Event processing method and device, computer equipment, readable storage medium and program product

By employing anti-duplication and conflict detection methods, the event processing system addresses duplication and conflict issues, enhancing efficiency and reliability in event handling.

CN119179584APending Publication Date: 2024-12-24SUGON INFORMATION IND +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411217556.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

Traditional event processing systems in Linux systems suffer from duplication and conflict issues in error event handling, leading to inefficient resource usage and reduced reliability due to repeated processing and conflicts.

Method used

Implement anti-duplication mutual exclusion detection on the waiting queue and conflict detection on the execution queue to manage events, reducing unnecessary processing and preventing conflicts.

Benefits of technology

This approach enhances event processing efficiency by minimizing redundant operations and ensuring reliable event handling, thereby improving system resource utilization and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179584A_ABST
    Figure CN119179584A_ABST
Patent Text Reader

Abstract

The invention relates to an event processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining a target event reported by an error detection mechanism, performing anti-re-exclusion detection on a waiting queue according to an anti-re-exclusion detection strategy and the target event, and updating the waiting queue based on an anti-re-exclusion detection result; waiting events in the waiting queue are sequentially obtained, conflict detection is carried out based on the waiting events and the events to be executed in the execution queue, and the waiting events are added to the execution queue based on a conflict detection result. By adopting the method, the event processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of event management, and in particular to an event processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of server technology, the demand for error event handling is also increasing. Servers need to detect and handle hardware and software failures to ensure system reliability and stability.

[0003] In traditional technology, first, the repair module in the Linux system repairs the error event in the event execution queue. When the Linux system detects an error in the hardware device, it reports the error event through the AER (Advanced Error Reporting) mechanism or the DPC (Downstream Port Containment) mechanism. After receiving the error event, the system adds the error event to the event execution queue.

[0004] However, in traditional technologies, since the hardware devices corresponding to different error events may have duplication and conflicts in processing logic, when processing error events in the event execution queue, repeated processing and processing conflicts may occur, thereby causing a waste of system resources and resulting in low efficiency in error event processing. Summary of the invention

[0005] Based on this, it is necessary to provide an event processing method, apparatus, computer device, computer-readable storage medium and computer program product to address the above technical issues.

[0006] In a first aspect, the present application provides an event processing method, comprising:

[0007] Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0008] The waiting events in the waiting queue are obtained in sequence, conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue, and based on the conflict detection result, the waiting event is added to the execution queue.

[0009] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0010] In one embodiment, the anti-duplication mutual exclusion detection is performed on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, including:

[0011] Determine a target strategy between the target event and each waiting event in the waiting queue in the anti-repetition mutual exclusion detection strategy;

[0012] Based on the target event and the target strategy, anti-duplicate mutual exclusion detection is performed on each waiting event in the waiting queue in turn.

[0013] In this embodiment, by determining the target strategy corresponding to the target event and each waiting event in the waiting queue in the anti-duplication mutual exclusion detection strategy, and using the target strategy corresponding to the current waiting event and the target event, the adaptability of the anti-duplication mutual exclusion detection to the target event and the waiting event can be improved, and the accuracy of the anti-duplication mutual exclusion detection can be improved.

[0014] In one embodiment, determining the target strategy between the target event and each waiting event in the waiting queue in the anti-repetitive mutual exclusion detection strategy includes:

[0015] If the first device path of the first device corresponding to the target event is the same as the second device path of the second device corresponding to the waiting event, determining a device relationship between the first device and each of the second devices according to the device tree;

[0016] According to the device relationship, the event type of the target event and the event type corresponding to each of the waiting events, a target strategy between the target event and each of the waiting events is determined in an anti-repetition mutual exclusion detection strategy table.

[0017] In this embodiment, the device paths of the target event and the waiting event are used to determine whether the current target event needs to perform anti-duplication mutual exclusion detection with the waiting event, which can avoid performing anti-duplication mutual exclusion detection on unnecessary waiting events and improve detection efficiency. Furthermore, when anti-duplication mutual exclusion detection is required, the target strategy is determined in the anti-duplication mutual exclusion detection strategy table based on the relationship between devices, which can accurately implement anti-duplication mutual exclusion detection of waiting events and target events, reduce the number of events that the central processor needs to process, and improve event processing efficiency.

[0018] In one embodiment, updating the waiting queue based on the anti-duplication mutual exclusion detection result includes:

[0019] If the anti-duplication mutual exclusion detection results between the target event and each of the waiting events are that the events are not merged, the target event is taken as a new waiting event and added to the waiting queue;

[0020] In the waiting queue, if the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded;

[0021] If the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

[0022] In this embodiment, by determining the target strategy between the target event and the waiting event in the anti-duplication mutual exclusion detection strategy table, and discarding the target event or the waiting event based on the target strategy, anti-duplication mutual exclusion processing of the target event and the waiting event is implemented, which can reduce the number of events that the central processor needs to process and improve event processing efficiency.

[0023] In one embodiment, sequentially acquiring the waiting events in the waiting queue, performing conflict detection based on the waiting events and each to-be-executed event in the execution queue, and adding the waiting events to the execution queue based on the conflict detection result, includes:

[0024] Sequentially obtain the waiting events in the waiting queue, and perform conflict detection based on the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue;

[0025] If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and the waiting event is added to an execution queue based on the conflict detection result.

[0026] In this embodiment, before adding the waiting events in the waiting queue to the execution queue, a conflict detection is performed on the waiting events and the queue to be executed, and the waiting events with a conflict detection result of no conflict detection are added to the queue to be executed. This can prevent execution conflicts from occurring in the waiting events in the execution queue, thereby improving the stability of event processing.

[0027] In one embodiment, after sequentially acquiring the waiting events in the waiting queue and performing conflict detection between the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue, the method further comprises:

[0028] If the first root port and the second root port are the same root port, the conflict detection is determined as a conflict, and after it is determined that the pending event that conflicts with the waiting event completes the execution operation, the waiting event is added to the execution queue.

[0029] In this embodiment, by avoiding setting waiting events that conflict with pending events in the execution queue at the same time, and adding the waiting events to the execution queue after the pending events that conflict with the waiting events in the pending events complete the execution operation, execution conflicts among the pending events in the execution queue can be avoided, thereby improving the stability of event processing.

[0030] In a second aspect, the present application also provides an event processing device, including:

[0031] An anti-duplication mutual exclusion detection module is used to obtain a target event reported by an error detection mechanism, perform an anti-duplication mutual exclusion detection on a waiting queue according to an anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0032] The conflict detection module is used to sequentially obtain the waiting events in the waiting queue, perform conflict detection based on the waiting events and each to-be-executed event in the execution queue, and add the waiting events to the execution queue based on the conflict detection results.

[0033] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0034] In one of the embodiments, the anti-repetition mutual exclusion detection module is specifically used to determine the target strategy between the target event and each waiting event in the waiting queue in the anti-repetition mutual exclusion detection strategy;

[0035] Based on the target event and the target strategy, anti-duplicate mutual exclusion detection is performed on each waiting event in the waiting queue in turn.

[0036] In this embodiment, by determining the target strategy corresponding to the target event and each waiting event in the waiting queue in the anti-duplication mutual exclusion detection strategy, and using the target strategy corresponding to the current waiting event and the target event, the adaptability of the anti-duplication mutual exclusion detection to the target event and the waiting event can be improved, and the accuracy of the anti-duplication mutual exclusion detection can be improved.

[0037] In one of the embodiments, the anti-duplication mutual exclusion detection module is specifically used to determine the device relationship between the first device and each of the second devices according to the device tree if the first device path of the first device corresponding to the target event is the same as the second device path of the second device corresponding to the waiting event;

[0038] According to the device relationship, the event type of the target event and the event type corresponding to each of the waiting events, a target strategy between the target event and each of the waiting events is determined in an anti-repetition mutual exclusion detection strategy table.

[0039] In this embodiment, the device paths of the target event and the waiting event are used to determine whether the current target event needs to perform anti-duplication mutual exclusion detection with the waiting event, which can avoid performing anti-duplication mutual exclusion detection on unnecessary waiting events and improve detection efficiency. Furthermore, when anti-duplication mutual exclusion detection is required, the target strategy is determined in the anti-duplication mutual exclusion detection strategy table based on the relationship between devices, which can accurately implement anti-duplication mutual exclusion detection of waiting events and target events, reduce the number of events that the central processor needs to process, and improve event processing efficiency.

[0040] In one of the embodiments, the anti-duplication mutual exclusion detection module is specifically used to treat the target event as a new waiting event and add it to the waiting queue if the anti-duplication mutual exclusion detection results between the target event and each of the waiting events are that the events are not merged;

[0041] In the waiting queue, if the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded;

[0042] If the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

[0043] In this embodiment, by determining the target strategy between the target event and the waiting event in the anti-duplication mutual exclusion detection strategy table, and discarding the target event or the waiting event based on the target strategy, anti-duplication mutual exclusion processing of the target event and the waiting event is implemented, which can reduce the number of events that the central processor needs to process and improve event processing efficiency.

[0044] In one embodiment, the conflict detection module is specifically used to sequentially obtain the waiting events in the waiting queue, and perform conflict detection according to the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue;

[0045] If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and the waiting event is added to an execution queue based on the conflict detection result.

[0046] In this embodiment, before adding the waiting events in the waiting queue to the execution queue, a conflict detection is performed on the waiting events and the queue to be executed, and the waiting events with a conflict detection result of no conflict detection are added to the queue to be executed. This can prevent execution conflicts from occurring in the waiting events in the execution queue, thereby improving the stability of event processing.

[0047] In one embodiment, the device further comprises:

[0048] An adding module is used to determine the conflict detection as a conflict if the first root port and the second root port are the same root port, and add the waiting event to the execution queue after determining that the pending event that conflicts with the waiting event completes the execution operation.

