CN112817788A - Task abnormity warning method, device, server and storage medium - Google Patents

Task abnormity warning method, device, server and storage medium Download PDF

Info

Publication number
CN112817788A
CN112817788A CN202110178507.6A CN202110178507A CN112817788A CN 112817788 A CN112817788 A CN 112817788A CN 202110178507 A CN202110178507 A CN 202110178507A CN 112817788 A CN112817788 A CN 112817788A
Authority
CN
China
Prior art keywords
alarm
task
configuration
configuration parameters
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110178507.6A
Other languages
Chinese (zh)
Inventor
陈群辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN202110178507.6A priority Critical patent/CN112817788A/en
Publication of CN112817788A publication Critical patent/CN112817788A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0715Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a system implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing

Abstract

The embodiment of the invention discloses a task abnormity warning method, a device, a server and a storage medium, wherein the method comprises the following steps: when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache; generating an alarm task according to the abnormal content and the alarm configuration parameters; and acquiring an idle thread from a preset thread pool to execute the alarm task. The embodiment of the invention realizes the configurability of the alarm parameter, the alarm parameter can be modified at any time without influencing the task flow of other business functions, and the time consumption for modifying and changing the alarm mechanism is reduced; meanwhile, threads for executing the alarm tasks are managed in a unified mode through the preset thread pool, and the phenomenon that when the alarm tasks are too many, the equipment load is increased due to the fact that too many threads are established is avoided.

Description

