Log synchronization system, method, storage medium and product

By using a multi-path log transmission mechanism between the primary monitoring unit and the secondary monitoring unit, the problem of low log synchronization stability is solved, enabling stable log transmission and multi-path backup during system failures, thereby improving the security of log synchronization and the efficiency of equipment maintenance.

CN116074334BActive Publication Date: 2025-12-12CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310009928.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2025-12-12
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

Existing log synchronization methods suffer from low stability, especially when any node in the specified transmission path fails, users cannot obtain log data in a timely manner.

Method used

After receiving logs from the monitoring unit, the logs are sent to a combination of target nodes within the set coverage area, including other slave monitoring units and/or the master monitoring unit, and the master monitoring unit sends the logs to at least one other master monitoring unit, ensuring that the logs are synchronized to the master monitoring unit through an uncertain path.

Benefits of technology

It improves the stability and security of log synchronization, ensuring that logs can be successfully transmitted to the main monitoring unit even in the event of a system failure, facilitating equipment debugging and troubleshooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074334B_ABST
    Figure CN116074334B_ABST
Patent Text Reader

Abstract

The application discloses a log synchronization system, method, storage medium and product. The system comprises at least two slave monitoring units, at least two master monitoring units and a grabbing unit for grabbing logs of a monitoring object. Any slave monitoring unit is configured to send logs to a target node combination in a set coverage range when receiving logs sent by any slave monitoring unit in the set coverage range or the corresponding grabbing unit, and the target node combination comprises other slave monitoring units and / or master monitoring units in the set coverage range. Any master monitoring unit is configured to send logs to at least one other master monitoring unit in the at least two master monitoring units when receiving logs sent by any slave monitoring unit in the set coverage range. The purpose of completing log synchronization through multiple uncertain paths is achieved, and the stability of log synchronization is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Internet of Things application, and in particular to a log synchronization system, method, storage medium and product. BACKGROUND

[0002] The Internet of Things refers to real-time collection of any object or process that needs to be monitored, linked and interacted through various information sensors, radio frequency identification technology, global positioning system, infrared sensors, laser scanners and other devices and technologies, and access to the Internet of Things through various possible networks to achieve ubiquitous connection between objects and objects, people and objects. The Internet of Things platform architecture can be roughly divided into four layers: terminal layer, access layer, platform layer and application layer. The access layer part mainly eliminates the differences between various devices, converts them into a general protocol to access the system, realizes data uploading and upper-layer application control device communication functions. In the access layer part of the existing Internet of Things system, a large number of devices and sensors are often involved, so a large number of control nodes are involved. Once a node or node group has a problem that needs to be checked, the system log needs to be obtained. In the daily production environment, the health of the device needs to be monitored and maintained through the log.

[0003] The prior art sends the log data to the corresponding device for user query through the specified transmission path after grabbing the log data. Once any node in the specified transmission path fails, the log data will be interrupted, and the user cannot obtain the log data in time. Therefore, the existing log synchronization method has the problem of low stability. SUMMARY

[0004] The present application provides a log synchronization system, method, storage medium and product to solve the problem of low stability of the existing log synchronization method.

[0005] According to one aspect of the present application, a log synchronization system is provided, characterized in that it comprises at least two slave monitoring units, at least two master monitoring units, and a grabbing unit for grabbing the log of a monitoring object, wherein:

[0006] Any of the slave monitoring units is configured to send the log to a target node combination in the set coverage range when receiving the log sent by the corresponding grabbing unit or any slave monitoring unit in the set coverage range, and the target node combination includes other slave monitoring units and / or master monitoring units in the set coverage range.

[0007] Any of the master monitoring units is configured to send the log to at least one other master monitoring unit in the at least two master monitoring units when receiving the log sent by any slave monitoring unit in the set coverage range.

[0008] According to another aspect of the present application, there is provided a log synchronization method applied to a slave monitoring unit of the log synchronization system according to any of the embodiments, comprising:

[0009] receiving the log sent by the slave monitoring unit within the set coverage range of the capturing unit or the set coverage range;

[0010] sending the log to a target node combination within the set coverage range, the target node combination comprising the slave monitoring unit and / or the master monitoring unit within the set coverage range.

[0011] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the log synchronization method according to any of the embodiments of the present application when executed.

[0012] According to another aspect of the present application, there is provided a computer program product comprising a computer program for implementing the log synchronization method according to any of the embodiments when executed by a processor.

