Interrupt management methods, devices, equipment and storage media

By dynamically allocating main processor and coprocessor resources and processing interrupt events based on peripheral type and current status information, the problem of unreasonable resource allocation in multi-core architecture devices is solved, and the real-time response capability of interrupt events is improved.

CN123114635APending Publication Date: 2026-11-17GOERTEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510621542.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In multi-core architecture devices, the interrupt manager's unreasonable pre-determined priorities lead to unreasonable resource allocation, resulting in an inability to respond promptly to interrupt operations triggered by external devices and reducing the real-time performance of interrupt event handling.

Method used

By responding to interrupt events from external devices, the peripheral type is determined and local status information is obtained. Processing resources between the main processor and coprocessors are dynamically allocated, avoiding the allocation of resources to high-priority interrupt events based on pre-determined priorities. A dynamic allocation strategy is adopted to improve resource utilization and response speed.

Benefits of technology

It improves the real-time performance of interrupt event handling, avoids uneven resource allocation, ensures timely response to interrupt operations triggered by external devices, and enhances the flexibility and adaptability of the interrupt manager.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114635A_ABST
    Figure CN123114635A_ABST
Patent Text Reader

Abstract

This application discloses an interrupt management method, apparatus, device, and storage medium, relating to the field of computer technology. The disclosed interrupt management method includes: responding to an interrupt event triggered by an external device, determining the peripheral type of the external device; acquiring local current state information; and dynamically allocating processing resources required for processing the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information. That is, by dynamically allocating processing resources for processing the interrupt event according to the peripheral type and current state information, it avoids prioritizing high-priority interrupt events based on predetermined priorities, thus preventing unreasonable resource allocation and consequently avoiding the inability to respond promptly to terminal operations triggered by external devices due to unreasonable resource allocation, thereby improving the real-time performance of interrupt event processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to interrupt management methods, apparatus, devices and storage media. Background Technology

[0002] In multi-core architecture devices, the interrupt manager is mainly responsible for coordinating the processor's response to various external and internal events, and its performance directly affects the performance of the corresponding device.

[0003] Currently, when dealing with the needs of complex user scenarios, interrupt management units typically pre-determine the priorities of each device and allocate resources to interrupt events based on those priorities. However, unreasonable pre-determined priorities can lead to unreasonable resource allocation, resulting in a failure to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance of interrupt event processing.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide an interrupt management method that aims to solve the technical problem of failing to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance of interrupt event handling.

[0006] To achieve the above objectives, this application proposes an interruption management method, the method comprising:

[0007] In response to an interrupt event triggered by an external device, determine the peripheral type of the external device;

[0008] Get the current local status information;

[0009] Based on the peripheral type and the current state information, the processing resources required to handle the interrupt event are dynamically allocated between the main processor and the coprocessor.

[0010] In one embodiment, the step of dynamically allocating processing resources required for processing the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information includes:

[0011] Based on the peripheral type and the current status information, determine whether it is necessary to notify the coprocessor to handle the interrupt event;

[0012] When it is not necessary to notify the coprocessor to handle the interrupt event, the processing resources required to handle the interrupt event are dynamically allocated based on the peripheral type and local performance metrics.

[0013] In one embodiment, the step of dynamically allocating processing resources required to handle the interrupt event based on the peripheral type and local performance metrics includes:

[0014] Get the local cache hit rate and CPU utilization;

[0015] Based on the priority of the peripheral type, the cache hit rate, and the CPU utilization, the processing resources required to handle the interrupt event are dynamically allocated.

[0016] In one embodiment, the step of determining whether to notify the coprocessor to handle the interrupt event based on the peripheral type and the current state information includes:

[0017] If the peripheral type is a preset type and the current status information is a charging state, then the charging information is sent to the coprocessor to notify the coprocessor to handle the interrupt event.

[0018] In one embodiment, the step of determining whether to notify the coprocessor to handle the interrupt event based on the peripheral type and the current state information includes:

