Method and device for adjusting interrupt priority, equipment, medium and product

By obtaining task priority and interrupt priority in the power operating system and adjusting interrupt priority, the problem of unbalanced allocation of interrupt processing and operation task execution resources is solved, and resource coordination and performance improvement is achieved.

CN119248506APending Publication Date: 2025-01-03CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411494844.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the power operating system, it is difficult to balance interrupt processing and operational tasks, resulting in unbalanced resource allocation, resulting in resource waste and allocation conflicts.

Method used

By obtaining the task priority of the executing task and the interrupt priority of the interrupt to be executed, adjusting the interrupt priority to coordinate with the execution of the operation task, the priority information acquisition module and the priority adjustment module are used to determine the interrupt to be executed. Prioritize the adjustment result and handle interrupts based on the adjustment result.

Benefits of technology

Effectively coordinate the execution of interrupt handling and operational tasks, avoid resource waste and resource allocation conflicts, and improve the overall performance of the power operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248506A_ABST
    Figure CN119248506A_ABST
Patent Text Reader

Abstract

The invention discloses an interrupt priority adjusting method and device, equipment, a medium and a product. The method comprises the steps of obtaining a task priority of a task being executed and an interrupt priority of an interrupt to be executed; and according to the task priority and the interrupt priority, determining a priority adjustment result of the interrupt to be executed so as to process the interrupt to be executed according to the priority adjustment result. According to the technical scheme, the problem of unbalanced allocation of execution resources of the interrupt processing and the operation task in the power operation system is solved, the interrupt priority is adjusted based on the priority of the operation task, so that the interrupt processing can be coordinated with the execution of the operation task, and resource waste and resource allocation conflicts are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of device control technology, and in particular to a method, device, equipment, medium and product for adjusting interrupt priority. Background Art

[0002] In the power operation system based on the Internet of Things, real-time and reliability are the core requirements of power control. With the increase in the number of devices in the power operation system and the increase in the complexity of data flow, how to effectively set interrupt priority has become an important challenge.

[0003] In the prior art, in order to ensure the overall performance of the power operation system, the priority of the operation tasks to be executed is usually adjusted dynamically, while the interrupt priority in the power operation system is usually fixed. Therefore, it is difficult to achieve a balance between interrupt processing and the execution of operation tasks, which is not conducive to resource allocation in the power operation system. Summary of the invention

[0004] The present invention provides a method, device, equipment, medium and product for adjusting interrupt priority to solve the problem of unbalanced resource allocation between interrupt processing and execution of operation tasks in a power operating system. By adjusting the interrupt priority based on the operation task priority, interrupt processing can be coordinated with the execution of the operation task, thus avoiding resource waste and resource allocation conflicts.

[0005] According to one aspect of the present invention, a method for adjusting interrupt priority is provided, the method comprising:

[0006] Get the task priority of the task being executed and the interrupt priority of the interrupt to be executed;

[0007] A priority adjustment result of the interrupt to be executed is determined according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

[0008] According to another aspect of the present invention, a method and device for adjusting interrupt priority is provided, the device comprising:

[0009] A priority information acquisition module is used to obtain the task priority of the task being executed and the interrupt priority of the interrupt to be executed;

[0010] The priority adjustment module is used to determine the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0012] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the interrupt priority adjustment method described in any embodiment of the present invention.

[0013] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the interrupt priority adjustment method described in any embodiment of the present invention when executed.

[0014] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for adjusting the interrupt priority level according to any embodiment of the present invention is implemented.

[0015] The technical solution of the embodiment of the present invention obtains the task priority of the task being executed and the interrupt priority of the interrupt to be executed; determines the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result. This technical solution solves the problem of unbalanced resource allocation between interrupt processing and execution of operation tasks in the power operation system. By adjusting the interrupt priority based on the operation task priority, interrupt processing can be coordinated with the execution of the operation task, avoiding resource waste and resource allocation conflicts.