[0013] The log synchronization system according to the embodiments of the present application achieves the purpose of synchronizing the log of the monitoring object captured by the capturing unit to the master monitoring unit through uncertain paths, and improves the stability of log synchronization, by sending the log to a target node combination within the set coverage range in the case that the slave monitoring unit receives the log sent by the capturing unit or any of the slave monitoring units within the set coverage range; and sending the log to at least one other master monitoring unit of the at least two master monitoring units in the case that any of the master monitoring units receives the log sent by any of the slave monitoring units within the set coverage range.

[0014] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0016] Figure 1 is a schematic diagram of a log synchronization system provided by the prior art;

[0017] Figure 2 is a schematic diagram of a log synchronization system provided by the embodiments of the present application;

[0018] Figure 3 is a workflow diagram of a slave monitoring unit according to an embodiment of the present application;

[0019] Figure 4 is a workflow diagram of a slave monitoring unit according to another embodiment of the present application;

[0020] Figure 5 is a workflow diagram of a master monitoring unit according to an embodiment of the present application;

[0021] Figure 6 is a flow diagram of a log storage method of a master monitoring unit according to an embodiment of the present application;

[0022] Figure 7 is a flow diagram of an alarm method of a master monitoring unit according to an embodiment of the present application;

[0023] Figure 8 is a log synchronization method according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] The acquisition, storage, use, processing, etc. of data in the technical solutions of the present application all comply with the relevant provisions of national laws and regulations.

[0027] Figure 1 is a schematic diagram of a log synchronization system of the prior art. As Figure 1As shown, the system includes at least one capture unit for capturing logs of monitored objects, at least one slave monitoring unit bound to the capture unit, and a master monitoring unit connected to the slave monitoring unit.

[0028] In the existing technology, after the capture unit 2 captures the logs of the monitored object 1, it sends the logs to the corresponding slave monitoring unit 3, which then sends them to the master monitoring unit 4. The caller 5 then queries the required logs through the master monitoring unit 4. It is understandable that if the communication link between any slave monitoring unit 3 and the master monitoring unit 4 fails, the slave monitoring unit 3 will be unable to send the logs obtained from the capture unit 2 to the master monitoring unit 4, resulting in log loss.

[0029] To address the aforementioned technical problems, this application proposes the following technical concept: Figure 2 As shown, after any monitoring unit 3 obtains a log, it sends it to other monitoring units 3 and / or the main monitoring unit 4 within the set coverage area to increase the path for the log to be synchronized to the main monitoring unit 4. In this way, even if a certain path fails, the synchronization of the log will not be affected.

[0030] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0031] Figure 2 This is a schematic diagram of a log synchronization system provided in an embodiment of the present invention. This embodiment is applicable to situations where logs of monitored objects captured by the capture unit are sent to the main monitoring unit for user querying via an uncertain path. Figure 2 As shown, the system includes at least two slave monitoring units 3, at least two master monitoring units 4, and a capture unit for capturing logs of the monitored objects (see attached diagram). Figure 2 (Not shown), wherein: any slave monitoring unit 3 is configured to send logs to a target node combination within the set coverage area upon receiving logs from a capture unit or any slave monitoring unit 3 within the set coverage area, the target node combination including other slave monitoring units 3 and / or master monitoring units 4 within the set coverage area; any master monitoring unit 4 is configured to send logs to at least one other master monitoring unit 4 among at least two master monitoring units 4 upon receiving logs from any slave monitoring unit 3 within the set coverage area.

[0032] The monitored object is the object whose logs are captured by the capture unit. This object can be a sensor, a controllable device, a gateway, etc. The gateway can be a Bluetooth gateway, a ZigBee gateway, etc.

[0033] The grabbing unit is configured to grab the monitoring data of the monitoring object in the form of a plug-in. That is, the grabbing unit is connected to the access layer of the Internet of Things in the form of a plug-in to obtain the log of the bound monitoring object. Optionally, one grabbing unit is bound to one monitoring object. In one embodiment, the grabbing unit is configured in the form of a plug-in file precompiled by a grabbing SDK or a custom grabbing protocol provided by a device manufacturer. The grabbing unit converts the grabbed log into a set data format to solve the problem of a large variety of communication protocols used by different monitoring objects and grabbing units for grabbing the logs of the monitoring objects in the Internet of Things system.

[0034] The slave monitoring unit 3, also referred to as a slave node, is configured to implement a corresponding function in the form of a plug-in. Specifically, for any slave monitoring unit 3 bound to a grabbing unit, when the log of the bound monitoring object grabbed by the corresponding grabbing unit 3 is received, the log is sent to other slave monitoring units 3 and master monitoring units 4 within a set coverage range. It can be understood that the more the number of slave monitoring units 3 and the more the distribution is dense, the more the paths for transmitting the log to the master monitoring unit 4, so that the probability of the log failing to be transmitted to the master monitoring unit 4 due to system failure is greatly reduced, and the security of log synchronization is improved.