[0019] If the peripheral type is a preset type and the current status information is a non-charging state, then the coprocessor will not be notified to process the interrupt event;

[0020] Alternatively, if the peripheral type is not the preset type, the coprocessor will not be notified to handle the interrupt event.

[0021] In one embodiment, prior to the step of determining the peripheral type of the external device in response to an interrupt event triggered by the external device, the method includes:

[0022] In response to an interrupt registration request from an external device, the peripheral type and the interrupt event to be registered are received from the external device.

[0023] The registered interrupt events are uniquely encoded and bound to their corresponding peripheral types;

[0024] The step of determining the peripheral type of the external device includes:

[0025] The peripheral type of the external device is determined based on the unique code of the interrupt event.

[0026] In one embodiment, after the step of dynamically allocating processing resources required for processing the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information, the method further includes:

[0027] Determine the frequency band and resource quantity of the processing resources;

[0028] Based on the frequency band and the amount of resources, determine the priority for processing the interruption event;

[0029] The interruption event is processed based on the order of the processing resources and the priority, and a callback operation is performed.

[0030] Furthermore, to achieve the above objectives, this application also proposes an interrupt management device, which includes:

[0031] A receiving module is used to determine the peripheral type of the external device in response to an interrupt event triggered by the external device;

[0032] The determination module is used to obtain the current status information of the local machine;

[0033] The allocation module is used to dynamically allocate the processing resources required to handle the interrupt event between the main processor and the coprocessor based on the peripheral type and the current status information.

[0034] In addition, to achieve the above objectives, this application also proposes an interrupt management device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the interrupt management method as described above.

[0035] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the interrupt management method described above.

[0036] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the interrupt management method described above.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] Upon receiving an interrupt event triggered by an external device, the peripheral type of the external device (the peripheral type to which the interrupt event belongs) is determined based on the interrupt event, and the local current status information is obtained. Based on the peripheral type and the current status information, the processing resources required to handle the interrupt event are dynamically allocated. This avoids prioritizing the allocation of processing resources to high-priority interrupt events according to a pre-determined priority, thus avoiding uneven resource allocation. Consequently, it avoids the inability to respond to terminal operations triggered by external devices in a timely manner due to unreasonable allocation of processing resources, thereby improving the real-time performance of interrupt event handling. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating an embodiment of the interruption management method of this application.

[0042] Figure 2 This is a flowchart illustrating Embodiment 2 of the interruption management method of this application;

[0043] Figure 3 This is a flowchart illustrating Embodiment 2 of the interruption management method of this application;

[0044] Figure 4 This is a block diagram of the interrupt manager structure in the interrupt management method of this application;

[0045] Figure 5 This is a schematic diagram of the module structure of the interrupt management device of this application;

[0046] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the interrupt management method of this application.

[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0048] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0049] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The main solution of this application embodiment is: the interrupt manager responds to an interrupt event triggered by an external device to determine the peripheral type of the external device; obtains local current status information; and dynamically allocates the processing resources required to process the interrupt event between the main processor and the coprocessor based on the peripheral type and the current status information.

[0051] In this embodiment, for ease of description, the interrupt manager will be used as the execution subject in the following description.

[0052] In existing technologies, when dealing with complex user scenarios, interrupt management units typically pre-determine the priorities of each device and allocate resources to interrupt events based on those priorities. However, unreasonable pre-determined priorities can lead to inappropriate resource allocation, resulting in delayed responses to interrupts triggered by external devices and reduced real-time performance in handling interrupt events.

[0053] This application provides a solution that, upon receiving an interrupt event triggered by an external device, determines the peripheral type of the external device (the peripheral type to which the interrupt event belongs) based on the interrupt event and obtains the local current status information. Based on the peripheral type and current status information, it dynamically allocates the processing resources required to handle the interrupt event. This avoids prioritizing high-priority interrupt events based on a predetermined priority, preventing uneven resource allocation and thus avoiding the inability to respond promptly to terminal operations triggered by external devices due to unreasonable resource allocation. This improves the real-time performance of interrupt event handling.

[0054] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or interrupt manager capable of implementing the above functions. The following description uses an interrupt manager as an example to illustrate this embodiment and the subsequent embodiments.

[0055] Based on this, embodiments of this application provide an interrupt management method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the interruption management method of this application.

[0056] In this embodiment, the interrupt management method includes steps S10 to S30:

[0057] Step S10: In response to an interrupt event triggered by an external device, determine the peripheral type of the external device;

[0058] It should be noted that an external device is an external hardware device connected to a host device (such as a computer, server, or other electronic system with an interrupt manager). External devices communicate with the host device through specific interfaces (such as USB, PCIe, etc.) and may trigger interrupt events to request processing by the host device. These interrupt events are issued by the external device to notify the host device of tasks or events that require processing. Interrupt events can be requests for data transfer, status change notifications, or other operations that require timely handling. Peripheral type refers to the category or type of external device.

[0059] Understandably, since different types of external devices may require different processing strategies and resource allocations, when an external device triggers an interrupt event, the interrupt manager first needs to identify the device type. For example, storage devices may require more memory and cache resources to handle data transfer, while input devices may only require less CPU time to handle simple input signals. In other words, the interrupt manager can provide a basis for subsequent resource allocation by determining the peripheral device type.

[0060] Step S20: Obtain the current local status information;

[0061] It should be noted that "local" refers to the main processor to which the interrupt manager belongs. The current status information refers to the main processor's running status data at the current moment. This running status data includes, but is not limited to, power status (e.g., charging, non-charging), main processor load (e.g., CPU utilization, memory utilization), cache hit rate, etc., to assess the main processor's current resource availability and processing capacity.

[0062] Understandably, after determining the peripheral type, the interrupt manager needs to obtain the current status information of the main processor in order to assess the current resource availability and main processor load.

[0063] Step S30: Based on the peripheral type and the current state information, dynamically allocate the processing resources required to process the interrupt event between the main processor and the coprocessor.

[0064] It should be noted that processing resources refer to the hardware and software resources used by the main processor to handle interrupt events, such as CPU time, memory space, and cache resources. Dynamic allocation refers to the real-time allocation and adjustment of resource usage based on the current operating status and needs.

[0065] Understandably, the processing resources required to handle interrupt events are dynamically allocated based on the current operating status and needs of the main processor. This improves the flexibility of resource allocation and allows the limited resources in the main processor to be rationally allocated according to the peripheral type of the interrupt event. This avoids the main processor prioritizing the processing of interrupt events with higher pre-set priorities, thereby avoiding the allocation of unused resources for handling such interrupt events and improving resource utilization.

[0066] Understandably, the interrupt manager dynamically allocates resources needed to handle interrupt events based on the peripheral type and current status information. For example, if the interrupt manager is currently under low load and the peripheral type is a high-priority storage device, the interrupt manager may allocate more CPU time and cache resources to quickly process the interrupt event; if the interrupt manager is currently charging and the peripheral type is a low-priority device, the interrupt manager may choose to distribute some processing tasks to the coprocessor to avoid affecting the normal operation of the main device. This dynamic allocation strategy can flexibly adjust resource allocation according to different scenarios, improving the overall performance and response speed of the interrupt manager.

[0067] Understandably, dynamic resource allocation strategies can rationally allocate resources based on the current main processor load and peripheral needs, avoiding resource waste or over-allocation. For example, when the main processor load is low, idle resources can be fully utilized to handle interrupt events; when the main processor load is high, resource allocation strategies can be adjusted to ensure the normal operation of critical tasks.

