A multi-task monitoring system based on message bus
Through the multi-collaborative task monitoring system based on the message bus, the problem of cross-platform and cross-means multi-collaborative task monitoring is solved, task monitoring and on-the-spot collaboration in complex scenarios are realized, the monitoring efficiency and computing speed are improved, and the task grouping status and confrontation relationship are dynamically analyzed.
Patent Information
- Application Number
- CN202211660726.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-12-23
AI Technical Summary
Existing task monitoring methods are difficult to adapt to the monitoring needs of multiple collaborative tasks that are triggered across means, platforms, and machines from machine to machine. In particular, they are not compatible with the monitoring of ad hoc collaborative tasks in complex scenarios, and there are problems of efficiency delay and computational delay.
A multi-collaborative task monitoring system based on a message bus is adopted. A streaming data-driven monitoring framework is constructed through external and internal message buses. Information access modules, monitoring management modules, information distribution modules and monitoring control modules are introduced to achieve unified monitoring of pre-planned tasks, on-the-spot task adjustments and on-the-spot collaborative tasks. A subscription distribution mechanism and Redis cache service are used for data push, and real-time calculation and monitoring object management are performed based on a thread pool.
It realizes cross-platform and cross-means multi-collaborative task monitoring, can adapt to task adjustments in real time, improves monitoring efficiency and computing speed, supports task monitoring and on-the-spot collaboration in complex scenarios, and dynamically analyzes task grouping status and confrontation relationships.
Smart Images

