WO2020114059A1 - 一种报警信息的发送方法、装置及电子设备 - Google Patents

一种报警信息的发送方法、装置及电子设备 Download PDF

Info

Publication number
WO2020114059A1
WO2020114059A1 PCT/CN2019/109148 CN2019109148W WO2020114059A1 WO 2020114059 A1 WO2020114059 A1 WO 2020114059A1 CN 2019109148 W CN2019109148 W CN 2019109148W WO 2020114059 A1 WO2020114059 A1 WO 2020114059A1
Authority
WO
WIPO (PCT)
Prior art keywords
alarm
time
alarm information
timing
stored
Prior art date
Application number
PCT/CN2019/109148
Other languages
English (en)
French (fr)
Inventor
章华
Original Assignee
杭州海康威视系统技术有限公司
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 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2020114059A1 publication Critical patent/WO2020114059A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B25/00Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/107Computer-aided management of electronic mailing [e-mailing]
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B25/00Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems
    • G08B25/01Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium
    • G08B25/10Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium using wireless transmission systems
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B29/00Checking or monitoring of signalling or alarm systems; Prevention or correction of operating errors, e.g. preventing unauthorised operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes

Definitions

  • the present application relates to the technical field of alarm information processing, in particular to a method, device and electronic equipment for transmitting alarm information.
  • an alarm email can be sent to the user by means of an alarm linkage email.
  • the administrator can configure the mail server information for the alarm server, as well as configure linkage mail, and add one or several email addresses to receive the alarm mail.
  • the alarm server can control the configured mail server to send the alarm mail to the added email address. The user can get the alarm information and proceed accordingly.
  • the alarm server When the alarm information is generated frequently, the alarm server will control the mail server to send alarm mails frequently. Frequent sending of alarm mails may cause the alarm mails to be blocked and cause the alarm mails to not be received by users. Moreover, the sending email address of the alarm email may be used as a spam email address, and all subsequent alarm emails are blocked, so that the user can no longer receive the alarm email.
  • the purpose of the embodiments of the present application is to provide a method, device and electronic device for sending alarm information, so as to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a method for sending alarm information, the method includes:
  • Timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the timing time is restarted and returned to the The step of detecting whether the timing time reaches the preset interval time.
  • the method further includes:
  • the step of restarting the counting of the counted time is performed.
  • the method further includes:
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is obtained again, the timing is restarted, and it is returned to whether the detection timing has been reached.
  • the step of storing the alarm information carried in the received alarm instruction includes:
  • the step of sending the stored alarm information to the target address includes:
  • the step of sending the stored alarm information to the target address includes:
  • an embodiment of the present application provides an alarm information sending device, the device including:
  • the interval time detection module is used to detect whether the timing time reaches a preset interval time, wherein the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information;
  • the alarm information storage module is configured to store the alarm information carried by the received alarm instruction when the alarm instruction is received before the preset interval time is reached, and restart the timing of the timing time, and Trigger the interval detection module;
  • the first sending module is used to send the stored alarm information to the target address when the preset interval time is reached, and clear the timing time until the alarm instruction is received again, and restart the timing. Time the time and trigger the interval time detection module.
  • the device further includes:
  • the preset quantity judgment module is used for judging whether the quantity of alarm information currently stored reaches the pre-measurement after the storing of the alarm information carried by the received alarm instruction and before restarting the counting of the timing time Set quantity
  • the second sending module is used to send the stored alarm information to the target address when the preset number is reached, and reset the timing time until the alarm instruction is obtained again, and restart counting the timing time , And trigger the interval detection module;
  • the retiming module is used to restart the counting of the timing time when the preset number is not reached.
  • the device further includes:
  • a preset duration judgment module used to judge whether the difference between the current time and the earliest alarm time reaches the preset duration, wherein the earliest alarm time is the earliest alarm time corresponding to the stored alarm information;
  • the third sending module is used to send the stored alarm information to the target address when the preset duration is reached, and reset the timing time until the alarm command is obtained again, and restart the timing of the timing time, and Trigger the interval detection module;
  • the time duration judging module is used to continue judging whether the difference between the current time and the earliest alarm time reaches the preset duration when the preset duration is not reached.
  • the alarm information storage module includes:
  • the first merging unit is used to merge the alarm information carried by the received alarm instruction with the alarm information that has been acquired and not sent;
  • the alarm information storage unit is used to store the combined alarm information.
  • the first sending module includes:
  • a second merging unit used for merging the stored alarm information
  • the first sending unit is used to send the combined alarm information to the target address.
  • the first sending module includes:
  • the second sending unit is used to send the stored alarm information to the target address in the form of an alarm mail and/or instant messaging message.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus;
  • Memory used to store computer programs
  • the processor is configured to implement any of the foregoing method steps for sending the alarm information when executing the program stored in the memory.
  • an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, any of the alarm information described above is implemented Send method steps.
  • an embodiment of the present application provides a computer program, which is used to execute steps of a method for sending any of the alarm information described above during runtime.
  • the timing time is the time obtained from the last time the alarm instruction is received.
  • the alarm instruction carries the alarm information.
  • the alarm information carried by the received alarm instruction is stored, the timing is restarted, and the step of detecting whether the timing time reaches the preset interval time is returned; when the preset interval time is reached.
  • FIG. 1 is a flowchart of a method for sending alarm information provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a preset quantity judgment method based on the embodiment shown in FIG. 1;
  • FIG. 3 is a flowchart of a method for determining a preset duration based on the embodiment shown in FIG. 1;
  • FIG. 4 is a flowchart of a method for storing alarm information based on the embodiment shown in FIG. 1;
  • FIG. 5 is a specific flowchart of step S103 in the embodiment shown in FIG. 1;
  • FIG. 6 is a schematic structural diagram of a device for sending alarm information according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for transmitting alarm information.
  • the method for sending alarm information can be applied to any electronic device that needs to send alarm information to a target address, such as an alarm server, a mail server, etc., and is not specifically limited herein.
  • a target address such as an alarm server, a mail server, etc.
  • the electronic device will be referred to below.
  • a method for sending alarm information includes:
  • the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information.
  • step S102 When receiving an alarm instruction, store the alarm information carried in the received alarm instruction, restart the timing of the timing time, and return to step S101;
  • step S103 Send the stored alarm information to the target address, and clear the timing time until the alarm instruction is received again, restart counting the timing time, and return to step S101.
  • the electronic device can detect whether the timing time reaches the preset interval time.
  • the timing time is the time obtained from the last time the alarm command is received.
  • the alarm command carries the alarm information, and the alarm time
  • the timing time is restarted, and the step of detecting whether the timing time reaches the preset interval time is returned;
  • the preset interval time is reached, the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the above timing time is restarted and returned to detect whether the timing time reaches the preset interval Steps in time.
  • the alarm information is frequently generated, the alarm information will not be frequently sent to the target address, to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the electronic device can detect in real time whether the timing time reaches a preset time interval, where the timing time is the time obtained from the last time the alarm instruction is received. In other words, when the alarm command is received last time, the electronic device can start timing, and then obtain the timing time. In one embodiment, the electronic device may set a timer to count time to obtain the counted time.
  • the above alarm instructions can carry alarm information, where the alarm information can be the specific content of the alarm.
  • the alarm information can include: the type of alarm; illegal vehicle entry; vehicle information: license plate number, vehicle model, etc.; Enter time and other information.
  • the above alarm command can be issued by the monitoring device or the management personnel when an abnormal situation is found; when the electronic device is a mail server, the above alarm command can be issued by the alarm server, which is reasonable, There is no specific limitation here.
  • the above-mentioned preset time interval can be determined according to actual factors such as the real-time nature of the alarm. If the real-time requirement is high, the preset time interval can be shorter, for example, 0.5 minutes, 1 minute, 1.5 minutes, etc.; Low, then the preset time interval can be longer, for example, 3 minutes, 3.5 minutes, 5 minutes, etc.
  • step S102 can be executed.
  • step S103 can be executed.
  • the timing time does not reach the above-mentioned preset interval time, it means that the current time is relatively short from the last time the alarm command was received, then when the electronic device receives the alarm command, it can store the received alarm command. Carry the alarm information instead of sending the alarm information to the target address, so that the target address will not receive the alarm information frequently.
  • the electronic device can restart the timing of the timing time, continue to wait for the next time to receive the alarm instruction, and return to step S101 to continue to detect whether the timing time reaches the preset interval time in real time.
  • the electronic device can store the alarm information carried by these alarm commands instead of frequently sending it to the target address.
  • timing time When the timing time reaches the above preset interval, it means that the current time has been longer than the last time the alarm command was received, and no alarm has been received from the time when the alarm command was last received to the current time.
  • Command in order to ensure the real-time requirements of the alarm, you can no longer continue to wait for the next time to receive the alarm command, but send the stored alarm information to the target address.
  • the electronic device sends the alarm information to the target address. If the alarm information stored in the electronic device is the alarm information carried by the multiple received alarm instructions when the timing time reaches the preset interval, then the electronic device sends all the stored alarm information to the target address.
  • the above target address may be a pre-configured IP (Internet Protocol) address, email address, instant messaging address, etc. for receiving alarm information, which is not specifically limited here.
  • IP Internet Protocol
  • the electronic device is an alarm server
  • the alarm information is sent to the target address by mail, instant messaging, etc.
  • sending the stored alarm information to the target address may be the server corresponding to the alarm server control mail, instant messaging Send the stored alarm information to the target address.
  • instant messaging includes short message, WeChat, push message and other methods, which are not specifically limited here.
  • the electronic device is a server corresponding to mail and instant messaging, and the alarm information is sent to the target address by mail, instant messaging, etc. Then, the sending of the stored alarm information to the target address may be mail and instant messaging The corresponding server sends the stored alarm information to the target address.
  • the following table illustrates the method of sending the above alarm information as an example:
  • the method may further include:
  • step S201 judging whether the number of alarm information currently stored reaches a preset number, if the preset number is reached, step S202 is performed; if the preset number is not reached, step S203 is performed;
  • the electronic device After the electronic device stores the alarm information carried in the received alarm instruction, the electronic device can determine whether the amount of alarm information currently stored reaches a preset number.
  • the preset number may be determined according to factors such as network traffic in the application scenario and real-time alarm requirements, for example, it may be 10, 50, 100, etc., which is not specifically limited herein.
  • the alarm information carried by an alarm instruction can be recorded as an alarm information, that is, the number of alarm information currently stored is consistent with the number of alarm instructions received in the corresponding time period of.
  • the electronic device may perform step S202.
  • the electronic device can execute step S203.
  • S202 Send the stored alarm information to the target address, and clear the timing time until the alarm instruction is obtained again, restart timing the timing time, and return to detect whether the timing time reaches the preset interval time A step of;
  • the electronic device can send the stored alarm information to the target address.
  • the electronic device can clear the timing time until the alarm instruction is obtained again, restart counting the timing time, and return to the step of detecting whether the timing time reaches the preset interval time. Continue to wait to receive the next alarm instruction, and detect whether the timing time reaches the preset interval time in real time.
  • the following table shows an example of the method for sending the above alarm information:
  • the electronic device can determine whether the number of currently stored alarm information reaches a preset number, and if the preset number is reached, send the stored alarm information to the target address. In this way, it can not only ensure that the alarm information will not be sent frequently to the target address, but also that there will not be too many alarm information sent each time, and that the alarm information can be sent smoothly.
  • the alarm message that requires high real-time performance is not sent to the target address in time.
  • the embodiment of this application may also include:
  • step S301 Determine whether the difference between the current time and the earliest alarm time reaches a preset duration. If the preset duration is reached, perform step S302; if the preset duration is not reached, perform step S303;
  • the electronic device can determine in real time whether the difference between the current time and the earliest alarm time reaches a preset duration, where the earliest alarm time is the earliest alarm time corresponding to the stored alarm information, that is, the earliest alarm time generated from the stored alarm information The generation time of the alarm message.
  • the stored alarm information includes alarm information a, alarm information b, and alarm information c.
  • the generation times of alarm information a, alarm information b, and alarm information c are 10:30:11, 10:36:32, and 10: 39:45, then the earliest alarm time is 10:30:11.
  • the above-mentioned preset duration may be determined according to factors such as the real-time requirement of the alarm information, the frequency of the alarm information, and the like, for example, 10 minutes, 15 minutes, 25 minutes, etc., which is not specifically limited herein.
  • the preset duration is generally greater than the above-mentioned preset interval time, to avoid occurrence of the difference between the current time and the earliest alarm time that has reached the preset duration every time the timing time does not reach the preset interval time happensing.
  • the electronic device may execute step S302.
  • the electronic device can perform Step S303.
  • step S302 Send the stored alarm information to the target address, and clear the timing time until the alarm command is obtained again, restart the timing of the timing time, and return to step S301;
  • the electronic device can send the stored alarm information to the target address, and clear the timing time Zero, until the alarm command is obtained again, restart the timing time, continue to wait for the next alarm command, and detect whether the timing time reaches the preset interval in real time.
  • step S302 is performed.
  • the electronic device can determine in real time whether the difference between the current time and the earliest alarm time reaches the preset duration, if the preset duration is reached, send the stored alarm information to the target address, if the preset duration is not reached , Continue to judge whether the difference between the current time and the earliest alarm time reaches the preset duration. In this way, while ensuring that the alarm information will not be frequently sent to the target address, it can also ensure that the alarm information will not be stored for a long time without being sent, meeting the real-time requirements of the alarm information, so that the user can deal with the abnormal situation in time.
  • the step of storing the alarm information carried by the received alarm instruction may include:
  • the electronic device when the electronic device receives the alarm instruction, it may compare the alarm information carried in the received alarm instruction with the acquired and not sent To merge the alarm information, and then store the combined alarm information to wait for the timing time to reach the preset interval time, or when the number of alarm information currently stored reaches the preset number, or, the current time and the earliest When the difference of the alarm time reaches the preset duration, the stored combined alarm information is sent to the target address.
  • the electronic device when the electronic device receives the alarm instruction, the currently acquired and unsent alarm information includes alarm information 1, then the electronic device can The alarm information 2 carried in the alarm instruction is combined with the alarm information 1 to obtain the combined alarm information 12, and then the alarm information 12 is stored.
  • merging the alarm information is to synthesize multiple alarm information into one alarm information
  • the specific merging method can adopt any method that can merge the alarm information, which is not specifically limited here.
  • combining the alarm information may be to write multiple alarm information into one mail.
  • the electronic device when the timing time has not reached the preset interval, when the electronic device receives the alarm instruction again, it can merge the alarm information carried by the alarm instruction with the merged alarm information again, and so on, until it is satisfied In the condition of sending alarm information to the target address, the combined alarm information is sent to the target address.
  • condition for sending the alarm information to the target address may be: when the above timing time reaches the preset interval time, or when the number of currently stored alarm information reaches the preset number, or, the current time and the earliest alarm time The difference reaches the preset duration.
  • the electronic device can merge the alarm information carried by the received alarm instruction with the alarm information that has been acquired and not sent, and then store the combined alarm information, so that the electronic device can receive
  • an alarm message needs to be stored it is merged with the alarm message that has been acquired and not sent to avoid the problem of loss of alarm message.
  • the combined alarm message can be quickly sent to the target address.
  • the step of sending the stored alarm information to the target address may include:
  • S502 Send the combined alarm information to the target address.
  • the electronic device When storing the received alarm information, the electronic device can store multiple alarm information separately. When sending the alarm information, the electronic device can merge the stored alarm information, and then send the combined alarm information to the target address .
  • merging the alarm information is to synthesize multiple alarm information into one alarm information
  • the specific merging method can adopt any method that can merge the alarm information, which is not specifically limited here.
  • combining the alarm information may be to write multiple alarm information into one mail.
  • the currently stored alarm information includes alarm information 3, alarm information 4, alarm information 5, and alarm information 6, then the electronic device can merge the alarm information 3-6 to obtain the combined alarm information 7, and then send the alarm Message 7 to the target address.
  • the electronic device can merge the stored alarm information, and then send the combined alarm information to the target address, so that the electronic device can store all the stored alarm information when sending the alarm information To perform the merge, only one merge process is needed to send the merged alarm information to the target address, and the operation is simple and convenient.
  • the step of sending the stored alarm information to the target address may include:
  • the electronic device may send the stored alarm information to the target address in the form of an alarm mail and/or instant messaging message.
  • the alarm mail and instant message can include the combined alarm information.
  • the specific sending method of the instant messaging message may be in the form of short messages, push messages, notification messages, etc., which is not specifically limited here.
  • the electronic device can send the stored alarm information to the target address in the form of an alarm mail and/or instant communication message, and the alarm mail and/or instant communication message will not be frequently sent to the target address to avoid the occurrence of Alarm mail and/or instant messaging messages are blocked.
  • the frequency and number of alarm mails and/or instant messaging messages sent are reduced, the risk of being shielded is effectively reduced, and the reliability of users receiving alarm mails and/or instant messaging messages is ensured. It also saves mailbox space and/or storage space for instant messaging messages for users, and reduces network consumption.
  • an embodiment of the present application further provides a device for sending alarm information.
  • an alarm information sending device the device includes:
  • the interval time detection module 610 is used to detect whether the timing time reaches the preset interval time
  • the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information.
  • the alarm information storage module 620 is configured to store the alarm information carried by the received alarm instruction and restart the timing when the alarm instruction is received when the preset interval time is not reached. And trigger the interval time detection module 610;
  • the first sending module 630 is configured to send the stored alarm information to the target address when the preset interval time is reached, and clear the timing time until the alarm instruction is received again, and restart the timing The timing time and trigger the interval time detection module 610.
  • the electronic device can detect whether the timing time reaches the preset interval time.
  • the timing time is the time obtained from the last time the alarm command is received.
  • the alarm command carries the alarm information, and the alarm time
  • the timing time is restarted, and the step of detecting whether the timing time reaches the preset interval time is returned;
  • the preset interval time is reached, the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the above timing time is restarted and returned to detect whether the timing time reaches the preset interval Steps in time.
  • the alarm information is frequently generated, the alarm information will not be frequently sent to the target address, to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the foregoing device may further include:
  • a preset quantity judgment module (not shown in FIG. 6), used for judging that the current stored information is stored after the alarm information carried in the received alarm instruction is stored, and before the timing of the timing is restarted Whether the number of alarm messages reached the preset number;
  • the second sending module (not shown in FIG. 6) is used to send the stored alarm information to the target address when the preset number is reached, and clear the timing time until the alarm instruction is obtained again , Restart counting the timing time, and trigger the interval detection module 610;
  • a retime module (not shown in FIG. 6) is used to restart the time counting when the preset number is not reached.
  • the foregoing device may further include:
  • a preset duration judgment module (not shown in FIG. 6), used to judge whether the difference between the current time and the earliest alarm time reaches the preset duration
  • the earliest alarm time is the earliest alarm time corresponding to the stored alarm information.
  • the third sending module (not shown in FIG. 6) is used to send the stored alarm information to the target address when the preset duration is reached, and reset the timing time until the alarm command is obtained again, and then restart Start timing the timing time, and trigger the interval detection module 610;
  • the duration continuity judgment module (not shown in FIG. 6) is used to continue to determine whether the difference between the current time and the earliest alarm time reaches the preset duration when the preset duration is not reached.
  • the alarm information storage module 620 may include:
  • the first merging unit (not shown in FIG. 6) is used to merge the alarm information carried by the received alarm instruction with the alarm information that has been acquired and not sent;
  • the alarm information storage unit (not shown in FIG. 6) is used to store the combined alarm information.
  • the first sending module 630 may include:
  • a second merging unit (not shown in FIG. 6) for merging the stored alarm information
  • the first sending unit (not shown in FIG. 6) is used to send the combined alarm information to the target address.
  • the first sending module 630 may include:
  • the second sending unit (not shown in FIG. 6) is used to send the stored alarm information to the target address in the form of an alarm mail and/or instant messaging message.
  • the electronic device may include a processor 701, a communication interface 702, a memory 703, and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 pass The communication bus 704 completes communication with each other,
  • Memory 703 used to store computer programs
  • the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the timing time is restarted and returned to the The step of detecting whether the timing time reaches the preset interval time.
  • the electronic device can detect whether the timing time reaches the preset interval time.
  • the timing time is the time obtained from the last time the alarm command is received.
  • the alarm command carries the alarm information, and the alarm time
  • the timing time is restarted, and the step of detecting whether the timing time reaches the preset interval time is returned;
  • the preset interval time is reached, the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the above timing time is restarted and returned to detect whether the timing time reaches the preset interval Steps in time.
  • the alarm information is frequently generated, the alarm information will not be frequently sent to the target address, to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the communication bus mentioned in the above electronic device may be a peripheral component interconnection (Peripheral Component Interconnect, PCI) bus or an extended industry standard structure (Extended Industry Standard Architecture, EISA) bus, etc.
  • PCI peripheral component interconnection
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, and a control bus. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), or non-volatile memory (Non-Volatile Memory, NVM), for example, at least one disk memory.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory may also be at least one storage device located away from the foregoing processor.
  • the aforementioned processor may be a general-purpose processor, including a central processor (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP), dedicated integration Circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • a central processor Central Processing Unit, CPU
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the method may further include:
  • the step of restarting the counting of the counted time is performed.
  • the above method may further include:
  • the earliest alarm time is the earliest alarm time corresponding to the stored alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is obtained again, the timing is restarted, and it is returned to whether the detection timing has been reached.
  • the step of storing the alarm information carried by the received alarm instruction may include:
  • the step of sending the stored alarm information to the target address may include:
  • the step of sending the stored alarm information to the target address may include:
  • An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the timing time is restarted and returned to the The step of detecting whether the timing time reaches the preset interval time.
  • the computer program when executed by the processor, it can detect whether the timing time reaches the preset interval time.
  • the timing time is the time obtained from the last time the alarm instruction is received.
  • the alarm instruction carries Alarm information, when the pre-set interval time is not reached, when the alarm instruction is received, store the alarm information carried by the received alarm instruction, restart the timing of the timing time, and return to detect whether the timing time reaches the preset time Steps of interval time; when the preset interval time is reached, send the stored alarm information to the target address, and clear the timing time until the alarm command is received again, restart the timing of the above timing time, and return to the detection timing The step of whether the time reaches the preset interval time. In this way, when the alarm information is frequently generated, the alarm information will not be frequently sent to the target address, to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the method may further include:
  • the step of restarting the counting of the counted time is performed.
  • the above method may further include:
  • the earliest alarm time is the earliest alarm time corresponding to the stored alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is obtained again, the timing is restarted, and it is returned to whether the detection timing has been reached.
  • the step of storing the alarm information carried by the received alarm instruction may include:
  • the step of sending the stored alarm information to the target address may include:
  • the step of sending the stored alarm information to the target address may include:
  • An embodiment of the present application also provides a computer program, the computer program is used to perform the following steps at runtime:
  • the timing time is the time obtained from the last time the alarm instruction is received, and the alarm instruction carries alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is received again, and the timing time is restarted and returned to the The step of detecting whether the timing time reaches the preset interval time.
  • the computer program can detect whether the timing time reaches the preset interval time during running.
  • the timing time is the time from the last time the alarm instruction is received, and the alarm instruction carries the alarm information.
  • the preset interval time is not reached, when the alarm instruction is received, the alarm information carried in the received alarm instruction is stored, the timing time is restarted, and it is returned to detect whether the timing time reaches the preset interval time Step; when the preset interval time is reached, send the stored alarm information to the target address, and clear the timing time until the alarm command is received again, restart the timing of the above timing time, and return to detect whether the timing time is reached Steps to preset intervals.
  • the alarm information is frequently generated, the alarm information will not be frequently sent to the target address, to avoid the problem that the alarm information is blocked due to frequent transmission of the alarm information.
  • the method may further include:
  • the step of restarting the counting of the counted time is performed.
  • the above method may further include:
  • the earliest alarm time is the earliest alarm time corresponding to the stored alarm information.
  • the stored alarm information is sent to the target address, and the timing time is cleared until the alarm command is obtained again, the timing is restarted, and it is returned to whether the detection timing has been reached.
  • the step of storing the alarm information carried by the received alarm instruction may include:
  • the step of sending the stored alarm information to the target address may include:
  • the step of sending the stored alarm information to the target address may include:

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Emergency Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

一种报警信息的发送方法、装置及电子设备,发送方法包括:检测计时时间是否达到预设间隔时间(S101),计时时间为从最近一次接收到报警指令开始计时得到的时间;在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤(S102);在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时该计时时间,并返回检测计时时间是否达到预设间隔时间的步骤(S103)。在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。

Description

一种报警信息的发送方法、装置及电子设备
本申请要求于2018年12月6日提交中国专利局、申请号为201811486779.7发明名称为“一种报警信息的发送方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及报警信息处理技术领域,特别是涉及一种报警信息的发送方法、装置及电子设备。
背景技术
为了告知用户发生紧急情况,例如非法人员出入、非法车辆出入、设备损坏等情况,可以通过发送报警信息的方式提醒用户进行处理,例如,可以采用报警联动邮件的方式发送报警邮件给用户。
在报警联动邮件方式中,管理人员可以给报警服务器配置邮件服务器信息,以及配置联动邮件,添加一个或者若干个接收报警邮件的邮箱地址。这样,每当报警信息产生时,报警服务器可以控制所配置的邮件服务器向所添加的邮箱地址发送报警邮件。用户便可以获知报警信息,进而进行相应处理。
当报警信息频繁产生时,报警服务器会控制邮件服务器频繁发送报警邮件,频繁发送报警邮件可能导致报警邮件被屏蔽,造成报警邮件无法被用户接收到。甚至,报警邮件的发送邮箱地址可能被作为垃圾邮件地址,后续所有的报警邮件均被屏蔽,导致用户无法再接收到报警邮件。
可见,在目前的报警信息发送方式中,只要产生报警信息便立刻发送报警信息至预设的目标地址,当报警信息频繁产生时,会频繁发送报警信息至目标地址,很可能会出现报警信息被屏蔽的问题。
发明内容
本申请实施例的目的在于提供一种报警信息的发送方法、装置及电子设备,以避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。具体技术方案如下:
第一方面,本申请实施例提供了一种报警信息的发送方法,所述方法包 括:
检测计时时间是否达到预设间隔时间,其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息;
在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回所述检测计时时间是否达到预设间隔时间的步骤;
在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤。
可选的,在所述存储所接收到的报警指令所携带的报警信息的步骤之后,在所述对所述计时时间重新开始计时的步骤之前,所述方法还包括:
判断当前已存储的报警信息的数量是否达到预设数量;
如果达到所述预设数量,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
如果未达到所述预设数量,执行所述对所述计时时间重新开始计时的步骤。
可选的,所述方法还包括:
判断当前时间与最早报警时间的差值是否达到预设时长,其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间;
如果达到所述预设时长,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间阈值的步骤;
如果未达到所述预设时长,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
可选的,所述存储所接收到的报警指令所携带的报警信息的步骤,包括:
将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
存储合并后的报警信息。
可选的,所述发送已存储的报警信息至目标地址的步骤,包括:
将所述已存储的报警信息进行合并;
发送合并后的报警信息至目标地址。
可选的,所述发送已存储的报警信息至目标地址的步骤,包括:
以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
第二方面,本申请实施例提供了一种报警信息的发送装置,所述装置包括:
间隔时间检测模块,用于检测计时时间是否达到预设间隔时间,其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息;
报警信息存储模块,用于在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并触发所述间隔时间检测模块;
第一发送模块,用于在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块。
可选的,所述装置还包括:
预设数量判断模块,用于在所述存储所接收到的报警指令所携带的报警信息之后,在所述对所述计时时间重新开始计时之前,判断当前已存储的报警信息的数量是否达到预设数量;
第二发送模块,用于在达到所述预设数量时,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块;
重新计时模块,用于在未达到所述预设数量时,对所述计时时间重新开始计时。
可选的,所述装置还包括:
预设时长判断模块,用于判断当前时间与最早报警时间的差值是否达到预设时长,其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间;
第三发送模块,用于在达到所述预设时长时,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块;
时长继续判断模块,用于在未达到所述预设时长时,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
可选的,所述报警信息存储模块包括:
第一合并单元,用于将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
报警信息存储单元,用于存储合并后的报警信息。
可选的,所述第一发送模块包括:
第二合并单元,用于将所述已存储的报警信息进行合并;
第一发送单元,用于发送合并后的报警信息至目标地址。
可选的,所述第一发送模块包括:
第二发送单元,用于以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
第三方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述任一所述的报警信息的发送方法步骤。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的报警信息的发送方法步骤。
第五方面,本申请实施例提供了一种计算机程序,所述计算机程序用于在运行时执行实现上述任一所述的报警信息的发送方法步骤。
本申请实施例所提供的方案中,检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种报警信息的发送方法的流程图;
图2为基于图1所示实施例的预设数量判断方式的一种流程图;
图3为基于图1所示实施例的预设时长判断方式的一种流程图;
图4为基于图1所示实施例的存储报警信息方式的一种流程图;
图5为图1所示实施例中步骤S103的一种具体流程图;
图6为本申请实施例所提供的一种报警信息的发送装置的结构示意图;
图7为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了避免发生频繁发送报警信息导致的报警信息被屏蔽的问题,本申请实施例提供了一种报警信息的发送方法、装置、电子设备及计算机可读存储介质。
下面首先对本申请实施例所提供的一种报警信息的发送方法进行介绍。
本申请实施例所提供的一种报警信息的发送方法可以应用于报警服务器、邮件服务器等任意需要发送报警信息至目标地址的电子设备,在此不做具体限定。为了后续描述方便,以下简称电子设备。
如图1所示,一种报警信息的发送方法,所述方法包括:
S101,检测计时时间是否达到预设间隔时间,在未达到所述预设间隔时间的情况下,执行步骤S102;在达到所述预设间隔时间的情况下,执行步骤S103;
其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息。
S102,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回步骤S101;
S103,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回步骤S101。
可见,本申请实施例所提供的方案中,电子设备可以检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的 时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
在上述步骤S101中,电子设备可以实时检测计时时间是否达到预设时间间隔,其中,该计时时间为从最近一次接收到报警指令开始计时得到的时间。也就是说,在最近一次接收到报警指令时,电子设备可以开始计时,进而得到计时时间。在一种实施方式中,电子设备可以设置一个计时器进行计时,得到计时时间。
上述报警指令可以携带报警信息,其中,报警信息可以为报警的具体内容,例如,当有非法车辆进入时,报警信息可以包括:报警类型;非法车辆进入;车辆信息:车牌号码、车辆型号等;进入时间等信息。
电子设备为报警服务器时,上述报警指令可以为监控设备或者管理人员在发现发生异常情况时发出的;当电子设备为邮件服务器时,上述报警指令可以为报警服务器发出的,这都是合理的,在此不做具体限定。
上述预设时间间隔可以根据报警的实时性等实际因素确定,如果实时性要求较高,那么预设时间间隔便可以较短,例如,0.5分钟、1分钟、1.5分钟等;如果实时性要求较低,那么预设时间间隔便可以较长,例如,3分钟、3.5分钟、5分钟等。
在计时时间未达到上述预设间隔时间的情况下,说明当前时间距离最近一次接收到报警指令的时间还比较短,那么为了避免频繁发送报警信息至目标地址,便可以执行步骤S102。在计时时间达到上述预设间隔时间的情况下,说明当前时间距离最近一次接收到报警指令的时间已经比较长,那么为了尽 可能及时地发送报警信息至目标地址,便可以执行步骤S103。
在计时时间未达到上述预设间隔时间的情况下,说明当前时间距离最近一次接收到报警指令的时间还比较短,那么当电子设备接收到报警指令时,便可以存储所接收到的报警指令所携带的报警信息,而不是将报警信息发送至目标地址,这样目标地址便不会频繁接收到报警信息。同时,电子设备可以对上述计时时间重新开始计时,继续等待下一次接收报警指令,并返回步骤S101,继续实时检测计时时间是否达到预设间隔时间。
这样,如果前后接收到的两次报警指令的时间间隔未达到预设间隔时间,那么电子设备便可以将这些报警指令所携带的报警信息进行存储,而不是频繁发送至目标地址。
在计时时间达到上述预设间隔时间的情况下,说明当前时间距离最近一次接收到报警指令的时间已经比较长,从最近一次接收到报警指令时到当前时刻这段时间内均未再接收到报警指令,那么为了保证报警的实时性要求,此时便可以不再继续等待下一次接收报警指令,而是将已存储的报警信息发送至目标地址。
如果在计时时间达到上述预设间隔时间时,电子设备存储的报警信息仅为最近一次接收到的报警指令所携带的报警信息,那么电子设备便将该报警信息发送至目标地址。如果在计时时间达到上述预设间隔时间时,电子设备存储的报警信息为多次接收到的报警指令所携带的报警信息,那么电子设备便将所存储的所有报警信息发送至目标地址。
其中,上述目标地址可以为预先配置的用于接收报警信息的IP(Internet Protocol,网络协议)地址、邮箱地址、即时通信地址等,在此不做具体限定。
在一种实施方式中,电子设备为报警服务器,报警信息通过邮件、即时通信等方式发送至目标地址,那么上述发送已存储的报警信息至目标地址可以为报警服务器控制邮件、即时通信对应的服务器发送已存储的报警信息至目标地址。其中,即时通信包括短信、微信、推送消息等方式,在此不做具体限定。
在另一种实施方式中,电子设备为邮件、即时通信对应的服务器,报警 信息通过邮件、即时通信等方式发送至目标地址,那么上述发送已存储的报警信息至目标地址可以为邮件、即时通信对应的服务器发送已存储的报警信息至目标地址。
下面假设预设时间间隔为3分钟,以下表举例说明上述报警信息的发送方法:
Figure PCTCN2019109148-appb-000001
为了避免一次发送的报警信息内容过多,导致发送或者接收报警信息时发生故障,作为本申请实施例的一种实施方式,如图2所示,在上述存储所接收到的报警指令所携带的报警信息的步骤之后,在上述对所述计时时间重新开始计时的步骤之前,上述方法还可以包括:
S201,判断当前已存储的报警信息的数量是否达到预设数量,如果达到所述预设数量,执行步骤S202;如果未达到所述预设数量,执行步骤S203;
在电子设备存储所接收到的报警指令所携带的报警信息之后,电子设备 可以判断当前已存储的报警信息的数量是否达到预设数量。其中,该预设数量可以根据应用场景中网络的流量、报警实时性要求等因素确定,例如,可以为10、50、100等,在此不做具体限定。
对于已存储的报警信息的数量,可以将一个报警指令携带的报警信息记为一个报警信息,也就是说,当前已存储的报警信息的数量与相应时间段内接收到的报警指令的数量是一致的。
当前已存储的报警信息的数量达到预设数量时,说明此时已存储的报警信息的数量已经较多,如果继续获取下一次的报警信息,再将所存储的报警信息发送至目标地址,可能会发生故障,那么为了避免这种问题发生,电子设备可以执行步骤S202。
当前已存储的报警信息的数量未达到预设数量时,说明此时已存储的报警信息的数量还比较少,如果继续获取下一次的报警信息,再将所存储的报警信息发送至目标地址,发生故障的可能性也比较低,那么为了减少报警信息的发送次数,电子设备可以执行步骤S203。
S202,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
当前已存储的报警信息的数量达到预设数量时,说明此时已存储的报警信息的数量已经较多,那么电子设备便可以发送已存储的报警信息至目标地址。同时电子设备可以将上述计时时间清零,直到再次获取报警指令时,重新开始计时该计时时间,并返回上述检测计时时间是否达到预设间隔时间的步骤。继续等待接收下一个报警指令,并实时检测计时时间是否达到预设间隔时间。
S203,执行所述对所述计时时间重新开始计时的步骤。
当前已存储的报警信息的数量未达到预设数量时,说明此时已存储的报警信息的数量还比较少,那么此时便可以不发送已存储的报警信息,而是对上述计时时间重新开始计时,继续等待接收下一个报警指令。
下面假设预设时间间隔为3分钟,预设数量为10,以下表举例说明上述 报警信息的发送方法:
Figure PCTCN2019109148-appb-000002
可见,在本实施例中,电子设备可以判断当前已存储的报警信息的数量是否达到预设数量,如果达到所述预设数量,则发送已存储的报警信息至目标地址。这样,不仅可以保证不会频繁发送报警信息至目标地址,同时还能 保证每次发送的报警信息不会过多,保证报警信息可以顺利发送。
为了避免长时间等待接收下一个报警信息,而长时间未发送报警信息,导实时性要求较高的报警信息没有及时发送至目标地址,作为本申请实施例的一种实施方式,如图3所示,在执行上述报警信息的发送方法的同时,还可以包括:
S301,判断当前时间与最早报警时间的差值是否达到预设时长,如果达到所述预设时长,执行步骤S302;如果未达到所述预设时长,执行步骤S303;
电子设备可以实时判断当前时间与最早报警时间的差值是否达到预设时长,其中,该最早报警时间为已存储的报警信息对应的最早的报警时间,也就是已存储的报警信息中,最早产生的报警信息的产生时间。
例如,已存储的报警信息包括报警信息a、报警信息b及报警信息c,报警信息a、报警信息b及报警信息c的产生时间分别为10:30:11、10:36:32及10:39:45,那么最早报警时间即为10:30:11。
上述预设时长可以根据报警信息的实时性要求、报警信息产生频率等因素确定,例如,可以为10分钟、15分钟、25分钟等,在此不做具体限定。为了避免发生判断混乱,预设时长一般大于上述预设间隔时间,以避免发生每次在计时时间未达到预设间隔时间时,而当前时间与最早报警时间的差值都已达到预设时长的情况。
如果当前时间与最早报警时间的差值达到预设时长,说明此时已经较长时间没有发送报警信息至目标地址,那么为了保证报警信息的实时性要求,电子设备可以执行步骤S302。
如果当前时间与最早报警时间的差值未达到预设时长,说明此时距离上次发送报警信息至目标地址的时间还比较短,那么为了不会频繁发送报警信息至目标地址,电子设备可以执行步骤S303。
S302,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回步骤S301;
如果当前时间与最早报警时间的差值达到预设时长,说明此时已经较长 时间没有发送报警信息至目标地址,那么电子设备便可以发送已存储的报警信息至目标地址,同时将计时时间清零,直到再次获取报警指令时,重新开始计时该计时时间,继续等待接收下一个报警指令,并实时检测计时时间是否达到预设间隔时间。
S303,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
如果当前时间与最早报警时间的差值未达到预设时长,说明此时距离上次发送报警信息至目标地址的时间还比较短,那么电子设备可以继续判断当前时间与最早报警时间的差值是否达到上述预设时长,直到当前时间与最早报警时间的差值达到上述预设时长时,执行上述步骤S302。
下面假设预设时间间隔为3分钟,预设数量为100,预设时长为20分钟,以下表举例说明上述报警信息的发送方法:
Figure PCTCN2019109148-appb-000003
Figure PCTCN2019109148-appb-000004
可见,在本实施例中,电子设备可以实时判断当前时间与最早报警时间的差值是否达到预设时长,如果达到预设时长,发送已存储的报警信息至目标地址,如果未达到预设时长,继续判断当前时间与最早报警时间的差值是否达到预设时长。这样,在保证不会频繁发送报警信息至目标地址的同时,还可以保证报警信息不会长时间存储而不被发送,满足报警信息的实时性要求,使得用户可以及时处理发生的异常情况。
作为本申请实施例的一种实施方式,如图4所示,上述存储所接收到的报警指令所携带的报警信息的步骤,可以包括:
S401,将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
S402,存储合并后的报警信息。
在一种实施方式中,在上述计时时间未达到所述预设间隔时间的情况下,电子设备接收到报警指令时,可以将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并,进而存储合并后的报警信息,以等待上述计时时间达到所述预设间隔时间时,或者,当前已存储的报警信息的数量达到预设数量时,或者,当前时间与最早报警时间的差值达到预设时长时,发送所存储的合并后的报警信息至目标地址。
例如,在上述计时时间未达到所述预设间隔时间的情况下,电子设备接收到报警指令时,当前已获取且未发送的报警信息包括报警信息1,那么电子设备便可以将当前接收到的报警指令所携带的报警信息2与报警信息1合并得到合并后的报警信息12,进而存储报警信息12。
其中,对报警信息进行合并即为将多个报警信息合成一个报警信息,具体合并方式可以采用任意能够合并报警信息的方式,在此不做具体限定。例如,在报警信息以邮件的方式发送至目标地址的情况下,将报警信息进行合并可以为将多个报警信息写入一封邮件中。
那么在计时时间未达到预设间隔时间的情况下,电子设备再次接收到报警指令时,并可以将该报警指令所携带的报警信息与已合并的报警信息再次进行合并,以此类推,直到满足发送报警信息至目标地址的条件时,发送已合并的报警信息至目标地址。
其中,满足发送报警信息至目标地址的条件可以为:上述计时时间达到所述预设间隔时间时,或者,当前已存储的报警信息的数量达到预设数量时,或者,当前时间与最早报警时间的差值达到预设时长。
可见,在本实施例中,电子设备可以将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并,进而存储合并后的报警信息,这样,电子设备可以在接收到一个需要存储的报警信息时并将其与已获取且未发送的报警信息合并,避免发生报警信息丢失的问题,同时可以在需要发送报警信息时快速发送合并后的报警信息至目标地址。
对于存储报警信息时未对报警信息进行合并的情况而言,作为本申请实施例的一种实施方式,如图5所示,上述发送已存储的报警信息至目标地址的步骤,可以包括:
S501,将所述已存储的报警信息进行合并;
S502,发送合并后的报警信息至目标地址。
在存储所接收到的报警信息时,电子设备可以将多个报警信息分别进行存储,在发送报警信息时,电子设备可以将已存储的报警信息进行合并,进而发送合并后的报警信息至目标地址。
其中,对报警信息进行合并即为将多个报警信息合成一个报警信息,具体合并方式可以采用任意能够合并报警信息的方式,在此不做具体限定。例如,在报警信息以邮件的方式发送至目标地址的情况下,将报警信息进行合并可以为将多个报警信息写入一封邮件中。
例如,当前已存储的报警信息包括报警信息3、报警信息4、报警信息5及报警信息6,那么电子设备便可以将报警信息3-6进行合并,得到合并后的报警信息7,进而发送报警信息7至目标地址。
可见,在本实施例中,电子设备可以将已存储的报警信息进行合并,进而,发送合并后的报警信息至目标地址,这样,电子设备可以在发送报警信息时将所存储的所有的报警信息进行合并,只需要进行一次合并处理即可发送合并后的报警信息至目标地址,操作简单方便。
作为本申请实施例的一种实施方式,上述发送已存储的报警信息至目标地址的步骤,可以包括:
以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
在本实施方式中,电子设备可以将已存储的报警信息以报警邮件和/或即时通信消息的方式发送至目标地址。该报警邮件及即时通信消息中可以包括合并后的报警信息。
即时通信消息的具体发送方式可以是以短信、推送消息、通知消息等形式发送,在此不做具体限定。
可见,在本实施例中,电子设备可以以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址,不会频繁发送报警邮件和/或即时通信消息至目标地址,避免发生报警邮件和/或即时通信消息被屏蔽的问题。减少了报警邮件和/或即时通信消息发送的频率和数量,有效降低被屏蔽的风险,保证了用户能够接收到报警邮件和/或即时通信消息的可靠性。同时也为用户节省了邮箱空间和/或即时通信消息的存储空间,并降低了网络消耗。
相应于上述报警信息的发送方法,本申请实施例还提供了一种报警信息 的发送装置。
下面对本申请实施例所提供的一种报警信息的发送装置进行介绍。
如图6所示,一种报警信息的发送装置,所述装置包括:
间隔时间检测模块610,用于检测计时时间是否达到预设间隔时间;
其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息。
报警信息存储模块620,用于在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并触发所述间隔时间检测模块610;
第一发送模块630,用于在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块610。
可见,本申请实施例所提供的方案中,电子设备可以检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
作为本申请实施例的一种实施方式,上述装置还可以包括:
预设数量判断模块(图6中未示出),用于在所述存储所接收到的报警指令所携带的报警信息之后,在所述对所述计时时间重新开始计时之前,判断当前已存储的报警信息的数量是否达到预设数量;
第二发送模块(图6中未示出),用于在达到所述预设数量时,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块610;
重新计时模块(图6中未示出),用于在未达到所述预设数量时,对所述计时时间重新开始计时。
作为本申请实施例的一种实施方式,上述装置还可以包括:
预设时长判断模块(图6中未示出),用于判断当前时间与最早报警时间的差值是否达到预设时长;
其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间。
第三发送模块(图6中未示出),用于在达到所述预设时长时,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块610;
时长继续判断模块(图6中未示出),用于在未达到所述预设时长时,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
作为本申请实施例的一种实施方式,上述报警信息存储模块620可以包括:
第一合并单元(图6中未示出),用于将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
报警信息存储单元(图6中未示出),用于存储合并后的报警信息。
作为本申请实施例的一种实施方式,上述第一发送模块630可以包括:
第二合并单元(图6中未示出),用于将所述已存储的报警信息进行合并;
第一发送单元(图6中未示出),用于发送合并后的报警信息至目标地址。
作为本申请实施例的一种实施方式,上述第一发送模块630可以包括:
第二发送单元(图6中未示出),用于以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
本申请实施例还提供了一种电子设备,如图7所示,电子设备可以包括处理器701、通信接口702、存储器703和通信总线704,其中,处理器701,通信接口702,存储器703通过通信总线704完成相互间的通信,
存储器703,用于存放计算机程序;
处理器701,用于执行存储器703上所存放的程序时,实现如下步骤:
检测计时时间是否达到预设间隔时间;
其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息。
在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回所述检测计时时间是否达到预设间隔时间的步骤;
在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤。
可见,本申请实施例所提供的方案中,电子设备可以检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral  Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
其中,在上述存储所接收到的报警指令所携带的报警信息的步骤之后,在上述对所述计时时间重新开始计时的步骤之前,上述方法还可以包括:
判断当前已存储的报警信息的数量是否达到预设数量;
如果达到所述预设数量,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
如果未达到所述预设数量,执行所述对所述计时时间重新开始计时的步骤。
其中,上述方法还可以包括:
判断当前时间与最早报警时间的差值是否达到预设时长;
其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间。
如果达到所述预设时长,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间阈值的步骤;
如果未达到所述预设时长,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
其中,上述存储所接收到的报警指令所携带的报警信息的步骤,可以包括:
将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
存储合并后的报警信息。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
将所述已存储的报警信息进行合并;
发送合并后的报警信息至目标地址。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:
检测计时时间是否达到预设间隔时间;
其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息。
在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回所述检测计时时间是否达到预设间隔时间的步骤;
在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址, 并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤。
可见,本申请实施例所提供的方案中,计算机程序被处理器执行时,可以检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
其中,在上述存储所接收到的报警指令所携带的报警信息的步骤之后,在上述对所述计时时间重新开始计时的步骤之前,上述方法还可以包括:
判断当前已存储的报警信息的数量是否达到预设数量;
如果达到所述预设数量,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
如果未达到所述预设数量,执行所述对所述计时时间重新开始计时的步骤。
其中,上述方法还可以包括:
判断当前时间与最早报警时间的差值是否达到预设时长;
其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间。
如果达到所述预设时长,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返 回所述检测计时时间是否达到预设间隔时间阈值的步骤;
如果未达到所述预设时长,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
其中,上述存储所接收到的报警指令所携带的报警信息的步骤,可以包括:
将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
存储合并后的报警信息。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
将所述已存储的报警信息进行合并;
发送合并后的报警信息至目标地址。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
本申请实施例还提供了一种计算机程序,所述计算机程序用于在运行时执行以下步骤:
检测计时时间是否达到预设间隔时间;
其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息。
在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回所述检测计时时间是否达到预设间隔时间的步骤;
在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤。
可见,本申请实施例所提供的方案中,计算机程序在运行时可以检测计时时间是否达到预设间隔时间,计时时间为从最近一次接收到报警指令开始计时得到的时间,报警指令携带报警信息,在未达到预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对计时时间重新开始计时,并返回检测计时时间是否达到预设间隔时间的步骤;在达到预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将计时时间清零直到再次接收到报警指令时,重新开始计时上述计时时间,并返回检测计时时间是否达到预设间隔时间的步骤。这样,在报警信息频繁产生时,也不会频繁发送报警信息至目标地址,避免发生频繁发送报警信息导致的报警信息被屏蔽的问题。
其中,在上述存储所接收到的报警指令所携带的报警信息的步骤之后,在上述对所述计时时间重新开始计时的步骤之前,上述方法还可以包括:
判断当前已存储的报警信息的数量是否达到预设数量;
如果达到所述预设数量,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
如果未达到所述预设数量,执行所述对所述计时时间重新开始计时的步骤。
其中,上述方法还可以包括:
判断当前时间与最早报警时间的差值是否达到预设时长;
其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间。
如果达到所述预设时长,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间阈值的步骤;
如果未达到所述预设时长,继续判断当前时间与所述最早报警时间的差 值是否达到所述预设时长。
其中,上述存储所接收到的报警指令所携带的报警信息的步骤,可以包括:
将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
存储合并后的报警信息。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
将所述已存储的报警信息进行合并;
发送合并后的报警信息至目标地址。
其中,上述发送已存储的报警信息至目标地址的步骤,可以包括:
以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
需要说明的是,对于上述装置、电子设备、计算机可读存储介质以及计算机程序实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
进一步需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同 之处。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (15)

  1. 一种报警信息的发送方法,其特征在于,所述方法包括:
    检测计时时间是否达到预设间隔时间,其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息;
    在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并返回所述检测计时时间是否达到预设间隔时间的步骤;
    在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤。
  2. 如权利要求1所述的方法,其特征在于,在所述存储所接收到的报警指令所携带的报警信息的步骤之后,在所述对所述计时时间重新开始计时的步骤之前,所述方法还包括:
    判断当前已存储的报警信息的数量是否达到预设数量;
    如果达到所述预设数量,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间的步骤;
    如果未达到所述预设数量,执行所述对所述计时时间重新开始计时的步骤。
  3. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    判断当前时间与最早报警时间的差值是否达到预设时长,其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间;
    如果达到所述预设时长,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并返回所述检测计时时间是否达到预设间隔时间阈值的步骤;
    如果未达到所述预设时长,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
  4. 如权利要求1所述的方法,其特征在于,所述存储所接收到的报警指令所携带的报警信息的步骤,包括:
    将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
    存储合并后的报警信息。
  5. 如权利要求1所述的方法,其特征在于,所述发送已存储的报警信息至目标地址的步骤,包括:
    将所述已存储的报警信息进行合并;
    发送合并后的报警信息至目标地址。
  6. 如权利要求1-4任一项所述的方法,其特征在于,所述发送已存储的报警信息至目标地址的步骤,包括:
    以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
  7. 一种报警信息的发送装置,其特征在于,所述装置包括:
    间隔时间检测模块,用于检测计时时间是否达到预设间隔时间,其中,所述计时时间为从最近一次接收到报警指令开始计时得到的时间,所述报警指令携带报警信息;
    报警信息存储模块,用于在未达到所述预设间隔时间的情况下,当接收到报警指令时,存储所接收到的报警指令所携带的报警信息,对所述计时时间重新开始计时,并触发所述间隔时间检测模块;
    第一发送模块,用于在达到所述预设间隔时间的情况下,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次接收到报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块。
  8. 如权利要求7所述的装置,其特征在于,所述装置还包括:
    预设数量判断模块,用于在所述存储所接收到的报警指令所携带的报警信息之后,在所述对所述计时时间重新开始计时之前,判断当前已存储的报警信息的数量是否达到预设数量;
    第二发送模块,用于在达到所述预设数量时,发送所述已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块;
    重新计时模块,用于在未达到所述预设数量时,对所述计时时间重新开始计时。
  9. 如权利要求7所述的装置,其特征在于,所述装置还包括:
    预设时长判断模块,用于判断当前时间与最早报警时间的差值是否达到预设时长,其中,所述最早报警时间为所述已存储的报警信息对应的最早的报警时间;
    第三发送模块,用于在达到所述预设时长时,发送已存储的报警信息至目标地址,并将所述计时时间清零直到再次获取报警指令时,重新开始计时所述计时时间,并触发所述间隔时间检测模块;
    时长继续判断模块,用于在未达到所述预设时长时,继续判断当前时间与所述最早报警时间的差值是否达到所述预设时长。
  10. 如权利要求7所述的装置,其特征在于,所述报警信息存储模块包括:
    第一合并单元,用于将所接收到的报警指令所携带的报警信息与已获取且未发送的报警信息进行合并;
    报警信息存储单元,用于存储合并后的报警信息。
  11. 如权利要求7所述的装置,其特征在于,所述第一发送模块包括:
    第二合并单元,用于将所述已存储的报警信息进行合并;
    第一发送单元,用于发送合并后的报警信息至目标地址。
  12. 如权利要求7-10任一项所述的装置,其特征在于,所述第一发送模块包括:
    第二发送单元,用于以报警邮件和/或即时通信消息的方式发送已存储的报警信息至目标地址。
  13. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通 信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。
  15. 一种计算机程序,其特征在于,所述计算机程序用于在运行时执行权利要求1至6任一项所述的方法步骤。