[0068] Understandably, the interrupt manager flexibly adjusts resource allocation strategies based on different peripheral types and current status information to adapt to various complex operating scenarios. That is, regardless of whether the device is high-priority or low-priority, the interrupt manager can determine the nature of the interrupt event based on the peripheral type, and then determine the actual situation based on the peripheral type and its nature. This allows for reasonable resource allocation based on the actual situation, enhancing the flexibility and adaptability of the interrupt manager.

[0069] Optionally, after step S30, the interrupt management method further includes:

[0070] Determine the frequency band and resource quantity of the processing resources;

[0071] Based on the frequency band and the amount of resources, determine the priority for processing the interruption event;

[0072] The interruption event is processed based on the order of the processing resources and the priority, and a callback operation is performed.

[0073] It's important to note that a frequency band refers to the range of frequency-related resources within the processing resources. Resource quantity refers to the specific amount or capacity of resources allocated to handling interrupt events, such as the size of a CPU time slice or the size of memory allocation. Priority is the ranking of the importance of interrupt events or processing tasks. Higher-priority tasks will be allocated processing resources more frequently. A callback operation is a predefined function or operation automatically invoked by the system after a task is completed. In interrupt handling, callback operations are typically used to notify the system or application that the interrupt event has been processed.

[0074] Understandably, the interrupt manager further refines the processing priority of interrupt events based on the allocated frequency band and resource amount. For example, even if two interrupt events have the same resource amount, the event allocated to the higher frequency band will be processed first.

[0075] This embodiment provides an interrupt management method. After receiving an interrupt event triggered by an external device, the method determines the peripheral type of the external device (the peripheral type to which the interrupt event belongs) based on the interrupt event and obtains the local current status information. Based on the peripheral type and the current status information, the method dynamically allocates the processing resources required to handle the interrupt event. This avoids allocating processing resources to high-priority interrupt events based on a pre-determined priority, thus avoiding uneven resource allocation. Consequently, it avoids the inability to respond to terminal operations triggered by external devices in a timely manner due to unreasonable allocation of processing resources, thereby improving the real-time performance of interrupt event handling.

[0076] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S30 also includes steps S31 to S32:

[0077] Step S31: Based on the peripheral type and the current status information, determine whether it is necessary to notify the coprocessor to handle the interrupt event;

[0078] Step S32: When it is not necessary to notify the coprocessor to handle the interrupt event, dynamically allocate the processing resources required to handle the interrupt event based on the peripheral type and local performance indicators.

[0079] It should be noted that a coprocessor is a processor that assists the main processor in handling specific types of computational tasks or interrupt events. Performance metrics are various parameters used to measure the performance of the main processor, including but not limited to CPU utilization, cache hit rate, and memory usage.

[0080] Understandably, the interrupt manager intelligently determines whether to notify the coprocessor based on the type and priority of the interrupt event, allowing the coprocessor to handle the interrupt events that need to be processed, thereby optimizing the performance of the main processor. Furthermore, when the main processor can handle the interrupt events independently, the interrupt manager can effectively avoid frequently waking up the coprocessor by effectively identifying the interrupt events, thereby reducing unnecessary power consumption.

[0081] Understandably, by determining whether the coprocessor needs to handle the interrupt event, the interrupt manager can flexibly adjust its resource allocation strategy based on the peripheral type and current status information. This allows the interrupt manager to handle high-priority interrupt events more efficiently while avoiding performance degradation due to insufficient resources.

[0082] In its implementation, the interrupt manager first determines whether the coprocessor needs to be notified to handle the interrupt event based on the peripheral type and current status information. If not, the manager dynamically allocates the resources required to handle the interrupt event based on the peripheral type and local performance metrics. This not only optimizes resource allocation but also improves the interrupt manager's response speed and overall performance, while enhancing its flexibility and adaptability.

