Distributed task monitoring method and system based on state transition and directional pushing

CN122554428APending Publication Date: 2026-08-11西安精雕软件科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供一种基于状态迁移与定向推送的分布式任务监控方法及系统,解决列表不同步、无效推送多等问题,实现列表即时一致与推送精准化

Benefits of technology

本申请所公开的一种基于状态迁移与定向推送的分布式任务监控方法,通过实时维护客户端的分组归属信息,并在任务状态迁移时分别向原状态分组和新状态分组推送移出与移入通知,使得订阅不同状态标签页的客户端能够仅凭接收到的通知即可同步完成本地任务列表中对应任务的移除与新增,整个过程无需依赖轮询或全量刷新,从而实现了任务列表与服务器真实状态的即时一致性。同时,在任务进度更新时,仅向执行中状态分组定向推送进度消息,避免了向所有客户端进行全局广播,使得只有当前正在查看执行中标签页的客户端才会收到进度信息,其他分组客户端不会收到无关消息,从而显著减少了无效推送对带宽和客户端资源的占用。上述技术特征协同作用,在保障列表实时同步的前提下,实现了推送消息的精准匹配与系统资源的节约。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554428A_ABST
    Figure CN122554428A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of Internet technology and relates to a distributed task monitoring method and system based on state transition and targeted push. It includes receiving subscription requests initiated by clients, adding clients to communication groups associated with the task status corresponding to a tab, and maintaining the group affiliation information of each client in real time; based on the group affiliation information, when a task status transitions from its original state to a new state, locating the original state group and the new state group, pushing a removal notification to the original state group and a move-in notification to the new state group; when a task in the execution state experiences a progress update, locating the execution state group and pushing a progress update message only to that group; and using the removal notification, move-in notification, and progress update message as outputs to trigger clients to perform removal, addition, and progress refresh operations on the corresponding tasks in their local task lists, respectively. This solves problems such as list synchronization issues and numerous invalid pushes, achieving real-time list consistency and accurate push notifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet technology, specifically relating to a distributed task monitoring method and system based on state transition and targeted push. Background Technology

[0002] In fields such as parts machining, high-precision toolpath calculation tasks are time-consuming. Adopting a distributed architecture that separates planning and calculation, and facilitates multi-node collaboration, users need to monitor the status and calculation progress of submitted tasks in real time to schedule subsequent design work or troubleshoot anomalies. Monitoring interfaces for such distributed computing systems often use an interactive method of "dividing tasks into tabs based on their status, with each tab displaying a list of tasks in that status." Users need to switch tabs to view tasks in different statuses, and the list must accurately reflect the actual task status and provide real-time updates on task progress. Existing technologies have the following problems: 1. Poor list consistency: When a task status is migrated, notifications are only pushed to the new status group. The original status tab list still retains the tasks that have been migrated out, which requires polling or a full refresh to correct, resulting in poor real-time performance. 2. Coarse push granularity: Using global broadcast to push all status and progress updates results in irrelevant tabs receiving a large number of invalid messages, wasting bandwidth and increasing the burden on the client. 3. Progress and tab mismatch: Progress updates are broadcast to all groups, and the user demand to view only the execution status tab is not accurately matched; 4. Limitations of single-channel notification: Only push notifications for task move-in are sent; the original status tab list cannot be synchronized solely through push notifications, increasing system complexity.

[0003] In summary, existing methods cannot simultaneously ensure list consistency and push accuracy, and there is an urgent need for a distributed task monitoring method that is suitable for this interaction scenario and is accurate and efficient. Summary of the Invention