[0035] In one embodiment, the system is further configured with at least two slave monitoring units not bound to a grabbing unit, which are used to increase the log transmission path and thereby increase the security of log synchronization.

[0036] The set coverage range is related to the communication mode and signal strength of the slave monitoring unit 3, which is not specifically limited in this embodiment.

[0037] The target node combination specifically includes other slave monitoring units 3 and / or master monitoring units 4 within the set coverage range that have the same communication protocol. For example, the slave monitoring unit A uses a Bluetooth communication protocol for data transmission, and thus sends the obtained log to other slave monitoring units and / or master monitoring units within the set coverage range that use the Bluetooth communication protocol for data transmission. The slave monitoring unit B uses wireless WiFi for data transmission, and thus sends the obtained log to other slave monitoring units and / or master monitoring units within the set coverage range that use the WiFi communication protocol for data transmission. In one embodiment, any two slave monitoring units, any two monitoring units, or any slave monitoring unit and any master monitoring unit communicate based on a handshake protocol.

[0038] The main monitoring unit 4 is also called a master node, which is configured with an input / output interface, and the calling party 5 can perform a log query operation through the input / output interface of any main monitoring unit. In an embodiment, the user can also perform log deletion, copying, moving, classification and other operations through the input / output interface.

[0039] In an embodiment, any slave monitoring unit or any main monitoring unit is configured with at least one communication protocol. It can be understood that if a slave monitoring unit is configured with a first communication protocol and a second communication protocol, it can send the obtained log to the target node combination within the first set coverage range through the first communication protocol; and send the obtained log to the target node combination within the second set coverage range through the second communication protocol. The first set coverage range is less than or equal to the communication range corresponding to the first communication protocol, and the second set coverage range is less than or equal to the communication range corresponding to the second communication protocol.

[0040] In an embodiment, the system further comprises a routing module arranged between the slave monitoring unit and the main monitoring unit, so that the slave monitoring unit sends the obtained log to other slave monitoring units and / or main monitoring units within the set coverage range through the routing module.

[0041] When the main monitoring unit receives the log sent by any slave monitoring unit within the set coverage range, it sends the log to at least one other main monitoring unit of the at least two main monitoring units, so that the log is synchronized from one main monitoring unit to other main monitoring units, so that the log is synchronized to all main monitoring units, so that the user can query the required log from any main monitoring unit.

[0042] It can be understood that when the slave monitoring unit sends the log to the main monitoring unit within the set coverage range, the purpose of synchronizing the log from the grabbing unit to the main monitoring unit is achieved. Since any slave monitoring unit will perform the operation of sending the log to the slave monitoring unit and / or the main monitoring unit within the set coverage range after receiving the log, the log grabbed by the grabbing unit may be transferred to the nearest main monitoring unit by the bound slave monitoring unit, or may be transferred to other at least one slave monitoring unit by the bound slave monitoring unit, and then be transferred to at least one main monitoring unit by at least one slave monitoring unit of the at least one slave monitoring unit, and then be transferred to other main monitoring units by the at least one main monitoring unit, so as to achieve the purpose of synchronizing the log grabbed by the grabbing unit to all main monitoring units. The technical effect of completing the log transfer through different transfer (synchronization) paths is achieved.

[0043] For any master monitoring unit and slave monitoring unit, a log set to expire is deleted based on a first-in first-out principle, wherein the log set to expire refers to a log exceeding a set time length. In an embodiment, the set time length corresponding to the master monitoring unit is different from the set time length corresponding to the slave monitoring unit, but the set time length corresponding to the master monitoring units is the same, and the set time length corresponding to the slave monitoring units is the same. In an embodiment, each slave monitoring unit is configured to correspond to a different set time length, and each master monitoring unit is configured to correspond to a different set time length. This embodiment is used to delete the log set to expire in the master monitoring unit and the slave monitoring unit, so that there is always space to store new logs corresponding to the master monitoring unit and the slave monitoring unit.

