Data processing method and electronic device
By using a plugin scheduling method driven by registration and configuration information, the problem of inaccurate scheduling of model plugins is solved, enabling efficient operation on appropriate processing units and improving task processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies cannot accurately schedule multiple model plugins, causing some model plugins to fail to run on the appropriate processing unit, thus reducing task processing efficiency.
In response to a call request from a target plugin, the system registers and determines its configuration information, including the current processing unit, runnable processing units, and priority. This allows the system to select a suitable target processing unit from multiple available processing units and send scheduling instructions to the plugin to run the target model on the target processing unit.
It improves the accuracy of plugin scheduling, enhances task processing efficiency, and ensures that plugins run on the most suitable processing unit.
Smart Images

Figure CN122152501A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method and an electronic device. Background Technology
[0002] Some multi-core electronic devices include multiple processing units (such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Network Processing Unit), etc.). Different model plugins can be assigned to the corresponding processing units, allowing the model plugins to run the corresponding models through the processing units to perform task processing.
[0003] Currently, it is not possible to accurately schedule multiple model plugins, resulting in some model plugins not being able to run on the appropriate processing unit (for example, model plugins used for graphics processing and suitable for running on the GPU are not scheduled to the GPU), which leads to low task processing efficiency of model plugins. Summary of the Invention
[0004] This application provides a data processing method, comprising: registering the target plugin in response to a call request from the target plugin; determining the configuration information of the target plugin, the configuration information including the current processing unit where the target plugin is located, the runnable processing units of the target plugin, and a first priority of each runnable processing unit; determining a target processing unit from a plurality of available processing units of an electronic device according to the configuration information, the current processing unit being one of the available processing units of the electronic device; and sending a scheduling instruction corresponding to the target processing unit to the target plugin, causing the target plugin to run a target model based on the target processing unit.
[0005] In some embodiments, determining a target processing unit from a plurality of available processing units of an electronic device based on the configuration information includes: determining the computing resource occupancy ratio of each of the available processing units; and determining the target processing unit from the plurality of available processing units based on the configuration information and the computing resource occupancy ratio of each of the available processing units.
[0006] In some embodiments, determining the target processing unit from a plurality of available processing units based on the configuration information and the respective computing resource occupancy ratios includes: determining candidate processing units from each of the available processing units whose computing resource occupancy ratio is less than a target occupancy ratio based on the respective computing resource occupancy ratios; and determining the candidate processing unit with the highest first priority as the target processing unit when there are multiple candidate processing units belonging to the runnable processing units.
[0007] In some embodiments, after sending the scheduling instruction corresponding to the target processing unit to the target plugin, the method further includes: in response to obtaining a deregistration request of the first plugin, deregistering the first plugin, determining a first processing unit corresponding to the first plugin, wherein the first plugin is different from the target plugin; and when the first processing unit belongs to the runnable processing unit, and the first priority corresponding to the first processing unit is higher than the first priority of the target processing unit, and the computing resource occupancy ratio of the first processing unit is less than the target occupancy ratio, sending the scheduling instruction corresponding to the first processing unit to the target plugin, so that the target plugin runs the target model based on the first processing unit.
[0008] In some embodiments, before determining the target processing unit from a plurality of available processing units of the electronic device according to the configuration information, the method further includes: obtaining a plugin priority list, the plugin priority list including a plurality of plugins arranged in a second priority order; if the plugin priority list includes the target plugin, adding the target plugin to a first queue that conforms to the plugin priority list; if the target plugin is the plugin with the highest second priority in the first queue, performing the step of determining the target processing unit from a plurality of available processing units of the electronic device according to the configuration information.
[0009] In some embodiments, after obtaining the plugin priority list, the method further includes: if the plugin priority list does not include the target plugin, adding the target plugin to the end of a second queue that conforms to the registration time order; if there is no plugin in the first queue and the target plugin is the plugin with the earliest registration time in the second queue, performing the step of determining the target processing unit from multiple available processing units of the electronic device based on the configuration information.
[0010] In some embodiments, after sending the scheduling instruction corresponding to the target processing unit to the target plugin, the method further includes: in response to receiving a message from the target plugin indicating that the call to the target processing unit was successful, removing the target plugin from the first queue; and if a plugin exists in the first queue, determining the second highest priority plugin in the first queue as the new target plugin.
[0011] In some embodiments, after sending the scheduling instruction corresponding to the target processing unit to the target plugin, the method further includes: in response to the computing resource occupancy ratio of the target processing unit being not less than the target occupancy ratio, determining a new target processing unit from other available processing units besides the target processing unit based on the configuration information and each of the computing resource occupancy ratios; sending the scheduling instruction corresponding to the new target processing unit to the target plugin, causing the target plugin to run the target model based on the new target processing unit.
[0012] In some embodiments, after sending the scheduling instruction corresponding to the target processing unit to the target plugin, the method further includes: updating the target scheduling information according to the running status of the target plugin and the computing resource occupancy ratio of the target processing unit, wherein the target scheduling information includes the running status information of multiple plugins and the computing resource occupancy ratio of each available processing unit; and displaying the updated target scheduling information.
[0013] This application embodiment also provides an electronic device, including multiple processing units, at least one of the processing units being configured to: register the target plugin in response to a call request from the target plugin; determine the configuration information of the target plugin, the configuration information including the current processing unit where the target plugin is located, the runnable processing units of the target plugin, and a first priority of each runnable processing unit; determine a target processing unit from the multiple available processing units of the electronic device according to the configuration information, the current processing unit being one of the available processing units of the electronic device; and send a scheduling instruction corresponding to the target processing unit to the target plugin, causing the target plugin to run a target model based on the target processing unit. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flow chart of a data processing method according to an embodiment of this application Figure 1 ;
[0016] Figure 2 This is a flowchart of the target determination processing unit in an embodiment of this application; Figure 3 A flow chart of a data processing method according to an embodiment of this application Figure 2 ; Figure 4A flow chart of a data processing method according to an embodiment of this application Figure 3 ; Figure 5 A flow chart of a data processing method according to an embodiment of this application Figure 4 ; Figure 6 A flow chart of a data processing method according to an embodiment of this application Figure 5 ; Figure 7 A flow chart of a data processing method according to an embodiment of this application Figure 6 ; Figure 8 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0017] Various embodiments and features of this application are described herein with reference to the accompanying drawings.
[0018] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.
[0019] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0020] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0021] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.
[0022] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0023] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0024] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0025] An embodiment of this application provides a data processing method that determines a target processing unit from multiple available processing units of an electronic device using configuration information, sends a scheduling instruction corresponding to the target processing unit to a target plugin, and enables the target plugin to run a target model based on the target processing unit. This allows the configuration information of the target processing unit and the target plugin to be matched, improving the accuracy of plugin scheduling and thereby enhancing the task processing efficiency of the target plugin.
[0026] like Figure 1 As shown, the data processing method includes the following steps: Step S101: In response to the call request of the target plugin, register the target plugin.
[0027] In this embodiment, the execution entity of the data processing method can be an electronic device, such as a server or computer comprising multiple processing units. The target plugin can be a model plugin used to run a target model, which may include any of the following: a graphics processing model, a text processing model, a video processing model, an audio processing model, a programming model, a natural language processing model, etc. The request to invoke the target plugin can be initiated by the user or automatically triggered during the execution of the target task. In response to the request to invoke the target plugin, the target plugin is registered to ensure accurate scheduling of it subsequently.
[0028] Step S102: Determine the configuration information of the target plugin. The configuration information includes the current processing unit where the target plugin is located, the runnable processing unit of the target plugin, and the first priority of each runnable processing unit.
[0029] In this embodiment, the target plugin carries configuration information. This configuration information can be obtained from the target plugin via IPC (Inter-Process Communication) after registration. Alternatively, it can be configuration information sent by the target plugin via IPC during the registration process. The configuration information includes the current processing unit where the target plugin resides, the executable processing unit of the target plugin, and the first priority of each executable processing unit. The electronic device includes multiple available processing units. After startup, the target plugin runs on one of the available processing units of the electronic device, which is the current processing unit.
[0030] The target plugin can have multiple executable processing units, and all or part of the available processing units of the electronic device belong to the executable processing units of the target plugin. Different first priorities represent different degrees of compatibility between the executable processing units and the target plugin. The higher the first priority of an executable processing unit, the higher its compatibility with the target plugin, and the higher the task processing efficiency of the target plugin during runtime. There can be one or more executable processing units corresponding to the same first priority.
[0031] For example, if the target model corresponding to the target plugin is a graphics processing model, and the executable processing units of the target plugin include GPU and CPU, then since graphics processing models are more suitable for running on GPUs, the first priority of GPU can be higher than the first priority of CPU. Alternatively, if the target model corresponding to the target plugin is a neural network model, and the executable processing units of the target plugin include GPU, CPU, and NPU, then since neural network models are more suitable for running on NPUs, the first priority of NPU can be the highest, followed by GPU, and then CPU.
[0032] Step S103: Determine the target processing unit from multiple available processing units of the electronic device according to the configuration information, wherein the current processing unit is one of the available processing units of the electronic device.
[0033] In this embodiment, the multiple available processing units of the electronic device may include, for example, one or more CPUs, one or more GPUs, one or more TPUs (Tensor Processing Units), one or more NPUs, one or more APUs (Accelerated Processing Units), etc. The target processing unit can be determined by selecting from the multiple available processing units of the electronic device based on the current processing unit, runnable processing units, and the first priority of each runnable processing unit in the configuration information. For example, if the runnable processing units include an NPU, and the NPU has the highest first priority, and the available processing units include an NPU, then the NPU can be determined as the target processing unit.
[0034] Step S104: Send a scheduling instruction corresponding to the target processing unit to the target plugin, so that the target plugin runs the target model based on the target processing unit.
[0035] In this embodiment, a scheduling instruction corresponding to the target processing unit can be sent to the target plugin via IPC to notify the target plugin that it can run on the target processing unit. If the current processing unit is different from the target processing unit, the target plugin can migrate from the current processing unit to the target processing unit and run the target model.
[0036] In some embodiments of this application, the target processing unit may be the current processing unit where the target plugin is located. In this case, after receiving the scheduling instruction, the target plugin can run the target model in the current processing unit.
[0037] The data processing method of this application embodiment, in response to a call request from a target plugin, registers the target plugin; determines the configuration information of the target plugin, including the current processing unit where the target plugin resides, the executable processing units of the target plugin, and the first priority of each executable processing unit; determines a target processing unit from multiple available processing units of the electronic device based on the configuration information, wherein the current processing unit is an available processing unit of the electronic device; and sends a scheduling instruction corresponding to the target processing unit to the target plugin, causing the target plugin to run the target model based on the target processing unit. This ensures that the configuration information of the target processing unit and the target plugin are matched, improving the accuracy of plugin scheduling and thus enhancing the task processing efficiency of the target plugin.
[0038] In some embodiments of this application, the step of determining the target processing unit from a plurality of available processing units of the electronic device based on the configuration information is as follows: Figure 2 As shown, it includes the following steps: Step S1031: Determine the computing resource occupancy ratio of each available processing unit.
[0039] The computing resources of each available processing unit can be monitored in real time or periodically to determine the computing resource utilization ratio of each available processing unit, which is the ratio of the computing resources used in the available processing unit to the total computing resources. When the computing resource utilization ratio is too high, the performance of the available processing unit will degrade, reducing task processing efficiency.
[0040] Step S1032: Based on the configuration information and the respective computing resource occupancy ratios, determine the target processing unit from among the multiple available processing units.
[0041] In this embodiment, a target processing unit is determined by selecting from multiple available processing units based on configuration information and the utilization rate of each computing resource. For example, a high-priority available processing unit can be selected from those with low computing resource utilization rates and that are runnable processing units.
[0042] By simultaneously considering configuration information and computing resource usage ratio, the available processing units that match the configuration information and have a suitable computing resource usage ratio are identified as the target processing units, thereby improving the accuracy of plug-in scheduling.
[0043] In some embodiments of this application, determining the target processing unit from a plurality of available processing units based on the configuration information and the respective computing resource occupancy ratios includes: Based on the computing resource occupancy ratio of each of the aforementioned processing units, candidate processing units whose computing resource occupancy ratio is less than the target occupancy ratio are determined from the available processing units. When there are multiple candidate processing units belonging to the operable processing unit, the candidate processing unit with the highest first priority is determined as the target processing unit.
[0044] In this embodiment, the utilization rate of each computing resource is compared with the target utilization rate. Available processing units with a utilization rate lower than the target utilization rate are identified as candidate processing units. Then, it is determined whether each candidate processing unit is a runnable processing unit. If multiple candidate processing units are runnable, the candidate processing unit with the highest priority is identified as the target processing unit. This avoids selecting available processing units with excessively high computing resource utilization rates as target processing units, which would reduce task processing efficiency and further improve the accuracy of plug-in scheduling.
[0045] For example, if an electronic device includes 10 available processing units A1, A2, A3, A4, A5, A6, A7, A8, A9, and A10, and A1, A2, A3, A4, A5, A6, and A7 are runnable processing units, and the computing resource usage ratio of A1, A2, A3, A4, A5, and A6 is less than the target usage ratio, then the first priority of A1, A2, A3, A4, A5, and A6 is determined. If A5 has the highest first priority, then A5 is determined as the target processing unit.
[0046] It is understandable that if there is only one candidate processing unit that is an operable processing unit, then that candidate processing unit is identified as the target processing unit.
[0047] In some embodiments of this application, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in, such as Figure 3 As shown, it also includes the following steps: Step S105: In response to obtaining the cancellation request of the first plugin, cancel the first plugin, and determine the first processing unit corresponding to the first plugin, wherein the first plugin is different from the target plugin.
[0048] In this embodiment, the first plugin is different from the target plugin. Before unregistering the first plugin, it runs on a first processing unit in the electronic device, which is different from the target processing unit. The unregistration request for the first plugin can be triggered when the first plugin completes its target task, or it can be triggered after receiving a user's unregistration command. In response to receiving the unregistration request for the first plugin, the first plugin is unregistered, and the first processing unit corresponding to the first plugin is determined.
[0049] Step S106: When the first processing unit belongs to the runnable processing unit, and the first priority corresponding to the first processing unit is higher than the first priority of the target processing unit, and the computing resource occupancy ratio of the first processing unit is less than the target occupancy ratio, a scheduling instruction corresponding to the first processing unit is sent to the target plugin, so that the target plugin runs the target model based on the first processing unit.
[0050] In this embodiment, after the first plugin is deregistered, the corresponding computing resources in the first processing unit are released, causing a change in the computing resource occupancy ratio of the first processing unit. If the first processing unit is a runnable processing unit, and its first priority is higher than the first priority of the target processing unit, and its computing resource occupancy ratio is less than the target's occupancy ratio, it indicates that the target plugin is more suitable to run in the first processing unit than in the target processing unit, and the target plugin can be rescheduled. A scheduling instruction corresponding to the first processing unit is sent to the target plugin, causing it to migrate from the target processing unit to the first processing unit, and the target model runs based on the first processing unit.
[0051] For example, if an electronic device includes 10 available processing units (A1, A2, A3, A4, A5, A6, A7, A8, A9, and A10), after scheduling the target plugin, the target processing unit running on the target plugin is A3. If a deregistration request is received from the first plugin on A4, the first plugin is deregistered, and the corresponding computing resources on A4 are released. It is then determined whether A4 is a runnable processing unit. If it is, it is determined whether its first priority is higher than the first priority of A3, and whether the computing resource ratio of A4 is less than the target occupancy ratio. If A4 is a runnable processing unit, and the first priority of A4 is higher than the first priority of A3, and the computing resource occupancy ratio of A4 is less than the target occupancy ratio, then it is determined that the target plugin is more suitable to run on A4. A scheduling instruction corresponding to A4 is sent to the target plugin, and the target plugin migrates from A3 to A4 to run the target model based on the scheduling instruction.
[0052] In this way, the target plugin is rescheduled in the event of plugin cancellation, realizing dynamic scheduling of the target plugin, so that the target plugin runs on a more suitable processing unit and improving the accuracy of plugin scheduling.
[0053] In some embodiments of this application, before determining the target processing unit from a plurality of available processing units of the electronic device based on the configuration information, such as Figure 4 As shown, it also includes the following steps: Step S107: Obtain a plugin priority list, which includes multiple plugins arranged according to the second priority.
[0054] In this embodiment, a plugin priority list is pre-set and stored at the target location. Before determining the target processing unit, the plugin priority list is obtained from the target location. This plugin priority list represents the second priority of multiple plugins, and the multiple plugins are arranged in the plugin priority list from high to low according to their second priority. Plugins with higher second priority are scheduled before plugins with lower second priority.
[0055] For example, if the plugin priority list includes 10 plugins: B1, B2, B3, B4, B5, B6, B7, B8, B9, and B10, and the second priority includes the highest priority, high priority, medium priority, low priority, and lowest priority, then the highest priority may include B1 and B2, the high priority may include B5 and B7, the medium priority may include B3 and B8, the low priority may include B4 and B9, and the lowest priority may include B10 and B6.
[0056] Step S108: If the target plugin is included in the plugin priority list, add the target plugin to the first queue that conforms to the plugin priority list.
[0057] In this embodiment, it is determined whether the plugin priority list includes the target plugin. If it does, the target plugin is added to the first queue, and subsequent scheduling of the target plugin is based on the first queue. The plugins in the first queue are arranged from high to low according to the second priority, which conforms to the plugin priority list.
[0058] Step S109: If the target plugin is the second highest priority plugin in the first queue, perform the step of determining the target processing unit from multiple available processing units of the electronic device based on the configuration information.
[0059] In this embodiment, each plugin in the first queue is scheduled in the order of second priority. The scheduled plugins are removed from the first queue. If the target plugin is the plugin with the highest second priority in the first queue, it means that it is time to schedule the target plugin. Then, the step of determining the target processing unit from multiple available processing units of the electronic device according to the configuration information is executed.
[0060] By scheduling target plugins through a plugin priority list and a first queue, the efficiency of plugin scheduling is improved in scenarios where multiple plugins need to be scheduled. Furthermore, plugins with higher second priority can be scheduled first, enabling more granular plugin scheduling and improving the user experience.
[0061] In some embodiments of this application, after obtaining the plugin priority list, such as Figure 5 As shown, it also includes the following steps: Step S110: If the target plugin is not included in the plugin priority list, add the target plugin to the end of the second queue that conforms to the registration time order.
[0062] In some cases, the plugin priority list may not include the target plugin. In this embodiment, if the plugin priority list does not include the target plugin, the target plugin is added to the end of the second queue. The plugins in the second queue are sorted according to their registration time. Plugins with earlier registration times in the second queue are scheduled before plugins with later registration times.
[0063] Step S111: If there is no plugin in the first queue and the target plugin is the plugin with the earliest registration time in the second queue, perform the step of determining the target processing unit from multiple available processing units of the electronic device based on the configuration information.
[0064] In this embodiment, the plugins in the second queue are scheduled after the scheduling of each plugin in the first queue is completed. If there are no plugins in the first queue, it means that the plugins in the second queue can be scheduled. If the target plugin is the plugin with the earliest registration time in the second queue, it means that it is the turn to schedule the target plugin, and the step of determining the target processing unit from multiple available processing units of the electronic device according to the configuration information is executed.
[0065] This allows for scheduling of target plugins using a second queue when the target plugin is not in the plugin priority list, thus improving the efficiency of plugin scheduling.
[0066] In some embodiments of this application, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in, such as Figure 6 As shown, it also includes the following steps: Step S112: In response to receiving a message from the target plugin indicating that the call to the target processing unit was successful, the target plugin is removed from the first queue.
[0067] In this embodiment, after the target plugin runs the target model based on the target processing unit, the target plugin will return a message that the call to the target processing unit was successful, and remove the target plugin from the first queue so that other plugins in the first queue can continue to be scheduled.
[0068] Step S113: If there is a plugin in the first queue, the second highest priority plugin in the first queue is determined as the new target plugin.
[0069] In this embodiment, after removing the target plugin, if there are still plugins in the first queue, the second highest priority plugin in the first queue is determined as the new target plugin, and steps S103 and S104 are executed to complete the scheduling of the new target plugin, thereby scheduling each plugin in the first queue more efficiently.
[0070] In some embodiments of this application, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in, the method further includes: In response to the fact that the computing resource occupancy ratio of the target processing unit is not less than the target occupancy ratio, a new target processing unit is determined from other available processing units other than the target processing unit based on the configuration information and each of the computing resource occupancy ratios. Send a scheduling instruction corresponding to the new target processing unit to the target plugin, so that the target plugin runs the target model based on the new target processing unit.
[0071] In this embodiment, the computing resource usage ratio of the target processing unit may change during its operation. If the computing resource usage ratio of the target processing unit is not less than the target usage ratio, it indicates that the computing resource usage ratio of the target processing unit is too high, and the performance of the target processing unit will decrease. If the target plugin continues to run on the target processing unit, the task processing efficiency of the target plugin will be reduced. In this case, based on the configuration information and the computing resource usage ratios of each unit, a new target processing unit is determined from other available processing units besides the target processing unit. The computing resource usage ratio of the new target processing unit is less than the target usage ratio, and a scheduling instruction corresponding to the new target processing unit is sent to the target plugin, causing the target plugin to migrate from the target processing unit to the new target processing unit, and the target model runs on the new target processing unit.
[0072] In this way, if the computing resource usage ratio of the target processing unit is not less than the target usage ratio, the target plugin is rescheduled to achieve dynamic scheduling of the target plugin, enabling the target plugin to perform task processing efficiently.
[0073] In some embodiments of this application, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in, such as Figure 7 As shown, it also includes the following steps: Step S114: Update the target scheduling information according to the running status of the target plugin and the computing resource occupancy ratio of the target processing unit. The target scheduling information includes the running status information of multiple plugins and the computing resource occupancy ratio of each available processing unit.
[0074] In this embodiment, the electronic device may include a display, and the user interface on the display may display target scheduling information. The target scheduling information includes the running status information of multiple plug-ins and the computing resource utilization ratio of each available processing unit. The target scheduling information may be in one or more combinations of text, images, animations, etc. For example, if the computing resource utilization ratio of an available processing unit is not less than the target utilization ratio, the icon or text of the available processing unit may be displayed in red, along with the numerical value of the computing resource utilization ratio. If the computing resource utilization ratio of an available processing unit is less than the target utilization ratio, the icon or text of the available processing unit may be displayed in blue, along with the numerical value of the computing resource utilization ratio.
[0075] Update the target scheduling information based on the running status of the target plugin and the computing resource usage ratio of the target processing unit.
[0076] Step S115: Display the updated target scheduling information.
[0077] The updated target scheduling information is sent to the display, which then shows the updated target scheduling information. This allows users to intuitively and accurately determine the current running status of multiple plugins and the computing resource usage ratio of each available processing unit, thus improving the user experience.
[0078] This application also proposes an electronic device, such as... Figure 8As shown, the device includes multiple processing units (processing unit 1-processing unit n), at least one of the processing units being configured to: register the target plugin in response to a call request from the target plugin; determine the configuration information of the target plugin, the configuration information including the current processing unit where the target plugin is located, the runnable processing units of the target plugin, and the first priority of each runnable processing unit; determine the target processing unit from multiple available processing units of the electronic device according to the configuration information, the current processing unit being one of the available processing units of the electronic device; and send a scheduling instruction corresponding to the target processing unit to the target plugin, causing the target plugin to run the target model based on the target processing unit.
[0079] The electronic device in this application embodiment determines the target processing unit from multiple available processing units of the electronic device through configuration information, and sends a scheduling instruction corresponding to the target processing unit to the target plug-in, so that the target plug-in runs the target model based on the target processing unit, thereby matching the configuration information of the target processing unit and the target plug-in, improving the accuracy of plug-in scheduling, and thus improving the task processing efficiency of the target plug-in.
[0080] The aforementioned processing unit can be a general-purpose processor, including a CPU, NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0081] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0082] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A data processing method, comprising: In response to a call request from the target plugin, the target plugin is registered; The configuration information of the target plugin is determined, including the current processing unit where the target plugin is located, the runnable processing unit of the target plugin, and the first priority of each runnable processing unit; The target processing unit is determined from a plurality of available processing units of the electronic device based on the configuration information, wherein the current processing unit is one of the available processing units of the electronic device; Send a scheduling instruction corresponding to the target processing unit to the target plugin, so that the target plugin runs the target model based on the target processing unit.
2. The data processing method as described in claim 1, wherein determining the target processing unit from a plurality of available processing units of the electronic device based on the configuration information comprises: Determine the computing resource usage ratio of each available processing unit; Based on the configuration information and the respective computing resource usage ratios, the target processing unit is determined from among the multiple available processing units.
3. The data processing method as described in claim 2, wherein determining the target processing unit from the plurality of available processing units based on the configuration information and the respective computing resource occupancy ratios includes: Based on the computing resource occupancy ratio of each of the aforementioned processing units, candidate processing units whose computing resource occupancy ratio is less than the target occupancy ratio are determined from the available processing units. When there are multiple candidate processing units belonging to the operable processing unit, the candidate processing unit with the highest first priority is determined as the target processing unit.
4. The data processing method as described in claim 2, further comprising, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in: In response to receiving a cancellation request for the first plugin, the first plugin is cancelled, and a first processing unit corresponding to the first plugin is determined, wherein the first plugin is different from the target plugin; If the first processing unit is a runnable processing unit, and the first priority of the first processing unit is higher than the first priority of the target processing unit, and the computing resource occupancy ratio of the first processing unit is less than the target occupancy ratio, a scheduling instruction corresponding to the first processing unit is sent to the target plugin, so that the target plugin runs the target model based on the first processing unit.
5. The data processing method of claim 1, further comprising, before determining the target processing unit from a plurality of available processing units of the electronic device according to the configuration information: Obtain a plugin priority list, which includes multiple plugins arranged according to the second priority. If the target plugin is included in the plugin priority list, the target plugin is added to the first queue that conforms to the plugin priority list; If the target plugin is the second highest priority plugin in the first queue, the step of determining the target processing unit from multiple available processing units of the electronic device based on the configuration information is performed.
6. The data processing method as described in claim 5, further comprising, after obtaining the plugin priority list: If the target plugin is not included in the plugin priority list, the target plugin is added to the end of the second queue that conforms to the registration time order. If no plugin is present in the first queue and the target plugin is the plugin with the earliest registration time in the second queue, the step of determining the target processing unit from multiple available processing units of the electronic device based on the configuration information is executed.
7. The data processing method as described in claim 5, further comprising, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in: In response to receiving a message from the target plugin indicating a successful invocation of the target processing unit, the target plugin is removed from the first queue; If a plugin exists in the first queue, the second highest priority plugin in the first queue is identified as the new target plugin.
8. The data processing method as described in claim 1, further comprising, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in: In response to the fact that the computing resource occupancy ratio of the target processing unit is not less than the target occupancy ratio, a new target processing unit is determined from other available processing units other than the target processing unit based on the configuration information and each of the computing resource occupancy ratios. Send a scheduling instruction corresponding to the new target processing unit to the target plugin, so that the target plugin runs the target model based on the new target processing unit.
9. The data processing method as described in claim 1, further comprising, after sending the scheduling instruction corresponding to the target processing unit to the target plug-in: The target scheduling information is updated based on the running status of the target plugin and the computing resource usage ratio of the target processing unit. The target scheduling information includes the running status information of multiple plugins and the computing resource usage ratio of each available processing unit. Displays updated target scheduling information.
10. An electronic device comprising a plurality of processing units, at least one of the processing units being configured to: In response to a call request from the target plugin, the target plugin is registered; The configuration information of the target plugin is determined, including the current processing unit where the target plugin is located, the runnable processing unit of the target plugin, and the first priority of each runnable processing unit; The target processing unit is determined from a plurality of available processing units of the electronic device based on the configuration information, wherein the current processing unit is one of the available processing units of the electronic device; Send a scheduling instruction corresponding to the target processing unit to the target plugin, so that the target plugin runs the target model based on the target processing unit.