[go: up one dir, main page]

CN114819612A - Method and system for carrying out early warning notification by short message reply control time wheel algorithm - Google Patents

Method and system for carrying out early warning notification by short message reply control time wheel algorithm Download PDF

Info

Publication number
CN114819612A
CN114819612A CN202210428713.2A CN202210428713A CN114819612A CN 114819612 A CN114819612 A CN 114819612A CN 202210428713 A CN202210428713 A CN 202210428713A CN 114819612 A CN114819612 A CN 114819612A
Authority
CN
China
Prior art keywords
short message
task
early warning
round
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210428713.2A
Other languages
Chinese (zh)
Other versions
CN114819612B (en
Inventor
刘德建
叶伟
李佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN202210428713.2A priority Critical patent/CN114819612B/en
Publication of CN114819612A publication Critical patent/CN114819612A/en
Application granted granted Critical
Publication of CN114819612B publication Critical patent/CN114819612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • G06Q10/063114Status monitoring or status determination for a person or group
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a method for carrying out early warning notification by a short message reply control time wheel algorithm, which comprises the following steps: step S1, short message early warning template information is configured in a database; step S2, receiving a starting early warning request, and reading short message early warning template information of a database; step S3, each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved by one bit per second, and whether the data in the slot position corresponding to the time wheel array with the current subscript has a task or not is judged; step S4, judging whether the time round of the task is equal to the current round of the system, if yes, executing the task content in the current round, and if not, waiting for the next time; step S5, receiving the short message reply, and judging the content of the short message reply; step S6, receiving the request for removing the early warning, wherein the receiving parameter has the mark of the short message early warning template information; the invention can solve the problem of accurate notification of the early warning system.

Description

Method and system for carrying out early warning notification by short message reply control time wheel algorithm
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for early warning and informing through a short message reply control time wheel algorithm.
Background
The system is necessary to monitor and early warn, so that the fault finding speed can be increased, the fault can be timely repaired, and the system is healthy and reliable. Short message notification is a common use means, and the mobile phone is used as the most popular intelligent device, so that the short message can timely transmit the message to the system responsible person and urge the system responsible person to quickly respond. However, the short message notification has a very obvious disadvantage that the short message notification is repeated, a system person in charge may need 30 minutes to perform troubleshooting and repair after receiving the first early warning short message, and if the early warning is 1 time in 1 minute, the early warning short message is repeatedly sent 29 times in 30 minutes, which wastes short message cost, generates invalid early warning information, increases screening cost, and may cause the system person in charge to miss other important early warning information. If the repetition times are reduced by increasing the early warning interval time, the early warning short message of the system responsible person is possibly missed for the first time, and the response is started only in the second early warning, so that the system is not checked in time.
Disclosure of Invention
In order to overcome the above problems, the present invention provides a method for realizing accurate notification of an early warning system and avoiding invalid repeated early warning messages.
The invention is realized by adopting the following scheme: a method for carrying out early warning notification by a short message reply control time wheel algorithm comprises the following steps:
step S1, short message early warning template information is configured in a database;
step S2, receiving a starting early warning request, reading short message early warning template information of a database, combining the receiving parameters of the early warning request to organize a unit task data structure and storing the unit task data structure in a corresponding slot position of a time wheel array;
step S3, each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, whether the data in the slot position corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the movement is continued;
step S4, judging whether the time round of the task is equal to the current round of the system, if yes, executing the task content in the current round, and if not, waiting for the next time;
step S5, receiving the short message reply, and judging the content of the short message reply so as to intervene the tasks on the time round group;
and step S6, receiving the early warning removing request, receiving the identifier of the short message early warning template information on the parameter, and removing the task of the template identifier on the time wheel array, thereby realizing the purpose of solving the problem of accurate notification of the early warning system.
Further, the step S1 is further specifically: and configuring short message early warning template information in a database of the system, wherein template identification, template content, the number of parameters of the template content and a notification mobile phone number are required to be configured.
Further, the step S2 is further specifically: and receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
Further, the step S3 is further specifically: each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, the corotation is started to traverse the tasks on the current slot position, the system sets a time wheel array sys _ timerray, the current subscript sys _ timerray _ index of the time wheel indicates the slot position to which the system currently executes the tasks, the sys _ timerray _ index is added by 1 per second, and the position to which the sys _ timerray _ index runs indicates that the task list on the corresponding slot position is to be executed; and a task list is placed on each slot, which indicates that the system traverses to the slot, and the task list on the slot is executed.
Further, the step S4 is further specifically: and judging whether the time round of the task is equal to the current round sys _ round of the system or not, if so, executing the task content, traversing to the last bit of the time round array, adding 1 to the current time round sys _ round of the system, and continuously moving the subscript sys _ timerray _ index from 0.
Further, the step S5 is further specifically: receiving a short message reply, and judging short message reply content, wherein the short message reply content comprises contents of stop, delay n and next n, and the stop represents that all the early warnings are stopped, and all the tasks in the time wheel array are removed; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time round array plus n, skipping n cycles.
The invention also provides a system for carrying out early warning notification by a short message reply control time wheel algorithm, which comprises a configuration module, a receiving module, a moving module, a judging module, an intervention module and a removing module, wherein the configuration module is used for configuring short message early warning template information in a database; the receiving template receives the starting early warning request, reads the short message early warning template information of the database, combines the receiving parameters of the early warning request to form a unit task data structure, and stores the unit task data structure in the corresponding slot position of the time wheel array; the mobile template, namely each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot positions, the subscript of the time wheel array is moved by one bit per second, whether the data in the slot positions corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the mobile template continues to move; the judging module judges whether the time round of the task is equal to the current round of the system, if so, the task content is executed in the current round, and if not, the next time is waited; the intervention template receives the short message reply and judges the content of the short message reply so as to intervene the tasks on the time round group; the removal module receives the early warning removing request, receives the identifier of the short message early warning template information on the parameter, and removes the task of the template identifier on the time wheel array, so that the problem of accurate notification of the early warning system is solved.
Further, the configuration module is further specifically: and configuring short message early warning template information in a database of the system, wherein template identification, template content, the number of parameters of the template content and a notification mobile phone number are required to be configured.
Further, the receiving module is further specifically: and receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
Further, the moving module is further specifically: each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, the corotation is started to traverse the tasks on the current slot position, the system sets a time wheel array sys _ timerray, the current subscript sys _ timerray _ index of the time wheel indicates the slot position to which the system currently executes the tasks, the sys _ timerray _ index is added by 1 per second, and the position to which the sys _ timerray _ index runs indicates that the task list on the corresponding slot position is to be executed; and placing a task list on each slot, wherein the task list on the slot is executed when the system traverses the slot.
Further, the determining module is further specifically: and judging whether the time round of the task is equal to the current round sys _ round of the system or not, if so, executing the task content, traversing to the last bit of the time round array, adding 1 to the current time round sys _ round of the system, and continuously moving the subscript sys _ timerray _ index from 0.
Further, the intervention module is further specifically: receiving a short message reply, and judging short message reply content, wherein the short message reply content comprises contents of stop, delay n and next n, and the stop represents that all the early warnings are stopped, and all the tasks in the time wheel array are removed; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time-round array plus n, skipping n cycles.
The invention has the beneficial effects that: the invention can solve the problem of accurate notification of the early warning system, and can intervene early warning by replying the intervention short message, thereby avoiding invalid repeated early warning short messages.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention.
Fig. 2 is a schematic block diagram of the system of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a method for performing an early warning notification by a short message reply control time wheel algorithm of the present invention includes the following steps:
step S1, short message early warning template information is configured in a database;
step S2, receiving a starting early warning request, reading short message early warning template information of a database, combining the receiving parameters of the early warning request to organize a unit task data structure and storing the unit task data structure in a corresponding slot position of a time wheel array;
step S3, each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, whether the data in the slot position corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the movement is continued;
step S4, judging whether the time round of the task is equal to the current round of the system, if yes, executing the task content in the current round, and if not, waiting for the next time;
step S5, receiving the short message reply, and judging the content of the short message reply so as to intervene the tasks on the time round group;
and step S6, receiving the early warning removing request, receiving the identifier of the short message early warning template information on the parameter, and removing the task of the template identifier on the time wheel array, thereby realizing the purpose of solving the problem of accurate notification of the early warning system.
The invention is further illustrated by the following specific examples:
step one, configuring short message early warning template information by a database, and configuring template identification, template content parameter number and notification mobile phone number.
The present short message notification system is used in a mall system for illustration. Firstly, a piece of short message early warning template data is established in a short message early warning template table of a database. Suppose the template is identified as "shop _ war", the template content is "the mall system starts at { time } and has an error { error }, please process in time", the number of the template content parameters is 2, and the mobile phone number is notified 18912345678. Execute sql statement insert _ war _ tb (code, content, args _ count, mobile) values ("shop _ war", "mall system starts at time, error occurs { error }, please handle in time", 2, "18912345678").
And step two, receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
The short message notification system is used as a general system and provides an interface for triggering the start of early warning for an access party. The receiving parameter is as follows, template identification ═ shop _ ward ", template content parameter { ' time ' {: 2022-04-0519: 30:58 ', ' error ═ commodity database link failure ' }", and notification interval is 300. Reading short message early warning template data of 'shop _ war', executing a sql statement select from code to obtain template data, and replacing corresponding parameters on corresponding template content to obtain final short message content, wherein the short message content is 'Shangcheng system starts from 2022-04-0519: 30:58, and the commodity database is failed to be linked and needs to be processed in time'; the notification interval 300 indicates notification once for 300 seconds, that is, 5 minutes; the formula of the index of which slot is placed is (sys _ timerray _ index + interval)% 3600, since if it exceeds 3600, a modulus is taken to obtain the corresponding index; the formula of round of the task is sys _ round + ((notification interval + sys _ timerray _ index)/3600), which results in round being 0, sys _ round is the current round of the system, sys _ timerray _ index is the current subscript of the system time round, and sys _ round and sys _ timerray _ index are explained in the step three-time round correlation algorithm. Organizing the above information into a task structure { "code": shop _ war "," content ": the mall system starts from 2022-04-0519: 30:58, a failure of wrong commodity database link occurs, and the mall system is required to process timely", "mobile": 18912345678 "," interval ": 300", "round": 0 }
And step three, moving the time wheel subscript one bit per second, if the subscript of the data has a task, starting a corotation to traverse the task at the current slot position, judging whether the time round of the task is equal to the current round sys _ round of the system, and if so, executing the task content. If the last bit of the time wheel array is traversed, the system current time round sys _ round is added with 1, and the subscript sys _ timerray _ index continues to move from 0.
The system sets a time wheel array sys _ timearray with length of 3600, and this array has 3600 slots, which represents 3600 seconds, namely 1 hour. The current subscript sys _ timerray _ index of the time wheel indicates which slot the system is currently executing a task on, the sys _ timerray _ index is incremented by 1 every second, and the position where the sys _ timerray _ index goes indicates that the task list on the corresponding slot is to be executed. And a task list is placed on each slot, which indicates that the system traverses to the slot, and the task list on the slot is executed. When the index sys _ timerray _ index traverses to the last bit of the array, the sys _ timerray _ index is reset to 0, and the current time round sys _ round is added with 1, the role of the current time round sys _ round is to satisfy such a task for more than 1 hour, because the array of 3600 can only represent the time schedule within the 1 hour, and the comparison between sys _ round and round in the task structure can know whether the task is to be executed at the current time.
The system judges whether task data exist on the time wheel array sys _ time _ index +1 every second, if the length of the task list is larger than 1, a task list on the slot is started to be asynchronously traversed, whether round on the task is equal to the current time wheel sys _ round, if yes, execution is performed in the following round, if yes, short message notification is performed according to data in the task structure task, and round does not exist and is not smaller than the sys _ round.
And after the task is executed, removing the task from the task list of the current slot position, and adding the task again for inter slot positions according to the time interval on the task data task, which indicates that the task is executed again after the inter second, wherein if the range of the time round group 3600 is exceeded after the current subscript is added with the inter, the round and the slot position index on the task need to be recalculated according to the formula in the second step.
Step four, receiving the short message reply, judging the content of the short message reply, stopping all the early warnings at this time by stop, and removing all the tasks in the time wheel array; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time round array plus n, skipping n cycles.
After receiving the early warning short message sent by the short message notification system, the system responsible person can reply the short message according to the actual situation so as to intervene the tasks on the time round group.
If the person in charge of the early warning information system evaluates that the early warning needs to be solved in 30 minutes, if the early warning does not need to be notified repeatedly in 30 minutes, the short message delay 1800 is replied, and the notification is performed after the early warning is delayed for 30 minutes at the interval of the original tasks. After receiving the reply, the system traverses the task of finding the code shop _ war on the time wheel array sys _ timearray, the added subscript is 1800, and round and index need to be recalculated according to the formula in the step two.
If the person in charge of the warning information system wants to skip for 4 times of intervals, namely 20 minutes, replying a short message next5, which means that 4 times of intervals are skipped over the intervals of the original task, namely, the notification is performed at the 5 th interval, after receiving the reply, the system traverses the task of finding the code _ shop _ war on the time wheel array sys _ time _ arrival to obtain the notification interval of 300, the added index is 300 (4+1) of 1500, and round and index need to be recalculated according to the formula of the second step.
If the task of the person in charge of the early warning information system is not an important error, the system can automatically reply to normal, and if the person does not want to receive the early warning information repeatedly, stop can be replied to indicate that the follow-up notice of the early warning is hoped to stop. After receiving the reply, the system traverses the task of finding the code shop _ war on the time wheel array sys _ timearray, and removes the task.
And step five, receiving the early warning removing request, receiving the template identifier of the parameter, and removing the task of the template identifier on the time wheel array.
Besides receiving the short message reply to intervene the task of the time wheel, the system also needs to provide an interface for relieving the early warning, and when the system problem is repaired, the early warning needs to be relieved. The interface receiving parameter has a template identifier code ═ shop _ war ", a task of finding the code ═ shop _ war on the traversal time wheel array sys _ timerray is traversed, and the task is removed.
The invention is used as a general short message notification service, does not relate to specific system monitoring, and is monitored by each system to request the short message notification system to trigger subsequent short message notification. 1. The database is configured with short message early warning template information, and template identification, template content parameter number and notification mobile phone number are required to be configured. 2. Receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing a unit task data structure by combining the receiving parameters to store corresponding slot positions of a time wheel array. 3. And moving the time wheel subscript by one grid every second, starting a corotation to traverse the task at the current slot position if the slot position has the task, judging whether the time wheel of the task is equal to the current wheel, and executing the task content if the time wheel of the task is equal to the current wheel. If the last bit of the time wheel array is traversed, then the current time round is incremented by 1 and the subscript continues to move from 0. 4. Receiving a short message reply, judging the content of the short message reply, stopping all the early warnings at this time by stop, and removing all the tasks in the time wheel array; delay n indicates that the notification is continued after the delay of n seconds, and the original task on the time wheel array is shifted backwards by n bits; next n denotes skipping n rounds, the round of the original task on the time round array plus n. 5. And receiving the early warning relieving request, receiving the template identifier of the parameter, and removing the task of the template identifier on the time wheel array.
Referring to fig. 2, the present invention further provides a system for performing an early warning notification by using a short message reply control time wheel algorithm, including a configuration module, a receiving module, a moving module, a determining module, an intervention module and a removing module, where the configuration module configures short message early warning template information in a database; the receiving template receives the starting early warning request, reads the short message early warning template information of the database, combines the receiving parameters of the early warning request to form a unit task data structure, and stores the unit task data structure in the corresponding slot position of the time wheel array; the mobile template, namely each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot positions, the subscript of the time wheel array is moved by one bit per second, whether the data in the slot positions corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the mobile template continues to move; the judging module judges whether the time round of the task is equal to the current round of the system, if so, the task content is executed in the current round, and if not, the next time is waited; the intervention template receives the short message reply and judges the content of the short message reply so as to intervene the tasks on the time round groups; the removal module receives the early warning removing request, receives the identifier of the short message early warning template information on the parameter, and removes the task of the template identifier on the time wheel array, so that the problem of accurate notification of the early warning system is solved.
The configuration module is further specifically: and configuring short message early warning template information in a database of the system, wherein template identification, template content, the number of parameters of the template content and a notification mobile phone number are required to be configured.
The receiving module is further specifically: and receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
The moving module is further specifically: each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, the corotation is started to traverse the tasks on the current slot position, the system sets a time wheel array sys _ timerray, the current subscript sys _ timerray _ index of the time wheel indicates the slot position to which the system currently executes the tasks, the sys _ timerray _ index is added by 1 per second, and the position to which the sys _ timerray _ index runs indicates that the task list on the corresponding slot position is to be executed; and a task list is placed on each slot, which indicates that the system traverses to the slot, and the task list on the slot is executed.
The judging module is further specifically: and judging whether the time round of the task is equal to the current round sys _ round of the system or not, if so, executing the task content, traversing to the last bit of the time round array, adding 1 to the current time round sys _ round of the system, and continuously moving the subscript sys _ timerray _ index from 0.
The intervention module is further specifically: receiving a short message reply, and judging short message reply content, wherein the short message reply content comprises contents of stop, delay n and next n, and the stop represents that all the early warnings are stopped, and all the tasks in the time wheel array are removed; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time-round array plus n, skipping n cycles.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.

Claims (12)

1. A method for carrying out early warning notification by a short message reply control time wheel algorithm is characterized by comprising the following steps:
step S1, short message early warning template information is configured in a database;
step S2, receiving a starting early warning request, reading short message early warning template information of a database, combining the receiving parameters of the early warning request to organize a unit task data structure and storing the unit task data structure in a corresponding slot position of a time wheel array;
step S3, each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, whether the data in the slot position corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the movement is continued;
step S4, judging whether the time round of the task is equal to the current round of the system, if yes, executing the task content in the current round, and if not, waiting for the next time;
step S5, receiving the short message reply, and judging the content of the short message reply so as to intervene the tasks on the time round group;
and step S6, receiving the early warning removing request, receiving the identifier of the short message early warning template information on the parameter, and removing the task of the template identifier on the time wheel array, thereby realizing the purpose of solving the problem of accurate notification of the early warning system.
2. The method of claim 1, wherein the method comprises the following steps: the step S1 further includes: and configuring short message early warning template information in a database of the system, wherein template identification, template content, the number of parameters of the template content and a notification mobile phone number are required to be configured.
3. The method of claim 1, wherein the method comprises the following steps: the step S2 further includes: and receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
4. The method of claim 1, wherein the method comprises the following steps: the step S3 further includes: each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, the corotation is started to traverse the tasks on the current slot position, the system sets a time wheel array sys _ timerray, the current subscript sys _ timerray _ index of the time wheel indicates the slot position to which the system currently executes the tasks, the sys _ timerray _ index is added by 1 per second, and the position to which the sys _ timerray _ index runs indicates that the task list on the corresponding slot position is to be executed; and a task list is placed on each slot, which indicates that the system traverses to the slot, and the task list on the slot is executed.
5. The method of claim 1, wherein the method comprises the following steps: the step S4 further includes: and judging whether the time round of the task is equal to the current round sys _ round of the system or not, if so, executing the task content, traversing to the last bit of the time round array, adding 1 to the current time round sys _ round of the system, and continuously moving the subscript sys _ timerray _ index from 0.
6. The method of claim 1, wherein the method comprises the following steps: the step S5 further includes: receiving a short message reply, and judging short message reply content, wherein the short message reply content comprises contents of stop, delay n and next n, and the stop represents that all the early warnings are stopped, and all the tasks in the time wheel array are removed; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time-round array plus n, skipping n cycles.
7. A system for carrying out early warning notification by a short message reply control time wheel algorithm is characterized in that: the system comprises a configuration module, a receiving module, a moving module, a judging module, an intervention module and a removing module, wherein the configuration module is used for configuring short message early warning template information in a database; the receiving template receives the starting early warning request, reads the short message early warning template information of the database, combines the receiving parameters of the early warning request to form a unit task data structure, and stores the unit task data structure in the corresponding slot position of the time wheel array; the mobile template, namely each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot positions, the subscript of the time wheel array is moved by one bit per second, whether the data in the slot positions corresponding to the time wheel array of the current subscript has a task or not is judged, if yes, a coroutine is started to traverse the task on the current slot position of the current time wheel data, and if not, the mobile template continues to move; the judging module judges whether the time round of the task is equal to the current round of the system, if so, the task content is executed in the current round, and if not, the next time is waited; the intervention template receives the short message reply and judges the content of the short message reply so as to intervene the tasks on the time round group; the removal module receives the early warning removing request, receives the identifier of the short message early warning template information on the parameter, and removes the task of the template identifier on the time wheel array, so that the problem of accurate notification of the early warning system is solved.
8. The system of claim 7, wherein the system is configured to perform the warning notification by a short message reply control time wheel algorithm, and comprises: the configuration module further specifically comprises: and configuring short message early warning template information in a database of the system, wherein template identification, template content, the number of parameters of the template content and a notification mobile phone number are required to be configured.
9. The system of claim 7, wherein the system is configured to perform the warning notification by a short message reply control time wheel algorithm, and comprises: the receiving module is further specifically: and receiving a start early warning request, wherein the receiving parameters comprise template identification, template content parameters and notification intervals, reading short message early warning template information of a database, and organizing unit task data structures by combining the receiving parameters to store corresponding slot positions of the time wheel array.
10. The system of claim 7, wherein the system for warning and informing by short message reply control time wheel algorithm comprises: the moving module is further specifically: each time wheel array with the subscript corresponds to a slot position, unit task data are arranged in the slot position, the subscript of the time wheel array is moved one bit per second, the corotation is started to traverse the tasks on the current slot position, the system sets a time wheel array sys _ timerray, the current subscript sys _ timerray _ index of the time wheel indicates the slot position to which the system currently executes the tasks, the sys _ timerray _ index is added by 1 per second, and the position to which the sys _ timerray _ index runs indicates that the task list on the corresponding slot position is to be executed; and a task list is placed on each slot, which indicates that the system traverses to the slot, and the task list on the slot is executed.
11. The system of claim 7, wherein the system is configured to perform the warning notification by a short message reply control time wheel algorithm, and comprises: the judging module is further specifically: and judging whether the time round of the task is equal to the current round sys _ round of the system or not, if so, executing the task content, traversing to the last bit of the time round array, adding 1 to the current time round sys _ round of the system, and continuously moving the subscript sys _ timerray _ index from 0.
12. The system of claim 7, wherein the system for warning and informing by short message reply control time wheel algorithm comprises: the intervention module is further specifically: receiving a short message reply, and judging short message reply content, wherein the short message reply content comprises contents of stop, delay n and next n, and the stop represents that all the early warnings are stopped, and all the tasks in the time wheel array are removed; delay n indicates that the notification continues after the delay of n seconds, and the original task on the time round number group is shifted back by n bits; next n denotes the turn of the original task on the time-round array plus n, skipping n cycles.
CN202210428713.2A 2022-04-22 2022-04-22 Method and system for carrying out early warning notification through short message reply control time round algorithm Active CN114819612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210428713.2A CN114819612B (en) 2022-04-22 2022-04-22 Method and system for carrying out early warning notification through short message reply control time round algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210428713.2A CN114819612B (en) 2022-04-22 2022-04-22 Method and system for carrying out early warning notification through short message reply control time round algorithm

Publications (2)

Publication Number Publication Date
CN114819612A true CN114819612A (en) 2022-07-29
CN114819612B CN114819612B (en) 2024-09-06

Family

ID=82506333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210428713.2A Active CN114819612B (en) 2022-04-22 2022-04-22 Method and system for carrying out early warning notification through short message reply control time round algorithm

Country Status (1)

Country Link
CN (1) CN114819612B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119577264A (en) * 2024-11-14 2025-03-07 浪潮云信息技术股份公司 Current limiting processing method, system, device and medium based on sliding event window

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4079581A (en) * 1974-03-08 1978-03-21 Seiko Koki Kabushiki Kaisha Alarm device for clocks
CN105760378A (en) * 2014-12-15 2016-07-13 阿里巴巴集团控股有限公司 Transaction state monitor method and device
CN107171834A (en) * 2017-05-05 2017-09-15 四川长虹电器股份有限公司 Short Message Service Gateway service platform monitoring early-warning system and method based on gateway early warning pond
CN110427551A (en) * 2019-07-01 2019-11-08 五八有限公司 Information-pushing method, device, electronic equipment and computer-readable medium
CN111329459A (en) * 2020-03-06 2020-06-26 北京化工大学 An improved early warning scoring method for monitoring vital signs of patients
CN112671560A (en) * 2020-12-11 2021-04-16 广东电力通信科技有限公司 High-availability distributed real-time alarm processing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4079581A (en) * 1974-03-08 1978-03-21 Seiko Koki Kabushiki Kaisha Alarm device for clocks
CN105760378A (en) * 2014-12-15 2016-07-13 阿里巴巴集团控股有限公司 Transaction state monitor method and device
CN107171834A (en) * 2017-05-05 2017-09-15 四川长虹电器股份有限公司 Short Message Service Gateway service platform monitoring early-warning system and method based on gateway early warning pond
CN110427551A (en) * 2019-07-01 2019-11-08 五八有限公司 Information-pushing method, device, electronic equipment and computer-readable medium
CN111329459A (en) * 2020-03-06 2020-06-26 北京化工大学 An improved early warning scoring method for monitoring vital signs of patients
CN112671560A (en) * 2020-12-11 2021-04-16 广东电力通信科技有限公司 High-availability distributed real-time alarm processing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119577264A (en) * 2024-11-14 2025-03-07 浪潮云信息技术股份公司 Current limiting processing method, system, device and medium based on sliding event window

Also Published As

Publication number Publication date
CN114819612B (en) 2024-09-06

Similar Documents

Publication Publication Date Title
CN108334037B (en) Numerical control system and breakpoint continuous cutting method thereof
US10248487B1 (en) Error recovery for multi-stage simultaneously running tasks
CN103744730B (en) Task scheduling method and device
CN104410512A (en) A resource monitoring alarm framework and method suitable for cloud computing
CN118449945A (en) Marine observation real-time data transmission state monitoring and studying method
CN111970339B (en) Request control method and device and electronic equipment
CN103678090A (en) Method and device for monitoring data processing
CN114819612A (en) Method and system for carrying out early warning notification by short message reply control time wheel algorithm
CN111710403A (en) Medical equipment supervision method, equipment and readable storage medium
CN118369245B (en) A scalable approach to handling failures in electric vehicle charging station networks
CN108111328A (en) A kind of abnormality eliminating method and device
CN106202084A (en) Date storage method and data storage device
CN112988463A (en) Fault node isolation method and device
US20240264589A1 (en) Forming-machine equipment testing method, apparatus, system, and computer-readable storage medium
CN112318752A (en) Silicon rod cutting system
KR20250145094A (en) Data transmission methods, devices, electronic devices and storage media
CN117614797A (en) Data acquisition system and method
CN111830913B (en) Data acquisition method and device
CN103500179B (en) A kind of data source change method for early warning
AU2017223095B2 (en) System and method for smart event paging
CN110750418B (en) Information processing method, electronic equipment and information processing system
JP5643970B2 (en) Failure recovery device and communication device recovery method
JP4364879B2 (en) Failure notification system, failure notification method and failure notification program
CN106878101B (en) Method and device for processing alarm information in monitoring system
CN115080577B (en) Data statistics period switching method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant