Alarm task execution method and device, computing equipment and storage medium

By receiving alarm task data to determine the type of task and selecting corresponding program code to execute tasks, the problems of poor expansion and maintenance of computing equipment are solved, and flexible configuration of alarm tasks and storage space savings are achieved.

CN119225833APending Publication Date: 2024-12-31CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310786776.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In software system development and maintenance, due to different types of alarm tasks execution logic, the program code expansion and maintenance of computing devices are poor, especially when the types of alarm tasks increase, the timing execution logic needs to be continuously added, resulting in redundant codes. Waste and storage space are wasted.

Method used

By receiving alarm data in the alarm task to be executed, determining the task type and selecting the corresponding program code to execute tasks, realizing the program code configuration corresponding to each task type, improving the expansion and maintainability of the computing device, and through the second Program code stores and sends execution results to avoid code redundancy.

Benefits of technology

It realizes that when the types of alarm tasks increase, the corresponding program code is configured in the computing device to improve expansion and maintainability, avoid code redundancy, and save storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225833A_ABST
    Figure CN119225833A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm task execution method and device, computing equipment and a storage medium, and relates to the technical field of information processing. In the application, a to-be-executed alarm task is received, and the to-be-executed alarm task carries alarm data. Determining a task type of a to-be-executed alarm task according to the alarm data, determining a corresponding first program code from the program codes corresponding to the plurality of task types according to the task type, and executing the to-be-executed alarm task according to the first program code to obtain an execution result. According to the method provided by the invention, different program codes are configured for the alarm tasks of each task type, so that the corresponding program codes can be configured in the computing equipment under the scene that the task types of the alarm tasks are increased, and the execution of the alarm tasks of newly added task types can be realized; the expansibility and maintainability of program codes of the computing device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to an alarm task execution method, device, computing equipment and storage medium. Background Art

[0002] In software system development and maintenance, the alarm tasks issued by the dispatch center are usually executed by computing devices. However, since the execution logic of different types of alarm tasks is different, the program codes used to execute different alarm tasks are also different.

[0003] When the types of alarm tasks increase, developers need to add timed execution logic based on the program code already configured on the computing device, where the timed execution logic is used to instruct the computing device to periodically execute the program code corresponding to the newly added types of alarm tasks. This results in poor scalability and maintainability of the computing device. Summary of the invention

[0004] The present application provides an alarm task execution method, apparatus, computing device and storage medium, which can improve the scalability and maintainability of the computing device.

[0005] The technical solution of the embodiment of the present application is as follows:

[0006] According to the first aspect of the embodiment of the present application, there is provided an alarm task execution method, which is applied to a computing device, wherein the computing device is configured with a plurality of program codes corresponding to the execution logic of a plurality of types of alarm tasks; the method comprises: receiving an alarm task to be executed, wherein the alarm task to be executed carries alarm data; determining the task type of the alarm task to be executed and a first program code corresponding to the task type according to the alarm data, wherein the first program code is one of the plurality of program codes; executing the alarm task to be executed based on the first program code, and obtaining an execution result.

[0007] Optionally, the above method also includes: storing and sending the execution result.

[0008] Optionally, the computing device is configured with a second program code, and the second program code is used to store and send the execution result corresponding to each alarm task in multiple types of alarm tasks. Storing and sending the execution result includes: storing and sending the execution result based on the second program code.

[0009] Optionally, the alarm data carries a task type identifier; determining the task type of the alarm task to be executed and the first program code corresponding to the task type based on the alarm data, including: determining the task type of the alarm task based on the task type identifier; determining the program code corresponding to the task type as the first program code.

[0010] Optionally, before receiving the alarm task to be executed, the method further includes: receiving and storing a plurality of program codes corresponding to the execution logics of a plurality of types of alarm tasks respectively; and receiving and storing a second program code.

[0011] According to the second aspect of the embodiment of the present application, an alarm task execution device is provided, wherein the alarm task execution device is configured with a plurality of program codes corresponding to the execution logic of a plurality of types of alarm tasks respectively; the alarm task execution device comprises: a receiving unit, configured to receive an alarm task to be executed, wherein the alarm task to be executed carries alarm data; a determining unit, configured to determine the task type of the alarm task to be executed and a first program code corresponding to the task type according to the alarm data, wherein the first program code is one of a plurality of program codes; and an executing unit, configured to execute the alarm task to be executed based on the first program code to obtain an execution result.

[0012] Optionally, the execution unit is also used to store and send execution results.

[0013] Optionally, the alarm task execution device is further configured with a second program code, the second program code is used to store and send the execution result corresponding to each alarm task in multiple types of alarm tasks. The execution unit is specifically used to store and send the execution result based on the second program code.

[0014] Optionally, the alarm data carries a task type identifier; the determination unit is configured to determine the task type of the alarm task based on the task type identifier; and to determine the program code corresponding to the task type as the first program code.

[0015] Optionally, before receiving the alarm task to be executed, the receiving unit is further used to receive and store a plurality of program codes corresponding to the execution logics of a plurality of types of alarm tasks respectively; and to receive and store a second program code.

[0016] According to a third aspect of an embodiment of the present application, a computing device is provided, which may include: a processor and a memory for storing processor executable instructions; wherein the processor is configured to execute instructions to implement any one of the optional alarm task execution methods in the above-mentioned first aspect.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of a computing device, the computing device is enabled to execute any one of the optional alarm task execution methods in the above-mentioned first aspect.

[0018] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, which, when the computer program / instruction is executed by a processor, implements an alarm task execution method as in any optional implementation manner of the first aspect.

[0019] The beneficial effects provided by the embodiments of the present application are: by configuring different program codes for the alarm tasks of each task type, in the scenario where the task types of the alarm tasks are increased, the corresponding program codes can be configured in the computing device, so that the execution of the alarm tasks of the newly added task types can be realized, and the extensibility and maintainability of the program codes of the computing device can be improved. On the other hand, by executing the same part of the execution logic of the alarm tasks of each task type in multiple task types through the second program code configured by the computing device, the code redundancy of the computing device configuration can be avoided, thereby saving the storage space of the computing device.

[0020] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0022] Figure 1a An application scenario diagram of an alarm task execution device provided by the present application is shown;

[0023] Figure 1b A schematic diagram of a processing chain provided by the present application is shown;

[0024] Figure 2 A schematic diagram of the structure of a computing device provided by the present application is shown;

[0025] Figure 3 A flowchart of another method for executing an alarm task provided by the present application is shown;

[0026] Figure 4 A flowchart of another alarm task execution method provided by the present application is shown;

[0027] Figure 5 A schematic structural diagram of an alarm task execution device provided by the present application is shown. DETAILED DESCRIPTION

[0028] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0030] It should also be understood that the term “comprising” indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or components.

[0031] In software system development and maintenance, the alarm tasks issued by the dispatch center are usually executed by computing devices. However, since the execution logic of different types of alarm tasks is different, the program codes used to execute different alarm tasks are also different.

[0032] When the types of alarm tasks increase, the R&D personnel need to add timed execution logic based on the program code that has been configured on the computing device, where the timed execution logic is used to instruct the computing device to periodically execute the program code corresponding to the newly added type of alarm task. For example, the computing device needs to add an alarm task of type A, and the R&D personnel need to configure the timed execution logic on the computing device. The timed execution logic can execute the alarm task of type A received by the computing device every 30 minutes. As the number of alarm tasks continues to increase, different timed execution logics are constantly set on the computing device to execute alarm tasks of different types, resulting in the disadvantages of poor scalability and poor maintainability of the program code configured on the computing device.

[0033] Based on this, an embodiment of the present application provides an alarm task execution method, the method comprising: receiving an alarm task to be executed, wherein the alarm task to be executed carries alarm data. Determine the task type of the alarm task to be executed according to the alarm data, then determine the first program code corresponding to the task type of the alarm task to be executed from multiple program codes according to the task type, and finally execute the alarm task to be executed based on the first program code to obtain an execution result. The method provided in the embodiment of the present application configures different program codes for the alarm tasks of each task type respectively. In the scenario where the task types of the alarm tasks are increased, the corresponding program code can be configured in the computing device, thereby realizing the execution of the alarm tasks of the newly added task types, and can improve the extensibility and maintainability of the program code of the computing device.

[0034] The embodiment of the present application provides an alarm task execution device, which is used to execute the alarm task execution method provided by the embodiment of the present application. Figure 1a , Figure 1a An application scenario diagram of an alarm task execution device provided by an embodiment of the present application is shown. The alarm task execution device 100 is connected to a dispatch center, which monitors the equipment (resources) running in the system. When a situation requiring an alarm occurs, the dispatch center generates an alarm task to be executed and sends it to the alarm task execution device 100, wherein the alarm task to be executed carries alarm data.

[0035] Among them, the devices (resources) running in the system can be a host, a virtual machine, an operating system, a storage system, etc. The embodiment of the present application does not specifically limit the type of resources monitored by the dispatch center.

[0036] The alarm task execution device 100 is configured with a plurality of processing modules 110, each processing module 110 being the execution logic corresponding to the alarm task of different task types. When the alarm task execution device 100 receives the alarm task to be executed, the alarm task execution device 100 determines the task type of the alarm task to be executed based on the alarm data carried by the alarm task, and then executes the alarm task to be processed through the processing module 110 corresponding to the task type to obtain the execution result.

[0037] In one example, multiple processing modules 110 may be arranged in the alarm task execution device 100 in the form of a processing chain. Figure 1b , Figure 1b A schematic diagram of a processing chain is shown for an embodiment of the present application, wherein a plurality of processing modules 110 are arranged in sequence in the processing chain. When the alarm task execution device 100 receives an alarm task to be executed, it determines in turn whether each processing module 110 in the processing chain is a processing module 110 corresponding to the task type of the alarm task to be executed. When the processing module 110 is a processing module corresponding to the task type of the alarm task to be executed, the alarm task is executed based on the processing module.

[0038] Among them, the number of processing modules 110 in the processing chain can be pre-configured according to the actual usage scenario. For example, the number of processing modules 110 can be greater than the number of task types of alarm tasks that the alarm task execution device 100 can handle, for example, several processing modules can jointly handle alarm tasks of one task type. The number of processing modules 110 can also be less than or equal to the number of task types of alarm tasks that the alarm task execution device 100 can handle, for example, one processing module 110 can handle alarm tasks of multiple task types. The embodiments of the present application do not impose any special restrictions on this.

[0039] Optionally, in a scenario where the alarm task to be executed requires multiple processing modules 110 to execute respectively, the number of processing times of the alarm task can also be pre-set. When the alarm task execution device 100 receives the alarm task to be executed, it sequentially determines whether each processing module 110 in the processing chain is a processing module 110 corresponding to the task type of the alarm task to be executed. If the processing module 110 is a processing module 110 corresponding to the task type of the alarm task to be executed, the alarm task is executed based on the processing module 110. Then, it continues to determine whether each remaining processing module 110 in the processing chain is a processing module 110 corresponding to the task type of the alarm task to be executed, until the alarm task to be executed is completed by the number of processing modules 110 corresponding to the processing times.

[0040] It should be understood that the alarm task execution device 100 can be any computing device with computing processing capabilities, or a functional module in the computing device. As an example, the computing device can be a general-purpose computer, a notebook computer or a server.

[0041] The following is an exemplary description using the alarm task execution device 100 as a computing device.

[0042] Figure 2 The schematic diagram of the structure of a computing device 200 provided in an embodiment of the present application is shown. The computing device 200 includes a processor 210, a memory 220 and at least one communication interface 230.

[0043] The processor 210 may include one or more processing cores. The processor 210 uses various interfaces and lines to connect various parts within the computing device 200, and executes various functions and processes data of the computing device 200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 220, and calling data stored in the memory 220. Optionally, the processor 210 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 210 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 210, but may be implemented separately through a communication chip.

[0044] The memory 220 may be used to store instructions, programs, codes, code sets or instruction sets. In an embodiment of the present application, the memory 220 may include a program storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a task receiving function, a task execution function, etc.), instructions for implementing the following method embodiments, etc. The memory 220 stores codes corresponding to the execution logic of alarm tasks of different task types.

[0045] The communication interface 230 is used to communicate with a communication network or a device in a communication network, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN) or an AP in a WLAN network, etc. For example, the communication interface 230 of the computing device 200 communicates with other computing devices or terminals to receive an alarm task to be executed.

[0046] In a specific implementation, in terms of physical implementation, the above-mentioned devices (such as processor 210, memory 220 and communication interface 230) can be devices in the same computing device; or, at least two of the devices can be set in the same computing device, that is, as different devices in a computing device, such as a deployment method similar to that of devices or devices in a distributed system.

[0047] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the computing device 200. In some embodiments, the computing device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0048] Figure 3 A flowchart of a method for executing an alarm task provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, this method can be Figure 1a The alarm task execution device 100 shown, that is, Figure 2 The method may include the following steps:

[0049] S301: Receive an alarm task to be executed, where the alarm task to be executed carries alarm data.

[0050] Specifically, the alarm task to be executed is sent by the scheduling center to the computing device. The scheduling center monitors the resources running in the system in advance. When the resources running in the system meet the alarm conditions, it generates the corresponding alarm task to be executed and sends the alarm task to the computing device so that the computing device executes the alarm task.

[0051] Among them, the alarm conditions include resource types, alarm items, and alarm thresholds. Resource types include hosts, virtual machines, operating systems, and storage systems running in the system. Alarm items include CPU usage, memory usage, system load, and number of system processes. The alarm threshold is the threshold corresponding to the alarm item. When the value of the alarm item exceeds the threshold, the dispatch center generates an alarm task to be executed.

[0052] It should be understood that the resource type, alarm item and alarm threshold in the alarm condition can be flexibly set according to specific usage requirements. The above is only an exemplary description, and the embodiment of the present application does not impose any special restrictions on the specific implementation method of the alarm condition.

[0053] The alarm data is generated by the dispatch center when generating an alarm task to be executed. The alarm data includes the resource identifier, resource type, and the value of the alarm item.

[0054] Exemplarily, the alarm data includes a resource identifier of host A, a resource type of host, and a value of the alarm item of 80% CPU usage.

[0055] S302: Determine the task type of the alarm task to be executed and the first program code corresponding to the task type according to the alarm data.

[0056] Specifically, the computing device is configured with program codes corresponding to the execution logic of multiple types of alarm tasks, and the first program code is one of the multiple program codes. The computing device processes the alarm data to obtain the task type of the alarm task, and then determines the program code corresponding to the task type of the alarm task as the first program code.

[0057] In combination with the above example, when the alarm data includes the resource identifier being host A, the resource type being host, the value of the alarm item being 80% of the CPU usage, and the threshold of the CPU usage being 60%, the CPU usage of the task type being the host exceeds the threshold. At this time, the program code corresponding to the execution logic of the alarm task corresponding to the CPU usage of the host exceeding the threshold is determined as the first program code.

[0058] In a possible implementation, the alarm data carries a task type identifier. Figure 4 The above S302 specifically includes the following steps:

[0059] S3021. Determine the task type of the alarm task based on the task type identifier;

[0060] Specifically, the task type identifier may be generated before the dispatch center sends the alarm task to be executed to the computing device, and then the dispatch center sends the task type identifier to the computing device through the alarm task.

[0061] It should be understood that the alarm task identifier can be set by oneself, for example, it can be a combination of letters, numbers or words, and the embodiment of the present application does not particularly limit the specific implementation method of the task type identifier.

[0062] S3022: Determine the program code corresponding to the task type as the first program code.

[0063] In the method provided in the embodiment of the present application, the computing device can quickly determine the first program code corresponding to the alarm task to be executed from multiple program codes configured on the computing device through the task type identification, which can improve the execution efficiency of the alarm task and thus improve the user experience.

[0064] In a possible implementation, the computing device is configured with program codes corresponding to the execution logics of multiple types of alarm tasks, which are respectively set in the computing device in the form of a processing chain. The multiple program codes are arranged in sequence in the processing chain. When the computing device receives an alarm task to be executed, it determines in sequence based on the task type of the alarm task whether each program code in the processing chain is a program code corresponding to the task type of the alarm task to be executed. If the current program code is a processing module corresponding to the task type of the alarm task to be executed, the alarm task is executed based on the current program code.

[0065] Optionally, in a scenario where the alarm task to be executed requires multiple program codes to be executed separately, the number of executions of the alarm task can also be pre-set. When the computing device receives the alarm task to be executed, it sequentially determines whether the current program code in the processing chain is the program code corresponding to the task type of the alarm task to be executed. If the current program code is the program code corresponding to the task type of the alarm task to be executed, the alarm task is executed based on the current program code. Then, it continues to sequentially determine whether each remaining program code in the processing chain is the program code corresponding to the task type of the alarm task to be executed, until the alarm task to be executed is completed by executing the number of program codes corresponding to the processing times.

[0066] Exemplarily, the process of the computing device determining the first program code corresponding to the alarm task to be executed can be implemented by the following code:

[0067]

[0068]