[0049] In this embodiment, by avoiding setting waiting events that conflict with pending events in the execution queue at the same time, and adding the waiting events to the execution queue after the pending events that conflict with the waiting events in the pending events complete the execution operation, execution conflicts among the pending events in the execution queue can be avoided, thereby improving the stability of event processing.

[0050] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0051] Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0052] The waiting events in the waiting queue are obtained in sequence, conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue, and based on the conflict detection result, the waiting event is added to the execution queue.

[0053] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0054] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0055] Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0056] The waiting events in the waiting queue are obtained in sequence, conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue, and based on the conflict detection result, the waiting event is added to the execution queue.

[0057] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0058] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0059] Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0060] The waiting events in the waiting queue are obtained in sequence, conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue, and based on the conflict detection result, the waiting event is added to the execution queue.

[0061] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0062] The above-mentioned event processing method, device, computer equipment, computer-readable storage medium and computer program product can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing by implementing anti-duplicate mutual exclusion detection on target events and waiting events through waiting queues; and can prevent event processing failures caused by concurrent processing of conflicting events by executing queues, thereby improving the reliability of event processing and further improving the efficiency of target event processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0064] Figure 1 A schematic diagram of a flow chart of an event processing method in an embodiment;

[0065] Figure 2 A schematic diagram of a scenario in which a target event and a waiting event are repeated or mutually exclusive in one embodiment;

[0066] Figure 3 It is a schematic diagram of a process of performing anti-duplicate mutual exclusion detection on a target event and a waiting event in one embodiment;

[0067] Figure 4 A schematic diagram of a process for determining a target strategy between a target event and a waiting event in one embodiment;

[0068] Figure 5 A schematic diagram of a process of performing event processing according to a target strategy in an embodiment;

[0069] Figure 6 A flowchart of performing anti-duplicate mutual exclusion detection on a target event and a waiting event in one embodiment;

[0070] Figure 7 A schematic diagram of a process for performing conflict detection on waiting events and pending events in one embodiment;

[0071] Figure 8 A flowchart of performing conflict detection on waiting events and pending events in one embodiment;

[0072] Fig. 9 A flowchart of an example of an event processing method in an embodiment;

[0073] Fig.10is a structural block diagram of an event processing device in an embodiment;

[0074] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] Before introducing the specific embodiments of the present invention, the professional terms involved in the present invention are explained first:

[0077] AER, Advanced error report, PCIe error detection and reporting mechanism;

[0078] DPC, Downstream port containment, PCIe error prevention mechanism;

[0079] HP (Hotplug, a technology for inserting and removing devices in a PCIe system during operation;

[0080] UP, Upstream Port, upstream port of PCIe switch;

[0081] DP, DisplayPort, downstream port of PCIe switch;

[0082] EP, Endpoint, PCIe endpoint device, the system is NVME disk, IO interface card network card, etc.;

[0083] RP, Root Port, the downstream port of the Root complex (the root node of the PCIe tree) is the port directly connected to the CPU.

[0084] AER, the PCIe error detection and reporting mechanism, is divided into three categories according to the impact of errors on the system: correctable errors are detected and repaired by hardware, do not affect business effectiveness and continuity, and do not require software intervention, but when a large number of correctable errors occur in the device, it will affect system performance; uncorrectable non-fatal errors affect single data transmission and transaction processing, do not affect other transaction processing, and the PCIe subsystem can operate normally at this time; uncorrectable fatal errors affect all data and transactions passing through the faulty device, and the PCIe subsystem cannot provide services normally. In this application, uncorrectable errors are a general term for uncorrectable fatal errors and uncorrectable non-fatal errors.

[0085] DPC is a standard feature for downstream devices to prevent error propagation. The underlying fault detection mechanism of the system is AER. DPC provides a fast fault isolation mechanism based on the AER detection mechanism. When the AER (unmasked uncorrectable error) condition is met, DPC replaces the AER reporting mechanism. The PCIe system reports the error through DPC and the DPC mechanism triggers the device link to immediately enter the disable state to isolate the faulty device.

[0086] HP refers to the plugging and unplugging of PCIe devices during system operation. If the PCIe device supports hot plugging, the PCIe system can ensure that the device is scanned normally when the device is inserted, and can remove device-related resources when the device is unplugged.

[0087] In one embodiment, Figure 1 As shown, an event processing method is provided. This embodiment takes the method applied to the central processing unit of the server as an example. It can be understood that the method can also be applied to the terminal, and can also be applied to the system including the terminal and the server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0088] Step 102, obtaining the target event reported by the error detection mechanism, performing anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and updating the waiting queue based on the anti-duplication mutual exclusion detection result.

[0089] In an embodiment of the present application, the error detection mechanism is a mechanism for detecting PCIe system events in a Linux system, including an AER mechanism, a DPC mechanism, and an HP mechanism, and the target events reported by the above-mentioned various error detection mechanisms include AER events, DPC events, and HP events.

[0090] The server system is generally a Linux system. In the Linux system, the causes of PCIe events include kernel-mode AER interrupts, DPC interrupts, and HP interrupts, as well as kernel-mode active repairs and user-mode active repairs. When a device in the server fails or runs erroneously, the server's central processor obtains the target event through AER reporting. After the central processor obtains the target event, it needs to add the target event to the waiting queue, which is a cache queue for storing error events. The error event can be reported by different error detection mechanisms and contains error descriptions for different server devices.