[0044] In an embodiment, the system further comprises a node management module configured to perform corresponding processing operations on the slave monitoring unit and / or the master monitoring unit according to the received processing instructions for the slave monitoring unit and / or the master monitoring unit. Specifically, the node management module performs corresponding processing on the slave monitoring unit according to the processing instruction when receiving the processing instruction for any slave monitoring unit, and performs corresponding processing operations on the corresponding master monitoring unit according to the processing instruction when receiving the processing instruction for any master monitoring unit. For example, the node management module is configured with an input interface connected with an input device and a display device, a user inputs a grabbing unit binding instruction for the slave monitoring unit A through the input device, the node management module outputs an information acquisition interface to the display device according to the grabbing unit binding instruction, the user inputs a grabbing unit identifier through the input device and clicks or touches a binding option, and the node management module binds the identifier (A) of the slave monitoring unit A with the grabbing unit identifier in response to the clicking or touching operation. Another example is that a user inputs a synchronization object binding instruction through an input device, a node management module outputs a synchronization object binding interface to a display device according to the synchronization object binding instruction, a user inputs an identifier of a target master monitoring unit and an identifier of at least one synchronization object (a master monitoring unit identifier) in the interface, and clicks or touches a binding option, and the node management module establishes a binding relationship between the master monitoring unit corresponding to the target master monitoring unit identifier and the at least one master monitoring unit corresponding to the at least one synchronization object identifier in response to the clicking or touching operation, so that the target monitoring unit sends the log to the at least one master monitoring unit after receiving the log.

[0045] In an embodiment, the master monitoring unit is configured with an input / output interface, and when detecting a set synchronization processing instruction, the master monitoring unit executes the set synchronization processing instruction and sends the set synchronization instruction to at least one target master monitoring unit, so that the at least one target master monitoring unit executes the set synchronization instruction. This embodiment realizes the effect of synchronizing the logs stored in other master monitoring units through the input / output interface of one master monitoring unit, and improves the flexibility of log processing.

[0046] The log synchronization system in the embodiment is independently operated, so that it does not affect the normal work of the crawling object and other devices in the Internet of Things, and makes the debugging and troubleshooting of the devices convenient and fast.

[0047] The log synchronization system provided in the embodiment comprises a monitoring unit, a crawling unit and a target node group.

[0048] Figure 3 The embodiment provided by the application is a flowchart of a log synchronization method corresponding to a slave monitoring unit, and the log synchronization method in the embodiment and the above-mentioned embodiments belong to the same inventive concept, which is a detailed scheme of the log synchronization method executed by the slave monitoring unit in the above-mentioned embodiments.

[0049] S110, in a case where the log corresponding to the crawling unit is received, the monitoring object identifier or the crawling unit identifier corresponding to the log is determined.

[0050] After the crawling unit collects the current log of the monitoring object, the current log is sent to the bound slave monitoring unit.

[0051] In one embodiment, the crawling unit is configured to correspond to one monitoring object and one slave monitoring unit, and in a case where the current log sent by the crawling unit is received, the monitoring object identifier corresponding to the current log is determined according to the crawling unit identifier and the pre-created binding relationship between the crawling unit identifier and the monitoring object.

[0052] In one embodiment, the crawling unit identifier is configured to comprise the identifier of the corresponding monitoring object, so that in a case where the current log sent by the crawling unit is received, the crawling unit identifier corresponding to the current log is determined.

[0053] S120, the log identifier is determined according to the monitoring object identifier or the crawling unit identifier, and the log identifier is added to the log.

[0054] After the monitoring object identifier is determined, the log identifier of the current log is determined according to the monitoring object identifier based on the set naming rule, and the log identifier is assigned to the current log.

[0055] In the case that the monitoring object identifier includes the capture unit identifier, after the capture unit identifier is determined, the log identifier of the current log is determined according to the capture unit identifier based on the set naming rule, and the log identifier is assigned to the current log.

[0056] In one embodiment, after the monitoring object identifier is determined, the log category corresponding to the monitoring object identifier is determined according to the correspondence between the monitoring object identifier and the pre-created monitoring object identifier and log category, the log identifier is determined according to the log category and the monitoring object identifier, and the log identifier is added to the log.

[0057] S130, store the log carrying the log identifier to the first set storage path, and send the log to the target node combination in the set coverage range.

[0058] The current log carrying the log identifier is stored to the first set storage path, and the log is sent to the target node combination in the set coverage range, so that the log carrying the log identifier is synchronized to other slave monitoring units and / or master monitoring units in the set coverage range.

[0059] In one embodiment, the slave monitoring unit determines whether the current log sent by the capture unit contains the set warning information after receiving the current log, if yes, adds the warning identifier to the current log identifier, so that the corresponding master monitoring unit performs the corresponding warning operation according to the warning identifier, and prompts the user that the corresponding monitoring object has a fault; if not, no processing is required.

[0060] In one embodiment, the slave monitoring unit determines whether the current log sent by the capture unit contains the set warning information after receiving the current log, if yes, adds the warning identifier to the current log, so that the corresponding master monitoring unit performs the corresponding warning operation according to the warning identifier, and prompts the user that the corresponding monitoring object has a fault; if not, no processing is required.

[0061] The embodiment of the application improves the stability of log data synchronization by cooperating the capture unit with the slave monitoring unit to flow the captured log of the monitoring object through an uncertain slave monitoring unit to an uncertain master monitoring unit.

