Disclosure of Invention
The invention mainly aims to provide a schedule reminding method, a schedule reminding system, a schedule reminding terminal and a computer readable storage medium of an emergency dispatching system, and aims to solve the problem that no schedule reminding is available in the emergency dispatching system in the prior art, and the task completion time and effect are affected.
In order to achieve the above purpose, the present invention provides a schedule reminding method of an emergency dispatch system, the schedule reminding method of the emergency dispatch system includes the following steps:
creating a schedule on a rule setting interface of the emergency dispatching system;
after the schedule is established, establishing a timing task service, and setting a reminding function through the timing task service, wherein the reminding function is used for reminding a preset time before the task in the schedule starts;
According to the actual demands of users, multiple reminding is set through the timing task service, and different reminding modes are set in different time periods before the tasks in the schedule are started;
creating a plurality of task classes and task schedulers by using a timer, and adding the tasks in the schedule to the task schedulers;
starting a thread pool through a timing task scheduling framework, and executing all tasks through the thread pool;
According to the set multiple reminding, sending out the reminding when the task is triggered;
and after the task is executed, updating the task state through the task dispatcher and recording the task execution result.
Optionally, the schedule reminding method of the emergency dispatching system updates the task state and records the task execution result through the task dispatcher after the task execution is completed, and then further includes:
when a schedule viewing instruction of a user is received, a schedule created by the user and a schedule participated in by the user in cooperation in the emergency scheduling system are called and displayed;
When a user department checking calendar instruction is received, all schedules of a current department and a subordinate department with department checking authority in the emergency dispatching system are called and displayed.
Optionally, the schedule reminding method of the emergency dispatching system updates the task state and records the task execution result through the task dispatcher after the task execution is completed, and then further includes:
when an operation instruction of editing or deleting the created schedule is received by a user, deleting a corresponding task in the emergency dispatching system, and not sending any reminding notification any more.
Optionally, the schedule reminding method of the emergency dispatching system, wherein the schedule information comprises date, time, task name, necessary information of participators and reminding time.
Optionally, in the schedule reminding method of the emergency dispatching system, the reminding mode in the reminding function includes a page popup window of a disconnection system, voice notification, short message notification and mail.
Optionally, the schedule reminding method of the emergency dispatching system, wherein the task dispatcher is used for managing and dispatching various tasks and processes in the emergency dispatching system.
Optionally, the schedule reminding method of the emergency dispatching system starts a thread pool through a timing task dispatching frame, and executes all tasks through the thread pool, which specifically includes:
detecting whether a task reaches a trigger time or not in the task scheduler by means of polling or monitoring a system event;
if a task has been triggered, a thread from a thread pool is selected by the task scheduler to execute the triggered task.
In addition, in order to achieve the above object, the present invention further provides a schedule reminding system of an emergency dispatch system, where the schedule reminding system of the emergency dispatch system includes:
the schedule creation module is used for creating a schedule on a rule setting interface of the emergency dispatching system;
The reminding setting module is used for creating a timing task service after finishing schedule creation, setting a reminding function through the timing task service, and the reminding function is used for reminding a preset time before a task in the schedule starts;
The reminding rule making module is used for setting multiple reminding through the timing task service according to the actual demands of users, and setting different reminding modes in different time periods before the start of the tasks in the schedule;
a schedule adding module for creating a plurality of task classes and task schedulers by using a timer, and adding tasks in the schedule to the task schedulers;
The task execution module is used for starting a thread pool through the timing task scheduling framework and executing all tasks through the thread pool;
The task triggering module is used for sending out a prompt when the task is triggered according to the set multiple prompts;
And the task recording module is used for updating the task state through the task scheduler and recording the task execution result after the task execution is completed.
In addition, in order to achieve the purpose, the invention also provides a terminal, wherein the terminal comprises a memory, a processor and a schedule reminding program of an emergency dispatching system which is stored in the memory and can run on the processor, and the schedule reminding program of the emergency dispatching system realizes the steps of the schedule reminding method of the emergency dispatching system when being executed by the processor.
In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a schedule reminding program of an emergency dispatch system, and the schedule reminding program of the emergency dispatch system realizes the steps of the schedule reminding method of the emergency dispatch system when being executed by a processor.
The method comprises the steps of creating a schedule on a rule setting interface of an emergency dispatching system, creating a timing task service after the schedule is created, setting a reminding function through the timing task service, wherein the reminding function is used for reminding a user at a preset time before a task in the schedule starts, setting multiple reminding modes according to actual demands of the user through the timing task service, setting different reminding modes in different time periods before the task in the schedule starts, creating a plurality of task classes and task schedulers through a timer, adding the tasks in the schedule to the task schedulers, starting a thread pool through the timing task dispatching frame, executing all tasks through the thread pool, sending reminding according to the set multiple reminding when the task is triggered, updating task states through the task schedulers after the task execution is completed, and recording task execution results. According to the invention, the schedule reminding is used for more effectively arranging and managing time, the working efficiency is improved, and the risk of omission or delay is reduced, so that timely processing of work and tasks is realized, and meanwhile, the emergency task can be successfully completed.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in FIG. 1, the schedule reminding method of the emergency dispatching system according to the preferred embodiment of the invention comprises the following steps:
and step S10, creating a schedule on a rule setting interface of the emergency dispatching system.
Specifically, the schedule information comprises date, time, task name, necessary information of participators and reminding time, as shown in fig. 2, the schedule is created in a rule setting interface of the emergency dispatching system, namely the date, time and task name, necessary information of participators and reminding time are required to be input in the rule setting interface of the auxiliary dispatching system, and daily, workday, weekly and monthly schedule addition is supported.
And step S20, creating a timing task service after the schedule is created, and setting a reminding function through the timing task service, wherein the reminding function is used for reminding a user at a preset time before the task in the schedule starts.
Specifically, after the schedule is created, a reminder function is further required to be set and added to a timed task service (i.e. the timed task in fig. 2), and the timed task service mainly adds a corresponding timed task and a management function of the timed task, so that a reminder notification is received at a certain time before the task starts, and the reminder can support various manners, such as page popup of a drop-line system, voice notification, short message notification, mail and the like.
And step S30, setting multiple reminding modes in different time periods before the task in the schedule starts according to the actual demands of the users through the timing task service.
Specifically, multiple reminders can be performed according to actual demands of users, and in order to ensure that the users do not miss important tasks, multiple reminders are suggested to be set simultaneously. For example, when the time is one hour from the task start time, a reminding window is popped up, then a voice notification is sent 5 minutes before the actual start of the task, and different reminding modes are set in different time periods before the start of the task in the schedule, so that the user is prevented from missing the execution of the task.
And S40, creating a plurality of task classes and task schedulers by using a timer, and adding the tasks in the schedule to the task schedulers.
Specifically, a timer is used to create a task (Job) class, then a task Scheduler (Scheduler) is defined, and tasks are added into the task Scheduler, wherein the task Scheduler is mainly used for managing and scheduling various tasks and processes in the system, and can help users and the system to automatically execute specific tasks. Executing Job tasks with Trigger-defined opportunities can understand what happens when to do, which initiates Trigger to execute Job. A task may be assigned to a plurality of triggers (Trigger), each Trigger defining when the task is triggered. The triggers may be configured based on time intervals, dates, or calendars.
And S50, starting a thread pool through a timing task scheduling framework, and executing all tasks through the thread pool.
Specifically, quartz (which is a timing task scheduling framework and consists of three core parts, namely Job and Trigger, scheduler) starts a thread pool and is responsible for executing all tasks, a task scheduler detects whether a task reaches a trigger time by polling or monitoring a system event, and if the task is triggered, the task scheduler selects a thread from the thread pool to execute the triggered task.
In the cluster mode of Quartz, no single "main Thread" is responsible for the scheduling and execution of all jobs, but rather multiple threads work cooperatively, with the Scheduler Thread (Scheduler Thread) playing a core role, which periodically examines and triggers jobs. These threads are typically daemon threads (Daemon Threads) that ensure that background execution continues while the application is running, without preventing the application from closing.
And step S60, according to the set multiple reminding, sending out the reminding when the task is triggered.
Specifically, according to the rule (multiple reminders) configured in step S30, the schedule is directly issued, i.e. reminders are issued when the task is triggered.
And step S70, updating the task state through the task scheduler and recording the task execution result after the task execution is completed.
Specifically, the Quartz provides a mechanism for a listener (Listener) to obtain the execution of a job by implementing a specific listener interface, and after completion of task execution, the task scheduler updates the task state and records the task execution results.
Further, as shown in fig. 3, the schedule viewing authority control is shown, when a schedule viewing instruction of a user is received, a schedule created by the user and a schedule participated in by the user in cooperation are called and displayed, and when a calendar viewing instruction of a department of the user is received, all schedules of a current department and a subordinate department with department viewing authority in the emergency scheduling system are called and displayed. The user can only check the schedule created by the user and the schedule participated in by the user, the user selects departments (or all departments within default authority) to check the calendar, and the user can check all schedules of the current department and the subordinate departments (provided that the current user has the authority of the departments).
Further, as shown in fig. 4, a process of deleting a schedule is shown, when an operation instruction of editing or deleting a created schedule is received, a corresponding task in the emergency dispatch system is deleted, and no reminding notification is sent out any more, that is, the user can edit or delete the created schedule, the task of the deleted schedule is a cancel task, and no reminding notification is sent out any more.
According to the invention, the schedule reminder can help the user to more effectively schedule and manage time, improve working efficiency, create schedule for the user, set reminder and notice, help the user to complete tasks and conferences in time, and reduce the risk of omission or delay. In addition, calendar reminders may also be integrated with other tools, such as email and online calendars, to make information management more convenient and efficient. By using the schedule service, time and resources can be better distributed, so that timely processing of work and tasks is realized, and meanwhile, the emergency tasks can be successfully completed.
Further, as shown in fig. 5, the invention further provides a schedule reminding system of the emergency dispatching system based on the schedule reminding method of the emergency dispatching system, wherein the schedule reminding system of the emergency dispatching system comprises:
A schedule creation module 51 for creating a schedule at a rule setting interface of the emergency dispatch system;
The reminding setting module 52 is configured to create a timed task service after completing the creation of the schedule, and set a reminding function according to the timed task service, where the reminding function is used for reminding a preset time before a task in the schedule starts;
the reminding rule making module 53 is configured to set multiple reminders according to actual demands of users through the timed task service, and set different reminding modes in different time periods before the start of tasks in the schedule;
a schedule adding module 54 for creating a plurality of task classes and task schedulers using a timer, adding tasks in the schedule to the task schedulers;
A task execution module 55, configured to start a thread pool through a timed task scheduling framework, and execute all tasks through the thread pool;
The task triggering module 56 is configured to issue a reminder when a task is triggered according to the set multiple reminders;
the task recording module 57 is configured to update a task state and record a task execution result by the task scheduler after the task execution is completed.
Further, as shown in fig. 6, the invention further provides a terminal based on the schedule reminding method and system of the emergency dispatch system, and the terminal comprises a processor 10, a memory 20 and a display 30. Fig. 6 shows only some of the components of the terminal, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented.
The memory 20 may in some embodiments be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. The memory 20 may in other embodiments also be an external storage device of the terminal, such as a plug-in hard disk provided on the terminal, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. Further, the memory 20 may also include both an internal storage unit and an external storage device of the terminal. The memory 20 is used for storing application software installed in the terminal and various data, such as program codes of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a schedule reminder 40 of the emergency dispatch system, and the schedule reminder 40 of the emergency dispatch system may be executed by the processor 10, so as to implement the schedule reminder method of the emergency dispatch system in the present application.
The processor 10 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 20, for example for executing a calendar reminder method of the emergency dispatch system, etc.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 30 is used for displaying information at the terminal and for displaying a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the schedule reminder program 40 of the conforming emergency system in the memory 20:
creating a schedule on a rule setting interface of the emergency dispatching system;
after the schedule is established, establishing a timing task service, and setting a reminding function through the timing task service, wherein the reminding function is used for reminding a preset time before the task in the schedule starts;
According to the actual demands of users, multiple reminding is set through the timing task service, and different reminding modes are set in different time periods before the tasks in the schedule are started;
creating a plurality of task classes and task schedulers by using a timer, and adding the tasks in the schedule to the task schedulers;
starting a thread pool through a timing task scheduling framework, and executing all tasks through the thread pool;
According to the set multiple reminding, sending out the reminding when the task is triggered;
and after the task is executed, updating the task state through the task dispatcher and recording the task execution result.
After the task is executed, updating the task state through the task scheduler, recording the task execution result, and then further comprising:
when a schedule viewing instruction of a user is received, a schedule created by the user and a schedule participated in by the user in cooperation in the emergency scheduling system are called and displayed;
When a user department checking calendar instruction is received, all schedules of a current department and a subordinate department with department checking authority in the emergency dispatching system are called and displayed.
After the task is executed, updating the task state through the task scheduler, recording the task execution result, and then further comprising:
when an operation instruction of editing or deleting the created schedule is received by a user, deleting a corresponding task in the emergency dispatching system, and not sending any reminding notification any more.
The schedule information comprises date, time, task name, necessary information of participators and reminding time.
The reminding mode in the reminding function comprises a page popup window of the disconnection system, voice notification, short message notification and mail.
The task scheduler is used for managing and scheduling various tasks and processes in the emergency scheduling system.
The method specifically comprises the steps of starting a thread pool through a timing task scheduling framework, and executing all tasks through the thread pool, wherein the method specifically comprises the following steps:
detecting whether a task reaches a trigger time or not in the task scheduler by means of polling or monitoring a system event;
if a task has been triggered, a thread from a thread pool is selected by the task scheduler to execute the triggered task.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a schedule reminding program of the emergency dispatching system, and the schedule reminding program of the emergency dispatching system realizes the steps of the schedule reminding method of the emergency dispatching system when being executed by a processor.
In summary, the invention provides a schedule reminding method, a schedule reminding system, a schedule reminding terminal and a computer readable storage medium of an emergency dispatch system, wherein the schedule reminding method comprises the steps of creating a schedule on a rule setting interface of the emergency dispatch system; creating a timing task service after finishing schedule creation, setting a reminding function through the timing task service, wherein the reminding function is used for reminding a user at a preset time before the task in the schedule starts, setting multiple reminders through the timing task service according to actual demands of the user, setting different reminding modes in different time periods before the task in the schedule starts, creating a plurality of task classes and task schedulers through a timer, adding the task in the schedule to the task schedulers, starting a thread pool through a timing task scheduling framework, executing all tasks through the thread pool, sending reminders when the task is triggered according to the set multiple reminders, and updating task states through the task schedulers and recording task execution results after the task execution is finished. According to the invention, the schedule reminding is used for more effectively arranging and managing time, the working efficiency is improved, and the risk of omission or delay is reduced, so that timely processing of work and tasks is realized, and meanwhile, the emergency task can be successfully completed.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
Of course, those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by a computer program for instructing relevant hardware (e.g., processor, controller, etc.), the program may be stored on a computer readable storage medium, and the program may include the above described methods when executed. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.