[0083] Specifically, since some peripheral types are better suited for processing by coprocessors (for example, coprocessors can handle related interrupt events more efficiently for high-throughput storage devices or graphics devices requiring complex calculations); current status information (such as power status, main processor load, etc.) also affects whether to notify the coprocessor (for example, if the main processor is currently under high load, but the peripheral type is a low-priority device, the interrupt manager may choose to assign the interrupt event to the coprocessor to avoid affecting the normal operation of the main processor), it is necessary to determine whether to notify the coprocessor by peripheral type and current status information, so as to flexibly decide whether the coprocessor needs to participate according to the actual situation, thereby optimizing resource allocation and main processor performance; when no notification is needed, the main processor can reasonably allocate resources according to the current operating status and the type and nature of the external device to ensure that interrupt events can be handled efficiently.

[0084] Furthermore, step S32 also includes:

[0085] Get the local cache hit rate and CPU utilization;

[0086] Based on the priority of the peripheral type, the cache hit rate, and the CPU utilization, the processing resources required to handle the interrupt event are dynamically allocated.

[0087] It's important to note that cache hit rate is a metric for measuring the efficiency of a caching system, representing the percentage of time data stored in the cache is successfully accessed. A high cache hit rate means the system can access frequently used data more efficiently, reducing the number of accesses to main memory and thus improving overall performance.

[0088] It's important to note that CPU utilization is the percentage of CPU time that is occupied, reflecting the CPU's workload. High CPU utilization may indicate a heavy system load, requiring reasonable resource allocation to avoid performance bottlenecks.

[0089] It should be noted that priority is a metric used to rank different peripheral types or tasks according to their importance. Peripherals or tasks with higher priority are usually allocated resources first.

[0090] Understandably, by dynamically allocating resources, the interrupt manager can rationally allocate resources based on the current cache hit rate and CPU utilization for different types of interrupt events, avoiding resource waste or over-allocation, improving the overall resource utilization efficiency of the main processor, and enabling interrupt events to be processed in a timely manner, thereby improving the real-time performance of interrupt event processing.

[0091] Understandably, resource allocation strategies can be flexibly adjusted based on different peripheral types and current status information to adapt to various complex operating scenarios and to handle situations appropriately. Furthermore, when coprocessor participation is not required, the interrupt manager can instruct the coprocessor to switch to low-power mode, thereby reducing the overall power consumption of the device to which the interrupt manager belongs. By simultaneously reducing power consumption and allocating resources rationally, unnecessary resource consumption can be reduced without affecting the performance of the device.

[0092] In practical implementation, since cache hit rate reflects the efficiency of data access, while CPU utilization reflects the current system's computational load, the interrupt manager can understand the current operating status and resource usage by obtaining cache hit rate and CPU utilization. Furthermore, by comprehensively considering peripheral type priority (determined based on the type and nature of the corresponding external device), cache hit rate, and CPU utilization, the interrupt manager can allocate resources selectively based on type and nature, avoiding the equal distribution of resources across all interrupt events, or allocating resources according to predefined priorities to ensure that high-priority interrupt events are processed promptly, thereby improving the efficiency of interrupt event handling.

[0093] Furthermore, step S31 also includes:

[0094] If the peripheral type is a preset type and the current status information is a charging state, then the charging information is sent to the coprocessor to notify the coprocessor to handle the interrupt event.

[0095] It should be noted that the default type is the type of interrupt event that requires the assistance of the coprocessor to handle. The charging state is the state in which the device is charging.

[0096] Understandably, by assigning specific interrupt events to the coprocessor for processing, the system can make more efficient use of the coprocessor's dedicated functions, thereby improving overall processing efficiency.

[0097] Understandably, when a device is charging, its performance is higher, allowing it to simultaneously start the main processor and coprocessor. When it is determined, based on the peripheral type, that the coprocessor is needed to assist in handling interrupt events, the coprocessor is notified to handle the interrupt events to ensure efficiency in handling interrupt events.

[0098] Optionally, step S31 further includes:

[0099] If the peripheral type is a preset type and the current status information is a non-charging state, then the coprocessor will not be notified to process the interrupt event;

[0100] Alternatively, if the peripheral type is not the preset type, the coprocessor will not be notified to handle the interrupt event.