[0062] Figure 4 The embodiment of the application provides a flowchart of a log synchronization method of a slave monitoring unit, the embodiment and the log synchronization method in the above-mentioned embodiment belong to the same inventive concept, and is a refinement scheme of the log synchronization method executed by the slave monitoring unit in the above-mentioned embodiment. The method comprises:

[0063] S210, in the case of receiving the log sent by any slave monitoring unit in the set coverage range, determining the log identification of the log, and determining whether the log with the log identification has been received, if not, performing S120, and if yes, performing S130.

[0064] S220, storing the log to the first set storage path, and sending the log to the target node combination in the set coverage range.

[0065] S230, deleting the log.

[0066] For any slave monitoring unit, in the case of receiving the log sent by any slave monitoring unit in the set coverage range, the log is temporarily stored in the cache, and the log identification of the log is determined. The log identification is compared with the received log identification record to determine whether the log with the log identification has been received. If the log with the log identification has been received, it indicates that the log with the log identification has been transferred from the slave monitoring unit, and the log is directly deleted from the cache without being transferred again. If the log with the log identification has not been received, the log is stored to the first set storage path, and the surrounding target node combination is sent the log.

[0067] Each slave monitoring unit is configured with a log directory. The slave monitoring unit adds the log identification of the log to the log directory while storing the log to the first set storage path. In an embodiment, the time of storing the log to the first set storage path is also added to the log directory as the time of log transfer to the slave monitoring unit while adding the log identification of the log to the log directory, so as to trace the log transfer path.

[0068] It can be understood that any log is configured to be transferred only once by each slave monitoring unit. This configuration can avoid repeated transfer of the log, i.e. invalid transfer, improve the efficiency of the first transfer of the log, i.e. improve the efficiency of the effective transfer of the log, and thus improve the speed of the log being transferred (synchronized) to the master monitoring unit.

[0069] The embodiment of the application avoids repeated transfer of the log by determining whether the same log with the same log identification has been received after receiving the log by the slave monitoring unit, and deleting the received log if yes, and improves the efficiency of the first transfer of the log and the speed of the log being synchronized to the master monitoring unit.

[0070] Figure 5 is the working flowchart of the master monitoring unit provided by the embodiment of the application. The embodiment and the log synchronization method in the above-mentioned embodiment belong to the same inventive concept, and is a refinement of the working flow of the master monitoring unit in the above-mentioned embodiment. The method comprises:

[0071] S310, in the case of receiving the log, determining the log identification of the log, and determining whether the log with the log identification has been received; if not, performing S320, and if yes, performing S330.

[0072] S320, storing the log to the second set storage path, and sending the log to at least one other master monitoring unit of the at least two master monitoring units.

[0073] S330, deleting the log.

[0074] For any master monitoring unit, in the case of receiving the log, determining the log identification of the log received by the master monitoring unit, traversing the log receiving record, determining whether the log with the log identification has been received, if not, adding the log to the second set storage path, and sending the log to at least one other master monitoring unit of the at least two master monitoring units; that is, if the master monitoring unit has not received the log, the log is saved and the log is transferred to other master monitoring units, and if the master monitoring unit has received the log, it means that the transfer of the log is completed, and thus the log is directly deleted from the cache.

[0075] It can be understood that any log is configured to be transferred only once by each master monitoring unit. This configuration can avoid repeated transfer of the log in the master monitoring unit, i.e. invalid transfer, and improve the efficiency of the first transfer of the log in the master monitoring unit.

[0076] For any master monitoring unit, in the case of receiving the log, determining the log identification of the log received by the master monitoring unit, traversing the log receiving record, determining whether the log with the log identification has been received, if not, adding the log to the second set storage path, and sending the log to at least one other master monitoring unit of the at least two master monitoring units; that is, if the master monitoring unit has not received the log, the log is saved and the log is transferred to other master monitoring units, and if the master monitoring unit has received the log, it means that the transfer of the log is completed, and thus the log is directly deleted from the cache.

[0077] Figure 6 It is a log storage method flowchart of a master monitoring unit according to another embodiment of the application, and the log synchronization method in the above embodiment belongs to the same inventive concept, which is a refinement of the log storage process performed by the master monitoring unit in the foregoing embodiment. The method comprises:

[0078] S410, in the case of receiving the log, determining the log identification of the log.

[0079] S420, determining the log category corresponding to the log according to the log identification.

[0080] S430, storing the log to the storage location corresponding to the corresponding log category.

[0081] The log categories are configured to correspond to different monitoring objects or different categories of monitoring objects, for example, logs corresponding to different Bluetooth gateways are taken as one category of logs, and logs corresponding to different sensors are taken as one category of logs.

