Upgrading processing method and electronic equipment

By responding to system upgrade instructions in electronic devices and determining the target processing system and resource configuration mode, the resource competition problem during system upgrade is solved, and user experience and upgrade efficiency are improved.

CN120144158APending Publication Date: 2025-06-13SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510388643.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

When the processing system of electronic devices is updated, resource scheduling conflicts and resource competition may occur, resulting in interface lag and heating problems, affecting the user experience.

Method used

By responding to system upgrade instructions, determine the target processing system of the upgrade task, determine the target resource configuration mode based on the task characteristics and current task status, and execute the upgrade task within the target processing system to dynamically adjust the resource configuration and avoid resource competition.

Benefits of technology

It effectively solves the problem of resource competition and waste during system upgrade, improves user experience, and ensures efficient execution of upgrade tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144158A_ABST
    Figure CN120144158A_ABST
Patent Text Reader

Abstract

The invention discloses an upgrading processing method and electronic equipment, and the upgrading processing method comprises the steps: responding to a system upgrading instruction received by the electronic equipment, and determining a target processing system corresponding to an upgrading task; determining a current task state of the upgrading task based on the task characteristics of the upgrading task; determining a target resource configuration mode based on the current task state; and executing the upgrading task in the target processing system based on the target resource configuration mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and more specifically, to an upgrade processing method and an electronic device. Background Art

[0002] When updating the processing system of an electronic device, since there may be related applications running in the processing system, resource scheduling conflicts and resource competition may occur during the update, resulting in problems such as interface lag and overheating of the electronic device, affecting the user experience. Summary of the Invention

[0003] In view of this, this application provides the following technical solutions:

[0004] An upgrade processing method includes:

[0005] In response to the electronic device receiving a system upgrade instruction, determining the target processing system corresponding to the upgrade task;

[0006] Based on the task characteristics of the upgrade task, determining the current task state of the upgrade task;

[0007] Based on the current task state, determining the target resource configuration mode;

[0008] Executing the upgrade task in the target processing system based on the target resource configuration mode.

[0009] Optionally, the determining the current task state of the upgrade task based on the task characteristics of the upgrade task includes:

[0010] When the task characteristics of the upgrade task include the division information of the task phases of the upgrade task, obtaining the current process information of the upgrade task; wherein, the division information of the task phases includes the resource requirement information corresponding to the task phases;

[0011] Based on the current process information and the division information of the task phases, determining the current task state corresponding to the current task phase of the upgrade task.

[0012] Optionally, the determining the current task state of the upgrade task based on the task characteristics of the upgrade task includes:

[0013] Based on the task characteristics of the upgrade task, determining the task progress of the upgrade task;

[0014] Based on the task progress, determining the current task state of the upgrade task.

[0015] Optionally, the determining the target resource configuration mode based on the current task state includes:

[0016] Determine the target scenario information in which the electronic device is located based on the current operating characteristics of the electronic device;

[0017] Determine the target resource configuration mode based on the target scenario information and the current task characteristics.

[0018] Optionally, the determining the target resource configuration mode based on the target scenario information and the current task status includes:

[0019] Determine the resource configuration information corresponding to the target scenario information;

[0020] Determine the target resource configuration mode based on the resource configuration information corresponding to the target scenario and the current task status.

[0021] Optionally, the determining the target resource configuration mode based on the target scenario information and the current task status includes:

[0022] Obtain a resource configuration set, where the resource configuration set includes at least one resource configuration mode, and the resource configuration mode represents a resource configuration mode determined based on the scenario information and task status of the electronic device;

[0023] Determine the target resource configuration mode in the resource configuration set according to the target scenario information and the task status.

[0024] Optionally, the executing the upgrade task in the target processing system based on the target resource configuration mode includes:

[0025] During the process of executing the upgrade task in the target processing system, based on the resource information of the upgrade stage of the upgrade task corresponding to the target resource configuration mode, configure the upgrade process corresponding to the upgrade stage into the corresponding resource information group, and execute the upgrade task corresponding to the upgrade stage.

[0026] Optionally, the determining the target processing system corresponding to the upgrade task includes:

[0027] When the electronic device includes at least a first processing system and a second processing system, obtain the first operation information of the first processing system and the second operation information of the second processing system;

[0028] Based on the first operation information and the second operation information, determine the target processing system among the first processing system and the second processing system.

[0029] Optionally, when the target processing system characterizes the non-currently operating second processing system of the electronic device, determining the target scenario information based on the current operating characteristics of the electronic device includes:

[0030] When the current operating characteristics include application process information, obtaining an application process list corresponding to each scenario information; the application process list includes at least one target application process corresponding to the scenario, and the call frequency of the target application process in this scenario is higher than the target call frequency threshold corresponding to this scenario;

[0031] Determining the target scenario information based on the application process information of the first processing system and the application process list.