[0101] It should be noted that the non-charging state refers to the state in which the device is not in the process of charging.

[0102] Understandably, when not charging, the main processor's resources are prioritized for handling interrupt events, avoiding unnecessary startup of the coprocessor. This not only improves the overall efficiency of the device to which the main processor and coprocessor belong, but also saves power and extends the device's battery life.

[0103] In practical implementation, when determining the need for coprocessor assistance based on the peripheral type, the system checks whether the power supply is charging or whether the remaining power is sufficient to support the simultaneous normal operation of the main processor and coprocessor. If the device is charging or has sufficient remaining power, it can simultaneously activate both the main processor and coprocessor to handle the interrupt event, fully utilizing the device's high-performance state. If the power supply is not charging or the remaining power is insufficient, it indicates that the device's power supply may be limited. In this case, to conserve power and avoid excessive resource consumption, the interrupt manager may not notify the coprocessor to handle the interrupt event; instead, the main processor will handle it alone, avoiding unnecessary power consumption due to coprocessor involvement. If the peripheral type triggering the interrupt event is not a preset type, it means that this peripheral type does not require coprocessor assistance. In this case, the interrupt manager will directly have the main processor handle the interrupt event without notifying the coprocessor.

[0104] Based on the first and second embodiments of this application, the same or similar content as the above embodiments in the third embodiment of this application can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Before step S10, the interrupt management method further includes steps S1 to S3:

[0105] Step S1: In response to the interrupt registration request from the external device, receive the peripheral type and the interrupt event to be registered sent by the external device;

[0106] Step S2: Uniquely encode and bind the registered interrupt event with the corresponding peripheral type;

[0107] The step of determining the peripheral type of the external device includes:

[0108] Step S3: Determine the peripheral type of the external device based on the unique code of the interrupt event.

[0109] It's important to note that an interrupt registration request is a request sent by the external device to the master device to register interrupt events it may trigger. During registration, the external device provides the master device with its peripheral type and the interrupt events to be registered. A unique code is used to uniquely identify the registered interrupt event and its corresponding peripheral type. Through this unique code, the system can quickly identify and process specific interrupt events. Binding is the process of associating the registered interrupt event with its corresponding peripheral type. Through binding, the system ensures that it can accurately identify the relevant external device when processing interrupt events.

[0110] It is understandable that processing resources can be allocated reasonably based on the type of external device and the nature of the registered interrupt event, so as to prioritize the allocation of resources corresponding to the nature to external devices with higher priority, thereby enabling external devices to allocate resources reasonably according to their nature.

[0111] It is understandable that since the type of external device represents the overall nature of the device, for example, the nature of memory is reading and writing data, when it is determined that the external device is a storage device, the nature of the external device can be determined to be reading and writing data. When allocating resources for memory interrupt events, resources related to reading and writing can be allocated to memory first, and resources unrelated to reading and writing can be allocated to interrupt events of the corresponding nature first, so as to achieve the effect of reasonable resource allocation.

[0112] It is understandable that by receiving the interrupt registration request from the external device, the peripheral type and interrupt event information are received, and the external device is quickly identified through a unique code binding mechanism, so that when the interrupt manager receives an interrupt event triggered by the external device, it can quickly determine the peripheral type of the interrupt event based on the unique code of the interrupt event.

[0113] For example, to help understand the implementation flow of the interrupt management method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 4 , Figure 4 This is a block diagram of the interrupt manager structure in the interrupt management method of this application, specifically:

[0114] When an external device needs to register an interrupt event, it sends peripheral type information to the interrupt manager, clearly informing the interrupt manager of the type of peripheral to which the interrupt belongs.

[0115] After receiving peripheral type information, the interrupt registration module in the interrupt manager registers the interrupt according to the type and binds a unique interrupt ID to the interrupt event. This interrupt ID is then passed to the type identification module for quick identification and callback operations when the interrupt is triggered subsequently.