[0091] In user state, before adding the current target event to the waiting queue, the central processing unit performs anti-duplication mutual exclusion detection on the target event and the waiting queue according to the anti-duplication mutual exclusion detection strategy pre-set in the user state, and determines whether the waiting event contained in the waiting queue is a duplicate of or mutually exclusive with the current target event. If the target event and the waiting queue do not have duplication or mutual exclusion, the target event is added to the waiting queue as a waiting event to update the waiting queue.

[0092] In an exemplary embodiment, Figure 2 In the scenario 1 shown, SW represents a switch. When an AER uncorrectable fatal error occurs on the downstream port DP of the SW, the server not only needs to reset and repair the DP, but also needs to reset and repair the EP corresponding to the DP. Therefore, the server generates event 1 corresponding to the DP and event 2 corresponding to the EP. The AER mechanism reports event 1 (AER uncorrectable reset and repair) corresponding to the DP and event 2 (AER uncorrectable reset and repair) corresponding to the DP and EP to the central processor and adds them to the waiting queue (the waiting queue is empty by default at this time). At this time, if an AER uncorrectable fatal error also occurs on the EP corresponding to the DP, the AER mechanism needs to report event 2 corresponding to the EP to the central processor again. The target events reported twice by the AER mechanism both include event 2, indicating that the target event (i.e., event 2) reported by the second AER is repeated with the waiting event already existing in the current waiting queue. According to the anti-duplicate mutual exclusion detection strategy, the anti-duplicate mutual exclusion detection result is to discard the target event (i.e., event 2 reported by the AER for the second time), thereby avoiding duplicate waiting events in the waiting queue and preventing the central processor from repeatedly performing invalid repair operations on error event 2 to improve event processing efficiency.

[0093] for Figure 2 In the scenario 2 shown, an AER uncorrectable fatal error first occurs in the EP device. At this time, after being reported by the AER mechanism, an AER uncorrectable reset and repair event exists in the waiting queue. At the same time, before the AER uncorrectable fatal error is reset and repaired, a hot-plug removal operation occurs on the EP device, and its corresponding DP port reports a hot-plug removal event. At this time, the reset and repair result of the uncorrectable fatal error of the EP device will fail. In this case, since the EP device has been unplugged (a hot-plug removal operation occurs), there is no need to reset and repair the EP device. At this time, according to the anti-double-mutex detection strategy, the anti-double-mutex detection result is to discard the waiting event (i.e., the AER uncorrectable reset and repair event), so as to avoid the central processor from invalidating the AER uncorrectable reset and repair event to improve event processing efficiency.

[0094] Step 104 , sequentially obtain the waiting events in the waiting queue, perform conflict detection based on the waiting events and each to-be-executed event in the execution queue, and add the waiting events to the execution queue based on the conflict detection result.

[0095] In an embodiment of the present application, the execution queue is a cache queue for storing events to be executed. When there is a waiting event in the waiting queue and the execution queue is empty or the waiting event in the execution queue is acquired for execution, the central processing unit acquires the waiting event in the waiting queue in turn, and performs conflict detection on the waiting event and each waiting event in the execution queue according to the event conflict detection mechanism. If there is no conflict between the waiting event and each waiting event, the waiting event is added to the execution queue until all the waiting events in the waiting queue are added to the execution queue.

[0096] When there are pending events in the execution queue, the repair module (or coroutine module) of the Linux system obtains the pending events in the execution queue and repairs the device that generates an error in the server based on the pending events.

[0097] In the above event processing method, anti-duplicate mutual exclusion detection is implemented on the target event and the waiting event through the waiting queue, which can reduce unnecessary event processing, reduce system resource consumption, and improve the efficiency of target event processing; conflict detection is performed on the target event and the event to be executed through the execution queue, which can prevent event processing failure caused by concurrent processing of conflicting events, improve the reliability of event processing and further improve the efficiency of target event processing.

[0098] In an exemplary embodiment, Figure 3 As shown, step 102 includes steps 302 to 304. Among them:

[0099] Step 302: Determine a target strategy between the target event and each waiting event in the waiting queue in an anti-duplicate mutual exclusion detection strategy.

[0100] In the embodiment of the present application, in the anti-repeating mutual exclusion detection strategy, different target strategies correspond to different waiting events in the target event and the waiting event in the waiting queue, which are used to perform anti-repeating mutual exclusion detection on the target event and the waiting event. The central processing unit can determine the target strategy for anti-repeating mutual exclusion detection based on the different attributes of the target event and the waiting event. For example, the basis for the central processing unit to determine the target strategy can be the device path and device relationship corresponding to the target event and the waiting event, and the event type corresponding to the target event and the waiting event respectively.