[0032] An electronic device includes:

[0033] A memory for storing an application program and data generated by the running of the application program;

[0034] A processor for executing the application program to implement:

[0035] In response to the electronic device receiving a system upgrade instruction, determining a target processing system corresponding to the upgrade task;

[0036] Based on the task characteristics of the upgrade task, determining the current task status of the upgrade task;

[0037] Based on the current task status, determining a target resource configuration mode;

[0038] Executing the upgrade task within the target processing system based on the target resource configuration mode.

[0039] An upgrade processing device includes:

[0040] A first determination unit for, in response to the electronic device receiving a system upgrade instruction, determining a target processing system corresponding to the upgrade task;

[0041] A second determination unit for, based on the task characteristics of the upgrade task, determining the current task status of the upgrade task;

[0042] A third determination unit for, based on the current task status, determining a target resource configuration mode;

[0043] An execution unit for executing the upgrade task within the target processing system based on the target resource configuration mode. Description of the Drawings

[0044] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on the provided drawings.

[0045] Figure 1 It is a schematic flowchart of an upgrade processing method provided by an embodiment of the present application;

[0046] Figure 2 It is a schematic flowchart of a method for upgrade processing based on task stages provided by an embodiment of the present application;

[0047] Figure 3 It is a flowchart of a method for upgrade processing based on scenario information provided by an embodiment of the present application;

[0048] Figure 4 It is a schematic diagram of a resource configuration set provided by an embodiment of the present application;

[0049] Figure 5 It is a schematic diagram of a Cgroup configuration list in an application scenario provided by an embodiment of the present application;

[0050] Figure 6 It is a schematic flowchart of a system upgrade method for a dual - processing system provided by an embodiment of the present application;

[0051] Figure 7 It is a schematic structural diagram of an upgrade processing device provided by an embodiment of the present application;

[0052] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0054] The terms "first" and "second" in the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any of their deformations are intended to cover non - exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0055] In an embodiment of the present application, an upgrade processing method is provided. This method can be applied to the scenario of system upgrade for a processing system in an electronic device. Herein, the electronic device can include a mobile terminal, a laptop computer, a desktop computer, a vehicle-mounted terminal, a wearable device, etc. The processing system of the electronic device can include an operating system, an embedded system, a virtual processing system, etc., and the present application does not limit this. Correspondingly, the upgrade of the processing system can be a wired network upgrade, a local storage upgrade, or an OTA (Over-The-Air Technology) upgrade. In the embodiment of the present application, the corresponding target resource configuration mode can be determined based on the current task state of the upgrade task, so as to execute the upgrade task, solving the problems of resource competition and resource waste during the execution of the upgrade task and improving the user experience effect.

[0056] See Figure 1 , which is a schematic flowchart of an upgrade processing method provided by an embodiment of the present application. This method can include the following steps:

[0057] S101. In response to the electronic device receiving a system upgrade instruction, determine the target processing system corresponding to the upgrade task.

[0058] The system upgrade instruction received by the electronic device can be an instruction obtained by the user manually triggering from a system update server; it can also be an instruction for system update automatically detected by the electronic device system. Among them, the system of the electronic device can be an operating system or other types of processing systems, etc. For example, the system upgrade instruction received by the electronic device can be an upgrade instruction for the operating system triggered through the OTA (Over-The-Air) update mechanism. After the electronic device receives the system upgrade instruction, the content of the system upgrade instruction can be parsed, such as obtaining the version information, task priority information, upgrade task type, information download address information, etc. of the information to be upgraded. By these parsed information and the current system information of the electronic device, the target processing system corresponding to the upgrade task is determined. For example, the target processing system can be the processing system specified by the current system upgrade instruction, or the system where the application program corresponding to the upgrade task is located. When the electronic device includes at least one processing system, the processing system with a lower current version can also be used as the target processing system, or when the electronic device includes at least one processing system, the currently idle processing system can be used as the target processing system. This upgrade task needs to be executed in the target processing system to achieve the system upgrade of the target processing system.

[0059] S102. Based on the task characteristics of the upgrade task, determine the current task state of the upgrade task.

[0060] The task characteristics of the upgrade task refer to the representational characteristics of the upgrade task at different times. For example, the task characteristics of the upgrade task can be the characteristics of different task phases of the pre-configured upgrade task; it can also be the status transfer information of the upgrade process corresponding to the upgrade task; it can also be the task behavior characteristics corresponding to the upgrade task; it can also be the resource requirement characteristics corresponding to the upgrade task, etc. Then, according to the task characteristics of the upgrade task, the current task status of the upgrade task can be determined. If the task characteristics represent the time progress characteristics of the task execution, the current task status of the upgrade task can be determined according to the execution time progress corresponding to the current upgrade task. At this time, the current task status can represent the time status of the upgrade task. When the task characteristics of the upgrade task represent the characteristics of the pre-configured task phase, the task status can be determined according to the progress of the task phase it executes. At this time, the task status can ensure the status of the task phase, such as including the download phase, data parsing phase, and upgrade execution phase of the system upgrade task, etc. In this way, according to the current task status of the upgrade task, the subsequent upgrade task can be executed, making the execution process of the upgrade task more compatible with the current task status, and improving the execution efficiency and resource utilization rate of the upgrade task.