[0069] Among them, the task type of alarm processing is AsyncCommand class, among which the matches method is used to filter the program code corresponding to the alarm task from multiple program codes, and only the data that meets the conditions can perform this task; ChainContext is the input parameter on the alarm task processing chain, which is used to place the screening rules and other data of the alarm task; the execute method is the basic execution logic of the alarm task.

[0070] It should be understood that the above is merely an exemplary description, and the first program code corresponding to the alarm task to be executed provided in the embodiment of the present application, and the specific implementation method of executing the alarm task based on the first program code can also be implemented by other program codes, and the embodiment of the present application does not impose any special restrictions on this.

[0071] S303: Execute the alarm task to be executed based on the first program code to obtain an execution result.

[0072] It can be seen from the above S301-S303 that the method provided in the embodiment of the present application configures different program codes for the alarm tasks of each task type. In the scenario where the task types of alarm tasks are increased, the corresponding program code can be configured in the computing device, thereby realizing the execution of the alarm tasks of the newly added task types, and improving the scalability and maintainability of the program code of the computing device.

[0073] Optionally, the method provided in the embodiment of the present application further includes:

[0074] S304: Store and send the execution result.

[0075] Specifically, the alarm task also carries a notification list, which includes multiple device identifiers, each of which is associated with a device. After executing the alarm task and obtaining an execution result, the computing device sends the execution result to the device associated with each device identifier included in the notification list.

[0076] In the related art, in the process of storing and sending execution results by a computing device, the computing device needs to configure corresponding program codes for storing and sending execution results for each type of alarm task, resulting in redundancy of program codes in the computing device and waste of storage space of the computing device.

[0077] In order to solve the above problem, the computing device provided in the embodiment of the present application is configured with a second program code, and the second program code is used to store and send the execution result corresponding to each alarm task in multiple types of alarm tasks.

[0078] The above S304 specifically includes the following steps: storing and sending the execution result based on the second program code.

[0079] Specifically, after executing the alarm task and obtaining the execution result, the computing device stores and sends the execution result of the alarm task of each task type based on the second program code.

[0080] In this way, the computing device executes the same part of the execution logic of the alarm task of each task type in multiple task types through the second program code configured by the computing device, which can avoid code redundancy configured by the computing device and thus save storage space of the computing device.

[0081] In some embodiments, before the above S301, the method further includes: the method provided by the embodiment of the present application further includes the following steps:

[0082] A plurality of program codes respectively corresponding to the execution logics of the plurality of types of alarm tasks are received and stored, and a second program code is received and stored.

[0083] Specifically, the multiple program codes corresponding to the execution logic of the multiple types of alarm tasks are configured with task type identifications, and the computing device stores the multiple program codes corresponding to the execution logic of the multiple types of alarm tasks in a preset location according to the task type identification, so that after receiving the alarm task to be executed, the computing device can quickly determine the first program code corresponding to the alarm task to be executed from the multiple program codes based on the task type identification.

[0084] In one example, the process of configuring the computing device with program codes corresponding to the execution logic of multiple types of alarm tasks can be implemented by the following code:

[0085]

[0086] Among them, the MainChain class is the processing chain for executing alarm tasks, and the Command class (program code) can be added in sequence to handle different types of alarm tasks.

[0087] It should be understood that the above is merely an exemplary description, and the computing device provided in the embodiment of the present application may also configure the program code corresponding to the execution logic of the alarm tasks of multiple task types through other program codes, and the embodiment of the present application does not impose any particular limitation on this.

[0088] In this way, the method provided by the embodiment of the present application realizes the flexible configuration of the program code of the execution logic of the alarm task of multiple task types. When the computing device needs to add an alarm task of a new task type to be executed, the configuration can be realized by simply storing the program code corresponding to the execution logic of the alarm task of the new task type to be executed in the computing device, thereby improving the scalability and maintainability of the program code of the computing device.

[0089] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the method. It is understandable that, in order to realize the above functions, the above computing device includes at least one of the hardware structure and software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.

[0090] The embodiment of the present application can divide the alarm task execution device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0091] For example, Figure 5 A structural schematic diagram of an alarm task execution device provided in an embodiment of the present application is shown. The alarm task execution device 100 is configured with multiple program codes corresponding to the execution logic of multiple types of alarm tasks. The above-mentioned device includes: a receiving unit 510, which is used to receive an alarm task to be executed, and the alarm task to be executed carries alarm data. A determination unit 520 is used to determine the task type of the alarm task to be executed and a first program code corresponding to the task type according to the alarm data, and the first program code is one of multiple program codes; an execution unit 530 is used to execute the alarm task to be executed based on the first program code to obtain an execution result.