[0101] In an optional embodiment, the basis for determining the target strategy may also be the priority of event processing, the event processed, the system resources and load corresponding to the event, etc. For example, the central processing unit can add the target event to the waiting queue based on the priority of event processing or the event processing time, and set the waiting events with a lower priority than the target event at the back of the waiting queue, or set the waiting events with a higher event processing time than the target event at the back of the waiting queue.

[0102] Step 304: perform anti-duplicate mutual exclusion detection on each waiting event in the waiting queue in turn based on the target event and the target strategy.

[0103] In the embodiment of the present application, the central processing unit performs anti-duplication mutual exclusion detection according to the target strategy between the target event and the waiting event determined during the traversal process when traversing the target event and each waiting event to perform anti-duplication mutual exclusion detection.

[0104] Specifically, after obtaining the target event, the CPU first selects the target strategy for the first waiting event in the waiting queue. After determining the target strategy, the CPU performs anti-duplicate mutual exclusion detection on the waiting event according to the target event and the target strategy. The anti-duplicate mutual exclusion detection result can be to discard the target event or the waiting event, or if there is no duplication or mutual exclusion between the target event and the waiting event, the target event and the waiting event are not merged. Then, the next waiting event in the waiting queue is selected in turn, and the anti-duplicate mutual exclusion detection is performed on the second waiting event according to the anti-duplicate mutual exclusion detection strategy, until the anti-duplicate mutual exclusion detection of all waiting events and target events is completed.

[0105] In this embodiment, by determining the target strategy corresponding to the target event and each waiting event in the waiting queue in the anti-duplication mutual exclusion detection strategy, and using the target strategy corresponding to the current waiting event and the target event, the adaptability of the anti-duplication mutual exclusion detection to the target event and the waiting event can be improved, and the accuracy of the anti-duplication mutual exclusion detection can be improved.

[0106] In an exemplary embodiment, each type of target event and different types of wait events perform anti-repeated mutual exclusion detection according to different target strategies, such as Figure 4 As shown, step 302 includes steps 402 to 404. Among them:

[0107] Step 402: If the first device path of the first device corresponding to the target event is the same as the second device path of the second device corresponding to the waiting event, determine the device relationship between the first device and each second device according to the device tree.

[0108] In an embodiment of the present application, in a server of a Linux system, the device tree contains the attribute information and structural relationship of each hardware device of the server, which enables the kernel-state operating system to determine which hardware exists in the current server, and then the central processing unit can determine the first device corresponding to the target event, the first device path, and the second device and the second device path corresponding to each waiting event. If the first device path and the second device path are the same, it means that there is an association relationship between the first device and the second device, that is, when the central processing unit processes the target event or the waiting event, both the first device and the second device will be affected. Therefore, the central processing unit first determines whether the first device path of the first device corresponding to the target event and the second device path of the second device corresponding to the waiting event are the same. If they are the same, it is necessary to determine the device relationship between the first device corresponding to the target event and the second device corresponding to the waiting event. The device relationship includes the parent device relationship of the first device as the second device, or the child device relationship of the first device as the second device, or the first device and the second device are the same device relationship. Each device relationship has a corresponding anti-repetitive mutual exclusion detection strategy table.

[0109] If the first device path of the first device corresponding to the target event and the second device path of the second device corresponding to the waiting event are different, it means that there is no direct hierarchical relationship or mutual influence between the first device and the second device in the device structure. Therefore, there is no need to perform anti-duplication mutual exclusion detection on the target events and waiting events corresponding to the first device and the second device. That is, the current waiting event is skipped, and the device path of the next waiting event is compared and the target strategy is determined according to the target event and the anti-duplication mutual exclusion detection strategy, and anti-duplication mutual exclusion detection is performed for the next waiting event.

[0110] Step 404, determining the target strategy between the target event and each waiting event in the anti-repetition mutual exclusion detection strategy table according to the device relationship, the event type of the target event and the event type corresponding to each waiting event.

[0111] In the embodiment of the present application, after the central processor of the server obtains the target event reported by the device or port, the central processor traverses each waiting event in the waiting queue according to the target event. If the first device path of the first device corresponding to the target event and the second device path of the second device corresponding to the waiting event are the same, the central processor further determines the target strategy for the target event and the waiting event according to the event type. Specifically, since there are different processing methods for the target event of each event type and the waiting queues of different event types, the central processor determines the target strategy between the current target event and each waiting event in the anti-repeated mutual exclusion detection strategy table (as shown in Tables 1 to 3 below) after determining that the first device path and the second device path are the same during the traversal process. For example, for the target event and the waiting event of the same device relationship, if the target event (new event) is hot-plug removal, and the currently traversed waiting event (old event) is AER uncorrectable reset repair, the target strategy is determined to discard the old event (discard the waiting event) according to Table 1. The anti-duplicate mutual exclusion detection strategy table is as follows, where Table 1 is the anti-duplicate mutual exclusion detection strategy table for the same device relationship, Table 2 is the anti-duplicate mutual exclusion detection strategy table for the target event (new event) is the parent device relationship of the waiting event (old event), and Table 3 is the anti-duplicate mutual exclusion detection strategy table for the target event (new event) is the child device relationship of the waiting event (old event).