[0061] In the embodiment of the present application, the historical data of the existing system upgrade task can be analyzed to determine the task status corresponding to the task characteristics of different system upgrade tasks, and a task status information table can be generated. The task status information table can include the mapping relationship between the task characteristics and the task status. In this way, according to the task characteristics of the current upgrade task and this task status information table, the current task status can be determined.

[0062] S103. Based on the current task status, determine the target resource configuration mode.

[0063] Based on the current task status, the resource information matching this task status can be determined, and then the call mode corresponding to this resource information, the relevant resource configuration information, etc. can be determined, so as to determine the target resource configuration mode. When the task status changes, the resource configuration mode will be dynamically adjusted to make the resource configuration mode match the current task status in real time. For example, if the current task status represents that the upgrade task is in the download phase, the resource information corresponding to it can be determined according to the resource requirements corresponding to the download phase, and this resource information can be determined as the resource that can be called in the resource configuration mode corresponding to the download phase. In this way, according to the current task status, the target resource configuration mode is determined, which can meet the resource requirements of the current task status while implementing the system upgrade task, and improve the user experience effect.

[0064] S104. Execute the upgrade task in the target processing system based on the target resource configuration mode.

[0065] The system upgrade task execution thread in the target processing system executes the upgrade task according to the configuration resources corresponding to the current upgrade task set in the target resource configuration mode. For example, if the current task status indicates that the upgrade task is in the middle task progress, and the corresponding target resource configuration mode requires bandwidth parameters, processing process parameters, data writing parameters, etc., the execution thread in the target processing system that executes the upgrade task will adjust the corresponding resources according to the relevant parameters in the target resource configuration mode, such as adjusting the network bandwidth, etc., so as to ensure the execution of the current upgrade task. During the entire upgrade process, the target processing system will monitor the changes in the task status and system scenario in real time and dynamically adjust the resource configuration mode. For example, when the task switches from the download stage to the parsing stage, the system will reallocate the processor and memory resources to ensure the efficient execution of the parsing task. Through this fine-grained resource control, the system can maximize the user experience while ensuring the smooth completion of the upgrade task.

[0066] In the upgrade processing method provided in the embodiments of the present application, the target resource configuration mode can be determined according to the current task status of the upgrade task, so that the corresponding resource configuration mode can be dynamically adjusted when the task status changes, and a more fine-grained resource control method for the upgrade task is adopted to execute the upgrade task, solving the problem of poor operation effect of the electronic device due to resource competition during system upgrade and improving the user experience effect.

[0067] The following combines the actual application scenarios to illustrate the upgrade processing method of the embodiments of the present application.

[0068] In the embodiments of the present application, the task characteristics of the upgrade task can represent the time progress characteristics of the upgrade task, the upgrade stage characteristics of the upgrade task, the progress characteristics of the upgrade task, etc., so that the determined tasks can include the current time progress status, the current task stage, the current task progress, etc. Further, a more suitable resource configuration mode can be matched for it to improve the resource utilization efficiency of the upgrade task.

[0069] In an implementation manner of the embodiments of the present application, taking the task status as an example to represent the task stage corresponding to the current upgrade task, the upgrade processing method is described. Refer to Figure 2 , which shows the schematic flowchart of the method for upgrade processing based on the task stage in the embodiments of the present application. Figure 2 The shown upgrade processing process may include the following steps:

[0070] S201. In response to the electronic device receiving a system upgrade instruction, determine the target processing system corresponding to the upgrade task.

[0071] S202. When the task characteristics of the upgrade task include the division information of the task phases of the upgrade task, obtain the current process information of the upgrade task.

[0072] S203. Based on the current process information and the division information of the task phases, determine the current task status corresponding to the current task phase of the upgrade task.

[0073] S204. Based on the current task status, determine the target resource configuration mode.

[0074] S205. Execute the upgrade task in the target processing system based on the target resource configuration mode.