[0116] When a peripheral device triggers an interrupt event, the interrupt manager's type identification module receives the corresponding information and matches it with the corresponding interrupt ID. Then, the module performs the following operations:

[0117] Interrupt type determination: Quickly identify the peripheral type to which the interrupt event belongs by using the bound interrupt ID.

[0118] Determine whether to notify the coprocessor: Based on the current status information of the interrupt manager, determine whether the interrupt event needs to be notified to the coprocessor for processing (e.g., whether the device is charging or not charging; if charging, update the battery and charging information to the coprocessor in real time; if not charging, do not update in real time).

[0119] The type identification module informs the dynamic allocation module of the determination result. This module obtains key performance indicators such as the current cache hit rate and CPU utilization from the PMU module. Based on this real-time data, the dynamic allocation module analyzes the data comprehensively, allocates appropriate processing resources to interrupt events, and determines their priorities, thereby efficiently executing interrupt callback operations.

[0120] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the interruption management method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0121] This application also provides an interrupt management device, please refer to... Figure 5 The interrupt management device includes:

[0122] The receiving module 10 is configured to determine the peripheral type of the external device in response to an interrupt event triggered by the external device.

[0123] Module 20 is used to obtain the current local status information;

[0124] The allocation module 30 is used to dynamically allocate the processing resources required to process the interrupt event between the main processor and the coprocessor based on the peripheral type and the current status information.

[0125] Optionally, the allocation module 30 is further configured to determine, based on the peripheral type and the current state information, whether it is necessary to notify the coprocessor to handle the interrupt event; when it is not necessary to notify the coprocessor to handle the interrupt event, dynamically allocate the processing resources required to handle the interrupt event based on the peripheral type and local performance indicators.

[0126] Optionally, the allocation module 30 is also used to obtain the local cache hit rate and CPU utilization; and to dynamically allocate the processing resources required to process the interrupt event based on the priority of the peripheral type, the cache hit rate and CPU utilization.

[0127] Optionally, the allocation module 30 is further configured to send charging information to the coprocessor if the peripheral type is a preset type and the current status information is a charging state, so as to notify the coprocessor to handle the interrupt event.

[0128] Optionally, the allocation module 30 is further configured to not notify the coprocessor to process the interrupt event if the peripheral type is a preset type and the current status information is a non-charging state; or not notify the coprocessor to process the interrupt event if the peripheral type is not the preset type.

[0129] Optionally, the receiving module 10 is further configured to respond to an interrupt registration request from an external device by receiving the peripheral type and the interrupt event to be registered sent by the external device; binding the registered interrupt event with the corresponding peripheral type using a unique encoding; and determining the peripheral type of the external device based on the unique encoding of the interrupt event.

[0130] Optionally, the allocation module 30 is further configured to determine the frequency band and resource quantity of the processing resources; determine the priority of processing the interrupt event based on the frequency band and resource quantity; process the interrupt event based on the order of the processing resources and the priority, and perform a callback operation.

[0131] The interrupt management device provided in this application, employing the interrupt management method described in the above embodiments, can solve the technical problem of failing to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance issues in interrupt event processing. Compared with the prior art, the beneficial effects of the interrupt management device provided in this application are the same as those of the interrupt management method provided in the above embodiments, and other technical features in the interrupt management device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0132] This application provides an interrupt management device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the interrupt management method in Embodiment 1 above.

[0133] The following is for reference. Figure 6The diagram illustrates a structural schematic suitable for implementing an interrupt management device according to embodiments of this application. The interrupt management device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The interrupt management device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0134] like Figure 6 As shown, the interrupt management device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the interrupt management device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the interrupt management device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show interrupt management devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0135] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0136] The interrupt management device provided in this application, employing the interrupt management method described in the above embodiments, can solve the technical problem of failing to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance of interrupt event processing. Compared with the prior art, the beneficial effects of the interrupt management device provided in this application are the same as those of the interrupt management method provided in the above embodiments, and other technical features of this interrupt management device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0137] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0138] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0139] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the interrupt management method in the above embodiments.