[0112] Table 1

[0113]

[0114] Table 2

[0115]

[0116] Table 3

[0117]

[0118] Among them, the blank part in the above-mentioned anti-duplicate mutual exclusion detection strategy table is a scenario that does not exist in the actual application. For example, as shown in Table 2, if the new event (parent device) is a hot plug add operation, it means that the device does not exist in the current server, and further, the child device of the device does not exist in the current server. Then, the scenario of the existence of old events (child devices) will not appear in the waiting queue.

[0119] In this embodiment, the device paths of the target event and the waiting event are used to determine whether the current target event needs to perform anti-duplication mutual exclusion detection with the waiting event, which can avoid performing anti-duplication mutual exclusion detection on unnecessary waiting events and improve detection efficiency. Furthermore, when anti-duplication mutual exclusion detection is required, the target strategy is determined in the anti-duplication mutual exclusion detection strategy table based on the relationship between devices, which can accurately implement anti-duplication mutual exclusion detection of waiting events and target events, reduce the number of events that the central processor needs to process, and improve event processing efficiency.

[0120] In an exemplary embodiment, Figure 5 As shown, step 102 includes steps 502 to 506. Among them:

[0121] Step 502: If the anti-duplication mutual exclusion detection result between the target event and each waiting event is that the events are not merged, the target event is taken as a new waiting event and added to the waiting queue.

[0122] In the embodiment of the present application, the anti-duplicate mutual exclusion detection result is that the events are not merged, indicating that there is no duplication or mutual exclusion between the target event and the waiting event, so there is no need to process the target event or the waiting event, that is, the central processing unit can traverse to the next waiting event. If the target event has traversed all the waiting events in the waiting queue, and the anti-duplicate mutual exclusion detection result between the target event and each waiting event is that the events are not merged, indicating that there is no duplication or mutual exclusion between the current target event and each waiting event, then the target event is treated as a new waiting event and added to the waiting queue. Figure 6 As shown, when the central processing unit obtains a new target event, it traverses the waiting events in the waiting queue in sequence according to the target event. If all the waiting events have not been traversed, the waiting events that have not been subjected to anti-duplication mutual exclusion detection are subjected to anti-duplication mutual exclusion detection according to the anti-duplication mutual exclusion detection strategy; if after traversing all the waiting events, if the anti-duplication mutual exclusion detection results of the remaining waiting events in the waiting queue and the target event are both not merged, the target event is added to the waiting queue.

[0123] Step 504: In the waiting queue, if the result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded.

[0124] In the present application embodiment, Figure 6 As shown, during the traversal process, if the anti-duplication mutual exclusion detection result between the target event and the waiting event in the waiting queue is to discard the target event, the target event will be discarded, that is, the target event will be deleted, and no subsequent traversal will be performed on the target event.

[0125] Step 506: If the result of the anti-duplicate mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

[0126] In the present application embodiment, Figure 6 As shown, during the traversal process, if the anti-duplication mutual exclusion detection result between the target event and the waiting event in the waiting queue is to discard the waiting event, the waiting event currently traversed by the target event will be discarded, that is, the waiting event in the waiting queue will be deleted, and the target event will be added to the waiting queue.

[0127] In this embodiment, by determining the target strategy between the target event and the waiting event in the anti-duplication mutual exclusion detection strategy table, and discarding the target event or the waiting event based on the target strategy, anti-duplication mutual exclusion processing of the target event and the waiting event is implemented, which can reduce the number of events that the central processor needs to process and improve event processing efficiency.

[0128] In an exemplary embodiment, Figure 7 As shown, step 104 includes steps 702 to 704. Among them:

[0129] Step 702, sequentially obtain the waiting events in the waiting queue, and perform conflict detection based on the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue.

[0130] In an embodiment of the present application, after the central processing unit completes anti-duplication and mutual exclusion detection on the target event and each waiting event in the waiting queue, if there is no duplication or mutual exclusion between the target event and each waiting event, the central processing unit adds the target event to the waiting queue, and when the execution queue is empty or the waiting event in the execution queue is acquired for execution, the central processing unit acquires the waiting event in the waiting queue in turn, and traverses each waiting event in the execution queue according to the current waiting event, and performs conflict detection based on the first root port corresponding to the waiting event and the second root port of each waiting event.

[0131] Step 704: If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and a waiting event is added to an execution queue based on the conflict detection result.

[0132] In the embodiment of the present application, after the central processing unit obtains a waiting event in the waiting queue, such as Figure 8As shown, firstly, the pending events in the execution queue are traversed. If the traversal of all pending events is not completed, a conflict detection is performed based on the first root port corresponding to the waiting event and the second root port of the pending event that has not been detected in the execution queue, wherein the central processing unit determines the first root port corresponding to the waiting event (the RP of the device corresponding to the waiting event) and the second root port corresponding to the pending event (the RP of the device of the pending event). If the first root port and the second root port are different root ports, that is, the waiting event and the pending event belong to different RPs, then the waiting event and the pending event are determined to be non-conflicting. Specifically, if the first root port corresponding to the waiting event and the second root port of the pending event in the current traversal process in the execution queue are different root ports, then a conflict detection is performed on the next pending event based on the current waiting event until the traversal of all pending events in the execution queue is completed. If there is no conflict between the current waiting event and each pending event, then the current waiting event is added to the execution queue.