[0075] In this embodiment, the task phases of the upgrade task are pre-divided to obtain the division information of the task phases. The division information may include the resource requirement information corresponding to each task phase and may also include the process information of each task phase. Then, based on the current process information of the execution of the current upgrade task and the division information of the task phases, determine the current task phase of the upgrade task, so as to obtain the current task status representing its task phase. Correspondingly, when the division information includes the resource requirement information corresponding to each task phase, the task phase in which the current process is located can be determined according to the resource access request parameters included in the current process information, so as to obtain the corresponding task status information. Further, the target resource configuration mode corresponding to it can be set according to the resource requirement information corresponding to this task phase. When the division information includes the process information of each task phase, the current process information can also be matched with the process information of each task phase, and the task phase corresponding to the result with the highest matching degree is determined as the current task phase, so that the target resource configuration mode corresponding to it can be determined according to the resource requirement information corresponding to this task phase. In this way, the corresponding resource configuration mode can be dynamically adjusted according to the upgrade task at different task phases, avoiding the problems of resource waste or resource surplus, and improving the resource utilization rate and user experience effect.

[0076] Correspondingly, in another implementation manner of the embodiment of the present application, based on the task characteristics of the upgrade task, determining the current task state of the upgrade task may further include: determining the task progress of the upgrade task based on the task characteristics of the upgrade task; and determining the current task state of the upgrade task based on the task progress. In this implementation manner, the task characteristics may represent at least one of the time progress characteristics, resource requirement characteristics, progress characteristics of the process, and project type characteristics of the upgrade task execution of the upgrade task, so that the task progress of the current upgrade task can be determined according to the task characteristics of the current upgrade task. Taking this task progress as the current task state, that is, the current task state represents the task progress of the upgrade task, so that the corresponding resource configuration mode can be matched according to the task progress of the upgrade task, and the utilization efficiency of the resources can be improved. For example, the total estimated time of the current upgrade task is 25 minutes (10 minutes for downloading, 5 minutes for parsing, 8 minutes for merging, and 2 minutes for verification). When the upgrade task is executed for the first 10 minutes, the upgrade task needs to download data, and at this time, a resource configuration mode that meets the data download will be matched, such as restricting the network bandwidth of the upgrade process to ensure the efficient execution of the download task. When the upgrade task is executed for 15 minutes later, the upgrade task needs to merge data, and at this time, a resource configuration mode for data merging will be matched, such as adjusting the allocation of disk I / O and memory resources to ensure the efficient execution of the merging task. In this process, the corresponding resource configuration mode is dynamically adjusted according to the task time progress until the upgrade task is completed.

[0077] Correspondingly, in another implementation manner, when the upgrade task includes different subtasks, the corresponding resource configuration mode can also be configured according to the task characteristics of the currently executed subtask. In this way, when the upgrade task is executed, the corresponding resource configuration mode can be matched based on different subtasks, realizing the efficient utilization of resources and improving the user experience effect.

[0078] During the process of receiving the system upgrade instruction and executing the upgrade task, relevant resources need to be called. When the resources are called, it may affect the operation of other applications, or the resources that can be called by the electronic device are different in different usage states. In order to improve the resource utilization rate of the upgrade task, in the embodiment of the present application, the resource configuration mode of the upgrade task can also be dynamically adjusted in combination with the application scenario of the electronic device. Refer to Figure 3 , which shows a flowchart of a method for upgrade processing based on scenario information provided by an embodiment of the present application. In Figure 3 this upgrade processing method may include the following steps:

[0079] S301. In response to the electronic device receiving a system upgrade instruction, determine the target processing system of the upgrade task.

[0080] S302. Determine the target scenario information of the electronic device based on the current operating characteristics of the electronic device.

[0081] S303. Determine the target resource configuration mode based on the target scenario information and the current task status.

[0082] S304. Execute the upgrade task in the target processing system based on the target resource configuration mode.

[0083] In this embodiment, after determining the target processing system of the upgrade task, the target scenario information of the electronic device can be determined in combination with the current operating characteristics of the electronic device. Among them, the operating characteristics of the electronic device can include one or more of the operating process information of the electronic device, the resource access information of the electronic device, the network status information of the electronic device, and the power consumption information of the electronic device. Further, the operating process information of the electronic device can be determined according to the application program currently running on the electronic device (such as a video player, a game, a document editor, etc.). The resource application situation of the electronic device can also be determined according to the occupancy rates of the processor, memory, disk, and network bandwidth of the electronic device, so as to determine the operating characteristics of the electronic device and further determine the corresponding target scenario information. For example, according to the application process currently running on the electronic device, the application scenario of the electronic device is determined. For example, when the electronic device is running a document editing application, the application scenario of the electronic device is the document editing scenario; when the electronic device is running a game application, the application scenario of the electronic device can be the game scenario. The high-power consumption scenario or low-power consumption scenario of the electronic device can also be determined according to the current power consumption of the electronic device. When the electronic device is in different scenarios, there can be corresponding resource information, and then the corresponding target resource configuration mode can be determined according to the current task status. It can also be that after obtaining the target scenario information, the applicable resources corresponding to the target scenario information are determined, and then based on the current task status and the current applicable resources, the target resource configuration mode matching the current task status is determined. For example, when the electronic device is currently in the video playback scenario and the current task status indicates that the upgrade task is in the data download stage, the corresponding target resource configuration mode can be such that the network bandwidth of the upgrade process is a first parameter, and this first parameter can ensure the normal download of the upgrade data and also ensure the smoothness of the video playback. The memory occupancy of the upgrade process in the current stage can also be restricted to avoid system jamming, thereby improving the user experience effect.