[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a flow chart of a method for adjusting interrupt priority provided according to Embodiment 1 of the present invention;

[0019] Figure 2 is a flow chart of a method for adjusting interrupt priority provided according to Embodiment 2 of the present invention;

[0020] Figure 32 is a schematic diagram of the structure of a method and device for adjusting interrupt priority according to Embodiment 3 of the present invention;

[0021] Figure 4 The invention is a schematic diagram of the structure of an electronic device for implementing the interrupt priority adjustment method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0024] Embodiment 1

[0025] Figure 1 A flowchart of a method for adjusting interrupt priority is provided for the first embodiment of the present invention. This embodiment is applicable to power dispatching scenarios, especially power dispatching scenarios with high concurrency tasks. The method can be executed by an interrupt priority adjustment method device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0026] S110, obtaining the task priority of the task being executed and the interrupt priority of the interrupt to be executed.

[0027] This solution can be executed by an electric power operating system, which can be an operating system for fault detection and power dispatching in the power system based on the Internet of Things technology. The electric power operating system may include devices such as sensing devices, control devices, and communication devices. The sensing device can be used to obtain the operating status information of the power equipment, the communication device can be used for communication between the sensing device and the control device, and the control device can be used to generate an operation task based on the operating status information of the power equipment obtained by the sensing device, and execute the operation task according to the task priority of the operation task according to the preset scheduling strategy. The control device can also process the interruption according to the interruption priority triggered by the power equipment.

[0028] The power operating system can screen the tasks to be executed and the interrupts to be executed in the current power system, and then obtain the task priority of the task being executed and the interrupt priority of the interrupt to be executed. It can be understood that both the operation task and the interrupt require the power operating system to provide hardware resources such as computing and storage for processing. The difference is that the operation task can usually realize specific functions, such as sensing data acquisition, power distribution and other functions, and the execution of the interrupt is usually in response to emergencies in the power system. In the prior art, the task priority of the operation task is set in the operation task system, and the interrupt priority of the interrupt is set in the interrupt system. Whether it is an operation task or a terminal, its priority setting is usually static, which makes it difficult to balance the operation task and the interrupt, and easily causes resource waste and allocation conflicts.

[0029] S120: Determine a priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

[0030] In this solution, the power operating system can adjust the interrupt priority of the pending interrupt according to the task priority of the task being executed, so that the interrupt processing can be coordinated with the execution of the operation task to avoid resource waste and allocation conflicts. Specifically, the power operating system can determine the adjusted priority of the pending interrupt according to the task priority of the task being executed and the preset interrupt priority of the pending interrupt, that is, the priority adjustment result of the pending interrupt.

[0031] In this solution, determining the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority includes:

[0032] The priority adjustment result of the interrupt to be executed is calculated according to the task priority, the interrupt priority and the pre-acquired real-time evaluation factor of the interrupt to be executed.

[0033] It is easy to understand that for the pending interrupt, in addition to associating its priority with the priority of the task being executed, the real-time processing of the pending interrupt should also be guaranteed. Therefore, the power operating system can calculate the priority adjustment result of the pending interrupt according to the task priority of the task being executed, the interrupt priority of the pending interrupt, and the real-time evaluation factor of the pending interrupt. Among them, the real-time evaluation factor can characterize the real-time requirement of the pending interrupt.

[0034] Based on the above solution, the calculation formula of the priority adjustment result of the interrupt to be executed is:

[0035] P i =P base +w1·P task +w2·R i ;

[0036] Among them, P i Indicates the priority adjustment result of the interrupt to be executed, P base Indicates the interrupt priority level of the interrupt to be executed, P task Indicates the task priority of the task being executed, R i It represents the real-time evaluation factor of the interrupt to be executed, w1 and w2 represent the task priority and the weight coefficient of the real-time evaluation factor respectively.

[0037] In this solution, w1+w2=1. By comprehensively considering the real-time nature of the interrupt to be executed and the task priority of the task being executed, the power operating system can adaptively adjust the interrupt priority of the interrupt to be executed, so that interrupt processing can be better coordinated with task execution.