Task abnormity warning method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a task abnormity warning method, a task abnormity warning device, a server and a storage medium.
Background
At present, with the rapid development of internet technology, the service functions are updated and upgraded more and more frequently, and there is a situation that the implementation of one service function needs to be completed cooperatively by multiple applications, so that the implementation of one service function often needs to run multiple task flows.
In order to find out the abnormal condition of the task flow running process in time, an alarm mechanism code is usually embedded in the running code of the task flow, and when the abnormal condition is found, the alarm information is sent by a related responsible person. The alarm mode is called hard coding alarm, the alarm mechanism code and the operation code of the task flow are integrated, when the alarm mechanism code has a problem, the corresponding task operation code needs to be rolled back and revised together, and time is consumed. In addition, in this warning mode, the warning information is fixed, and when the warning information needs to be changed, a new task version needs to be issued, which is a complicated process.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a server, and a storage medium for task exception alarm, so as to implement an instant-taking-effect exception alarm configuration and reduce the time consumption for revising and changing an alarm mechanism.
In a first aspect, an embodiment of the present disclosure provides a method for task exception warning, including:
when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache;
generating an alarm task according to the abnormal content and the alarm configuration parameters;
and acquiring an idle thread from a preset thread pool to execute the alarm task.
Further, when a task is detected to be abnormal, before determining abnormal content and reading alarm configuration parameters from the local cache, the method further includes:
determining whether configuration change information sent by a configuration center is received;
and if receiving configuration change information sent by a configuration center, acquiring the latest alarm configuration parameters from the configuration center according to the configuration change information, and caching the latest alarm configuration parameters in the local.
Further, obtaining the latest alarm configuration parameters from the configuration center according to the configuration change information includes:
determining a configuration name according to the configuration change information;
and acquiring the latest alarm configuration parameters from the configuration center according to the configuration name.
Further, before acquiring an idle thread from a preset thread pool to execute the alarm task, the method further includes:
adding the alarm task into a queue;
and acquiring the current alarm task from the queue according to a first-in first-out principle.
Further, after adding the alarm task into the queue, the method further includes:
and if the number of the alarm tasks in the queue reaches a preset threshold value, discarding the alarm tasks added into the queue before the current time, and taking the alarm task newly added into the queue as the current alarm task.
Further, acquiring an idle thread from a preset thread pool to execute the alarm task includes:
and acquiring an idle thread from a preset thread pool to execute the current alarm task.
Further, after acquiring an idle thread from a preset thread pool and executing the current alarm task, the method further includes:
and returning the idle thread to the preset thread pool when the execution of the current alarm task is finished.
In a second aspect, an embodiment of the present disclosure provides a task exception warning device, including:
the parameter reading module is used for determining abnormal contents and reading alarm configuration parameters from a local cache when the task is detected to be abnormal;
the alarm task generating module is used for generating an alarm task according to the abnormal content and the alarm configuration parameters;
and the alarm task execution module is used for acquiring an idle thread from a preset thread pool and executing the alarm task.
In a third aspect, an embodiment of the present disclosure provides a server, including:
one or more processors;
a storage device for storing one or more programs,
when the one or at least one program is executed by the one or more processors, the one or more processors are enabled to implement the task exception warning method provided by any embodiment of the invention.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the task exception warning method provided in any embodiment of the present invention.
The task abnormity warning method provided by the embodiment of the invention determines the abnormal content and reads the warning configuration parameters from the local cache when the task abnormity is detected; generating an alarm task according to the abnormal content and the alarm configuration parameters; and acquiring an idle thread from a preset thread pool to execute the alarm task. The alarm parameters can be modified at any time without influencing the task flow of other business functions, and the time consumption for modifying and changing the alarm mechanism is reduced; meanwhile, threads for executing the alarm tasks are managed in a unified mode through the preset thread pool, and the phenomenon that when the alarm tasks are too many, the equipment load is increased due to the fact that too many threads are established is avoided.
Drawings
Fig. 1 is a schematic flowchart of a task exception warning method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a task exception warning method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a task exception warning device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "plurality", "batch" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
Fig. 1 is a flowchart illustrating a task exception warning method according to an embodiment of the present invention. As shown in fig. 1, a method for warning task exception according to an embodiment of the present invention includes:
and S110, when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache.
Specifically, the task in this embodiment may refer to a task flow corresponding to any business, such as a task flow formed by a loan business, a task flow formed by a trade order, and the like. In the running process of the task flow, when an abnormal condition is detected, the abnormal content needs to be determined so as to feed back the abnormal content; and simultaneously reading the alarm configuration parameters from the local cache. The alarm configuration parameters are configuration information which is preset by a user and is related to an alarm task, such as an alarm receiver, an alarm frequency and the like.
For example, in the running process of a task flow of a loan service, one wind control interface needs to be called for risk assessment, if the wind control interface cannot be called normally, an abnormal condition is determined, at the moment, abnormal content is determined, and alarm configuration parameters are read from a local cache, so that specific alarm operation is performed.
And S120, generating an alarm task according to the abnormal content and the alarm configuration parameters.
Specifically, an alarm task is generated according to an alarm receiver, an alarm frequency and the like of the alarm configuration parameters and specific abnormal contents, and the alarm task is generated according to the alarm frequency and sends the specific abnormal contents to the task of the alarm receiver.
S130, acquiring an idle thread from a preset thread pool to execute the alarm task.
Specifically, the alarm task is executed by a thread, and the threads executing the alarm task in this embodiment are all managed by a preset thread pool in a unified manner. When the alarm task needs to be executed, the idle thread is obtained from the preset thread pool to be executed, a new thread is not needed to be established without executing the alarm task once, and therefore the phenomenon that when the alarm task is too many, the equipment load is aggravated due to the fact that too many threads are established can be avoided.
The task abnormity warning method provided by the embodiment of the invention determines abnormal content and reads warning configuration parameters from a local cache when the task abnormity is detected; generating an alarm task according to the abnormal content and the alarm configuration parameters; and acquiring an idle thread from a preset thread pool to execute the alarm task. The alarm parameters can be modified at any time without influencing the task flow of other business functions, and the time consumption for modifying and changing the alarm mechanism is reduced; meanwhile, threads for executing the alarm tasks are managed in a unified mode through the preset thread pool, and the phenomenon that when the alarm tasks are too many, the equipment load is increased due to the fact that too many threads are established is avoided.
Example two
Fig. 2 is a schematic flow chart of a task exception warning method according to a second embodiment of the present invention, which further details the above-described embodiment. As shown in fig. 2, a task exception warning method provided in the second embodiment of the present invention includes:
s210, determining whether the configuration change information sent by the configuration center is received.
S220, if configuration change information sent by a configuration center is received, obtaining the latest alarm configuration parameters from the configuration center according to the configuration change information, and caching the latest alarm configuration parameters in the local.
Specifically, a configuration center user manages all alarm configuration parameters, and the user sets and modifies various alarm configuration parameters through the configuration center. The configuration center and the equipment of the task flow belong to two independent modules, for example, the configuration center and the equipment belong to different servers. When the user modifies the alarm configuration parameters of the configuration center, the configuration center sends configuration change information to the equipment where the task flow is located. When the equipment of the task process receives the configuration change information, the equipment can know that the alarm configuration parameters are changed, and at the moment, the equipment of the task process obtains the latest alarm configuration parameters from the configuration center and covers the latest alarm configuration parameters with the old alarm configuration parameters cached locally, so that the subsequent alarm operation can be executed according to the latest alarm configuration parameters.
Furthermore, the alarm configuration parameter of the configuration center usually has a unique configuration name, and when the alarm configuration parameter is changed, the received configuration change information includes the configuration name, so that the corresponding changed latest alarm configuration parameter can be obtained from the configuration center according to the configuration name.
Furthermore, one abnormal detection point in the task flow usually corresponds to one alarm configuration parameter, the same alarm configuration can be used in multiple abnormal detection points in one task flow or abnormal detection points of multiple task flows, at this time, only the configuration name corresponding to the alarm configuration parameter of the configuration center needs to be associated with the corresponding abnormal detection point, and an alarm configuration parameter does not need to be established at each abnormal detection point. Therefore, the alarm configuration parameters are more managed, the repeated appearance of the same alarm configuration parameters is reduced, resources are saved, and the efficiency is improved.
And S230, when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from the local cache.
Specifically, since the latest alarm configuration parameter is obtained from the configuration center when the alarm configuration parameter is updated, the alarm configuration parameter cached locally is also the latest alarm configuration parameter. In addition, the alarm configuration parameters are cached in the local, when the connection between the configuration center and the equipment of the task flow is abnormal, the alarm operation cannot be executed, and the stability of the system is improved.
And S240, generating an alarm task according to the abnormal content and the alarm configuration parameters.
And S250, adding the alarm task into a queue.
And S260, acquiring the current alarm task from the queue according to a first-in first-out principle.
Specifically, the alarm tasks are added into the queue so as to perform ordered processing on the alarm tasks. The alarm tasks in the queue adopt a first-in first-out principle, namely the alarm tasks which are firstly added into the queue are firstly processed. The alarm task obtained from the queue is the alarm task which needs to be processed currently, namely the current alarm task.
And S270, acquiring an idle thread from a preset thread pool to execute the current alarm task.
Specifically, an idle thread is obtained from a preset thread pool to execute the current alarm task, specific abnormal contents are fed back to a corresponding alarm receiver, and the whole alarm process is executed.
Furthermore, the number of threads in the preset thread pool is limited, the preset thread pool has a default number of threads, and a user can set the maximum value of the number of threads in the preset thread pool by himself. And when the number of the threads of the preset thread pool is more than the number of the alarm tasks in the queue, the alarm tasks in the queue need to be queued. In order to avoid congestion caused by excessive alarm tasks in the queue, when the number of the alarm tasks in the queue reaches a preset threshold (for example, the number of the alarm tasks in the queue is greater than the number of threads in a preset thread pool), the alarm tasks added into the queue before the current time are discarded, and the alarm tasks added into the queue before the current time are executed from the latest alarm task, that is, the latest alarm task added into the queue is used as the current alarm task.
And S280, returning the idle thread to the preset thread pool when the current alarm task is executed.
Specifically, when the current alarm task is completed, the thread executing the current alarm task is changed into an idle thread, and the idle thread is returned to the preset thread pool, so that when a new alarm task needs to be executed, the idle thread can be continuously used for executing the new alarm task. Therefore, the threads do not need to be repeatedly established and eliminated in the execution process of the plurality of alarm tasks, the execution time of the alarm tasks is saved, and the alarm efficiency is improved.
The task abnormity warning method provided by the embodiment of the invention realizes the configurability of the warning parameters, the warning parameters can be modified at any time without influencing the task flow of other business functions, and the time consumption for modifying and changing the warning mechanism is reduced; threads for executing the alarm tasks are managed in a unified mode through the preset thread pool, and the phenomenon that when the alarm tasks are excessive, the excessive threads are established to aggravate equipment loads is avoided; the execution time of the alarm task is saved through the reuse of the thread, and the alarm efficiency is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a task exception warning device according to a third embodiment of the present invention. The task exception warning device provided by this embodiment can implement the task exception warning method provided by any embodiment of the present invention, and has a corresponding functional structure and beneficial effects of the implementation method.
As shown in fig. 3, a task exception warning device provided in the third embodiment of the present invention includes: a parameter reading module 310, an alert task generating module 320, and an alert task executing module 330, wherein:
the parameter reading module 310 is configured to, when a task abnormality is detected, determine abnormal content and read an alarm configuration parameter from a local cache;
the alarm task generating module 320 is configured to generate an alarm task according to the abnormal content and the alarm configuration parameter;
the alert task execution module 330 is configured to obtain an idle thread from a preset thread pool to execute the alert task.
Further, the system further comprises a latest parameter acquisition module, and the latest parameter acquisition module is specifically configured to:
determining whether configuration change information sent by a configuration center is received;
and if receiving configuration change information sent by a configuration center, acquiring the latest alarm configuration parameters from the configuration center according to the configuration change information, and caching the latest alarm configuration parameters in the local.
Further, the latest parameter obtaining module is further configured to:
determining a configuration name according to the configuration change information;
and acquiring the latest alarm configuration parameters from the configuration center according to the configuration name.
Further, the system further comprises a current alarm task obtaining module, wherein the current alarm task obtaining module is specifically configured to:
adding the alarm task into a queue;
and acquiring the current alarm task from the queue according to a first-in first-out principle.
Further, the current alarm task obtaining module is further configured to:
and if the number of the alarm tasks in the queue reaches a preset threshold value, discarding the alarm tasks added into the queue before the current time, and taking the alarm task newly added into the queue as the current alarm task.
Further, the alarm task execution module 330 is specifically configured to:
and acquiring an idle thread from a preset thread pool to execute the current alarm task.
Further, the method also comprises the following steps:
and the thread returning module is used for returning the idle thread to the preset thread pool after the current alarm task is executed.
The task abnormity warning device provided by the third embodiment of the invention realizes the configurability of the warning parameters through the parameter reading module, the warning task generating module and the warning task executing module, the warning parameters can be modified at any time without influencing the task flows of other business functions, and the time consumption for modifying and changing the warning mechanism is reduced; meanwhile, threads for executing the alarm tasks are managed in a unified mode through the preset thread pool, and the phenomenon that when the alarm tasks are too many, the equipment load is increased due to the fact that too many threads are established is avoided.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary server 412 suitable for use in implementing embodiments of the present invention. The server 412 shown in fig. 4 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 4, server 412 is in the form of a general purpose server. Components of server 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
Bus 418 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Server 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 428 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 430 and/or cache Memory 432. The server 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk such as a Compact disk Read-Only Memory (CD-ROM), Digital Video disk Read-Only Memory (DVD-ROM) or other optical media may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for instance, in storage 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 442 generally perform the functions and/or methodologies of the described embodiments of the invention.
The server 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), with one or more terminals that enable a user to interact with the server 412, and/or with any terminals (e.g., network card, modem, etc.) that enable the server 412 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 422. Further, server 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the Internet) via Network adapter 420. As shown in FIG. 4, network adapter 420 communicates with the other modules of server 412 via bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the server 412, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 416 executes various functional applications and data processing by executing programs stored in the storage device 428, for example, implementing a task exception warning method provided by any embodiment of the present invention, which may include:
when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache;
generating an alarm task according to the abnormal content and the alarm configuration parameters;
and acquiring an idle thread from a preset thread pool to execute the alarm task.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for task exception warning provided in any embodiment of the present invention, where the method may include:
when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache;
generating an alarm task according to the abnormal content and the alarm configuration parameters;
and acquiring an idle thread from a preset thread pool to execute the alarm task.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A task abnormity warning method is characterized by comprising the following steps:
when the task is detected to be abnormal, determining abnormal content and reading alarm configuration parameters from a local cache;
generating an alarm task according to the abnormal content and the alarm configuration parameters;
and acquiring an idle thread from a preset thread pool to execute the alarm task.
2. The method of claim 1, wherein when a task anomaly is detected, before determining the anomaly content and reading the alarm configuration parameters from the local cache, further comprising:
determining whether configuration change information sent by a configuration center is received;
and if receiving configuration change information sent by a configuration center, acquiring the latest alarm configuration parameters from the configuration center according to the configuration change information, and caching the latest alarm configuration parameters in the local.
3. The method of claim 2, wherein obtaining the latest alarm configuration parameters from the configuration center based on the configuration change information comprises:
determining a configuration name according to the configuration change information;
and acquiring the latest alarm configuration parameters from the configuration center according to the configuration name.
4. The method of claim 1, wherein prior to obtaining an idle thread from a pool of preset threads to execute the alert task, further comprising:
adding the alarm task into a queue;
and acquiring the current alarm task from the queue according to a first-in first-out principle.
5. The method of claim 4, wherein after enqueuing the alert task, further comprising:
and if the number of the alarm tasks in the queue reaches a preset threshold value, discarding the alarm tasks added into the queue before the current time, and taking the alarm task newly added into the queue as the current alarm task.
6. The method of claim 4 or 5, wherein obtaining an idle thread from a pool of preset threads to perform the alert task comprises:
and acquiring an idle thread from a preset thread pool to execute the current alarm task.
7. The method of claim 6, wherein after acquiring an idle thread from a pool of preset threads to execute the current alert task, further comprising:
and returning the idle thread to the preset thread pool when the execution of the current alarm task is finished.
8. A task abnormality warning device characterized by comprising:
the parameter reading module is used for determining abnormal contents and reading alarm configuration parameters from a local cache when the task is detected to be abnormal;
the alarm task generating module is used for generating an alarm task according to the abnormal content and the alarm configuration parameters;
and the alarm task execution module is used for acquiring an idle thread from a preset thread pool and executing the alarm task.
9. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a task exception alert method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out a task exception alert method according to any one of claims 1 to 7.
CN202110178507.6A 2021-02-09 2021-02-09 Task abnormity warning method, device, server and storage medium Withdrawn CN112817788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110178507.6A CN112817788A (en) 2021-02-09 2021-02-09 Task abnormity warning method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110178507.6A CN112817788A (en) 2021-02-09 2021-02-09 Task abnormity warning method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112817788A true CN112817788A (en) 2021-05-18