[0084] In Figure 3In the described embodiments, determining the target resource configuration mode based on the target scenario information and the current task status can be achieved in the following manner: determining the resource configuration information corresponding to the target scenario information; and determining the target resource configuration mode based on the resource configuration information corresponding to the target scenario and the current task status. The resource configuration information corresponding to the current target scenario information can be determined in real time. For example, different scenarios have different resource requirements for networks, memory, or hard disks. The network resource configuration information available for the upgrade task can be determined according to the network information corresponding to the current target scenario information. This network resource configuration information can not only meet the network resource scheduling requirements of the current upgrade task but also does not affect the invocation of network resources by other applications in the current target scenario, thereby solving problems such as data lag and improving the user experience effect.

[0085] In another implementation manner of the embodiments of the present application, the corresponding resource configuration mode can be determined in advance for each application scenario and task status, and then, according to the current application scenario and the task status corresponding to the upgrade task, the resource configuration mode with a relatively high matching degree is selected from these existing resource configuration modes as the target resource configuration mode. Among them, the processing procedure for determining the target resource configuration mode based on the target scenario information and the current task status may include: obtaining a resource configuration set; and determining the target resource configuration mode in the resource configuration set according to the target scenario information and the task status.

[0086] In this implementation manner, the resource configuration set includes at least one resource configuration mode, and this resource configuration mode represents the resource configuration mode determined based on the scenario information and the task status of the electronic device. Refer to Figure 4 , which is a schematic diagram of a resource configuration set provided by the embodiments of the present application. In Figure 4In this resource configuration set, it includes Scenario A, Scenario B, and Scenario C. In Scenario A, it includes the resource configuration mode 11 corresponding to the 01 stage of the upgrade task; the resource configuration mode 12 corresponding to the 02 stage of the upgrade task, and the resource configuration mode 13 corresponding to the 03 stage of the upgrade task. In Scenario B, it includes the resource configuration mode 21 corresponding to the 01 stage of the upgrade task; the resource configuration mode 22 corresponding to the 02 stage of the upgrade task, and the resource configuration mode 23 corresponding to the 03 stage of the upgrade task. In Scenario C, it includes the resource configuration mode 31 corresponding to the 01 stage of the upgrade task; the resource configuration mode 32 corresponding to the 02 stage of the upgrade task, and the resource configuration mode 33 corresponding to the 03 stage of the upgrade task. If the current target scenario information indicates that the electronic device is in Scenario C and the current task state indicates that it is in the 02 stage of the upgrade task, then the target resource configuration mode is the resource configuration mode 22. In this way, by pre-configuring the resource configuration mode that matches the scenario and task state of the corresponding electronic device, the target resource configuration mode can be quickly determined based on the current scenario and task state, improving the efficiency of determining the resource configuration mode, and the resource configuration mode can be quickly and dynamically adjusted according to the update of the scenario and task state.

[0087] In the embodiment of the present application, in order to make the resource call more convenient during the execution of the upgrade task and be able to dynamically adjust the resource configuration mode, the upgrade process corresponding to the current upgrade state can be configured into the corresponding resource information group to execute the upgrade task. In one implementation manner, executing the upgrade task in the target processing system based on the target resource configuration mode includes: during the execution of the upgrade task in the target processing system, based on the resource information of the upgrade stage of the upgrade task corresponding to the target resource configuration mode, configuring the upgrade process corresponding to the upgrade stage into the corresponding resource information group and executing the upgrade task corresponding to the upgrade stage.