[0004] The purpose of this invention is to provide a distributed task monitoring method and system based on state transition and targeted push, which solves problems such as list synchronization issues and numerous invalid pushes, and achieves real-time list consistency and accurate pushes.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a distributed task monitoring method based on state transition and targeted push, comprising: The system receives subscription requests initiated by clients based on the currently selected tab, adds the clients to the communication group associated with the task status corresponding to the tab, and maintains the group affiliation information of each client in real time. Based on the group affiliation information, when it is detected that the task status has migrated from the original status to the new status, the original status group and the new status group are located, and a move-out notification carrying the task identifier is pushed to the original status group, and a move-in notification carrying the task identifier and task summary is pushed to the new status group. Based on the group affiliation information, when a progress update is detected for a task in the execution state, the group in the execution state is located, and a progress update message carrying the task identifier and the current progress value is pushed only to that group. The removal notification, removal notification, and progress update message are output as outputs, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list, respectively.

[0006] Optionally, when pushing the removal notification to the original state group and the removal notification to the new state group, the timing order of removal first and removal later is followed, so that the client can remove the task from the original state list and then add it to the new state list.

[0007] Optionally, the removal notification includes at least a unique task identifier; the removal notification includes at least a unique task identifier and task summary data for display in the client list, wherein the task summary data includes at least one of the following: task name, submission time, and current status.

[0008] Optionally, the method further includes: when the server detects an anomaly in the long connection with the client, in response to the full query request initiated by the client after a preset anomaly duration, returning a complete list of tasks corresponding to the client's currently subscribed group to the client, so as to enable the client to perform a fallback update of the local list.

[0009] Optionally, when pushing out a notification, moving in a notification, or progress update message, a structured log is recorded synchronously. The structured log includes at least a task identifier, a target group identifier, a push timestamp, and a notification type. The structured log is used for system operation monitoring and anomaly backtracking.

[0010] Optionally, when a task is in the execution state and the progress value has not changed, no progress update message is pushed; a progress update message is only pushed to the execution state group when the progress value has changed compared to the last push.

[0011] Optionally, the communication packets are predefined by the server according to the state types supported by the distributed task, and the state types include at least the waiting state, the executing state, the completed state, and the abnormal state; the packets subscribed to by the client change dynamically as its tabs are switched, and each client subscribes to only one communication packet at a time.

[0012] In a second aspect, the present invention provides a distributed task monitoring system based on state transition and targeted push, comprising: The subscription management module is used to receive subscription requests initiated by clients based on the currently selected tab, add the clients to the communication group associated with the task status corresponding to the tab, and maintain the group affiliation information of each client in real time. The state transition push module is used to locate the original state group and the new state group when the task state is detected to have migrated from the original state to the new state based on the group affiliation information. It pushes a move-out notification carrying the task identifier to the original state group and a move-in notification carrying the task identifier and task summary to the new state group. The progress push module is used to locate the group in the execution state when a progress update is detected in a task in the execution state, based on the group affiliation information, and push a progress update message carrying the task identifier and the current progress value only to that group. The notification output module is used to output the removal notification, the removal notification, and the progress update message, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list.

[0013] In a third aspect, the present invention provides an electronic device, including a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the distributed task monitoring method based on state transition and targeted push as described in any one of the preceding claims.

[0014] In a fourth aspect, the present invention provides a computer-readable storage medium storing at least one instruction, wherein the at least one instruction, when executed by a processor, implements the distributed task monitoring method based on state transition and targeted push as described in any one of the preceding claims.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This application discloses a distributed task monitoring method based on state transition and targeted push notifications. By maintaining the group affiliation information of clients in real time and pushing removal and addition notifications to both the original and new state groups during task state transitions, clients subscribed to different state tabs can synchronously remove and add corresponding tasks from their local task lists based solely on the received notifications. The entire process does not rely on polling or full refreshes, thus achieving real-time consistency between the task list and the server's actual state. Simultaneously, when task progress is updated, progress messages are only pushed to the "Executing" state group, avoiding global broadcasts to all clients. This ensures that only clients currently viewing the "Executing" tab receive progress information, while other groups do not receive irrelevant messages, significantly reducing the bandwidth and client resource consumption caused by invalid push notifications. These technical features work synergistically to achieve accurate matching of push messages and conserve system resources while ensuring real-time list synchronization.