[0133] In this embodiment, before adding the waiting events in the waiting queue to the execution queue, a conflict detection is performed on the waiting events and the queue to be executed, and the waiting events with a conflict detection result of no conflict detection are added to the queue to be executed. This can prevent execution conflicts from occurring in the waiting events in the execution queue, thereby improving the stability of event processing.

[0134] In an exemplary embodiment, after step 702, the method includes step 7021. In which:

[0135] Step 7021, if the first root port and the second root port are the same root port, the conflict detection is determined as a conflict, and after it is determined that the pending event that conflicts with the waiting event completes the execution operation, the waiting event is added to the execution queue.

[0136] In the embodiment of the present application, if the first root port and the second root port are the same root port, that is, the waiting event and the event to be executed belong to the same RP, because multiple events occur on the same RP, the events involve the same hardware resources, which may cause the central processor to be unable to determine which event is prioritized, and multiple error events on the same RP may interfere with each other, thereby causing a conflict, then the central processor determines that the waiting event and the event to be executed are in conflict, then the central processor keeps the execution queue unchanged, and does not add the current waiting event to the execution queue. Furthermore, after the pending event that conflicts with the waiting event in the pending event completes the execution operation, the central processor adds the waiting event to the execution queue.

[0137] In this embodiment, by avoiding setting waiting events that conflict with pending events in the execution queue at the same time, and adding the waiting events to the execution queue after the pending events that conflict with the waiting events in the pending events complete the execution operation, execution conflicts among the pending events in the execution queue can be avoided, thereby improving the stability of event processing.

[0138] In a specific embodiment, Fig. 9 As shown, an example of an event handling method is provided, including:

[0139] Step 901, obtaining target events reported by the error detection mechanism, including AER interruption events, DPC interruption events, HP interruption events, kernel state active repair events and user state active repair events;

[0140] Step 902, performing anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event;

[0141] Step 903, updating the waiting queue based on the anti-duplicate mutual exclusion detection result;

[0142] Step 904, sequentially obtain the waiting events in the waiting queue, and perform conflict detection based on the waiting events and each to-be-executed event in the execution queue;

[0143] Step 905, based on the conflict detection result, adding the waiting event to the execution queue;

[0144] Step 906: Repair the error event in the event execution queue according to the repair module, or call the kernel state interface to scan or remove the device.

[0145] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0146] Based on the same inventive concept, the embodiment of the present application also provides an event processing device for implementing the event processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more event processing device embodiments provided below can refer to the limitations on the event processing method above, and will not be repeated here.

[0147] In an exemplary embodiment, Fig.10 As shown, an event processing device 1000 is provided, including: an anti-duplication mutual exclusion detection module and a conflict detection module, wherein:

[0148] The anti-duplicate mutual exclusion detection module 1001 is used to obtain the target event reported by the error detection mechanism, perform anti-duplicate mutual exclusion detection on the waiting queue according to the anti-duplicate mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplicate mutual exclusion detection result;

[0149] The conflict detection module 1002 is used to sequentially obtain the waiting events in the waiting queue, perform conflict detection based on the waiting events and each to-be-executed event in the execution queue, and add the waiting events to the execution queue based on the conflict detection result.

[0150] In one of the embodiments, the anti-duplicate mutual exclusion detection module 1001 is specifically used to determine a target strategy between the target event and each waiting event in the anti-duplicate mutual exclusion detection strategy according to the target event and each waiting event in the waiting queue;

[0151] Based on the target event and the target strategy, each waiting event in the waiting queue is tested for duplicate mutual exclusion in turn.

[0152] In one of the embodiments, the anti-duplicate mutual exclusion detection module 1001 is specifically used to determine the device relationship between the first device and each second device according to the device tree if the first device path corresponding to the target event and the second device path corresponding to the waiting event are the same;

[0153] According to the device relationship, the event type of the target event and the event type corresponding to each waiting event, a target strategy between the target event and each waiting event is determined in the anti-repetition mutual exclusion detection strategy table.

[0154] In one embodiment, the anti-duplicate mutual exclusion detection module 1001 is specifically used to treat the target event as a new wait event and add it to the wait queue if the anti-duplicate mutual exclusion detection results between the target event and each wait event are both events that are not merged;

[0155] In the waiting queue, if the result of the anti-duplicate mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded;

[0156] If the result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

[0157] In one embodiment, the conflict detection module 1002 is specifically used to sequentially obtain the waiting events in the waiting queue, and perform conflict detection according to the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue;

[0158] If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and the waiting event is added to the execution queue based on the conflict detection result.

[0159] In one embodiment, the apparatus 1000 further includes:

[0160] The adding module is used to determine the conflict detection as a conflict if the first root port and the second root port are the same root port, and add the waiting event to the execution queue after determining that the pending event that conflicts with the waiting event completes the execution operation.