[0038] It should be noted that the task priority of the task being executed can be pre-set, or can be obtained by adjusting at least once based on the pre-set task priority. In a specific example, the power operation system can periodically adjust the task priority of the task being executed in the power operation system to ensure the real-time execution of each operation task. The task priority of the task being executed after adjustment can be expressed as: t ′ ask =P task +w3·I task -w4·R task ; Among them, I task Represents the importance factor of the task being performed, R task Indicates the real-time factor of the task being executed, P taskIndicates the preset task priority of the task being executed. The preset task priority of the task being executed can be set according to the task type of the task being executed. The importance factor of the task being executed can be determined based on the contribution of all the tasks being executed in the power operation system to the power system. The real-time factor of the task being executed can be determined based on the maximum delay time of the task being executed or the periodic demand of the task being executed. The priority adjustment result of the interrupt to be executed can be based on P task It can also be obtained by adjusting based on P t ′ ask Adjusted.

[0039] The technical solution of the embodiment of the present invention obtains the task priority of the task being executed and the interrupt priority of the interrupt to be executed; determines the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result. This technical solution solves the problem of unbalanced resource allocation between interrupt processing and execution of operation tasks in the power operation system. By adjusting the interrupt priority based on the operation task priority, interrupt processing can be coordinated with the execution of the operation task, avoiding resource waste and resource allocation conflicts.

[0040] Embodiment 2

[0041] Figure 2 This is a flow chart of a method for adjusting interrupt priority provided by Embodiment 2 of the present invention. This embodiment is refined based on the above embodiment. Figure 2 As shown, the method includes:

[0042] S210. Obtain trigger frequency information of historical interruptions in the power operation system.

[0043] The power operating system can collect historically stored interruption trigger information, count the trigger frequency of each historical interruption, and obtain the trigger frequency information of the historical interruption. The number of historical interruptions can be multiple, and the trigger frequency information can include the trigger frequency of each historical interruption.

[0044] S220: Determine a target interrupt set according to the trigger frequency information of the historical interrupts.

[0045] The trigger frequency of each historical interrupt is compared with a preset frequency threshold, and target interrupts whose trigger frequency is lower than the frequency threshold are screened out from various historical interrupts to form a target interrupt set.

[0046] S230: Obtain interrupt attribute information of each target interrupt in the target interrupt set.

[0047] After obtaining the target interruption set, the power operating system can obtain the interruption attribute information of each target interruption in the target interruption set. The interruption attribute information may include information such as interruption name, interruption type, processing logic, processing time, trigger frequency, and interruption priority; the interruption type may include timer interruption, sensor interruption, and communication interruption; the processing logic may be the execution steps of responding to the target interruption; the processing time may include the average processing time, maximum processing time, or minimum processing time of the target interruption under the historical processing record; the triggering frequency may be the number of triggers within a preset time period, such as the number of triggers within the past month.

[0048] S240 : Determine the similarity between the interrupt to be executed and each target interrupt according to the interrupt attribute information of each target interrupt and the interrupt attribute information of the interrupt to be executed.

[0049] The power operating system can generate a feature vector of the target interruption according to the interruption attribute information of the target interruption, generate a feature vector of the interruption to be executed according to the interruption attribute information of the interruption to be executed, and calculate the distance between the feature vector of the target interruption and the feature vector of the interruption to be executed as the similarity between the interruption to be executed and the target interruption. Specifically, the distance calculation method between the feature vector of the target interruption and the feature vector of the interruption to be executed can be one of the distance calculation methods such as Euclidean distance, Mahalanobis distance and cosine distance.

[0050] In this solution, the interrupt attribute information includes interrupt type, processing time, trigger frequency and interrupt priority;

[0051] The determining, according to the interrupt attribute information of each target interrupt and the interrupt attribute information of the interrupt to be executed, the similarity between the interrupt to be executed and each target interrupt comprises:

[0052] Determine the functional similarity between the interrupt to be executed and each target interrupt according to the interrupt type of each target interrupt and the interrupt type of the interrupt to be executed;

[0053] Determine the time similarity between the interrupt to be executed and each target interrupt according to the processing time of each target interrupt and the processing time of the interrupt to be executed;

[0054] Determine the similarity between the trigger frequency of the interrupt to be executed and the trigger frequency of each target interrupt according to the trigger frequency of each target interrupt and the trigger frequency of the interrupt to be executed;