[0082] In this embodiment, the storage space corresponding to the second set storage position is divided into at least two storage positions, and each storage position corresponds to one log category. When a log is received, the log identifier of the log is determined, the log category corresponding to the log is determined according to the log identifier, and then the log is stored in the storage position corresponding to the log category.

[0083] The embodiment of the present application improves the management efficiency of logs, for example, the efficiency of log query and search.

[0084] Figure 7 is a flowchart of an alarm method of the main monitoring unit provided by another embodiment of the present application. This embodiment and the log synchronization method in the above-mentioned embodiments belong to the same inventive concept. The alarm method is based on the working process of the main monitoring unit in the above-mentioned embodiments and adds an alarm operation. The alarm method comprises the following steps:

[0085] S510, in the case of receiving a log, determining the log identifier of the log.

[0086] S520, in the case that it is determined that no log corresponding to the log identifier has been received and the log identifier contains set alarm information, outputting an alarm signal.

[0087] If no log corresponding to the log identifier has been received, it means that the main monitoring unit receives the log for the first time. If the log identifier contains set alarm information, it means that a device fault occurs in the corresponding monitoring object. When the log identifier contains set alarm information and is received for the first time by any main monitoring unit, the any main monitoring unit outputs an alarm signal to prompt the user to check the working state of the corresponding monitoring object in time, and at the same time, the situation that the main monitoring unit repeatedly outputs the alarm signal of the same log is avoided.

[0088] In one embodiment, whether to output an alarm signal is determined by the following steps, comprising:

[0089] Step a1, in the case that the log identifier contains set alarm information, determining the direct source of the log.

[0090] Step a2, if the direct source is a main monitoring unit, ignoring the alarm information.

[0091] Step a3, if the direct source is a slave monitoring unit, outputting an alarm signal.

[0092] The direct source is the sender of the log received by the current master monitoring unit. If the log received by the current master monitoring unit is from a slave monitoring unit, the direct source of the log is the slave monitoring unit, and if the log received by the current master monitoring unit is from another master monitoring unit, the direct source of the log is the master monitoring unit.

[0093] If the direct source is a master monitoring unit, it indicates that the current master monitoring unit is not the first master monitoring unit on the log flow path, and the alarm information is directly ignored. If the direct source is a slave monitoring unit, it indicates that the current master monitoring unit is the first master monitoring unit on the log flow path, and an alarm signal is output.

[0094] The technical scheme provided by the embodiment of the application includes setting alarm information in the log identification, and when the alarm information is received by any master monitoring unit for the first time, the master monitoring unit outputs an alarm signal to prompt a user to check the working state of the corresponding monitoring object in time, and the repeated output of the alarm signal of the same log by the master monitoring unit is avoided.

[0095] Figure 8 The log synchronization method provided by the embodiment of the application belongs to the same inventive concept as the log synchronization method in the above embodiment, and is applied to the slave monitoring unit in the above embodiment, as shown in Figure 1 and Figure 8 The method comprises the following steps.

[0096] S610, receiving the log sent by the slave monitoring unit in the set coverage range or the grabbing unit.

[0097] S620, sending the log to a target node combination in the set coverage range, and the target node combination comprises the slave monitoring unit and / or the master monitoring unit in the set coverage range.

[0098] The grabbing unit is configured as a plug-in for monitoring data of the grabbing unit. That is, the grabbing unit is connected to the access layer of the Internet of Things in the form of a plug-in to obtain the log of the bound monitoring object. Optionally, one grabbing unit is bound to one monitoring object. In an embodiment, the grabbing unit is configured as a grabbing SDK provided by a device manufacturer or a self-defined grabbing protocol precompiled into a plug-in file. The grabbing unit converts the grabbed log into a set data format to solve the problem of a large variety of communication protocols used by different monitoring objects and grabbing units for grabbing the logs of the monitoring objects in the Internet of Things system.

[0099] The slave monitoring unit 3, also referred to as a slave node, is configured to implement the corresponding function in the form of a plug-in. Specifically, for any slave monitoring unit that is bound with a grabbing unit, in the case of receiving a log of a bound monitoring object grabbed by the corresponding grabbing unit, the log is sent to other slave monitoring units and the master monitoring unit within the set coverage. It can be understood that the more the number of slave monitoring units and the more the distribution is dense, the more the paths for transmitting the log to the master monitoring unit, so that the probability of the log being unable to be transmitted to the master monitoring unit due to system failure is greatly reduced, thereby improving the security of log synchronization.

[0100] In one embodiment, the log synchronization system further comprises at least two slave monitoring units that are not bound with grabbing units, which are used to increase the log transmission path, thereby increasing the security of log synchronization.