PCT/CN2019/109148 2018-12-06 2019-09-29 一种报警信息的发送方法、装置及电子设备 WO2020114059A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811486779.7 2018-12-06
CN201811486779.7A CN111292514A (zh) 2018-12-06 2018-12-06 一种报警信息的发送方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2020114059A1 true WO2020114059A1 (zh) 2020-06-11

Family

ID=70973727

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/109148 WO2020114059A1 (zh) 2018-12-06 2019-09-29 一种报警信息的发送方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN111292514A (zh)
WO (1) WO2020114059A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047689A (zh) * 2021-11-17 2022-02-15 广州易而达科技股份有限公司 一种照明设备控制方法、装置、照明设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112349073A (zh) * 2020-10-28 2021-02-09 广州鸿大智能科技有限公司 动力环境告警方法、装置和存储介质
CN113988338A (zh) * 2021-11-17 2022-01-28 广州地铁集团有限公司 一种地铁车辆人机混检的管理监控系统及管理监控方法
CN116527853B (zh) * 2023-06-20 2023-10-13 深圳比特微电子科技有限公司 电子设备、云端设备、客户端设备及其操作方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437109A (zh) * 2002-02-05 2003-08-20 联想(北京)有限公司 防火墙设备可变频率的确认式故障报警方法
CN102882702A (zh) * 2012-08-24 2013-01-16 曙光信息产业(北京)有限公司 一种告警信息处理的系统和方法
CN102932757A (zh) * 2012-09-25 2013-02-13 百度在线网络技术(北京)有限公司 移动终端的心跳消息发送方法、移动终端、信息推送系统
US20160150385A1 (en) * 2014-11-24 2016-05-26 Orange Message management method and device
CN106972943A (zh) * 2016-01-13 2017-07-21 中兴通讯股份有限公司 告警消息发送方法及基站
CN107025143A (zh) * 2016-09-23 2017-08-08 阿里巴巴集团控股有限公司 一种应用消息的通知处理方法、装置及通信终端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3151514B2 (ja) * 1997-03-14 2001-04-03 綜合警備保障株式会社 画像監視システム
CN101192332A (zh) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 告警系统和方法
CN103746938A (zh) * 2014-01-13 2014-04-23 广东睿江科技有限公司 一种发送数据包的方法及装置
CN107040581B (zh) * 2017-01-25 2021-03-02 腾讯科技(深圳)有限公司 一种网络包发送方法、装置、服务器及系统
CN108593991A (zh) * 2017-12-19 2018-09-28 杭州海兴电力科技股份有限公司 基于无线通讯的停电告警装置、系统及方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437109A (zh) * 2002-02-05 2003-08-20 联想(北京)有限公司 防火墙设备可变频率的确认式故障报警方法
CN102882702A (zh) * 2012-08-24 2013-01-16 曙光信息产业(北京)有限公司 一种告警信息处理的系统和方法
CN102932757A (zh) * 2012-09-25 2013-02-13 百度在线网络技术(北京)有限公司 移动终端的心跳消息发送方法、移动终端、信息推送系统
US20160150385A1 (en) * 2014-11-24 2016-05-26 Orange Message management method and device
CN106972943A (zh) * 2016-01-13 2017-07-21 中兴通讯股份有限公司 告警消息发送方法及基站
CN107025143A (zh) * 2016-09-23 2017-08-08 阿里巴巴集团控股有限公司 一种应用消息的通知处理方法、装置及通信终端

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047689A (zh) * 2021-11-17 2022-02-15 广州易而达科技股份有限公司 一种照明设备控制方法、装置、照明设备和存储介质
CN114047689B (zh) * 2021-11-17 2023-03-24 广州易而达科技股份有限公司 一种照明设备控制方法、装置、照明设备和存储介质