[0016] Furthermore, the timing design adopted in this application effectively avoids visual confusion caused by the same task being displayed repeatedly in the client list for a short period of time or the simultaneous existence of the old and new lists due to improper operation order. At the same time, it prevents data state conflicts that may be caused by adding and removing items, thereby ensuring the logical rigor and display accuracy of the client list synchronization process.

[0017] Furthermore, the unique task identifier in the removal notification allows the client to accurately locate and remove the corresponding task from its local list, preventing accidental deletion or omission. The unique task identifier and task summary data (such as task name, submission time, and current status) in the moving-in notification allow the client to directly add and fully display the task information in the target list without needing to initiate an additional query to the server after receiving the notification. This design reduces the number of interactions between the client and server, lowers network overhead, and improves the response speed of task list updates and the user experience.

[0018] Furthermore, when a persistent connection failure causes push synchronization to be interrupted, a fallback update mechanism is established through the client's proactive full query and the server's complete list return. This mechanism ensures that in abnormal scenarios such as network fluctuations or connection failures, the client can promptly restore consistency with the server's task status, avoiding delays or errors in local list information due to missing push notifications. Simultaneously, the conditional judgment of the preset duration of the exception effectively filters out momentary fluctuations, preventing frequent full queries from placing an additional burden on the system, thus balancing system robustness and resource utilization efficiency. Attached Figure Description

[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating Embodiment 1 of the present invention; Figure 3 This is a schematic diagram illustrating the correspondence between tabs and group subscriptions in an embodiment of the present invention; Figure 4 This is a timing diagram for dual-channel push of task removal / removal according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating that the progress is only pushed to the execution group in this embodiment of the invention; Figure 6 This is a system structure block diagram according to an embodiment of the present invention; Figure 7 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0020] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.

[0021] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.

[0022] See Figure 1 This application discloses a distributed task monitoring method based on state transition and targeted push, including: The system receives subscription requests initiated by clients based on the currently selected tab, adds the clients to the communication group associated with the task status corresponding to the tab, and maintains the group affiliation information of each client in real time. Based on the group affiliation information, when it is detected that the task status has migrated from the original status to the new status, the original status group and the new status group are located, and a move-out notification carrying the task identifier is pushed to the original status group, and a move-in notification carrying the task identifier and task summary is pushed to the new status group. Based on the group affiliation information, when a progress update is detected for a task in the execution state, the group in the execution state is located, and a progress update message carrying the task identifier and the current progress value is pushed only to that group. The removal notification, removal notification, and progress update message are output as outputs, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list, respectively.

[0023] This application's dual-channel notification system enables the original and new status tab clients to synchronize lists solely through push notifications, eliminating the need for polling; progress is pushed only to the execution status group, matching user interaction needs and reducing bandwidth consumption and client burden; the push targets and data specifications for various notifications are clearly defined, simplifying system implementation and subsequent maintenance; in addition, status groups can be expanded as needed, while the core push rules remain unchanged, adapting to various distributed task monitoring scenarios.

[0024] In some embodiments, when pushing removal notifications to the original state group and moving-in notifications to the new state group, a sequence of removal first, then moving-in is followed. This ensures that the client removes tasks from the original state list before adding them to the new state list. This sequence design effectively avoids visual confusion caused by the same task being displayed repeatedly in the client list for a short period of time or by the simultaneous existence of the old and new lists due to improper operation order. It also prevents data state conflicts that may be caused by adding before removing, thereby ensuring the logical rigor and display accuracy of the client list synchronization process.

[0025] In some embodiments, the removal notification includes at least a unique task identifier; the addition notification includes at least a unique task identifier and task summary data for display in the client list, wherein the task summary data includes at least one of task name, submission time, and current status. The unique task identifier in the removal notification allows the client to accurately locate and remove the corresponding task from its local list, avoiding accidental deletion or omission; the unique task identifier and task summary data (such as task name, submission time, and current status) in the addition notification allow the client to directly add and fully display the task information in the target list without initiating an additional query to the server after receiving the notification. This design reduces the number of interactions between the client and server, lowers network overhead, and improves the response speed of task list updates and user experience.