[0101] The set coverage is related to the communication mode of the slave monitoring unit and the signal strength, which is not specifically limited in this embodiment.

[0102] The master monitoring unit, also referred to as a master node, is configured with an input / output interface, through which a user can at least perform a log query operation. In one embodiment, the user can also perform log deletion, copying, moving, categorizing, and the like through the input / output interface.

[0103] The target node combination specifically includes other slave monitoring units and / or the master monitoring unit within the set coverage that have the same communication protocol. For example, the slave monitoring unit A uses a Bluetooth communication protocol for data transmission, so it sends the acquired log to other slave monitoring units and / or the master monitoring unit within the set coverage that use the Bluetooth communication protocol for data transmission. The slave monitoring unit B uses wireless WiFi for data transmission, so it sends the acquired log to other slave monitoring units and / or the master monitoring unit within the set coverage that use the WiFi communication protocol for data transmission.

[0104] In one embodiment, any slave monitoring unit or any master monitoring unit is configured with at least one communication protocol. It can be understood that if a slave monitoring unit is configured with a first communication protocol and a second communication protocol, it can send the acquired log to the target node combination within the first set coverage through the first communication protocol, and send the acquired log to the target node combination within the second set coverage through the second communication protocol. The first set coverage is less than or equal to the communication range corresponding to the first communication protocol, and the second set coverage is less than or equal to the communication range corresponding to the second communication protocol.

[0105] It can be understood that when the log is sent from the slave monitoring unit to the master monitoring unit within the set coverage range, the purpose of synchronizing the log from the crawling unit to the master monitoring unit is achieved. Since any slave monitoring unit will perform the operation of sending the log to the slave monitoring units and / or the master monitoring units within the set coverage range after receiving the log, the log captured by the crawling unit may be transferred to the nearest master monitoring unit by the bound slave monitoring unit, or may be transferred to at least one slave monitoring unit by the bound slave monitoring unit, and then transferred to at least one master monitoring unit by at least one of the at least one slave monitoring unit, and then transferred to other master monitoring units by the at least one master monitoring unit, so as to achieve the purpose of synchronizing the log captured by the crawling unit to all master monitoring units. The technical effect of completing the log transfer through different transfer (synchronization) paths is achieved.

[0106] In the case where the master monitoring unit receives the log sent by any slave monitoring unit within the set coverage range, the master monitoring unit sends the log to at least one other master monitoring unit of the at least two master monitoring units, so as to synchronize the log from one master monitoring unit to other master monitoring units, so as to synchronize the log to all master monitoring units, so that the user can query the required log from any master monitoring unit.

[0107] For any master monitoring unit and slave monitoring unit, the set expired log is deleted based on the first-in first-out principle, wherein the set expired log refers to the log exceeding the set time length. In an embodiment, the set time length corresponding to the master monitoring unit is different from the set time length corresponding to the slave monitoring unit, but the set time length corresponding to the master monitoring units is the same, and the set time length corresponding to the slave monitoring units is the same. In an embodiment, each slave monitoring unit is configured to correspond to different set time lengths, and each master monitoring unit is configured to correspond to different set time lengths. This embodiment is used to delete the set expired log in the master monitoring unit and the slave monitoring unit, so as to always have space to store new logs corresponding to the master monitoring unit and the slave monitoring unit.

[0108] The log synchronization system in the embodiment runs independently, so it does not affect the normal work of the crawling object and other devices in the Internet of Things, so that the debugging and troubleshooting of each device become convenient and fast.

[0109] The log synchronization method provided by the embodiment of the present application realizes the purpose that the log of the monitoring object grabbed by the grabbing unit is synchronized to the master monitoring unit through uncertain paths, and improves the security of log synchronization.

[0110] In some embodiments, the log synchronization method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device via the ROM and / or the communication unit. When the computer program is loaded onto the RAM and executed by the processor 11, one or more steps of the log synchronization method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform the log synchronization method by any other suitable means, such as by means of firmware.

[0111] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on chips (SoCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0112] Computer programs used to implement the processes of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a machine or entirely on a remote machine or server.

[0113] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0115] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0116] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0117] The embodiment of the present application further provides a computer program product, which comprises a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and the at least one processor executes the computer program to realize the technical solution of the task scheduling method in the above embodiment.

[0118] It should be understood that the steps shown above can be reordered, added, or deleted using various forms of flow. For example, each step described in the present application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present application can be achieved, which is not limited herein.