[0092] Optionally, the execution unit 530 is also used to store and send the execution result.

[0093] Optionally, the alarm task execution device is further configured with a second program code, and the second program code is used to store and send the execution result corresponding to each alarm task in multiple types of alarm tasks. The execution unit 530 is specifically used to store and send the execution result based on the second program code.

[0094] Optionally, the alarm data carries a task type identifier. The determining unit 520 is configured to determine the task type of the alarm task based on the task type identifier; and to determine the program code corresponding to the task type as the first program code.

[0095] Optionally, before receiving the alarm task to be executed, the receiving unit 510 is further configured to receive and store a plurality of program codes corresponding to the execution logics of a plurality of types of alarm tasks respectively; and to receive and store a second program code.

[0096] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any alarm task execution device provided above and the description of the beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.

[0097] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement the alarm task execution method of each embodiment above. For the explanation of the relevant content and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference can be made to the above-mentioned corresponding embodiments, and no further description is given here.

[0098] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for realizing the functions of the above-mentioned alarm task execution device. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, a specific circuit structure (application specific integrated circuit, ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (field programmabl e gatearray, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.

[0099] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that may be integrated with one or more media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.

[0100] It should be noted that the above-mentioned device for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to, the above-mentioned memory, computer-readable storage medium and communication chip, etc., all have non-volatile (non-transitory). Those skilled in the art should be aware that in the above one or more examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0101] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for executing an alarm task, characterized in that: Applied to a computing device, the computing device is configured with a plurality of program codes corresponding to the execution logic of a plurality of types of alarm tasks; the method comprises: Receiving an alarm task to be executed, wherein the alarm task to be executed carries alarm data; Determine, according to the alarm data, a task type of the alarm task to be executed and a first program code corresponding to the task type, wherein the first program code is one of the multiple program codes; The to-be-executed alarm task is executed based on the first program code to obtain an execution result.

2. The method according to claim 1, characterized in that: The method further comprises: The execution result is stored and sent.

3. The method according to claim 2, characterized in that The computing device is configured with a second program code, and the second program code is used to store and send an execution result corresponding to each alarm task in the multiple types of alarm tasks; The storing and sending the execution result includes: The execution result is stored and sent based on the second program code.

4. The method according to claim 3, characterized in that: The alarm data carries a task type identifier; The step of determining the task type of the alarm task to be executed and the first program code corresponding to the task type according to the alarm data includes: Determining the task type of the alarm task based on the task type identifier; The program code corresponding to the task type is determined as the first program code.

5. The method according to claim 4, characterized in that Before receiving the alarm task to be executed, the method further includes: Receiving and storing a plurality of program codes respectively corresponding to the execution logics of the plurality of types of alarm tasks; and receiving and storing the second program code.

6. An alarm task execution device, characterized in that: The alarm task execution device is configured with a plurality of program codes corresponding to the execution logics of a plurality of types of alarm tasks respectively; The alarm task execution device comprises: A receiving unit, used for receiving an alarm task to be executed, wherein the alarm task to be executed carries alarm data; a determining unit, configured to determine, according to the alarm data, a task type of the alarm task to be executed and a first program code corresponding to the task type, wherein the first program code is one of the plurality of program codes; An execution unit is used to execute the alarm task to be executed based on the first program code to obtain an execution result.

7. The device according to claim 6, characterized in that The execution unit is further used to store and send the execution result.

8. The device according to claim 7, characterized in that The alarm task execution device is also configured with a second program code, and the second program code is used to store and send the execution result corresponding to each alarm task in the multiple types of alarm tasks; The execution unit is specifically configured to store and send the execution result based on the second program code.

9. The device according to claim 8, characterized in that The alarm data carries a task type identifier; the determining unit is configured to determine the task type of the alarm task based on the task type identifier; and used to determine the program code corresponding to the task type as the first program code.

10. The device according to claim 9, characterized in that Before receiving the alarm task to be executed, the receiving unit is further used to receive and store a plurality of program codes corresponding to the execution logics of the plurality of types of alarm tasks respectively; and to receive and store the second program code.

11. A computing device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instruction to implement the alarm task execution method as described in any one of claims 1-5.

12. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a computing device, the computing device is enabled to execute the alarm task execution method as described in any one of claims 1 to 5.