[0055] Determine the similarity between the priority of the interrupt to be executed and that of each target interrupt according to the interrupt priority of each target interrupt and the interrupt priority of the interrupt to be executed;

[0056] The similarity between the interrupt to be executed and each target interrupt is determined according to the functional similarity, time similarity, trigger frequency similarity and priority similarity between the interrupt to be executed and each target interrupt.

[0057] Based on the above scheme, the similarity calculation formula between the interrupt to be executed and the target interrupt can be expressed as:

[0058] S(i,j)=α·C(i,j)+β·T(i,j)+γ·F(i,j)+δ·P(i,j);

[0059] Where, C(i,j) represents functional similarity, T(i,j) represents temporal similarity, F(i,j) represents trigger frequency similarity, P(i,j) represents priority similarity, i represents the interrupt index to be executed, j represents the target interrupt index, α, β, γ and δ are weight coefficients of functional similarity, temporal similarity, trigger frequency similarity and priority similarity respectively; C(i,j) is 0 or 1, 1 represents the same, 0 represents different;

[0060] The calculation formula of time similarity can be expressed as:

[0061]

[0062] Among them, 0≤T(i,j)≤1, T i represents the average processing time of the pending interrupt i, T j represents the average processing time of target interrupt j;

[0063] The calculation formula of trigger frequency similarity can be expressed as:

[0064]

[0065] Among them, 0≤F(i,j)≤1, F i Indicates the trigger frequency of the interrupt i to be executed; F j Indicates the trigger frequency of target interrupt j;

[0066] The calculation formula of priority similarity can be expressed as:

[0067]

[0068] Among them, 0≤P(i,j)≤1, ΔP=|P i -P j |, where P i Indicates the interrupt priority of the interrupt i to be executed; P j represents the interrupt priority of target interrupt j; ΔP represents the priority difference.

[0069] This scheme evaluates the similarity between interruptions from multiple dimensions, which is conducive to ensuring the reliability and stability of the similarity.

[0070] S250: Determine whether the similarity between the interrupt to be executed and each target interrupt is less than a preset similarity threshold.

[0071] It can be understood that the power operating system can use a preset similarity threshold to determine whether the interrupt to be executed is the same or similar to each target interrupt in the target interrupt set. If the similarity between the interrupt to be executed and each target interrupt is less than the preset similarity threshold, it means that the interrupt to be executed is neither the same nor similar to each target terminal, that is, the interrupt to be executed is not an interrupt with a low trigger frequency, and the power operating system can execute S270. If the similarity between the interrupt to be executed and at least one target interrupt is greater than or equal to the preset similarity threshold, it means that the interrupt to be executed is the same or similar to at least one target interrupt in the target interrupt set, then the interrupt to be executed is an interrupt with a low trigger frequency, and the power operating system can execute S260.

[0072] S260: Aggregate the interrupts to be executed according to the preset time window.

[0073] If the interrupt to be executed is a low trigger frequency interrupt, the power operating system can collect the low trigger frequency interrupts in the same time window according to the preset time window, and centrally process the collected multiple low trigger frequency interrupts to avoid the low trigger frequency interrupts interfering with the execution of the operation task.

[0074] S270 , determining a priority adjustment result of the interrupt to be executed according to the interrupt priority of the interrupt to be executed and the task priority of the task being executed.

[0075] If the pending interrupt is not an interrupt with a low trigger frequency, the power operating system can adjust the interrupt priority of the pending interrupt according to the task priority of the task being executed, so as to coordinate the execution order of the two when the pending interrupt conflicts with the task being executed. When the pending interrupt is more urgent than the task being executed, the processing of the task being executed is suspended and the pending interrupt is processed in time. When the task being executed is more urgent than the pending interrupt, the task being executed is continued and the pending interrupt is not responded to for the time being.