[0026] In some embodiments, a distributed task monitoring method based on state transition and targeted push further includes: when the server detects an anomaly in the long-term connection with the client, in response to a full query request initiated by the client after a preset anomaly duration, returning a complete task list corresponding to the client's currently subscribed group to the client, thereby enabling the client to perform a fallback update of its local list. This method establishes a fallback update mechanism through the client's proactive full query and the server's complete list return when a long-term connection anomaly causes push synchronization interruption. This mechanism ensures that in abnormal scenarios such as network fluctuations or connection failures, the client can promptly restore consistency with the server's task state, avoiding delays or errors in local list information due to missing pushes. Simultaneously, the conditional judgment of the preset anomaly duration effectively filters out instantaneous fluctuations, preventing frequent full queries from placing an additional burden on the system, thus balancing system robustness and resource utilization efficiency.

[0027] In some embodiments, when pushing outgoing notifications, incoming notifications, or progress update messages, structured logs are recorded synchronously. These structured logs include at least a task identifier, a target group identifier, a push timestamp, and a notification type. The structured logs are used for system operation monitoring and anomaly backtracking. By synchronously recording structured logs containing task identifiers, target group identifiers, push timestamps, and notification types when pushing various notifications, a traceable operational record is provided for the system. This logging mechanism facilitates maintenance personnel in quickly locating the problem area (such as missed pushes, incorrect grouping, or disordered timing) when list synchronization issues or push anomalies occur, thereby shortening troubleshooting time. Simultaneously, the structured logs also support statistical analysis of core indicators such as push frequency and group load, providing data support for system performance optimization and capacity planning.

[0028] In some embodiments, when a task is in the execution state and the progress value has not changed, no progress update message is pushed; a progress update message is only pushed to the execution state group when the progress value has changed compared to the previous push. Pushing is only triggered when the progress value actually changes, avoiding invalid message transmission caused by repeatedly pushing the same progress value. This design effectively reduces network bandwidth usage from the server to the client, while also reducing the client's burden of parsing and processing redundant messages, especially in high-frequency progress reporting scenarios. Furthermore, the client only receives meaningful progress change information, which helps maintain the true trend of progress display and avoids visual interference and resource waste caused by repeatedly refreshing the same value.

[0029] In some embodiments, the communication groups are predefined by the server based on the state types supported by the distributed task. These state types include at least waiting, in-process, completed, and abnormal states. The groups subscribed to by the client dynamically change as its tabs are switched, and each client subscribes to only one communication group at a time. This achieves precise binding between the subscription relationship and the user's currently focused interface. This design ensures that the client only receives notifications related to its currently selected tab, avoiding interference from invalid messages across states. Furthermore, the predefined group structure is clear, and the state extensibility is strong. When adding a new task type, only the corresponding group needs to be added, without modifying the core push logic, effectively improving the system's maintainability and scalability.

[0030] Example 1 A distributed task monitoring method based on state transition and targeted push is proposed, targeting a scenario where "the monitoring interface is divided into tabs according to task status, and each tab only displays the task list corresponding to the current status": The client subscribes to the corresponding status group based on the currently selected tab; when a task status transitions, the server pushes a move-out notification to the original status group and a move-in notification and task summary data to the new status group through dual channels; when the task execution progress changes, the server only pushes progress updates to the execution status group; the client completes the addition, deletion and progress refresh of the list according to various notifications, achieving consistency between the list and the actual task status without polling, reducing invalid pushes.

[0031] See Figure 2 The following implementation case based on ASP.NET Core and SignalR will provide a detailed description of the present invention.

[0032] 1. Implementation of tab list and links, and group subscription. The monitoring interface tabs correspond one-to-one with task statuses. The client establishes a long-lived SignalR connection with the server and registers a notification receiver. The server defines group identifiers corresponding to each status. The client subscribes to the corresponding group based on the currently selected tab. When switching tabs, the client unsubscribes from the original group before subscribing to the new group, ensuring consistency between the subscription relationship and the tabs. The tab-to-group subscription correspondence is as follows: Figure 3 As shown.