[0140] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0141] The aforementioned computer-readable storage medium may be included in the interrupt management device; or it may exist independently and not assembled into the interrupt management device.

[0142] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an interrupt management device, cause the interrupt management device to: determine the peripheral type of the external device in response to an interrupt event triggered by the external device; obtain local current state information; and dynamically allocate processing resources required to process the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information.

[0143] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0145] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0146] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described interrupt management method. This solves the technical problem of failing to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance of interrupt event handling. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the interrupt management method provided in the above embodiments, and will not be repeated here.

[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the interrupt management method described above.

[0148] The computer program product provided in this application can solve the technical problem of failing to respond promptly to interrupt operations triggered by external devices, thereby reducing the real-time performance of interrupt event handling. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the interrupt management method provided in the above embodiments, and will not be repeated here.

[0149] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An interrupt management method, characterized in that, The method includes: In response to an interrupt event triggered by an external device, determine the peripheral type of the external device; Get the current local status information; Based on the peripheral type and the current state information, the processing resources required to handle the interrupt event are dynamically allocated between the main processor and the coprocessor.

2. The method as described in claim 1, characterized in that, The step of dynamically allocating processing resources required for handling the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information includes: Based on the peripheral type and the current status information, determine whether it is necessary to notify the coprocessor to handle the interrupt event; When it is not necessary to notify the coprocessor to handle the interrupt event, the processing resources required to handle the interrupt event are dynamically allocated based on the peripheral type and local performance metrics.

3. The method as described in claim 2, characterized in that, The step of dynamically allocating processing resources required to handle the interrupt event based on the peripheral type and local performance metrics includes: Get the local cache hit rate and CPU utilization; Based on the priority of the peripheral type, the cache hit rate, and the CPU utilization, the processing resources required to handle the interrupt event are dynamically allocated.

4. The method as described in claim 2, characterized in that, The step of determining whether to notify the coprocessor to handle the interrupt event based on the peripheral type and the current status information includes: If the peripheral type is a preset type and the current status information is a charging state, then the charging information is sent to the coprocessor to notify the coprocessor to handle the interrupt event.

5. The method as described in claim 2, characterized in that, The step of determining whether to notify the coprocessor to handle the interrupt event based on the peripheral type and the current status information includes: If the peripheral type is a preset type and the current status information is a non-charging state, then the coprocessor will not be notified to process the interrupt event; Alternatively, if the peripheral type is not the preset type, the coprocessor will not be notified to handle the interrupt event.

6. The method as described in claim 1, characterized in that, Prior to the step of determining the peripheral type of the external device in response to an interrupt event triggered by the external device, the steps include: In response to an interrupt registration request from an external device, the peripheral type and the interrupt event to be registered are received from the external device. The registered interrupt events are uniquely encoded and bound to their corresponding peripheral types; The step of determining the peripheral type of the external device includes: The peripheral type of the external device is determined based on the unique code of the interrupt event.

7. The method as described in claim 1, characterized in that, Following the step of dynamically allocating processing resources required for handling the interrupt event between the main processor and the coprocessor based on the peripheral type and the current state information, the method further includes: Determine the frequency band and resource quantity of the processing resources; Based on the frequency band and the amount of resources, determine the priority for processing the interruption event; The interruption event is processed based on the order of the processing resources and the priority, and a callback operation is performed.

8. An interrupt management device, characterized in that, The device includes: A receiving module is used to determine the peripheral type of the external device in response to an interrupt event triggered by the external device; The determination module is used to obtain the current status information of the local machine; The allocation module is used to dynamically allocate the processing resources required to handle the interrupt event between the main processor and the coprocessor based on the peripheral type and the current status information.

9. An interrupt management device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the interrupt management method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the interrupt management method as described in any one of claims 1 to 7.