[0119] The above detailed description does not constitute a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A log synchronization system, characterized by, The application comprises: at least two slave monitoring units, at least two master monitoring units, and a grabbing unit for grabbing logs of a monitoring object, the grabbing unit being bound to the slave monitoring unit and being configured as a plug-in for grabbing monitoring data of the monitoring object, wherein: any slave monitoring unit is configured to send the log to a target node combination in the set coverage range upon receiving the log sent by any slave monitoring unit in the set coverage range or the corresponding grabbing unit, the target node combination comprising other slave monitoring units and master monitoring units in the set coverage range; any master monitoring unit is configured to send the log to at least one other master monitoring unit in the at least two master monitoring units upon receiving the log sent by any slave monitoring unit in the set coverage range, send the log to at least one other master monitoring unit in the at least two master monitoring units upon receiving the log sent by any master monitoring unit and the log being the first received, and determine a log identifier of the log; output an alarm signal upon determining that no log corresponding to the log identifier has been received and the log identifier contains set alarm information; wherein, upon receiving the log sent by any slave monitoring unit in the set coverage range, the log is sent to a target node combination in the set coverage range, comprising: upon receiving the log sent by any slave monitoring unit in the set coverage range, determining a log identifier of the log and determining whether a log corresponding to the log identifier has been received; if not, storing the log to a first set storage path and sending the log to the target node combination in the set coverage range; if yes, deleting the log.

2. The system of claim 1, wherein, upon receiving the log sent by the corresponding grabbing unit, the log is sent to the target node combination in the set coverage range, comprising: upon receiving the log sent by the corresponding grabbing unit, determining a monitoring object identifier or a grabbing unit identifier corresponding to the log; determining a log identifier according to the monitoring object identifier or the grabbing unit identifier, and assigning the log identifier to the log; storing the log carrying the log identifier to a first set storage path, and sending the log to the target node combination in the set coverage range.

3. The system of claim 2, wherein, adding the log identifier to the log at the same time or after, further comprising: determining whether the log contains set early warning information; if yes, adding an early warning identifier to the log.

4. The system of claim 1, wherein, The slave monitoring unit is further configured to: periodically clean up expired logs based on a first-in-first-out rule, wherein an expired log is a log exceeding a set time length.

5. The system of claim 1, wherein, upon receiving the log, the log is sent to at least one other master monitoring unit in the at least two master monitoring units, comprising: upon receiving the log, determining a log identifier of the log and determining whether a log corresponding to the log identifier has been received; If not, the log is stored to a second set storage path and sent to at least one other master monitoring unit of the at least two master monitoring units; If yes, the log is deleted.

6. The system of claim 1, wherein, The target node combination includes slave monitoring units and master monitoring units in the set coverage range and using the same communication protocol.

7. The system of claim 1, wherein, The master monitoring unit is further configured to: Upon receiving the log, determine a log identifier of the log; According to the log identifier, determine a log category corresponding to the log; Store the log to a storage location corresponding to the log category.

8. The system of claim 1, wherein, The outputting of the alarm signal in the case that the log identifier contains set alarm information includes: Upon receiving the log, determine a log identifier of the log; If the direct source is a master monitoring unit, ignore the alarm information; If the direct source is a slave monitoring unit, output an alarm signal.

9. The system of claim 1, wherein, The master monitoring unit is further configured to: Upon detecting a set synchronization processing instruction, execute the set synchronization processing instruction and send the set synchronization processing instruction to at least one target master monitoring unit, so that the at least one target master monitoring unit executes the set synchronization processing instruction.

10. The system of claim 1, wherein, Further comprising: A node management module configured to execute corresponding processing operations on the slave monitoring units and / or master monitoring units according to received processing instructions for the slave monitoring units and / or master monitoring units.

11. A method of log synchronization, the method comprising: The slave monitoring unit applied to the log synchronization system of any one of claims 1-10, comprising: Receive the log sent by the grabbing unit or a slave monitoring unit in the set coverage range; Send the log to a target node combination in the set coverage range, the target node combination including slave monitoring units and master monitoring units in the set coverage range; Upon receiving the log sent by any slave monitoring unit in the set coverage range, send the log to the target node combination in the set coverage range, including: Upon receiving the log sent by any slave monitoring unit in the set coverage range, determine a log identifier of the log and determine whether a log with the log identifier has been received; If not, store the log to a first set storage path and send the log to the target node combination in the set coverage range; If yes, delete the log.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a processor to execute the log synchronization method of claim 11.

13. A computer program product, characterised in that, The computer program product includes a computer program for implementing the log synchronization method of claim 11 when executed by a processor. The computer program product includes a computer program for implementing the log synchronization method of claim 11 when executed by a processor.

Citation Information

Patent Citations

  • Active multi-path network redundancy with performance monitoring

    CN106130933A

  • CDN monitoring system and method

    CN107707414A

  • Transformer substation monitoring method and device, computer equipment and storage medium

    CN114422408A