[0033] 2. Dual-channel push implementation for task status transition The server listens for task state migration events, collecting task identifiers, original / new states, and task summary data. It pushes a move-out notification containing the task identifier to the original state group, allowing clients to remove the corresponding task from the current tab. It pushes a move-in notification containing the task identifier and summary data to the new state group, allowing clients to add tasks and update the display accordingly. The server pushes notifications in a "move-out first, move-in later" sequence to ensure accurate list synchronization. The task move-out / move-in dual-channel push sequence diagram is shown below. Figure 4 As shown.

[0034] 3. Accurate progress tracking for execution groups is achieved. See Figure 5 The server listens for task progress change events and collects task identifiers and progress values. It only pushes progress update messages containing these two data items to the execution status group. Clients that subscribe to this group (currently viewing the execution status tab) refresh the corresponding task progress accordingly. Clients on other tabs do not receive this message to avoid invalid pushes.

[0035] 4. Implementation of client list synchronization and progress update After receiving a removal notification, the client removes the corresponding task from the current tab based on the task identifier; after receiving a move-in notification, it adds a task and updates the display; after receiving a progress update notification, it refreshes the progress of the corresponding task; and for abnormal situations such as duplicate pushes, it sets ignore or update logic to ensure that the list is displayed normally.

[0036] 5. Backup update mechanism for connection failures When a long connection fails, the client periodically queries the server for the task list of the currently subscribed group after the client meets preset conditions (such as the duration of the failure reaching a certain threshold), and overwrites the local list with the full data to complete the fallback update; after the connection is restored, the fallback update stops and the push synchronization mode is restored.

[0037] 6. Observability and Operations Optimization The server records structured logs when pushing notifications, and the client records notification processing logs to facilitate troubleshooting. The server also tracks key metrics such as the number of pushes and the success rate of receipt, providing data support for system optimization.

[0038] Example 2 like Figure 6 As shown, based on the same inventive concept as the above embodiments, the present invention also provides a distributed task monitoring system based on state transition and targeted push, comprising: The subscription management module is used to receive subscription requests initiated by clients based on the currently selected tab, add the clients to the communication group associated with the task status corresponding to the tab, and maintain the group affiliation information of each client in real time. The state transition push module is used to locate the original state group and the new state group when the task state is detected to have migrated from the original state to the new state based on the group affiliation information. It pushes a move-out notification carrying the task identifier to the original state group and a move-in notification carrying the task identifier and task summary to the new state group. The progress push module is used to locate the group in the execution state when a progress update is detected in a task in the execution state, based on the group affiliation information, and push a progress update message carrying the task identifier and the current progress value only to that group. The notification output module is used to output the removal notification, the removal notification, and the progress update message, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list.

[0039] By leveraging the collaborative capabilities of dual-channel state transition notifications and targeted push notifications from execution groups, the precise matching capabilities of state-grouped subscriptions, and the list synchronization capabilities of move-out / move-in dual channels, the task lists of each tab are made instantly consistent with the actual task status. This reduces invalid push notifications, lowers bandwidth usage and client burden, while improving the real-time performance and maintainability of distributed task monitoring.

[0040] Example 3 like Figure 7 As shown, the present invention also provides an electronic device 100 for implementing a distributed task monitoring method based on state transition and targeted push; The electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on at least one processor 102, and at least one communication bus 104.

[0041] The memory 101 can be used to store computer programs 103. The processor 102 implements the steps of a distributed task monitoring method based on state transition and targeted push by running or executing the computer programs stored in the memory 101 and calling the data stored in the memory 101.

[0042] The memory 101 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0043] At least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 102 may be a microprocessor or any conventional processor. Processor 102 is the control center of electronic device 100, connecting various parts of electronic device 100 via various interfaces and lines.