[0076] For example, the sensing device in the power operation system detects that a power line fault has occurred in the target area and sends a fault signal. If the priority of the fault detection interrupt is higher than the task priority of the task being executed, the task being executed (such as daily monitoring data recording) can be immediately suspended to handle the fault detection interrupt. The power operation system can take emergency measures in a timely manner to quickly locate and isolate faults, thereby improving the real-time response capability of the power system and avoiding the expansion of faults. During peak power consumption periods, the power grid needs to adjust the allocation of power resources based on the operating status data of the power equipment obtained in real time by the sensing device. If an equipment status report interruption occurs when executing a power dispatching task, the interruption priority of the power dispatching task is higher than the equipment status report interruption. The power dispatching system can give priority to the power dispatching task and suspend the response to the equipment status report interruption to ensure that the power system can quickly adjust power resources, optimize dispatching and allocation, and maintain power supply balance.

[0077] The technical solution of the embodiment of the present invention obtains the task priority of the task being executed and the interrupt priority of the interrupt to be executed; determines the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result. This technical solution solves the problem of unbalanced resource allocation between interrupt processing and execution of operation tasks in the power operation system. By adjusting the interrupt priority based on the operation task priority, interrupt processing can be coordinated with the execution of the operation task, avoiding resource waste and resource allocation conflicts.

[0078] Embodiment 3

[0079] Figure 3 The structure diagram of a method and device for adjusting interrupt priority provided by the third embodiment of the present invention is shown in FIG. Figure 3 As shown, the device comprises:

[0080] The priority information acquisition module 310 is used to obtain the task priority of the task being executed and the interrupt priority of the interrupt to be executed;

[0081] The priority adjustment module 320 is used to determine a priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

[0082] In this solution, the priority adjustment module 320 is specifically used to:

[0083] The priority adjustment result of the interrupt to be executed is calculated according to the task priority, the interrupt priority and the pre-acquired real-time evaluation factor of the interrupt to be executed.

[0084] Based on the above solution, the calculation formula of the priority adjustment result of the interrupt to be executed is:

[0085] P i =P base +w1·P task +w2·R i ;

[0086] Among them, P i Indicates the priority adjustment result of the interrupt to be executed, P base Indicates the interrupt priority level of the interrupt to be executed, P task Indicates the task priority of the task being executed, R i It represents the real-time evaluation factor of the interrupt to be executed, w1 and w2 represent the task priority and the weight coefficient of the real-time evaluation factor respectively.

[0087] In a feasible solution, the device further includes a similarity calculation module, which is used to:

[0088] Before determining the priority adjustment result of the interrupt to be executed, obtaining the trigger frequency information of the historical interrupt in the power operation system;

[0089] Determining a target interrupt set according to the trigger frequency information of the historical interrupts;

[0090] Obtain interrupt attribute information of each target interrupt in the target interrupt set;

[0091] The similarity between the interrupt to be executed and each target interrupt is determined according to the interrupt attribute information of each target interrupt and the interrupt attribute information of the interrupt to be executed.

[0092] Based on the above solution, the priority adjustment module 320 is specifically used to:

[0093] If the similarity between the interrupt to be executed and at least one target interrupt is greater than or equal to a preset similarity threshold, determining a priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority;

[0094] If the similarity between the interrupt to be executed and each target interrupt is less than a preset similarity threshold, the interrupt to be executed is aggregated according to a preset time window.

[0095] In a preferred solution, the interrupt attribute information includes interrupt type, processing time, trigger frequency and interrupt priority;

[0096] The similarity calculation module is specifically used for:

[0097] Determine the functional similarity between the interrupt to be executed and each target interrupt according to the interrupt type of each target interrupt and the interrupt type of the interrupt to be executed;

[0098] Determine the time similarity between the interrupt to be executed and each target interrupt according to the processing time of each target interrupt and the processing time of the interrupt to be executed;

[0099] Determine the similarity between the trigger frequency of the interrupt to be executed and the trigger frequency of each target interrupt according to the trigger frequency of each target interrupt and the trigger frequency of the interrupt to be executed;

[0100] Determine the similarity between the priority of the interrupt to be executed and that of each target interrupt according to the interrupt priority of each target interrupt and the interrupt priority of the interrupt to be executed;