Also Published As

Publication number Publication date
CN111292514A (zh) 2020-06-16

Similar Documents

Publication Publication Date Title
WO2020114059A1 (zh) 一种报警信息的发送方法、装置及电子设备
CN110224858B (zh) 基于日志的告警方法及相关装置
WO2019052283A1 (zh) 一种防盗刷方法、操作检测方法、装置及电子设备
US8601065B2 (en) Method and apparatus for preventing outgoing spam e-mails by monitoring client interactions
CN107395632B (zh) SYN Flood防护方法、装置、清洗设备及介质
US8719625B2 (en) Method, apparatus and computer program for processing invalid data
US20080082658A1 (en) Spam control systems and methods
WO2020168933A1 (zh) 一种网络请求的处理方法、装置、终端及存储介质
CN108390856B (zh) 一种DDoS攻击检测方法、装置及电子设备
CN110022259B (zh) 消息到达率确定方法、装置、数据统计服务器及存储介质
WO2014023189A1 (en) Method and apparatus for entering a client function module
CN112511517B (zh) 一种邮件检测方法、装置、设备及介质
US20120210420A1 (en) Systems and Methods of Probing Data Transmissions for Detecting Spam Bots
WO2015058640A1 (zh) 安全访问方法、系统及装置
JP2019176473A5 (zh)
WO2016107456A1 (zh) 一种处理消息的方法、装置及系统
US20130152196A1 (en) Throttling of rogue entities to push notification servers
CN111447201A (zh) 一种扫描行为识别方法、装置及电子设备和存储介质
US9002771B2 (en) System, method, and computer program product for applying a rule to associated events
CN111355765B (zh) 一种网络请求的处理、发送方法及装置
CN107547301A (zh) 一种主备设备倒换方法及装置
CN109981478A (zh) 一种报文处理方法及装置
CN111865716B (zh) 一种端口拥塞检测方法、装置、设备及机器可读存储介质
US11665120B2 (en) Identifying HTTP requests generated from links embedded in emails by automated processes
WO2015000428A1 (zh) 数据处理的方法、服务器及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19893735

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19893735

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19893735

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 14.12.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19893735

Country of ref document: EP

Kind code of ref document: A1