[0044] The memory 101 in the electronic device 100 stores multiple instructions to implement a distributed task monitoring method based on state transition and targeted push. The processor 102 can execute multiple instructions to achieve the following: The system receives subscription requests initiated by clients based on the currently selected tab, adds the clients to the communication group associated with the task status corresponding to the tab, and maintains the group affiliation information of each client in real time. Based on the group affiliation information, when it is detected that the task status has migrated from the original status to the new status, the original status group and the new status group are located, and a move-out notification carrying the task identifier is pushed to the original status group, and a move-in notification carrying the task identifier and task summary is pushed to the new status group. Based on the group affiliation information, when a progress update is detected for a task in the execution state, the group in the execution state is located, and a progress update message carrying the task identifier and the current progress value is pushed only to that group. The removal notification, removal notification, and progress update message are output as outputs, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list, respectively.

[0045] Example 4 If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, and read-only memory (ROM).

[0046] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0047] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0048] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0049] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0050] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A distributed task monitoring method based on state transition and targeted push, characterized in that, include: The system receives subscription requests initiated by clients based on the currently selected tab, adds the clients to the communication group associated with the task status corresponding to the tab, and maintains the group affiliation information of each client in real time. Based on the group affiliation information, when it is detected that the task status has migrated from the original state to the new state, the original state group and the new state group are located, and a move-out notification carrying the task identifier is pushed to the original state group, and a move-in notification carrying the task identifier and task summary is pushed to the new state group. Based on the group affiliation information, when a progress update is detected for a task in the execution state, the group in the execution state is located, and a progress update message carrying the task identifier and the current progress value is pushed only to that group. The removal notification, removal notification, and progress update message are output as outputs, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list, respectively.

2. The distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, When pushing removal notifications to the original state group and moving-in notifications to the new state group, the order of removal first and moving-in second is followed, which is used to enable the client to remove tasks from the original state list and then add them to the new state list.

3. The distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, The removal notification includes at least a unique task identifier; the moving-in notification includes at least a unique task identifier and task summary data for display in the client list, wherein the task summary data includes at least one of the following: task name, submission time, and current status.

4. The distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, Also includes: When the server detects an anomaly in the long-lived connection with the client, in response to the full query request initiated by the client after a preset anomaly duration, the server returns the complete task list corresponding to the client's currently subscribed group to the client, so as to enable the client to perform fallback updates to the local list.

5. A distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, When pushing out, in, or progress update messages, structured logs are recorded synchronously. The structured logs include at least the task identifier, target group identifier, push timestamp, and notification type. The structured logs are used for system operation monitoring and anomaly backtracking.

6. The distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, When a task is in the execution state and the progress value has not changed, no progress update message is pushed; a progress update message is only pushed to the execution state group when the progress value has changed compared to the last push.

7. A distributed task monitoring method based on state transition and targeted push according to claim 1, characterized in that, The communication packets are predefined by the server according to the state types supported by the distributed task. The state types include at least the waiting state, the executing state, the completed state, and the abnormal state. The packets subscribed to by the client change dynamically as the client switches tabs, and each client subscribes to only one communication packet at a time.

8. A distributed task monitoring system based on state transition and targeted push, characterized in that, include: The subscription management module is used to receive subscription requests initiated by clients based on the currently selected tab, add the clients to the communication group associated with the task status corresponding to the tab, and maintain the group affiliation information of each client in real time. The state transition push module is used to locate the original state group and the new state group when the task state is detected to have migrated from the original state to the new state based on the group affiliation information. It pushes a move-out notification carrying the task identifier to the original state group and a move-in notification carrying the task identifier and task summary to the new state group. The progress push module is used to locate the group in the execution state when a progress update is detected in a task in the execution state, based on the group affiliation information, and push a progress update message carrying the task identifier and the current progress value only to that group. The notification output module is used to output the removal notification, the removal notification, and the progress update message, which are used to trigger the receiving client to perform the removal, addition, and progress refresh operations of the corresponding tasks in the local task list.

9. An electronic device, characterized in that, It includes a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the distributed task monitoring method based on state transition and targeted push as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the distributed task monitoring method based on state transition and targeted push as described in any one of claims 1 to 7.