[0101] The similarity between the interrupt to be executed and each target interrupt is determined according to the functional similarity, time similarity, trigger frequency similarity and priority similarity between the interrupt to be executed and each target interrupt.

[0102] The interrupt priority adjustment method device provided in the embodiment of the present invention can execute the interrupt priority adjustment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0103] Embodiment 4

[0104] Figure 4 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0105] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0106] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0107] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as a method for adjusting interrupt priority.

[0108] In some embodiments, the interrupt priority adjustment method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the interrupt priority adjustment method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to execute the interrupt priority adjustment method in any other appropriate manner (e.g., by means of firmware).

[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable interrupt priority adjustment method device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for adjusting interrupt priority, characterized in that: The method comprises: Get the task priority of the task being executed and the interrupt priority of the interrupt to be executed; A priority adjustment result of the interrupt to be executed is determined according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

2. The method according to claim 1, characterized in that The step of determining the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority includes: The priority adjustment result of the interrupt to be executed is calculated according to the task priority, the interrupt priority and the pre-acquired real-time evaluation factor of the interrupt to be executed.

3. The method according to claim 2, characterized in that The calculation formula of the priority adjustment result of the interrupt to be executed is: P i =P base +w1·P task +w2·R i ; Among them, P i Indicates the priority adjustment result of the interrupt to be executed, P base Indicates the interrupt priority level of the interrupt to be executed, P task Indicates the task priority of the task being executed, R i It represents the real-time evaluation factor of the interrupt to be executed, w1 and w2 represent the task priority and the weight coefficient of the real-time evaluation factor respectively.

4. The method according to claim 1, characterized in that: Before determining the priority adjustment result of the interrupt to be executed, the method further includes: Obtain the trigger frequency information of historical interruptions in the power operation system; Determining a target interrupt set according to the trigger frequency information of the historical interrupts; Obtain interrupt attribute information of each target interrupt in the target interrupt set; The similarity between the interrupt to be executed and each target interrupt is determined according to the interrupt attribute information of each target interrupt and the interrupt attribute information of the interrupt to be executed.

5. The method according to claim 4, characterized in that The step of determining the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority includes: If the similarity between the interrupt to be executed and at least one target interrupt is greater than or equal to a preset similarity threshold, determining a priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority; If the similarity between the interrupt to be executed and each target interrupt is less than a preset similarity threshold, the interrupt to be executed is aggregated according to a preset time window.

6. The method according to claim 4, characterized in that The interrupt attribute information includes interrupt type, processing time, trigger frequency and interrupt priority; The determining, according to the interrupt attribute information of each target interrupt and the interrupt attribute information of the interrupt to be executed, the similarity between the interrupt to be executed and each target interrupt comprises: Determine the functional similarity between the interrupt to be executed and each target interrupt according to the interrupt type of each target interrupt and the interrupt type of the interrupt to be executed; Determine the time similarity between the interrupt to be executed and each target interrupt according to the processing time of each target interrupt and the processing time of the interrupt to be executed; Determine the similarity between the trigger frequency of the interrupt to be executed and the trigger frequency of each target interrupt according to the trigger frequency of each target interrupt and the trigger frequency of the interrupt to be executed; Determine the similarity between the priority of the interrupt to be executed and each target interrupt according to the interrupt priority of each target interrupt and the interrupt priority of the interrupt to be executed; The similarity between the interrupt to be executed and each target interrupt is determined according to the functional similarity, time similarity, trigger frequency similarity and priority similarity between the interrupt to be executed and each target interrupt.

7. A method and device for adjusting interrupt priority, characterized in that: The device comprises: A priority information acquisition module is used to obtain the task priority of the task being executed and the interrupt priority of the interrupt to be executed; The priority adjustment module is used to determine the priority adjustment result of the interrupt to be executed according to the task priority and the interrupt priority, so as to process the interrupt to be executed according to the priority adjustment result.

8. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the interrupt priority adjustment method described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the interrupt priority adjustment method according to any one of claims 1 to 6 when the processor executes the computer instructions.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for adjusting the interrupt priority according to any one of claims 1 to 6.

Citation Information

Cited By

  • High-efficiency embedded information processing method and system

    CN120104270A