[0161] Each module in the above event processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0162] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.11As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an event processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0163] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0164] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0165] Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result;

[0166] The waiting events in the waiting queue are obtained in sequence, and conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue. Based on the conflict detection result, the waiting events are added to the execution queue.

[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0168] Determine the target strategy between the target event and each waiting event in the anti-duplicate mutual exclusion detection strategy according to the target event and each waiting event in the waiting queue;

[0169] Based on the target event and the target strategy, each waiting event in the waiting queue is tested for duplicate mutual exclusion in turn.

[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0171] If a first device path of a first device corresponding to the target event is the same as a second device path of a second device corresponding to the waiting event, determining a device relationship between the first device and each second device according to the device tree;

[0172] According to the device relationship, the event type of the target event and the event type corresponding to each waiting event, a target strategy between the target event and each waiting event is determined in the anti-repetition mutual exclusion detection strategy table.

[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0174] If the anti-duplicate mutual exclusion detection result between the target event and each waiting event is that the events are not merged, the target event is taken as a new waiting event and added to the waiting queue;

[0175] In the waiting queue, if the result of the anti-duplicate mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded;

[0176] If the result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0178] Obtain the waiting events in the waiting queue in sequence, and perform conflict detection based on the first root port corresponding to the waiting event and the second root port of each waiting event in the execution queue;

[0179] If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and the waiting event is added to the execution queue based on the conflict detection result.

[0180] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0181] If the first root port and the second root port are the same root port, the conflict detection is determined as a conflict, and after it is determined that the pending event that conflicts with the waiting event completes the execution operation, the waiting event is added to the execution queue.

[0182] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0183] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0185] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An event processing method, characterized in that: The method comprises: Obtain the target event reported by the error detection mechanism, perform anti-duplication mutual exclusion detection on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result; The waiting events in the waiting queue are obtained in sequence, conflict detection is performed based on the waiting events and each to-be-executed event in the execution queue, and based on the conflict detection result, the waiting event is added to the execution queue.

2. The method according to claim 1, characterized in that The anti-duplication mutual exclusion detection is performed on the waiting queue according to the anti-duplication mutual exclusion detection strategy and the target event, including: Determine a target strategy between the target event and each waiting event in the waiting queue in the anti-repetition mutual exclusion detection strategy; Based on the target event and the target strategy, anti-duplicate mutual exclusion detection is performed on each waiting event in the waiting queue in turn.

3. The method according to claim 2, characterized in that Determining the target strategy between the target event and each waiting event in the waiting queue in the anti-repetitive mutual exclusion detection strategy includes: If the first device path of the first device corresponding to the target event is the same as the second device path of the second device corresponding to the waiting event, determining a device relationship between the first device and each of the second devices according to the device tree; According to the device relationship, the event type of the target event and the event type corresponding to each of the waiting events, a target strategy between the target event and each of the waiting events is determined in an anti-repetition mutual exclusion detection strategy table.

4. The method according to claim 1, characterized in that: The updating of the waiting queue based on the anti-duplication mutual exclusion detection result includes: If the anti-duplication mutual exclusion detection results between the target event and each of the waiting events are both that the events are not merged, the target event is taken as a new waiting event and added to the waiting queue; In the waiting queue, if the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the target event, the target event is discarded; If the detection result of the anti-duplication mutual exclusion detection between the target event and the waiting event is to discard the waiting event, the waiting event in the waiting queue is deleted.

5. The method according to claim 1, characterized in that The step of sequentially acquiring the waiting events in the waiting queue, performing conflict detection based on the waiting events and each to-be-executed event in the execution queue, and adding the waiting events to the execution queue based on the conflict detection result includes: Sequentially obtain the waiting events in the waiting queue, and perform conflict detection based on the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue; If the first root port and the second root port are different root ports, a non-conflict detection result is determined, and the waiting event is added to an execution queue based on the conflict detection result.

6. The method according to claim 5, characterized in that After sequentially acquiring the waiting events in the waiting queue and performing conflict detection between the first root port corresponding to the waiting event and the second root port of each to-be-executed event in the execution queue, the method further comprises: If the first root port and the second root port are the same root port, the conflict detection is determined as a conflict, and after it is determined that the pending event that conflicts with the waiting event completes the execution operation, the waiting event is added to the execution queue.

7. An event processing device, characterized in that: The device comprises: An anti-duplication mutual exclusion detection module is used to obtain a target event reported by an error detection mechanism, perform an anti-duplication mutual exclusion detection on a waiting queue according to an anti-duplication mutual exclusion detection strategy and the target event, and update the waiting queue based on the anti-duplication mutual exclusion detection result; The conflict detection module is used to sequentially obtain the waiting events in the waiting queue, perform conflict detection based on the waiting events and each to-be-executed event in the execution queue, and add the waiting events to the execution queue based on the conflict detection results.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Task scheduling method and device, storage medium and electronic equipment

    CN119781945A

  • A task scheduling method, device, storage medium and electronic device

    CN119781945B