Family

ID=75864669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110178507.6A Withdrawn CN112817788A (en) 2021-02-09 2021-02-09 Task abnormity warning method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112817788A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473785A (en) * 2022-05-30 2022-12-13 北京罗克维尔斯科技有限公司 Alarm information processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473785A (en) * 2022-05-30 2022-12-13 北京罗克维尔斯科技有限公司 Alarm information processing method and device, electronic equipment and storage medium
CN115473785B (en) * 2022-05-30 2024-02-27 北京罗克维尔斯科技有限公司 Alarm information processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109144696B (en) Task scheduling method and device, electronic equipment and storage medium
CN109144697B (en) Task scheduling method and device, electronic equipment and storage medium
CN110955640A (en) Cross-system data file processing method, device, server and storage medium
CN110851276A (en) Service request processing method, device, server and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN112817788A (en) Task abnormity warning method, device, server and storage medium
CN114285838A (en) File uploading method, device, system, storage medium and electronic equipment
CN114091704A (en) Alarm suppression method and device
CN111953569B (en) State information reporting method, device, equipment and medium
CN110515749B (en) Method, device, server and storage medium for queue scheduling of information transmission
CN113778644A (en) Task processing method, device, equipment and storage medium
CN113760503A (en) Task migration method and device, electronic equipment and computer readable medium
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN114928603A (en) Client software upgrading method and device, electronic equipment and medium
CN110928940B (en) Data writing method and device based on kafka cluster, electronic equipment and storage medium
CN113726885A (en) Method and device for adjusting flow quota
CN113656239A (en) Monitoring method and device for middleware and computer program product
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN108874560B (en) Method and communication device for communication
CN111427878A (en) Data monitoring and alarming method, device, server and storage medium
US11799768B1 (en) Lightweight reactive workflows through internal event generation and matching
CN113778711B (en) Event processing method and device, electronic equipment and storage medium
CN110262756B (en) Method and device for caching data
CN109918209B (en) Method and equipment for communication between threads

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210518

WW01 Invention patent application withdrawn after publication