[0088] In this embodiment, the upgrade process for the current upgrade stage is configured into the corresponding resource information group, which can automatically and efficiently execute the corresponding upgrade task, and can dynamically adjust the resource information group, making the resource scheduling during the execution of the upgrade task more matched with the current task state. For example, the resource configuration is achieved through the Cgroup resource management mechanism. Among them, Cgroup (Control Group) is a mechanism provided by the Linux kernel for managing and restricting the resource usage of a process group (a group of processes). It allows users to perform fine-grained allocation and control of system resources such as CPU, memory, and I / O, thereby achieving resource isolation, priority adjustment, and performance optimization. The Cgroup configuration of the process group can be performed at the operating system level. For example, the configuration corresponding to the Cgroup where the upgrade process for the current upgrade stage of the upgrade task is located can be adjusted, or the upgrade process can be configured into other Cgroups corresponding to the matching resource configuration. For example, the operating system can select the corresponding resource configuration mode from the Cgroup configuration list according to the current target application scenario and the upgrade process state of the upgrade task. The Cgroup configuration list can provide corresponding resource configurations for the upgrade state corresponding to each upgrade process and the current application scenario. For example, when the system is in the high-definition movie playback scenario and the upgrade process is in the download stage, the system will limit the network bandwidth of the update process to ensure the smoothness of movie playback. When the system is in the document editing scenario and the upgrade process is in the merge stage, the system will limit the disk I / O of the update process to avoid affecting the response speed of document editing. The system monitors the resource usage in real time during the execution of the upgrade task and dynamically adjusts the resource allocation according to the current scenario and the upgrade process state. Through the Cgroup API (Application Programming Interface), the system can adjust the allocation of resources such as CPU, memory, and disk I / O in real time to ensure that the system update will not have a negative impact on the user's current operations. Through the Cgroup technology, the system can perform fine-grained control of resources during the update process, avoiding problems such as interface lag and overheating caused by resource competition.

[0089] For example, the scenario manager of the electronic device can use the current upgrade state corresponding to the upgrade task and the target scenario information as input information to perform resource control through the resource configuration group of the current system. The resources of network input and output, processor (such as CPU), memory, and disk can be divided. The resource requirements can be represented by numbers. For example, the degree of resource requirements is represented by numbers from 0 to 10, and the larger the value, the higher the resource requirements for this type. The degree of resource requirements for each type is different in different upgrade task stages. Such as:

[0090] During the upgrade package download phase, the demand representation value for network resources is 7, the demand representation value for CPU resources is 1, the demand representation value for memory resources is 1, and the demand representation value for disk resources is 2; during the upgrade package parsing phase, the demand representation value for network resources is 0, the demand representation value for CPU resources is 3, the demand representation value for memory resources is 2, and the demand representation value for disk resources is 2; during the partitioning phase, the demand representation value for network resources is 0, the demand representation value for CPU resources is 2, the demand representation value for memory resources is 4, and the demand representation value for disk resources is 5. In this way, according to the demand information of different types of resources in the above-mentioned respective phases, a corresponding resource configuration mode can be generated, such as generating a resource information group corresponding to different upgrade phases, which is convenient for dynamically adjusting the resource information of the upgrade process in different upgrade phases.

[0091] See Figure 5 , which shows a schematic diagram of the Cgroup configuration list in an application scenario provided by an embodiment of the present application. As Figure 5 shown, the application scenario list includes three scenarios A, B, and C, which are represented by scenseA, scenseB, and scenseC respectively. The upgrade task status list includes upgrade process status 1, upgrade process status 2, and upgrade process status 3. The corresponding resource information group in the corresponding Cgroup configuration list can include resource information corresponding to the above scenarios and upgrade process statuses respectively. For example, the first resource information group can correspond to the resource information of scenario A and upgrade process status 1, which is represented by cgroup cofig 1_A; the second resource information group can correspond to the resource information of scenario A and process status 2, which is represented by cgroup cofig 2_A. In this way, according to the current application scenario and upgrade process status, the upgrade process can be configured to the corresponding resource information group to realize the invocation of resource information to complete the upgrade task.

[0092] An upgrade processing method provided by an embodiment of the present application can also be applied to an electronic device with two operating systems. System upgrade can be carried out simultaneously with the user using the system. For example, the user can perform system upgrade while editing documents, playing videos, and playing games through the electronic device. See Figure 6 , which shows a schematic flowchart of the system upgrade method for a dual-processing system provided by an embodiment of the present application. The electronic device includes at least a first processing system and a second processing system. The method may include the following steps:

[0093] S601. In response to the electronic device receiving a system upgrade instruction, obtain the first running information of the first processing system and the second running information of the second processing system.

[0094] S602. Determine a target processing system in the first processing system and the second processing system based on the first operation information and the second operation information.

[0095] S603. Determine the current task status of the upgrade task based on the task characteristics of the upgrade task.

[0096] S604. Determine the target scenario information where the electronic device is located based on the current operation characteristics of the electronic device.

[0097] S605. Determine the target resource configuration mode based on the target scenario information and the current task status.

[0098] S606. Execute the upgrade task in the target processing system based on the target resource configuration mode.

[0099] In this embodiment, the first operation information of the first processing system may include the applications currently running in the first processing system, user-triggered data, system power consumption data, resource access information, etc., so as to determine the operation status of the first processing system based on this information. Similarly, the operation status of the second processing system can be determined according to the second operation information of the second processing system. This operation status can indicate whether the processing system is performing the corresponding application processing. Then, based on the operation status of these two systems, the currently running processing system in the electronic device can be determined, and the target scenario information of the electronic device can be determined according to the running processing system, and the non-currently running processing system can be determined as the target processing system. In this way, when upgrading the system of a dual-processing system or a multi-processing system, the non-currently running processing system can be upgraded first, which does not affect the processing of relevant application information by the currently running processing system.