Figure CN115840680B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of auxiliary decision making, and in particular to a multi-cooperative task monitoring system based on a message bus. Background Art
[0002] Mission monitoring is the primary means by which existing command and control systems monitor current status, confrontational situations, and execution. By collecting real-time information about friendly and enemy forces, analyzing discrepancies between the current situation and mission expectations and the effectiveness of mission achievement, missions can be adjusted immediately to ensure ultimate goal achievement. Existing mission monitoring methods primarily focus on pre-planned mission monitoring. By parsing and reading planned mission information, a monitoring object is created to perform unified monitoring and calculations for all tasks. When tasks are adjusted, the entire monitoring object requires maintenance and management. When there are many tasks, the calculation efficiency of a single monitoring object is delayed, making it incompatible with the monitoring of ad hoc collaborative tasks.
[0003] As tasks gradually develop from single-unit to multi-unit to system, unified monitoring of pre-planned tasks and ad hoc collaborative tasks becomes an urgent need. Existing methods are difficult to adapt to the monitoring needs of multi-collaborative tasks that are triggered across means, platforms, and machines to machines, and are insufficient to support task monitoring and ad hoc collaboration in complex scenarios. Summary of the Invention
[0004] The main purpose of the present invention is to provide a multi-cooperative task monitoring system based on a message bus, aiming to solve the technical problem that the current task monitoring system is difficult to adapt to the multi-cooperative task monitoring needs of cross-means, cross-platform and machine-to-machine spontaneous triggering.
[0005] To achieve the above-mentioned object, the present invention provides a multi-task collaborative monitoring system based on a message bus, the system comprising an information connection module, a monitoring management module, an information distribution module, a monitoring control module, an external message bus, and an internal message bus; wherein:
[0006] The information connection module is used to connect the task information set to the external message bus;
[0007] The monitoring management module receives task information through an external message bus and creates a collaborative task monitoring object based on the received task information;
[0008] The information distribution module receives task information through the external message bus and transmits it to the internal message bus, and the internal message bus distributes it to each collaborative task monitoring object. The collaborative task monitoring object performs monitoring calculations based on streaming data in the thread pool according to the preset collaborative task monitoring model;
[0009] The monitoring and control module performs real-time monitoring and real-time control of tasks according to the monitoring calculation results.
[0010] Optionally, the task information includes pre-planned tasks, on-the-spot task adjustments, on-the-spot collaborative tasks, and real-time friendly-enemy information. The task information is specifically expressed as follows:
[0011] data i =f(domin i ,topicName i ), (i = pre-planned tasks, on-the-spot task adjustments, on-the-spot coordinated tasks, real-time enemy and friendly information)
[0012] Among them, f represents the corresponding data information according to the corresponding domain and subject, domin i Indicates the domain name of a certain type of data, topicName i Indicates the subject name of a certain type of data, data i Indicates the data results corresponding to a certain type of data.
[0013] Optionally, the information connection module connects the real-time data and non-real-time data of operators and nodes, and uses a message bus based on a subscription distribution mechanism to distribute pre-planned tasks, on-the-spot task adjustments, and on-the-spot collaborative tasks to the monitoring and management module, and distributes real-time friendly and enemy information to the distribution module.
[0014] Optionally, the monitoring management module is provided with a pre-planned task monitoring object management queue for managing pre-planned tasks and an ad hoc task monitoring object management queue for managing ad hoc tasks.
[0015] Optionally, upon receiving the task information, the monitoring management module performs the following steps:
[0016] Creation of pre-planned monitoring objects: Extracting task grouping information based on time-planned tasks and creating task monitoring objects;
[0017] Pre-planned monitoring object adjustment: extract task grouping information based on ad hoc task adjustments, and adjust or delete task monitoring objects;
[0018] Creation / adjustment of ad hoc monitoring objects: Extract task grouping information based on ad hoc collaborative task information and add / adjust task monitoring objects;
[0019] Self-adjustment of task monitoring objects: Based on the execution time of the task, the task monitoring objects that exceed the execution time are deleted.
[0020] Optionally, the monitoring management module adopts a unique identification method for the monitoring object based on the task number, and the expression of the identification method is specifically:
[0021] Obj i =Str(TaskID i,TaskGroupID i )
[0022] Among them, Obj i Indicates the unique identifier of the monitoring object corresponding to collaborative task i, TaskID i Indicates the unique identifier of the collaborative task, TaskGroupID i It indicates the unique identifier of the task group corresponding to collaborative task i, and Str represents the identifier string concatenation operation.
[0023] Optionally, when facing different monitoring objects, the information distribution module subscribes to channels related to data services on demand according to their respective monitoring needs. When the corresponding channel has data updates, the channel update message is published according to the Redis cache service subscription mechanism. The monitoring objects that subscribe to the relevant channels passively receive the corresponding updated data to realize asynchronous message push.
[0024] Optionally, the information distribution module automatically cleans up the data cache at regular intervals and sets different data preservation times for different data. The information distribution module builds several Redis cache services, and all monitored objects are connected to any node to subscribe to relevant channels and obtain corresponding updated data.
[0025] Optionally, the system also includes a monitoring and computing module, in which data and computing space are independently opened for each monitored object in the monitoring and computing module thread pool, and node status monitoring, execution process monitoring, confrontation relationship monitoring and grouping abnormality warning tasks are performed based on real-time data of the task corresponding to the current monitored object.
[0026] Optionally, the monitoring control module pushes the monitoring calculation results to a designated monitor for display, and based on the monitoring calculation results, performs on-the-spot adjustment of collaborative tasks or task grouping resource scheduling.
[0027] The present invention proposes a multi-collaborative task monitoring system based on a message bus. By introducing external and internal dual buses, a streaming multi-collaborative task monitoring framework based on real-time data is realized. It can adapt to the unified monitoring of pre-planned tasks and ad hoc collaborative tasks, and based on thread data and computing space design, the collaborative task monitoring process is abstracted as a monitoring object. Through thread driving, the node status, execution process, confrontation relationship and abnormal alarm of the collaborative task are dynamically analyzed and fully monitored, effectively solving the multi-collaborative task monitoring problem in complex task monitoring scenarios such as cross-platform and cross-means. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Schematic diagram of a multi-task monitoring system based on a message bus in the present invention.
[0029] Figure 2Schematic diagram of the collaborative task monitoring element model in the present invention.
[0030] Figure 3 This is a schematic diagram of the service node and partition settings in the present invention.
[0031] Figure 4 This is a schematic diagram of dual-queue monitoring object management in the present invention.
[0032] Figure 5 Schematic diagram of the monitoring object management process in the present invention.
[0033] Figure 6 Schematic diagram of monitoring object channel subscription and information release in the present invention.
[0034] Figure 7 This is a schematic diagram of the cache service cluster in the present invention.
[0035] Figure 8 This is a schematic diagram of collaborative task monitoring calculation in the present invention.
[0036] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0037] It should be understood that the specific embodiments described herein are only used to illustrate the invention and are not intended to limit the invention.
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the invention, not all of the embodiments. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0039] It should be noted that all directional indications in the embodiments of the invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0040] In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the invention.
[0041] Reference Figure 1 , Figure 1 This is a schematic diagram of a multi-cooperative task monitoring system based on a message bus according to an embodiment of the present invention.
[0042] This embodiment provides a multi-cooperative task monitoring system based on a message bus, which includes an information connection module, a monitoring management module, an information distribution module, a monitoring calculation module, a monitoring control module, an external message bus, and an internal message bus. The system first connects the external pre-planned task information, ad hoc task adjustment information, ad hoc collaborative task information, and real-time friendly-enemy information to the external message bus through the information connection module. Subsequently, the monitoring management module creates a collaborative task monitoring object based on the pre-planned task information and the ad hoc collaborative task information, and the information distribution module distributes the real-time friendly-enemy information to each collaborative task monitoring object through the internal message bus. Finally, the collaborative task monitoring object calculates and analyzes each monitoring element in real time based on streaming data in accordance with the collaborative task monitoring model in the thread pool, and pushes the information to the monitoring control module.
[0043] At the same time, the monitoring management module can dynamically maintain and manage the monitored objects based on the ad hoc task adjustment information and ad hoc collaborative task information.
[0044] In this embodiment, a collaborative task monitoring framework based on streaming data drive is constructed through internal and external message buses, which can create, delete and modify monitoring objects based on pre-planned data and real-time data, and at the same time create an independent operation space for the monitoring objects, perform real-time calculation and analysis based on the collaborative task monitoring element model, and perform real-time analysis on the status of task grouping, confrontation relationship, etc. Figure 2 shown.
[0045] Specifically, for the information access module:
[0046] The information access module needs to access both real-time and non-real-time data. It adopts a message bus based on a subscription distribution mechanism. It designs domains and topics for four types of data: pre-planned tasks, ad hoc task adjustments, ad hoc collaborative tasks, and real-time friendly-enemy information. These can be marked using formula (1). i can take values of the above four types of data.
[0047] data i =f(domin i ,topicName i ),(i=pre-planned tasks, on-the-spot task adjustments, on-the-spot coordinated tasks, real-time enemy and friendly information)(1)
[0048] Among them, f represents the corresponding data information according to the corresponding domain and subject, domin i Indicates the domain name of a certain type of data, topicName i Indicates the subject name of a certain type of data, data iIndicates the data result corresponding to a certain type of data. This embodiment is based on the Kakfa distributed publish-subscribe message system as the external message bus, with the collaborative task monitoring manager and real-time information distributor as the data i Consumers, marshaling nodes or operators as data i The producer creates an information push relationship through the information connector to achieve information connection. Considering that there are three types of data, namely, ad hoc task adjustment, ad hoc collaborative tasks, and real-time enemy and friend information, which are large in number and have high real-time requirements, multiple partitions are opened. Pre-task planning data is non-real-time information and one partition is opened. To ensure the real-time connection of external information, multiple Kafka service nodes are opened. The service node and partition settings are as follows: Figure 3 shown.
[0049] Specifically, for the monitoring management module:
[0050] The monitoring management module focuses on the maintenance and management of task monitoring objects based on three types of data: pre-planned tasks, ad hoc task adjustments, and ad hoc collaborative tasks. Pre-planned tasks have clear temporal relationships, and ad hoc adjustments have a large impact domain. Ad hoc collaborative tasks are highly sudden, have unclear temporal relationships, and have a small impact domain. In response to this feature, this embodiment proposes a monitoring object management mechanism based on multiple queues. By setting up planned task queues and ad hoc task queues, dynamic maintenance and management are performed separately to reduce the impact of frequent adjustments of ad hoc collaborative tasks on planned task monitoring objects. Figure 4 shown.
[0051] Monitoring object management mainly includes: 1) Creation of pre-planned monitoring objects: extracting task grouping information based on time-planned task data and creating task monitoring objects; 2) Adjustment of pre-planned monitoring objects: extracting task grouping information based on ad hoc task adjustment, adjusting or deleting task monitoring objects; 3) Creation / adjustment of ad hoc monitoring objects: extracting task grouping information based on ad hoc collaborative task information, adding and adjusting task monitoring objects; 4) Self-adjustment of task monitoring objects: deleting task monitoring objects that exceed the execution time based on the task execution time. The specific operation process is as follows: Figure 5 shown.
[0052] At the same time, in order to ensure the rapid association of each monitored object with collaborative tasks and task groups, a unique identification method for monitored objects based on task numbers is designed, as shown in formula (2).
[0053] Obj i =Str(TaskID i ,TaskGroupID i )(2)
[0054] Among them, Obj iIndicates the unique identifier of the monitoring object corresponding to collaborative task i, TaskID i Indicates the unique identifier of the collaborative task, TaskGroupID i It indicates the unique identifier of the task group corresponding to collaborative task i, and Str represents the identifier string concatenation operation.
[0055] Specifically, for the information distribution module:
[0056] The information distribution module is mainly aimed at real-time friendly and enemy data push, and requires lightweight, fast and asynchronous for all monitored objects. In view of this feature, this embodiment uses the Redis cache based on the subscription / publishing mechanism as the internal message bus to realize real-time active push to the task monitoring object. Different monitoring objects, according to their respective monitoring needs, subscribe to channels related to data services on demand. When the corresponding channel has data updates, the channel update message is published according to the Redis cache service subscription mechanism. All monitoring objects that subscribe to the relevant channels will passively receive the corresponding updated data, realizing asynchronous message push, such as Figure 6 shown.
[0057] Since the amount of real-time friendly and enemy information data is large, it is easy to cause the data service cache resources to be too large, resulting in application instability. Therefore, this embodiment adopts a combination of two approaches: active and scheduled automatic cleaning of data cache and Redis cache service cluster. Among them, the scheduled automatic cleaning of data cache sets different data preservation times for the above data, and the Redis cache service automatically clears the corresponding data according to the set data preservation time. For the Redis cache service cluster, this embodiment builds multiple Redis cache services, and all monitored objects can connect to any node to subscribe to related channels and obtain corresponding updated data. The cache service cluster is shown as follows: Figure 7 shown.
[0058] Specifically, for monitoring the compute module:
[0059] The monitoring and calculation module is based on the collaborative task monitoring element model and is driven by real-time data. It uses streaming analysis to calculate the node status, execution process, confrontation relationship, grouping abnormality alarm, and execution effect, and monitors the collaborative tasks in all dimensions. In combination with the actual monitoring of planned tasks and ad hoc tasks, this embodiment proposes a task monitoring and calculation strategy based on a thread pool. For each monitored object, an independent data and calculation space is opened, and analysis and calculation are performed based on the real-time data of the task corresponding to the current monitored object, such as Figure 8 shown.
[0060] Node status monitoring: Based on the unique node identifier in the task group, the real-time information received is extracted and matched to obtain the node status and determine whether the current node status is normal;
[0061] Execution process monitoring: According to the unique identifier of the node in the task group, the real-time information of the access is extracted and matched, and the time t when the current node reports the information is extracted. i . Get the start and end time of the task according to the task time information (t s ,t e ). Compare the current node reporting time with the task start and end time, and the execution process status T is shown in formula (3).
[0062]
[0063] Adversarial relationship monitoring: Based on real-time target information, compare our node data in the information with our node information in the task group. If the same nodes exist, it means that there is an adversarial relationship between the node and the task target.
[0064] Grouping abnormality alarm: 1) Determine the status of each node based on the extracted information of our side, and issue a status abnormality alarm if there is a fault; 2) Based on the execution process monitoring situation, issue an execution process abnormality alarm if there is a task executed early or delayed; 3) Based on the confrontation relationship monitoring situation, issue an alarm if there is no confrontation relationship between the task target and the node in the task grouping.
[0065] Specifically, for the monitoring and control module:
[0066] Based on the monitoring calculation results, the monitoring and control module makes on-the-fly adjustments to collaborative tasks or schedules task grouping resources. First, the analysis and calculation results of the monitored thread are pushed to the real-time monitor for display as needed. This embodiment uses a WebSocket push mechanism to distribute the calculation results to the designated task monitor. Simultaneously, the monitoring module pushes abnormality alerts to the real-time controller, which generates a response based on the abnormality type and sends it to the task grouping node via an external message bus.
[0067] For ease of understanding, this embodiment provides a specific example of a multi-task monitoring system based on a message bus, as follows:
[0068] A message bus-based multi-task monitoring system, applied to task management for an integrated project, effectively monitors pre-planned collaborative tasks and ad hoc machine-to-machine collaboration, fully supporting task adjustment and resource scheduling. The system employs a microservices architecture and physically consists of three components: a basic environment server, a business server, and a monitoring client. The relevant modules are implemented as follows:
[0069] Information Integration: Kafka (a distributed publish-subscribe messaging system) version 2.2.0 was selected. The Kafka server was deployed on the infrastructure server as the message integration bus, with multiple instances deployed based on service virtualization resources. Four data producers, including pre-mission planning, on-the-fly mission adjustment, on-the-fly collaborative missions, and real-time friendly-enemy information, were built on the SpringBoot (Java open source application framework) framework, integrating Kafka interfaces to implement information integration.
[0070] Information distribution: Redis 4.0 (remote dictionary service) is selected. The Redis server is deployed on the infrastructure server as a real-time distribution bus, and multiple instances are deployed based on server virtualization resources. The real-time information distributor integrates Jedis (a Java tool for operating Redis databases) based on the Spring Boot framework to implement the real-time information distributor function.
[0071] Monitoring and management: Based on the SpringBoot framework, implement the task management class TaskManager, create private variables task monitoring object dual lists pTaskList and sTaskList for monitoring object management, and integrate the Kafka interface to implement data consumption function;
[0072] Monitoring and Calculation: Based on the Spring Boot framework, we implement the TaskObj task monitoring object class and create a private variable objID as the unique identifier for the monitored object, using the "task ID + @ + task group ID" method. We also integrate and implement a real-time information callback processing function based on Jedis to receive information from the real-time information distributor. Furthermore, we inherit the Thread multithreading base class and create a calculation thread upon class instantiation. This performs streaming processing of real-time data based on the calculation methods specified in the monitoring factor model.
[0073] Monitoring and control: The real-time monitor is based on the React (Web development framework) front-end framework, and uses the Websocket (single TCP connection full-duplex communication protocol) interface to implement information interaction and interface display between monitoring result data and the real-time monitor; the real-time controller integrates the Kafka interface to implement the real-time control information delivery interface. Each monitoring object creates a real-time controller private member. After an abnormal alarm, the relevant information is called to the real-time controller interface to convert and generate control information for delivery.
[0074] The above are only preferred embodiments of the invention and are not intended to limit the patent scope of the invention. Any equivalent structure or equivalent process transformation made using the contents of the invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the invention.
Claims
1. A multi-task monitoring system based on a message bus, characterized in that: The system includes an information connection module, a monitoring management module, an information distribution module, a monitoring control module, an external message bus and an internal message bus; wherein: The information connection module is used to connect the task information set to the external message bus; The monitoring management module receives task information through an external message bus and creates a collaborative task monitoring object based on the received task information; The information distribution module receives task information through the external message bus and transmits it to the internal message bus, and the internal message bus distributes it to each collaborative task monitoring object. The collaborative task monitoring object performs monitoring calculations based on streaming data in the thread pool according to the preset collaborative task monitoring model; The monitoring and control module performs real-time monitoring and real-time control of tasks according to the monitoring calculation results; The mission information includes pre-planned missions, on-the-spot mission adjustments, on-the-spot collaborative missions, and real-time friendly-enemy information. The mission information is specifically expressed as follows: in, i Indicates pre-planned tasks, on-the-spot task adjustments, on-the-spot collaborative tasks, or real-time friendly and enemy information. Indicates querying the corresponding data information based on the corresponding domain and subject. Indicates the domain name of a certain type of data. Indicates the subject name of a certain type of data. Indicates the data results corresponding to a certain type of data.
2. The multi-task monitoring system based on the message bus according to claim 1, characterized in that: The information connection module connects the real-time data and non-real-time data of operators and nodes, and uses a message bus based on a subscription distribution mechanism to distribute pre-planned tasks, on-the-spot task adjustments, and on-the-spot collaborative tasks to the monitoring and management module, and distributes real-time friendly and enemy information to the distribution module.
3. The multi-task monitoring system based on the message bus according to claim 2, characterized in that: The monitoring management module is provided with a pre-planned task monitoring object management queue for managing pre-planned tasks and an ad hoc task monitoring object management queue for managing ad hoc tasks.
4. The multi-task monitoring system based on the message bus according to claim 3, characterized in that: When the monitoring management module receives the task information, it performs the following steps: Creation of pre-planned monitoring objects: Extracting task grouping information based on time-planned tasks and creating task monitoring objects; Pre-planned monitoring object adjustment: extract task grouping information based on ad hoc task adjustments, and adjust or delete task monitoring objects; Creation / adjustment of ad hoc monitoring objects: Extract task grouping information based on ad hoc collaborative task information and add / adjust task monitoring objects; Self-adjustment of task monitoring objects: Based on the execution time of the task, the task monitoring objects that exceed the execution time are deleted.
5. The multi-task monitoring system based on the message bus according to claim 4, characterized in that: The monitoring management module adopts a unique identification method for monitoring objects based on task numbers. The expression of the identification method is specifically: in, Represents collaborative tasks j The unique identifier of the corresponding monitored object, Represents collaborative tasks j The unique identifier of Represents collaborative tasks j The unique identifier of the corresponding task group, Indicates the identifier string concatenation operation.
6. The multi-task monitoring system based on the message bus according to claim 5, characterized in that: When facing different monitoring objects, the information distribution module subscribes to channels related to data services on demand according to their respective monitoring needs. When the corresponding channel has data updates, the channel update message is published according to the Redis cache service subscription mechanism. The monitoring objects that subscribe to the relevant channels passively receive the corresponding updated data to realize asynchronous message push.
7. The multi-task monitoring system based on the message bus according to claim 6, characterized in that: The information distribution module automatically cleans up the data cache at regular intervals and sets different data preservation times for different data. The information distribution module builds several Redis cache services. All monitored objects are connected to any node to subscribe to relevant channels and obtain corresponding updated data.
8. The multi-task monitoring system based on the message bus according to claim 1, characterized in that: The system also includes a monitoring and computing module, in which a thread pool independently opens data and computing space for each monitored object, and performs node status monitoring, execution process monitoring, confrontation relationship monitoring and grouping abnormality warning tasks based on the real-time data of the task corresponding to the current monitored object.
9. The multi-task monitoring system based on message bus according to claim 1, characterized in that: The monitoring control module pushes the monitoring calculation results to the designated monitor for display, and based on the monitoring calculation results, performs on-the-spot adjustment of the collaborative tasks or task grouping resource scheduling.
Citation Information
Patent Citations
Multitask process monitoring method and system in distributed system environment
CN102360310A
Method and device for monitoring message bus of power system
CN112865311A