[0100] In the embodiments of the present application, the target application scenario information of the electronic device can be determined according to the resource access information, user-triggered information, or application process information in the currently running processing system. For example, in one embodiment, when the target processing system represents the non-currently running second processing system in the electronic device, the currently running processing system in the electronic device at this time is the first processing system. Among them, the process of determining the target scenario information where the electronic device is located based on the current operation characteristics of the electronic device may include: when the current operation characteristics include application process information, obtaining the application process list corresponding to each scenario information; and determining the target scenario information based on the application process information of the first processing system and the application process list.

[0101] Among them, the application process list includes at least one target application process corresponding to the scenario, and the call frequency of the target application process in this scenario is higher than the target call frequency threshold corresponding to this scenario. That is, in this embodiment, an application process list corresponding to each scenario is set. Each target application process in this application process list is an application process that is frequently executed in the current scenario. For example, the target application process can be one whose call frequency is higher than the preset target call frequency threshold; it can also be sorted according to the call frequencies of each application process in this scenario in descending order of call frequency, and the first n application processes are used as the target application processes in the application process list corresponding to this scenario, where n is a positive integer and can be determined according to this scenario. In this way, the application processes currently running on the first processing system can be monitored, and then compared with each application process list. When the comparison result indicates that the currently running application of the first processing system matches most of the target application processes in a certain application process list, such as matching 80% of the target application processes, the scenario corresponding to this application process list is used as the target application scenario of the electronic device. Further, it can also be to match the first n application processes with higher current call frequencies of the first processing system with the target application processes in the application process list to determine the target application scenario of the electronic device. In this way, based on the resource information corresponding to the target application scenario, the target resource configuration mode corresponding to the current task state can be determined to ensure the effective utilization of resources and improve the user experience effect in the current application scenario.

[0102] In another embodiment of the present application, an upgrade processing device is further provided. Refer to Figure 7 , and the device includes:

[0103] The first determination unit 701 is configured to determine a target processing system corresponding to the upgrade task in response to the electronic device receiving a system upgrade instruction;

[0104] The second determination unit 702 is configured to determine the current task state of the upgrade task based on the task characteristics of the upgrade task;

[0105] The third determination unit 703 is configured to determine a target resource configuration mode based on the current task state;

[0106] The execution unit 704 is configured to execute the upgrade task in the target processing system based on the target resource configuration mode.

[0107] Optionally, the second determination unit includes:

[0108] A first acquisition subunit, configured to obtain the current process information of the upgrade task when the task characteristics of the upgrade task include the division information of the task phases of the upgrade task; wherein, the division information of the task phases includes the resource requirement information corresponding to the task phases.

[0109] A first determination subunit, configured to determine the current task status corresponding to the current task phase of the upgrade task based on the current process information and the division information of the task phases.

[0110] Optionally, the second determination unit includes:

[0111] A second determination subunit, configured to determine the task progress of the upgrade task based on the task characteristics of the upgrade task.

[0112] A third determination subunit, configured to determine the current task status of the upgrade task based on the task progress.

[0113] Optionally, the third determination unit includes:

[0114] A fourth determination subunit, configured to determine the target scenario information of the electronic device based on the current operation characteristics of the electronic device.

[0115] A fifth determination subunit, configured to determine the target resource configuration mode based on the target scenario information and the current task status.

[0116] Optionally, the fifth determination subunit is configured to:

[0117] Determine the resource configuration information corresponding to the target scenario information.

[0118] Determine the target resource configuration mode based on the resource configuration information corresponding to the target scenario and the current task status.

[0119] Optionally, the fifth subunit is configured to:

[0120] Obtain a resource configuration set, where the resource configuration set includes at least one resource configuration mode, and the resource configuration mode represents a resource configuration mode determined based on the scenario information and task status of the electronic device.

[0121] Determine the target resource configuration mode in the resource configuration set according to the target scenario information and the task status.

[0122] Optionally, the execution unit includes:

[0123] A configuration subunit, during the process of executing the upgrade task within the target processing system, configures the upgrade process corresponding to the upgrade stage into the corresponding resource information group based on the resource information of the upgrade stage of the upgrade task corresponding to the target resource configuration mode, and executes the upgrade task corresponding to the upgrade stage.

[0124] Optionally, the first determination unit includes:

[0125] A second acquisition subunit, when the electronic device includes at least a first processing system and a second processing system, obtains the first running information of the first processing system and the second running information of the second processing system;

[0126] A sixth determination subunit, based on the first running information and the second running information, determines a target processing system among the first processing system and the second processing system.

[0127] Optionally, when the target processing system represents the non-currently running second processing system of the electronic device, the fourth determination subunit is configured to:

[0128] When the current running feature includes application process information, obtain an application process list corresponding to each scenario information; the application process list includes at least one target application process corresponding to the scenario, and the call frequency of the target application process in this scenario is higher than the target call frequency threshold corresponding to this scenario;

[0129] Based on the application process information of the first processing system and the application process list, determine the target scenario information.

[0130] It should be noted that the specific implementation of each unit and subunit in this embodiment can refer to the corresponding content in the previous text, and will not be elaborated here.

[0131] In another embodiment of the present application, a readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the upgrade processing method as described above is implemented.

[0132] In another embodiment of the present application, an electronic device is further provided. Refer to Figure 8 , the electronic device may include:

[0133] A memory 801, for storing an application program and data generated by the running of the application program;

[0134] A processor 802, for executing the application program to implement:

[0135] In response to the electronic device receiving a system upgrade instruction, determine a target processing system corresponding to the upgrade task;

[0136] Determine the current task status of the upgrade task based on the task characteristics of the upgrade task;

[0137] Determine the target resource configuration mode based on the current task status;

[0138] Execute the upgrade task within the target processing system based on the target resource configuration mode.

[0139] It should be noted that the specific implementation of the processor in this embodiment can refer to the corresponding content in the previous text and will not be elaborated here.

[0140] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0141] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0142] The steps of the methods or algorithms described in combination with the embodiments disclosed in this article can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0143] The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An upgrade processing method, comprising: In response to the electronic device receiving a system upgrade instruction, determining a target processing system corresponding to the upgrade task; Determine the current task status of the upgrade task based on the task characteristics of the upgrade task; Based on the current task status, determining a target resource configuration mode; The upgrade task is performed in the target processing system based on the target resource configuration mode.

2. The method according to claim 1, wherein determining the current task status of the upgrade task based on the task characteristics of the upgrade task comprises: In the case where the task feature of the upgrade task includes the division information of the task phases of the upgrade task, obtaining the current process information of the upgrade task; wherein the division information of the task phases includes the resource demand information corresponding to the task phases; Based on the current process information and the division information of the task phases, a current task state corresponding to the current task phase of the upgrade task is determined.

3. The method according to claim 1, wherein determining the current task status of the upgrade task based on the task characteristics of the upgrade task comprises: Determining the task progress of the upgrade task based on the task characteristics of the upgrade task; Based on the task progress, a current task status of the upgrade task is determined.

4. The method according to claim 1, wherein determining the target resource configuration mode based on the current task state comprises: Determining target scene information of the electronic device based on current operation characteristics of the electronic device; Based on the target scenario information and the current task status, a target resource configuration mode is determined.

5. The method according to claim 4, wherein the determining the target resource configuration mode based on the target scenario information and the current task status comprises: Determining resource configuration information corresponding to the target scene information; A target resource configuration mode is determined based on the resource configuration information corresponding to the target scenario and the current task status.

6. The method according to claim 4, wherein the determining the target resource configuration mode based on the target scenario information and the current task status comprises: Obtaining a resource configuration set, the resource configuration set including at least one resource configuration mode, the resource configuration mode representing a resource configuration mode determined based on scenario information and task status of the electronic device; A target resource configuration mode is determined in the resource configuration set according to the target scenario information and the task status.

7. The method according to claim 1, wherein executing the upgrade task in the target processing system based on the target resource configuration mode comprises: During execution of the upgrade task in the target processing system, based on the resource information of the upgrade stage of the upgrade task corresponding to the target resource configuration mode, the upgrade process corresponding to the upgrade stage is configured to the corresponding resource information group, and the upgrade task corresponding to the upgrade stage is executed.

8. The method according to claim 4, wherein determining the target processing system corresponding to the upgrade task comprises: In a case where the electronic device includes at least a first processing system and a second processing system, obtaining first operating information of the first processing system and second operating information of the second processing system; A target processing system is determined among the first processing system and the second processing system based on the first operation information and the second operation information.

9. The method according to claim 8, wherein, when the target processing system represents a second processing system that is not currently running in the electronic device, determining the target scene information of the electronic device based on the current running characteristics of the electronic device comprises: In the case where the current running feature includes application process information, obtaining an application process list corresponding to each scenario information; The application process list includes at least one target application process corresponding to a scenario, and the call frequency of the target application process in the scenario is higher than the target call frequency threshold corresponding to the scenario; Based on the application process information of the first processing system and the application process list, target scene information is determined.

10. An electronic device, comprising: A memory, used to store applications and data generated by the operation of the applications; A processor, configured to execute the application program to implement: In response to the electronic device receiving a system upgrade instruction, determining a target processing system corresponding to the upgrade task; Determine the current task status of the upgrade task based on the task characteristics of the upgrade task; Based on the current task status, determining a target resource configuration mode; The upgrade task is performed in the target processing system based on the target resource configuration mode.