Method for adjusting network speed of background application, electronic device, and readable storage medium

By judging the reloaded scenario of electronic devices and adjusting the network speed of the backend application according to the temperature, the application lag or interruption caused by temperature rise in the prior art is solved, and the user experience is improved.

WO2025025946A1PCT designated stage expired Publication Date: 2025-02-06HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/102843
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-31
Filing Date
2024-07-01
Publication Date
2025-02-06

AI Technical Summary

Technical Problem

When the temperature of electronic devices increases, high temperature and frequency limits are avoided by uniformly limiting the network speed. However, this coarse-grained control will cause lag or interruption of the application users are using, affecting the user's experience.

Method used

By determining whether the electronic device is a reloaded scenario and adjusting the network speed of the background application according to the current temperature, to reduce the temperature increase speed and avoid application lag or interruption.

Benefits of technology

It effectively reduces the temperature increase speed of electronic devices, avoids application lag or interruption, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102843_06022025_PF_FP_ABST
    Figure CN2024102843_06022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of terminals, and particularly relates to a method for adjusting the network speed of a background application, an electronic device, and a computer readable storage medium. In the method, during use of an electronic device, the electronic device can determine whether the electronic device is in an overload scenario. When the electronic device is in the overload scenario, the electronic device can acquire a first temperature (i.e., the current temperature of the electronic device), and on the basis of the first temperature, can adjust the network speed of a second application running in the background, so as to reduce the network speed of the second application running in the background, thereby preventing the background application from preempting network resources, decreasing the rate of temperature rise of the electronic device, ensuring the overall performance of the electronic device, avoiding the problem of lagging or interruption of the electronic device caused by frequency decrease of the electronic device due to high temperature, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Background application network speed adjustment method, electronic device and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on July 31, 2023, with application number 202310957412.3 and application name “Network speed adjustment method for background applications, electronic device and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application belongs to the field of terminal technology, and in particular relates to a method for adjusting the network speed of a background application, an electronic device, and a computer-readable storage medium. Background Art

[0003] Currently, when the temperature of an electronic device rises, network speed controls are applied to applications running on the device to prevent high-temperature frequency throttling. However, existing network speed controls are relatively coarse-grained, typically directly limiting the network speed of the electronic device. This applies uniform speed controls to all applications running on the device, causing issues such as lag or interruptions in currently used applications, impacting the user experience.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a method for adjusting the network speed of background applications, an electronic device, and a computer-readable storage medium. By adjusting the network speed of background applications, the temperature rise rate of the electronic device can be reduced, thereby avoiding problems such as lag or interruption of the application currently being used by the user, and improving the user experience.

[0006] In a first aspect, an embodiment of the present application provides a method for adjusting the network speed of a background application, which is applied to an electronic device, and the method includes:

[0007] Determining whether the electronic device is in a heavy load scenario;

[0008] When the electronic device is in a heavy load scenario, obtaining a first temperature of the electronic device, where the first temperature is the current temperature of the electronic device;

[0009] According to the first temperature, the network speed of a second application is adjusted, where the second application is an application running in the background of the electronic device.

[0010] In the above-mentioned method for adjusting the network speed of background applications, during the use of the electronic device, it can be determined whether the electronic device is in an overload scenario. When the electronic device is in an overload scenario, the first temperature (i.e., the current temperature of the electronic device) can be obtained, and the network speed of the second application can be adjusted according to the first temperature, thereby reducing the network speed of the second application running in the background, avoiding background applications from grabbing network resources, reducing the temperature rise rate of the electronic device, ensuring the overall performance of the electronic device, avoiding the electronic device from reducing the frequency due to high temperature, causing the electronic device to freeze or interrupt, and improving the user experience.

[0011] In one example, determining whether the electronic device is in an overload scenario may include:

[0012] Determine the number of apps running in the foreground;

[0013] When the number of applications running in the foreground is greater than or equal to a preset number, it is determined that the electronic device is in an overload scenario.

[0014] In the example method for adjusting the network speed of background applications, the more applications running in the foreground, the greater the load on the electronic device. The fewer applications running in the foreground, the less load on the electronic device. Therefore, the electronic device can determine whether it is in a heavy load scenario based on the number of applications running in the foreground.

[0015] In another example, determining whether the electronic device is in an overload scenario may include:

[0016] When the application running in the foreground is a preset application, it is determined that the electronic device is in a heavy load scenario.

[0017] Optionally, the preset application includes a camera application, a game application or a short video application.

[0018] In the network speed adjustment method for background applications provided in this example, when a preset application (such as a camera application, a game application, or a short video application) is running in the foreground, it will occupy a large CPU load. That is, when any preset application is running in the foreground, it can be determined that the electronic device is in an overloaded scenario. Therefore, the electronic device can determine whether the electronic device is overloaded based on whether the application running in the foreground is a preset application.

[0019] In another example, determining whether the electronic device is in an overload scenario may include:

[0020] Determining a function corresponding to a current task of the electronic device;

[0021] When the function is a preset function, it is determined that the electronic device is in a heavy load scenario.

[0022] Optionally, the preset functions include a super desktop function, a car screen projection function or a first unlocking function.

[0023] In the network speed adjustment method for background applications provided in this example, when a preset function (such as the super desktop function, the car screen projection function, or the first unlocking function) is executed in the foreground, it will occupy a large CPU load. That is, when the foreground executes any preset function, it can be determined that the electronic device is in an overload scenario. Therefore, the electronic device can determine whether the electronic device is overloaded based on whether the function executed in the foreground (that is, the function corresponding to the current task) is a preset function.

[0024] In another example, determining whether the electronic device is in an overload scenario may include:

[0025] Determine the tasks that the foreground application is performing in the background;

[0026] When the task is a preset task, it is determined that the electronic device is in an overload scenario, and the preset task includes application installation or application update.

[0027] In the background application network speed adjustment method provided in this example, the preset tasks of the foreground application (such as application installation or application update) will occupy a large CPU load when executed in the background. That is, when the foreground application executes any preset task in the background, it can be determined that the electronic device is in a heavy load scenario. Therefore, the electronic device can determine whether the electronic device is heavy loaded based on whether the task executed by the foreground application in the background is a preset task.

[0028] In a possible implementation, adjusting the network speed of the second application according to the first temperature may include:

[0029] Determining a first speed limit temperature corresponding to the first temperature;

[0030] Determining a first target network speed corresponding to the second application according to the first speed limit temperature and the first corresponding relationship;

[0031] Adjusting the network speed of the second application to not exceed the first target network speed;

[0032] The first corresponding relationship is the corresponding relationship between the speed limit temperature and the network speed.

[0033] In the network speed adjustment method for background applications provided in this example, a correspondence between a speed limit temperature and a network speed gear can be set in advance in the electronic device. Therefore, after determining the first temperature of the electronic device, the electronic device can determine the target network speed gear corresponding to the second application based on the first temperature and the correspondence, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear (i.e., the first target network speed), so that the network speed of the second application does not exceed the network speed corresponding to the target network speed gear. For example, the network speed of the second application can be adjusted to the network speed corresponding to the target network speed gear.

[0034] It should be understood that, when the current temperature of the electronic device is higher, to ensure the overall performance of the electronic device, the network speed of the second application can be more strictly restricted; when the current temperature of the electronic device is lower, the network speed of the second application can be more loosely restricted. In other words, as the temperature of the electronic device increases, the electronic device can gradually reduce the network speed of the second application to limit the second application's use of network resources, avoid the second application competing with the first application for network resources, and cause the temperature of the electronic device to rise too quickly. This reduces the temperature rise rate of the electronic device, lowers the maximum temperature of the electronic device, and improves the user experience.

[0035] Exemplarily, after adjusting the network speed of the second application to not exceed the first target network speed, the method may further include:

[0036] Obtaining a first recovery temperature corresponding to the first speed limit temperature;

[0037] Acquire a second temperature of the electronic device, where the second temperature is a temperature measured after the electronic device adjusts the network speed of the second application;

[0038] determining whether the second temperature is less than or equal to the first recovery temperature;

[0039] When the second temperature is less than or equal to the first recovery temperature, determining a second speed limit temperature corresponding to the second temperature;

[0040] Determining a second target network speed corresponding to the second application based on the second speed limit temperature and the first corresponding relationship;

[0041] Adjust the network speed of the second application to not exceed the second target network speed.

[0042] In the network speed adjustment method for background applications provided in this example, after adjusting the network speed of the second application, the current temperature of the electronic device can be re-detected. When the current temperature of the electronic device changes, the target network speed gear corresponding to the second application can be re-determined based on the changed temperature, and the network speed of the second application can be adjusted according to the re-determined target network speed gear. When the temperature of the electronic device rises, the network speed of the second application can be further reduced, reducing the second application's occupation of network resources. When the temperature of the electronic device drops, the network speed of the second application can be increased to ensure the upload or download speed of the second application.

[0043] Exemplarily, before adjusting the network speed of the second application according to the first temperature, the method may further include:

[0044] Determine that the second application is one or more applications in the application whitelist.

[0045] In the network speed adjustment method for background applications provided in this example, since the second application running in the background does not necessarily occupy network resources, the network speed does not need to be adjusted for the second application that does not occupy network resources. At this time, an application whitelist can be set in the electronic device, and the application whitelist can include identification information (such as name and / or code, etc.) of applications that need to occupy network resources when running in the background. Therefore, when adjusting the network speed of the second application running in the background, the electronic device can obtain the identification information of the second application and determine whether the second application is an application in the application whitelist based on the identification information of the second application. When it is determined that the second application is an application in the application whitelist, the electronic device adjusts the network speed of the second application according to the first temperature.

[0046] In another possible implementation, adjusting the network speed of the second application according to the first temperature may include:

[0047] Obtaining a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device;

[0048] Adjust the network speed of the second application according to the first network speed and the first temperature.

[0049] Exemplarily, adjusting the network speed of the second application according to the first network speed and the first temperature includes:

[0050] Determining a first network speed gear corresponding to the first network speed;

[0051] Determining a second correspondence based on the first network speed level, where the second correspondence is a correspondence between the speed limit temperature and the network speed;

[0052] determining a third speed limit temperature corresponding to the first temperature;

[0053] Determining a third target network speed corresponding to the second application according to the third speed limit temperature and the second corresponding relationship;

[0054] Adjust the network speed of the second application to not exceed the third target network speed.

[0055] In the network speed adjustment method for background applications provided in this example, the electronic device may be pre-set with a correspondence between the speed limit temperature and the network speed gear under different real-time network speeds. Among them, the real-time network speed may refer to the current network speed of the electronic device (ie, the first network speed). Therefore, after determining that the application scenario is an overload scenario, the electronic device can obtain the first network speed of the electronic device, and can determine the target network speed gear corresponding to the second application based on the first network speed, the first temperature and the correspondence, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear (ie, the third target network speed), so that the network speed of the second application does not exceed the network speed corresponding to the target network speed gear. For example, the network speed of the second application can be adjusted to the third target network speed.

[0056] It is understandable that when the current network speed of the electronic device is faster, it can be considered that the network resources of the electronic device are more sufficient. Therefore, the network speed of the second application can be more loosely restricted to ensure the upload or download speed of the second application; when the current network speed of the electronic device is slower, it can be considered that the network resources in the electronic device are less sufficient. Therefore, the network speed of the second application can be more strictly restricted. That is, when the current network speed of the electronic device is slower, the electronic device can reduce the network speed of the second application to limit the second application's occupation of network resources, avoid the second application competing with the first application for network resources, cause the temperature of the electronic device to rise too quickly, reduce the temperature rise rate of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.

[0057] For example, the electronic device may be provided with a correspondence between the speed limit temperature and the second network speed level at each first network speed level. Therefore, after determining the first network speed and the first temperature of the electronic device, the electronic device may determine the first network speed level at which the first network speed is located, and may determine the target correspondence between the speed limit temperature and the second network speed level based on the first network speed level at which the first network speed is located. Thus, the target network speed level corresponding to the second application may be determined based on the first temperature and the target correspondence, so as to adjust the network speed of the second application based on the network speed corresponding to the target network speed level.

[0058] It is understandable that the first network speed gear, the speed limit temperature and the second network speed gear can be determined specifically according to the actual scenario, and the embodiments of the present application do not impose any restrictions on this.

[0059] For example, based on actual scenarios, the first network speed gear can be determined to include gear A, gear B, and gear C. Among them, the network speed corresponding to gear A is greater than the network speed corresponding to gear B, and the network speed corresponding to gear B is greater than the network speed corresponding to gear C. For example, the network speed corresponding to gear A is 10M / s or above, the network speed corresponding to gear B is [3M / s, 10M / s), and the network speed corresponding to gear C is [0M / s, 3M / s).

[0060] Therefore, the electronic device can be provided with a correspondence between the speed limit temperature and the second network speed gear when the first network speed gear is A gear (for example, it can be called correspondence A1), a correspondence between the speed limit temperature and the second network speed gear when the first network speed gear is B gear (for example, it can be called correspondence A2), and a correspondence between the speed limit temperature and the second network speed gear when the first network speed gear is C gear (for example, it can be called correspondence A3).

[0061] That is to say, after determining that the electronic device is in an overload scenario, if it is determined that the current network speed of the electronic device (i.e., the first network speed) is in gear A, the electronic device can determine the target network speed gear corresponding to the second application based on the first temperature and the corresponding relationship A1, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear. If it is determined that the first network speed is in gear B, the electronic device can determine the target network speed gear corresponding to the second application based on the first temperature and the corresponding relationship A2, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear. If it is determined that the first network speed is in gear C, the electronic device can determine the target network speed gear corresponding to the second application based on the first temperature and the corresponding relationship A3, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear.

[0062] Optionally, the electronic device further includes: a second network speed gear, the second network speed gear is different from the first network speed gear, and a third corresponding relationship corresponding to the second network speed gear is different from the second corresponding relationship.

[0063] In another possible implementation, the method may further include:

[0064] Determining a first application scenario to which a first application belongs, where the first application is an application running in the foreground of the electronic device;

[0065] Obtaining a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device;

[0066] The adjusting the network speed of the second application according to the first temperature includes:

[0067] Adjust the network speed of the second application according to the first application scenario, the first network speed, and the first temperature.

[0068] In the network speed adjustment method for background applications provided in this example, when there is a first application running in the foreground and a second application running in the background in an electronic device, the electronic device can determine a first application scenario to which the first application belongs, and obtain a first network speed and a first temperature of the electronic device, so as to determine the actual demand of the first application for network resources based on the first application scenario to which the first application belongs, thereby accurately adjusting the network speed of the second application based on the actual demand of the first application for network resources, as well as the first network speed and the first temperature of the electronic device, to ensure that network resources meet the needs of the first application, ensure the smoothness of the operation of the first application, reduce the temperature rise rate of the electronic device, protect the overall performance of the electronic device, avoid frequency reduction of the electronic device due to high temperature, resulting in problems such as slow response or freezing of the electronic device, and improve user experience.

[0069] Exemplarily, adjusting the network speed of the second application according to the first application scenario, the first network speed, and the first temperature may include:

[0070] Determine a fourth corresponding relationship corresponding to the first application scenario, where the fourth corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed in the first application scenario;

[0071] Adjust the network speed of the second application according to the first network speed, the first temperature, and the fourth corresponding relationship.

[0072] Optionally, adjusting the network speed of the second application according to the first network speed, the first temperature, and the fourth corresponding relationship may include:

[0073] Determine a third network speed gear corresponding to the first network speed;

[0074] Determining a fifth corresponding relationship based on the third network speed gear and the fourth corresponding relationship, where the fifth corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed in the first application scenario and the third network speed gear;

[0075] determining a fourth speed limit temperature corresponding to the first temperature;

[0076] determining a fourth target network speed corresponding to the second application according to the fourth speed limit temperature and the fifth corresponding relationship;

[0077] Adjust the network speed of the second application to not exceed the fourth target network speed.

[0078] Optionally, the electronic device further includes: a second application scenario, the second application scenario is different from the first application scenario, and the sixth corresponding relationship corresponding to the second application scenario is different from the fourth corresponding relationship.

[0079] In the network speed adjustment method for background applications provided in this example, the electronic device may be provided with a correspondence between the speed limit temperature and the second network speed gear in each preset scenario under each first network speed gear. Therefore, after determining the first network speed and the first temperature of the electronic device, and the application scenario to which the first application belongs, the electronic device can determine the first network speed gear where the first network speed is located, and can determine the target correspondence between the speed limit temperature and the second network speed gear based on the first network speed gear and the application scenario where the first network speed is located, so that the target network speed gear corresponding to the second application can be determined based on the first temperature and the target correspondence, so as to adjust the network speed of the second application according to the network speed corresponding to the target network speed gear (i.e., the fourth target network speed), so that the network speed of the second application does not exceed the fourth target network speed. For example, the network speed of the second application can be adjusted to the fourth target network speed.

[0080] In a second aspect, an embodiment of the present application provides a network speed adjustment device for a background application, which is applied to an electronic device. The device may include:

[0081] An overload scenario judgment module, configured to judge whether the electronic device is in an overload scenario;

[0082] A first temperature acquisition module, configured to acquire a first temperature of the electronic device when the electronic device is in a heavy load scenario, where the first temperature is the current temperature of the electronic device;

[0083] The first network speed adjustment module is used to adjust the network speed of a second application according to the first temperature, where the second application is an application running in the background of the electronic device.

[0084] In one example, the overload scenario judgment module is specifically used to determine the number of applications running in the foreground; when the number of applications running in the foreground is greater than or equal to a preset number, it is determined that the electronic device is in an overload scenario.

[0085] In another example, the overload scenario judgment module is further configured to determine that the electronic device is in an overload scenario when the application running in the foreground is a preset application.

[0086] Optionally, the preset application includes a camera application, a game application or a short video application.

[0087] In another example, the overload scenario judgment module is further used to determine the function corresponding to the current task of the electronic device; when the function is a preset function, it is determined that the electronic device is in an overload scenario.

[0088] Optionally, the preset functions include a super desktop function, a car screen projection function or a first unlocking function.

[0089] In another example, the overload scenario judgment module is further used to determine the task performed in the background by the application running in the foreground; when the task is a preset task, the electronic device is determined to be in an overload scenario, and the preset task includes application installation or application update.

[0090] In one possible implementation, the first network speed adjustment module is specifically used to determine a first speed limit temperature corresponding to the first temperature; determine a first target network speed corresponding to the second application based on the first speed limit temperature and the first correspondence; and adjust the network speed of the second application to not exceed the first target network speed; wherein the first correspondence is the correspondence between the speed limit temperature and the network speed.

[0091] Exemplarily, the device may further include:

[0092] a recovery temperature acquisition module, configured to acquire a first recovery temperature corresponding to the first speed limit temperature;

[0093] a second temperature acquisition module, configured to acquire a second temperature of the electronic device, where the second temperature is a temperature measured after the electronic device adjusts the network speed of the second application;

[0094] a second temperature determination module, configured to determine whether the second temperature is less than or equal to the first recovery temperature;

[0095] a second speed limit temperature determining module, configured to determine a second speed limit temperature corresponding to the second temperature when the second temperature is less than or equal to the first recovery temperature;

[0096] a second target network speed determining module, configured to determine a second target network speed corresponding to the second application according to the second speed limit temperature and the first corresponding relationship;

[0097] The second network speed adjustment module is used to adjust the network speed of the second application to not exceed the second target network speed.

[0098] Exemplarily, the device may further include:

[0099] The second application determining module is configured to determine that the second application is one or more applications in an application whitelist.

[0100] In another possible implementation, the first network speed adjustment module is further used to obtain a first network speed of the electronic device, where the first network speed is the current network speed of the electronic device; and adjust the network speed of the second application according to the first network speed and the first temperature.

[0101] Exemplarily, the first network speed adjustment module is also used to determine a first network speed gear corresponding to the first network speed; determine a second corresponding relationship based on the first network speed gear, the second corresponding relationship being the corresponding relationship between the speed limit temperature and the network speed; determine a third speed limit temperature corresponding to the first temperature; determine a third target network speed corresponding to the second application based on the third speed limit temperature and the second corresponding relationship; and adjust the network speed of the second application to not exceed the third target network speed.

[0102] Optionally, the electronic device further includes: a second network speed gear, the second network speed gear is different from the first network speed gear, and a third corresponding relationship corresponding to the second network speed gear is different from the second corresponding relationship.

[0103] In another possible implementation, the apparatus may further include:

[0104] an application scenario determination module, configured to determine a first application scenario to which a first application belongs, where the first application is an application running in the foreground of the electronic device;

[0105] A first network speed acquisition module, configured to acquire a first network speed of the electronic device, where the first network speed is the current network speed of the electronic device;

[0106] The first network speed adjustment module is further used to adjust the network speed of the second application according to the first application scenario, the first network speed and the first temperature.

[0107] Exemplarily, the first network speed adjustment module is also used to determine a fourth corresponding relationship corresponding to the first application scenario, where the fourth corresponding relationship is the corresponding relationship between the speed limit temperature and the network speed in the first application scenario; and adjust the network speed of the second application according to the first network speed, the first temperature and the fourth corresponding relationship.

[0108] Optionally, the first network speed adjustment module is also used to determine a third network speed gear corresponding to the first network speed; determine a fifth correspondence based on the third network speed gear and the fourth correspondence, the fifth correspondence being the correspondence between the speed limit temperature and the network speed in the first application scenario and the third network speed gear; determine a fourth speed limit temperature corresponding to the first temperature; determine a fourth target network speed corresponding to the second application based on the fourth speed limit temperature and the fifth correspondence; and adjust the network speed of the second application to not exceed the fourth target network speed.

[0109] Optionally, the electronic device further includes: a second application scenario, the second application scenario is different from the first application scenario, and the sixth corresponding relationship corresponding to the second application scenario is different from the fourth corresponding relationship.

[0110] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the method for adjusting the network speed of background applications described in any one of the first aspects above.

[0111] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a computer, the computer implements the network speed adjustment method for the background application described in any one of the first aspects above.

[0112] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the network speed adjustment method of the background application described in any one of the first aspects above.

[0113] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0114] FIG1 is a schematic diagram of the structure of an electronic device to which a method for adjusting the network speed of a background application provided by an embodiment of the present application is applicable;

[0115] FIG2 is a first schematic diagram of a software architecture to which a method for adjusting the network speed of a background application provided in an embodiment of the present application is applicable;

[0116] FIG3 is a second schematic diagram of a software architecture to which the network speed adjustment method for background applications provided in an embodiment of the present application is applicable;

[0117] FIG4 is a flow chart of a method for adjusting the network speed of a background application provided in Example 1 of the present application;

[0118] FIG5 is a flow chart of a method for adjusting the network speed of a background application provided in Example 2 of the present application. DETAILED DESCRIPTION

[0119] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0120] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0121] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0122] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0123] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0124] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.

[0125] The steps involved in the method for adjusting the network speed of a background application provided in the embodiments of the present application are merely examples. Not all steps are mandatory, nor are all information or messages required. These steps may be added or reduced as needed during use. The same step or steps or messages with the same function in different embodiments of the present application may be referenced and learned from each other.

[0126] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field will know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0127] Electronic devices generally run foreground applications and background applications. For example, while the foreground application is running, upload or download tasks can be performed through the background application. Among them, when the background application performs batch upload or download tasks for a long time, on the one hand, it will cause the temperature of the electronic device to rise rapidly, causing the electronic device to reduce the frequency due to high temperature, resulting in problems such as slow response or jamming of the electronic device. On the other hand, it will occupy more network resources, resulting in limited network resources of the foreground application, resulting in problems such as slow response or jamming of the electronic device, which greatly affects the user experience.

[0128] To address the above issues, when an electronic device has both foreground and background applications, the network speed of the background application can be adjusted based on the temperature of the electronic device. This prevents the temperature of the electronic device from rising too quickly, reduces the network resource usage of the background application, and thus reduces the possibility of the electronic device experiencing slow response or lag. Generally, a speed limit policy corresponding to the background application can be set in advance based on the temperature, so that the network speed of the background application can be adjusted based on the speed limit policy and the real-time temperature of the electronic device.

[0129] For example, you can set four speed levels for background applications in advance: the first level can be 3MB / s, the second level can be 1MB / s, the third level can be 500KB / s, and the fourth level can be 50KB / s. The speed limit policy can be that when the temperature is less than 37 degrees Celsius (hereinafter referred to as degrees), no speed limit is imposed on background applications. When the temperature rises to 37 degrees, the speed is adjusted to the first level. For every subsequent 3 degrees increase in temperature, the speed limit increases by one level, thereby gradually limiting the speed of background applications.

[0130] That is to say, when the temperature is less than 37 degrees, the network speed of background applications will not be adjusted, that is, the electronic device can upload or download tasks at the original network speed. When the temperature rises to 37 degrees, the network speed of background applications can be the first gear, that is, when the temperature of the electronic device reaches 37 degrees, the network speed of background applications can be adjusted to 3MB / s. When the temperature rises to 40 degrees, the network speed of background applications can be the second gear, that is, when the temperature of the electronic device reaches 40 degrees, the network speed of background applications can be adjusted to 1MB / s. When the temperature rises to 43 degrees, the network speed of background applications can be the third gear, that is, when the temperature of the electronic device reaches 43 degrees, the network speed of background applications can be adjusted to 500KB / s. When the temperature rises to 46 degrees, the network speed of background applications can be the fourth gear, that is, when the temperature of the electronic device reaches 46 degrees, the network speed of background applications can be adjusted to 50KB / s.

[0131] This method of adjusting the network speed of background applications based on temperature can, to a certain extent, slow the temperature rise of electronic devices and reduce the use of network resources by background applications, thereby reducing the average load and power consumption of electronic devices, thereby reducing the possibility of electronic devices experiencing slow response or lag. However, this method only considers the impact of temperature on network speed, which will lead to insufficient utilization of network resources by foreground and background applications. When foreground applications are heavily dependent on network resources, background applications may not be able to fully limit their speed, resulting in limited network resources for foreground applications, causing the temperature of electronic devices to rise too quickly, which will still cause problems such as slow response or lag.

[0132] In order to solve the above problems, the embodiments of the present application provide a method for adjusting the network speed of a background application, an electronic device, and a computer-readable storage medium. In the method, when there is a first application running in the foreground and a second application running in the background in the electronic device, the electronic device can determine the application scenario to which the first application belongs, and obtain the first network speed and first temperature of the electronic device, where the first network speed is the current network speed of the electronic device, and the first temperature is the current temperature of the electronic device, so as to determine the actual demand of the first application for network resources according to the application scenario to which the first application belongs, and thus accurately adjust the network speed of the second application according to the actual demand of the first application for network resources, as well as the first network speed and first temperature of the electronic device, to ensure that the network resources meet the needs of the first application, ensure the smoothness of the operation of the first application, reduce the temperature rise rate of the electronic device, protect the overall performance of the electronic device, avoid the electronic device from reducing the frequency due to high temperature, resulting in problems such as slow response or freezing of the electronic device, improve user experience, and have strong ease of use and practicality.

[0133] In the embodiments of the present application, the electronic device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or a desktop computer, etc. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device.

[0134] The following first introduces the electronic device involved in the embodiment of the present application. Please refer to Figure 1, which shows a schematic structural diagram of an electronic device 100.

[0135] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, an antenna 1, an antenna 2, a mobile communication module 140, a wireless communication module 150, a sensor module 160, and a display screen 170. The sensor module 160 may include a pressure sensor 160A, a gyroscope sensor 160B, an acceleration sensor 160C, a temperature sensor 160D, a touch sensor 160E, and the like.

[0136] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0137] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0138] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0139] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0140] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0141] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 160E, etc., via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 160E via the I2C interface, enabling communication between the processor 110 and the touch sensor 160E via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0142] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 150. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 150 via the UART interface to implement the Bluetooth function. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 170. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the display screen 170 communicate via the DSI interface to implement the display function of the electronic device 100.

[0143] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the display 170, the wireless communication module 150, the sensor module 160, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0144] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to transfer data between the electronic device 100 and peripheral devices. The interface can also be used to connect other electronic devices, such as AR devices.

[0145] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0146] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 140, the wireless communication module 150, the modem processor and the baseband processor.

[0147] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0148] The mobile communication module 140 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 140 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 140 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 140 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 140 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 140 can be set in the same device as at least some of the modules of the processor 110.

[0149] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor displays images or videos through the display screen 170. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 140 or other functional modules.

[0150] The wireless communication module 150 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 150 can be one or more devices that integrate at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 150 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0151] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 140, and the antenna 2 is coupled to the wireless communication module 150, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0152] Electronic device 100 implements display functionality through a GPU, display screen 170, and an application processor. The GPU is a microprocessor for image processing that connects display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0153] Display screen 170 is used to display images, videos, and the like. Display screen 170 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 170, where N is a positive integer greater than one.

[0154] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0155] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0156] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0157] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as videos can be stored in the external memory card.

[0158] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0159] Pressure sensor 160A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 160A can be located on display screen 170. There are many types of pressure sensors 160A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 160A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 170, electronic device 100 detects the touch intensity based on pressure sensor 160A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 160A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.

[0160] The gyroscope sensor 160B can be used to determine the motion of the electronic device 100. In some embodiments, the gyroscope sensor 160B can be used to determine the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 160B can be used for navigation and somatosensory gaming scenarios.

[0161] Accelerometer 160C can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0162] Temperature sensor 160D is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 160D to implement a temperature management strategy. For example, when the temperature reported by temperature sensor 160D exceeds a threshold, electronic device 100 may reduce the performance of a processor located near temperature sensor 160D to reduce power consumption and implement thermal protection.

[0163] For example, the electronic device 100 can determine the target network speed gear corresponding to the background application based on the temperature detected by the temperature sensor 160D, so as to adjust the network speed of the background application according to the target network speed gear. The touch sensor 160E is also called a "touch device". The touch sensor 160E can be set on the display screen 170, and the touch sensor 160E and the display screen 170 form a touch screen, also called a "touch screen". The touch sensor 160E is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 170. In other embodiments, the touch sensor 160E can also be set on the surface of the electronic device 100, which is different from the position of the display screen 170.

[0164] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. For example, the software system of the electronic device 100 may adopt an Android operating system (OS), a Harmony OS, or an IOS with a layered architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100.

[0165] FIG2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

[0166] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0167] The application layer can include a series of application packages.

[0168] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0169] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0170] As shown in FIG2 , the application framework layer may include a non-real-time processing subsystem, a real-time processing subsystem, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0171] The non-real-time processing subsystem is used to obtain the temperature of the electronic device 100, the load of the processor 110, the current network speed of the electronic device 100, or user operations, etc. The non-real-time processing subsystem can also be used to determine the application scenario to which the foreground application belongs. In addition, the non-real-time processing subsystem can also perform speed limit configuration management, such as speed limit application whitelist, speed limit temperature and network speed gear configuration management. Among them, the application whitelist can include identification information such as the name and / or number of the application.

[0172] The real-time processing subsystem is used to identify application status, that is, to identify foreground applications and background applications. It can also perform speed limit management based on the temperature and / or network speed obtained by the non-real-time processing subsystem, as well as the corresponding application scenario, such as determining a list of speed-limited applications and target network speed levels. In addition, the real-time processing subsystem can also send speed limit instructions to the native layer to send the list of speed-limited applications and target network speed levels to the native layer. Among them, the applications in the speed-limited application list are one or more applications in the non-real-time processing subsystem's application whitelist.

[0173] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0174] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0175] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0176] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0177] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0178] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, or flashing indicator lights.

[0179] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0180] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0181] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0182] The system library can include multiple functional modules, such as the native layer, surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0183] The native layer can receive the speed limit instruction sent by the real-time processing subsystem. After receiving the speed limit instruction, it can assemble the kernel message according to the speed limit application list and the target network speed gear, and send the kernel information to the kernel layer.

[0184] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0185] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0186] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0187] A 2D graphics engine is a drawing engine for 2D drawings.

[0188] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0189] After receiving the kernel information, the kernel layer can map the quality of service (QoS) label to the socket network connection, and limit the speed of the background applications in the speed-limited application list according to the speed-limited application list and the target network speed gear in the kernel message, that is, adjust the network speed of the background applications in the speed-limited application list according to the target network speed gear.

[0190] Please refer to Figure 3, which shows a second schematic diagram of a software architecture to which the network speed adjustment method for a background application provided in an embodiment of the present application is applicable. This schematic diagram only illustrates the modules involved in the embodiment of the present application.

[0191] As shown in Figure 3, in the embodiment of the present application, the Android system is divided into an application framework layer, a system library, and a kernel layer. The application framework layer may include a non-real-time processing subsystem and a real-time processing subsystem. The system library may include a native layer.

[0192] The non-real-time processing subsystem is used to obtain the temperature of the electronic device 100, the load of the processor 110, the current network speed of the electronic device 100, or user operations, etc. The non-real-time processing subsystem can also be used to determine the application scenario to which the foreground application belongs. In addition, the non-real-time processing subsystem can also perform speed limit configuration management, such as speed limit application whitelist, speed limit temperature and network speed gear configuration management. Among them, the application whitelist can include identification information such as the name and / or number of the application.

[0193] The real-time processing subsystem is used to identify application status, that is, to identify foreground applications and background applications. It can also perform speed limit management based on the temperature and / or network speed obtained by the non-real-time processing subsystem, as well as the corresponding application scenario, such as determining a list of speed-limited applications and target network speed levels. In addition, the real-time processing subsystem can also send speed limit instructions to the native layer to send the list of speed-limited applications and target network speed levels to the native layer. Among them, the applications in the speed-limited application list are one or more applications in the non-real-time processing subsystem's application whitelist.

[0194] The native layer can receive the speed limit instruction sent by the real-time processing subsystem. After receiving the speed limit instruction, it can assemble the kernel message according to the speed limit application list and the target network speed gear, and send the kernel information to the kernel layer.

[0195] After receiving the kernel information, the kernel layer can map the quality of service (QoS) label to the socket network connection, and limit the speed of the background applications in the speed-limited application list according to the speed-limited application list and the target network speed gear in the kernel message, that is, adjust the network speed of the background applications in the speed-limited application list according to the target network speed gear.

[0196] The following will describe in detail the method for adjusting the network speed of background applications provided in the embodiments of the present application in combination with the accompanying drawings and specific application scenarios.

[0197] [Example 1]

[0198] Please refer to Figure 4, which shows a schematic flow chart of a method for adjusting the network speed of a background application provided in Example 1 of the present application. The method can be applied to the above-mentioned electronic device, which may include a first application and a second application. The first application may be an application running in the foreground of the electronic device, and the second application may be an application running in the background of the electronic device. As shown in Figure 4, the method may include:

[0199] S401: When a first application is running in the foreground of an electronic device, the electronic device determines an application scenario to which the first application belongs.

[0200] Determining the application scenario to which the first application belongs mainly involves determining whether the application scenario to which the first application belongs is an overload scenario.

[0201] It can be understood that overload means that the processor in the electronic device is heavily loaded, that is, the processor has a large load. Among them, load refers to the number of tasks being processed and waiting to be processed in the processor within a period of time. The higher the load, the more tasks the electronic device is running and the more network resources it requires. Therefore, when the foreground application belongs to an overload scenario, the electronic device can reduce the network speed of the background application to reduce the background application's occupation of network resources and ensure the foreground application's demand for network resources. In addition, reducing the network speed of the background application can reduce the upload or download speed of the background application, reduce the temperature rise rate of the electronic device, and reduce the temperature of the electronic device to avoid problems such as frequency reduction of the electronic device due to excessive temperature, thereby avoiding problems such as slow response or jamming of the electronic device, ensuring the smoothness of the foreground application and improving the user experience.

[0202] In one example, a heavy load scenario can be a scenario where multiple applications are running in the foreground. The more applications running in the foreground, the greater the load on the electronic device, and the fewer applications running in the foreground, the smaller the load on the electronic device. Therefore, the electronic device can determine whether the application scenario to which the first application belongs is a heavy load scenario based on the number of first applications running in the foreground.

[0203] Optionally, when the number of first applications running on the current platform is greater than or equal to a preset number, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario. The preset number may be determined based on the actual scenario. For example, the preset number may be determined to be 2 based on the actual scenario. In other words, when the number of first applications running on the current platform is greater than or equal to 2, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario.

[0204] It should be noted that the above setting of the preset number to 2 is only for illustrative purposes and should not be construed as limiting this embodiment. In this embodiment, the preset number may also be set to any number, such as 3 or 4, depending on actual circumstances. That is, when the number of first applications running on the current platform is greater than or equal to 3, or greater than or equal to 4, the electronic device may determine that the application scenario to which the first application belongs is an overloaded scenario.

[0205] In one example, the overload scenario can be a scenario in which multiple applications are running in the foreground via split-screen mode. When the electronic device runs application A and application B in the foreground via split-screen mode, that is, when the electronic device divides the display interface into a first display area and a second display area, and displays the application interface corresponding to application A in the first display area and the application interface corresponding to application B in the second display area, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario.

[0206] In one example, the overload scenario can be a scenario where multiple applications are running in the foreground via pop-up windows. When the electronic device is running application A in the foreground, if the electronic device also displays relevant information of application B via a pop-up window (e.g., a floating window), that is, when the electronic device displays the application interface corresponding to application A in the display interface, if the electronic device also displays the application interface corresponding to application B via a pop-up window (e.g., a floating window), the electronic device can determine that the application scenario to which the first application belongs is the overload scenario.

[0207] In one example, the overload scenario can be a scenario in which multiple applications are run in the foreground through split screen and pop-up windows. When the electronic device runs application A and application B in the foreground through split screen, if the electronic device also displays relevant information of application C through a pop-up window (such as a floating window), that is, when the electronic device divides the display interface into a first display area and a second display area, and displays the application interface corresponding to application A in the first display area and the application interface corresponding to application B in the second display area, if the electronic device also displays the application interface corresponding to application C through a pop-up window (such as a floating window), the electronic device can determine that the application scenario to which the first application belongs is an overload scenario.

[0208] In another example, the overload scenario can be a scenario in which certain applications (hereinafter referred to as preset applications) are running in the foreground. That is, the electronic device can determine whether the application scenario to which the first application belongs is an overload scenario based on the identification information of the application running in the foreground. For example, the preset application occupies a large CPU load when running in the foreground. In this scenario, when any preset application is running in the foreground, it can be determined that the application scenario to which the first application belongs is an overload scenario. Therefore, when the foreground runs the first application, the electronic device can determine whether the first application is a preset application. When the first application is a preset application, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset application can be specifically determined according to the actual scenario. For example, it can be determined based on the actual scenario that the preset application includes a camera application, a game application, a short video application, etc.

[0209] For example, when the electronic device determines that the first application running in the foreground is a camera application, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario. For example, when the electronic device determines that the first application running in the foreground is a game application, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario. For example, when the electronic device determines that the first application running in the foreground is a short video application, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario.

[0210] In another example, the overload scenario can be a scenario in which certain functions of an application (hereinafter referred to as preset functions) are executed in the foreground. That is, the electronic device can determine whether the application scenario to which the first application belongs is an overload scenario based on the CPU occupancy of certain functions of the application. For example, the preset function occupies a large CPU load when executed in the foreground. In this scenario, when the foreground executes a preset function of the first application, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset function can be specifically determined according to the actual scenario. For example, the preset functions can be determined according to the actual scenario to include a super desktop function, a car screen projection function, or a first unlocking function, etc.

[0211] For example, when the foreground executes the super desktop function of the first application (such as a system application), the electronic device can determine that the application scenario to which the first application belongs is an overloaded scenario. When the foreground executes the car screen projection function of the first application (such as a system application), the electronic device can determine that the application scenario to which the first application belongs is an overloaded scenario. When the foreground executes the first unlocking function of the first application (such as a system application), the electronic device can determine that the application scenario to which the first application belongs is an overloaded scenario.

[0212] It should be noted that car screen projection can refer to projecting the content of an electronic device to the car device. First unlocking can refer to the first unlocking of the electronic device after restarting the electronic device.

[0213] In another example, the overload scenario can be a scenario in which the foreground application performs certain tasks (hereinafter referred to as preset tasks) in the background. That is, the electronic device can determine whether the application scenario to which the first application belongs is an overload scenario based on the CPU occupancy of certain tasks performed by the application. For example, certain tasks of the application (i.e., preset tasks) occupy a large CPU load when executed in the background; in this scenario, when the first application performs preset tasks in the background, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario. Therefore, when the first application is running in the foreground, the electronic device can determine whether the first application is performing a preset task in the background. When the first application performs any preset task in the background, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset task can be specifically determined according to the actual scenario. For example, the preset task can be determined according to the actual scenario to include application installation or application update, etc.

[0214] For example, when the foreground runs the first application, the electronic device can determine whether the first application is installing or updating the application in the background. When it is determined that the first application is installing or updating the application in the background, the electronic device can determine that the application scenario to which the first application belongs is a heavy load scenario.

[0215] It should be understood that this embodiment does not impose any restrictions on the method for determining the number of first applications running in the foreground, the method for determining whether the foreground is split-screen, the method for determining whether there is a pop-up window in the foreground, the method for determining whether the first application running in the foreground is a preset application, the method for determining whether the function executed in the foreground is a preset function, and the method for determining whether the task executed in the background is a preset task, etc., and can be determined specifically according to the actual scenario.

[0216] It should be noted that the above-mentioned determination of whether the application scenario corresponding to the first application is an overloaded scenario by the number of first applications running in the foreground, whether the foreground is split-screen, whether there is a pop-up window in the foreground, whether the first application running in the foreground is a preset application, whether the function executed in the foreground is a preset function, and whether the task executed in the background is a preset task is only for illustrative explanation and should not be understood as a limitation to this embodiment. In this embodiment, the electronic device may also determine whether the application scenario to which the first application belongs is an overloaded scenario according to other methods.

[0217] For example, whether the application scenario to which the first application belongs is a heavy-load scenario can be determined based on the actual load of the electronic device. That is, when the first application is running in the foreground, the electronic device can obtain the load of the electronic device. When the load of the electronic device is greater than a preset load, the electronic device can determine that the application scenario to which the first application belongs is a heavy-load scenario. It should be understood that the preset load can be determined based on actual conditions, and this embodiment does not impose any restrictions on this.

[0218] S402: When the application scenario to which the first application belongs is a heavy load scenario, the electronic device obtains a first temperature, where the first temperature is the current temperature of the electronic device.

[0219] Optionally, the first temperature may be a temperature obtained in real time by the electronic device, or may be a temperature obtained periodically by the electronic device. It will be understood that this embodiment does not impose any restrictions on the specific value of the period, which may be determined according to the actual scenario. For example, the period may be determined to be 5 seconds according to the actual scenario, i.e., the electronic device may obtain the first temperature every 5 seconds. For example, the period may be determined to be 10 seconds according to the actual scenario, i.e., the electronic device may obtain the first temperature every 10 seconds. For example, the period may be determined to be 1 minute according to the actual scenario, i.e., the electronic device may obtain the first temperature every one minute, and so on.

[0220] That is, when the first application is running in the foreground, the electronic device can detect the temperature of the electronic device in real time or periodically, that is, obtain the first temperature in real time or periodically. Therefore, the electronic device can adjust the network speed of the second application based on the first temperature obtained in real time or periodically.

[0221] S403: The electronic device adjusts the network speed of the second application according to the first temperature.

[0222] Optionally, the second application may include one or more applications. That is, the electronic device may adjust the network speed of multiple applications running in the background according to the first temperature. Alternatively, the electronic device may adjust the network speed of one application among the applications running in the background according to the first temperature.

[0223] For example, a correspondence between a speed-limiting temperature and a network speed level (hereinafter referred to as correspondence A) may be pre-set in the electronic device. Therefore, after determining the first temperature of the electronic device, the electronic device may determine a target network speed level corresponding to the second application based on the first temperature and correspondence A, and adjust the network speed of the second application based on the target network speed level. For example, the network speed of the second application may be adjusted to the network speed corresponding to the target network speed level.

[0224] It is understandable that, to ensure the overall performance of the electronic device, the higher the current temperature of the electronic device, the stricter the limit on the network speed of the second application can be placed; and the lower the current temperature of the electronic device, the looser the limit on the network speed of the second application can be placed. That is, as the temperature of the electronic device increases, the electronic device can gradually reduce the network speed of the second application to limit the second application's use of network resources, avoid the second application competing with the first application for network resources, and cause the temperature of the electronic device to rise too quickly. This reduces the temperature rise rate of the electronic device, lowers the maximum temperature of the electronic device, and improves the user experience.

[0225] Optionally, the speed limit temperature and network speed gear can be specifically determined according to the actual scenario. For example, the speed limit temperature can be determined according to the actual scenario to include speed limit temperature A and speed limit temperature B, and speed limit temperature A can be lower than speed limit temperature B. For example, the network speed gear can be determined according to the actual scenario to include the first gear, the second gear, and the third gear. Among them, the network speed corresponding to the first gear is greater than the network speed corresponding to the second gear, and the network speed corresponding to the second gear is greater than the network speed corresponding to the third gear.

[0226] It should be understood that the specific values ​​of speed limit temperature A and speed limit temperature B can be determined according to the actual scenario. For example, speed limit temperature A can be determined to be 37 degrees Celsius and speed limit temperature B can be determined to be 46 degrees Celsius according to the actual scenario. Similarly, the network speed corresponding to each network speed gear can be determined according to the actual scenario, and this embodiment does not impose specific limitations on this.

[0227] For example, as shown in Table 1, the corresponding relationship A can be: the network speed gear corresponding to the speed limit temperature A is the second gear, and the network speed gear corresponding to the speed limit temperature B is the third gear. When the temperature is lower than the speed limit temperature A, the network speed gear corresponding to the second application can be the first gear (for example, the unlimited speed gear).

[0228] Table 1

[0229] That is to say, when the first temperature is between [0 degrees, speed limit temperature A), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., unlimited speed gear); when the first temperature is between [speed limit temperature A, speed limit temperature B), the electronic device can determine that the target network speed gear corresponding to the second application is the second gear; when the first temperature is between [speed limit temperature B, 100 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear.

[0230] Therefore, when it is detected that the first temperature (for example, 36 degrees) is less than the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear. At this time, the electronic device can not limit the speed of the second application. When it is detected that the first temperature rises to the speed limit temperature A, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. When it is detected that the first temperature rises to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear.

[0231] It should be noted that the speed limit temperatures described above, including speed limit temperature A and speed limit temperature B, and the network speed gears including the first gear and the second gear, are merely exemplary and should not be construed as limiting this embodiment. In this embodiment, the speed limit temperature and network speed gear can be determined based on actual scenarios.

[0232] In one example, the electronic device can set the network speed corresponding to each network speed gear by default. For example, the electronic device can set the first gear to unlimited speed by default, the second gear to 500KB / s, and the third gear to 100KB / s. This allows the second application to upload or download at a lower speed when the temperature of the electronic device rises, avoiding competing with the first application for network resources, reducing the temperature rise rate of the electronic device, and ensuring the smoothness of the first application.

[0233] In another example, the electronic device may obtain the current network speed of the electronic device (hereinafter referred to as network speed B), and may determine the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear based on network speed B. Optionally, the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear may be positively correlated with network speed B. That is, when network speed B is larger, the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear may be relatively larger; when network speed B is smaller, the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear may also be relatively smaller.

[0234] For example, as shown in Table 2, when the network speed B is 10MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of the second application (i.e., unlimited speed), the network speed corresponding to the second gear is 700KB / s, and the network speed corresponding to the third gear is 300KB / s. When the network speed B is 3MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of the second application (i.e., unlimited speed), the network speed corresponding to the second gear is 200KB / s, and the network speed corresponding to the third gear is 100KB / s. When the network speed B is 1MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of the second application, the network speed corresponding to the second gear is 100KB / s, and the network speed corresponding to the third gear is 50KB / s.

[0235] Table 2

[0236] In one embodiment, when the electronic device adjusts the network speed of a second application based on the first temperature, the electronic device can determine the network speed corresponding to each network speed gear based on the current network speed of the second application, or can determine the network speed corresponding to each network speed gear based on the current network speed of the electronic device and the current network speed of the second application.

[0237] In one example, the electronic device can obtain the current network speed of the second application (hereinafter referred to as network speed A), and can determine the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear based on network speed A. Optionally, the network speed corresponding to the first gear can be network speed A, and the network speed corresponding to the second gear and the network speed corresponding to the third gear can be positively correlated with network speed A, so as to adjust the network speed of the second application in combination with the current network speed of the second application, so as to avoid suddenly reducing the network speed of the second application to a very small level, thereby affecting the download experience of the second application. That is, when network speed A is larger, the network speed corresponding to the second gear and the network speed corresponding to the third gear can be relatively larger; when network speed A is smaller, the network speed corresponding to the second gear and the network speed corresponding to the third gear can also be relatively smaller.

[0238] For example, as shown in Table 3, when network speed A is 5MB / s, the electronic device can determine that the network speed corresponding to the first gear is 5MB / s, the network speed corresponding to the second gear is 1MB / s, and the network speed corresponding to the third gear is 200KB / s. When network speed A is 2MB / s, the electronic device can determine that the network speed corresponding to the first gear is 2MB / s, the network speed corresponding to the second gear is 300KB / s, and the network speed preset value B corresponding to the third gear is 100KB / s. When network speed A is 1MB / s, the electronic device can determine that the network speed corresponding to the first gear is 1MB / s, the network speed corresponding to the second gear is 200KB / s, and the network speed corresponding to the third gear is 50KB / s.

[0239] Table 3

[0240] In another example, the electronic device may obtain the current network speed of the second application (i.e., network speed A) and the current network speed of the electronic device (i.e., network speed B), and may determine the network speed corresponding to the first gear, the network speed corresponding to the second gear, and the network speed corresponding to the third gear based on network speed A and network speed B. Optionally, the network speed corresponding to the first gear may be network speed A, and the network speed corresponding to the second gear and the network speed corresponding to the third gear may be positively correlated with network speed B, and the network speed corresponding to the second gear and the network speed corresponding to the third gear are both less than network speed A. In other words, when network speed B is larger, the network speed corresponding to the second gear and the network speed corresponding to the third gear may be relatively larger; when network speed B is smaller, the network speed corresponding to the second gear and the network speed corresponding to the third gear may also be relatively smaller.

[0241] For example, as shown in Table 4, when network speed B is 10MB / s and network speed A is 4MB / s, the electronic device can determine that the network speed corresponding to the first gear is 4MB / s, the network speed corresponding to the second gear is 800KB / s, and the network speed corresponding to the third gear is 300KB / s. When network speed B is 3MB / s and network speed A is 2MB / s, the electronic device can determine that the network speed corresponding to the first gear is 2MB / s, the network speed corresponding to the second gear is 200KB / s, and the network speed corresponding to the third gear is 100KB / s.

[0242] When the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can determine that the network speed corresponding to the first gear is 500KB / s, the network speed corresponding to the second gear is 100KB / s, and the network speed corresponding to the third gear is 50KB / s.

[0243] Table 4

[0244] From the above description, we can see that the corresponding relationship A can be: the network speed gear corresponding to the speed limit temperature A is the second gear, and the network speed gear corresponding to the speed limit temperature B is the third gear. When the temperature is lower than the speed limit temperature A, the corresponding network speed gear is the first gear (i.e., the speed is unlimited).

[0245] For example, when the network speeds corresponding to the various network speed levels are as shown in Table 2 above, the corresponding relationship A may be as shown in Table 5 below:

[0246] Table 5

[0247] Therefore, the electronic device can adjust the network speed of one or more second applications running in the background according to the first temperature and the corresponding relationship A shown in Table 5. Assume that there are multiple second applications for which the network speed is to be adjusted. When it is detected that the first temperature (for example, 36 degrees) is less than the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the first gear. At this time, the electronic device may not limit the network speed of each second application. When it is detected that the first temperature rises to the speed limit temperature A, the electronic device can determine that the target network speed gear corresponding to each second application is the second gear. At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the second gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of each second application to 700KB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of each second application to 200KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of each second application to 100KB / s.

[0248] When it is detected that the first temperature rises to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the third gear. At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the third gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of each second application to 300KB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of each second application to 100KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of each second application to 50KB / s.

[0249] For example, when the network speeds corresponding to the various network speed levels are as shown in Table 3 above, the corresponding relationship A may be as shown in Table 6 below:

[0250] Table 6

[0251] Therefore, the electronic device can adjust the network speed of a second application running in the background according to the first temperature and the corresponding relationship A shown in Table 6. When it is detected that the first temperature (for example, 36 degrees) is less than the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear. At this time, the electronic device may not limit the network speed of the second application. When it is detected that the first temperature rises to the speed limit temperature A, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 1MB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 200KB / s.

[0252] When it is detected that the first temperature rises to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 200KB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 50KB / s.

[0253] For example, when the network speed corresponding to the network speed gear is as shown in Table 4 above, the corresponding relationship A can be as shown in Table 7 below:

[0254] Table 7

[0255] Therefore, the electronic device can adjust the network speed of a second application running in the background according to the first temperature and the corresponding relationship A shown in Table 7. When it is detected that the first temperature (for example, 36 degrees) is less than the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear. In this case, the electronic device may not limit the network speed of the second application. When it is detected that the first temperature rises to the speed limit temperature A, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear. In this case, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. For example, when network speed B is 10MB / s and network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 800KB / s. For example, when network speed B is 3MB / s and network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 200KB / s. For example, when network speed B is 1MB / s and network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 100KB / s.

[0256] When it is detected that the first temperature rises to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear. For example, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 50KB / s.

[0257] Optionally, based on actual scenarios, the speed limit temperatures may include speed limit temperature C, speed limit temperature D, speed limit temperature E, and speed limit temperature F. Speed ​​limit temperature C is lower than speed limit temperature D, speed limit temperature D is lower than speed limit temperature E, and speed limit temperature E is lower than speed limit temperature F. For example, speed limit temperature C may be 37 degrees Celsius, speed limit temperature D may be 40 degrees Celsius, speed limit temperature E may be 43 degrees Celsius, and speed limit temperature F may be 46 degrees Celsius.

[0258] Optionally, the network speed gears may include the first gear, the second gear, the third gear, the fourth gear, and the fifth gear, depending on the actual scenario. The network speed corresponding to the first gear is greater than or equal to the network speed corresponding to the second gear, the network speed corresponding to the second gear is greater than or equal to the network speed corresponding to the third gear, the network speed corresponding to the third gear is greater than or equal to the network speed corresponding to the fourth gear, and the network speed corresponding to the fourth gear is greater than or equal to the network speed corresponding to the fifth gear.

[0259] For example, when the speed limit temperatures include speed limit temperature C, speed limit temperature D, speed limit temperature E, and speed limit temperature F, as shown in Table 8, the corresponding relationship A may be: the network speed gear corresponding to speed limit temperature C is the second gear, the network speed gear corresponding to speed limit temperature D is the third gear, the network speed gear corresponding to speed limit temperature E is the fourth gear, and the network speed gear corresponding to speed limit temperature F is the fifth gear. When the temperature is lower than speed limit temperature C, the corresponding network speed gear is the first gear (for example, the unlimited speed gear).

[0260] Table 8

[0261] Therefore, when it is detected that the first temperature (for example, 36 degrees) is less than the speed limit temperature C (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear. At this time, the electronic device can not limit the speed of the second application. When it is detected that the first temperature rises to the speed limit temperature C, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. When it is detected that the first temperature rises to the speed limit temperature D (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear. When it is detected that the first temperature rises to the speed limit temperature E (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fourth gear. When it is detected that the first temperature rises to the speed limit temperature F (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear.

[0262] It should be understood that the network speed corresponding to each network speed gear can be set by default by the electronic device. For example, the electronic device can be set by default so that the first gear can be unlimited speed, the second gear corresponds to a network speed of 1MB / s, the third gear corresponds to a network speed of 500KB / s, the fourth gear corresponds to a network speed of 100KB / s, and the fifth gear corresponds to a network speed of 50KB / s.

[0263] Alternatively, the network speed corresponding to each network speed gear can be determined by the electronic device according to the current network speed of the electronic device (ie, network speed B).

[0264] For example, as shown in Table 9, when the network speed B is 10MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of each second application (i.e., unlimited speed), the network speed corresponding to the second gear is 5MB / s, the network speed corresponding to the third gear is 1MB / s, the network speed corresponding to the fourth gear is 300KB / s, and the network speed corresponding to the fifth gear is 100KB / s.

[0265] When the network speed B is 3MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of each second application (i.e., no speed limit), the network speed corresponding to the second gear is 900KB / s, the network speed corresponding to the third gear is 400KB / s, the network speed corresponding to the fourth gear is 200KB / s, and the network speed corresponding to the fifth gear is 80KB / s.

[0266] When the network speed B is 1MB / s, the electronic device can determine that the network speed corresponding to the first gear is the original network speed of each second application (i.e., no speed limit), the network speed corresponding to the second gear is 400KB / s, the network speed corresponding to the third gear is 200KB / s, the network speed corresponding to the fourth gear is 50KB / s, and the network speed corresponding to the fifth gear is 10KB / s.

[0267] Table 9

[0268] Alternatively, the network speed corresponding to each network speed gear can be determined by the electronic device according to the current network speed of the second application (ie, network speed A).

[0269] For example, as shown in Table 10, when the network speed A is 5MB / s, the electronic device can determine that the network speed corresponding to the first gear is 5MB / s, the network speed corresponding to the second gear is 2MB / s, the network speed corresponding to the third gear is 800KB / s, the network speed corresponding to the fourth gear is 300KB / s, and the network speed corresponding to the fifth gear is 100KB / s.

[0270] When the network speed A is 2MB / s, the electronic device can determine that the network speed corresponding to the first gear is 2MB / s, the network speed corresponding to the second gear is 700KB / s, the network speed corresponding to the third gear is 300KB / s, the network speed corresponding to the fourth gear is 100KB / s, and the network speed corresponding to the fifth gear is 50KB / s.

[0271] When the network speed A is 1MB / s, the electronic device can determine that the network speed corresponding to the first gear is 1MB / s, the network speed corresponding to the second gear is 400KB / s, the network speed corresponding to the third gear is 200KB / s, the network speed corresponding to the fourth gear is 50KB / s, and the network speed corresponding to the fifth gear is 10KB / s.

[0272] Table 10

[0273] Alternatively, the network speed corresponding to each network speed gear can be determined by the electronic device based on the current network speed of the electronic device (ie, network speed B) and the current network speed of the second application (ie, network speed A).

[0274] For example, as shown in Table 11, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can determine that the network speed corresponding to the first gear is 4MB / s, the network speed corresponding to the second gear is 2MB / s, the network speed corresponding to the third gear is 800KB / s, the network speed corresponding to the fourth gear is 300KB / s, and the network speed corresponding to the fifth gear is 100KB / s.

[0275] When the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can determine that the network speed corresponding to the first gear is 2MB / s, the network speed corresponding to the second gear is 800KB / s, the network speed corresponding to the third gear is 200KB / s, the network speed corresponding to the fourth gear is 80KB / s, and the network speed corresponding to the fifth gear is 30KB / s.

[0276] When the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can determine that the network speed corresponding to the first gear is 500KB / s, the network speed corresponding to the second gear is 200KB / s, the network speed corresponding to the third gear is 100KB / s, the network speed corresponding to the fourth gear is 50KB / s, and the network speed corresponding to the fifth gear is 10KB / s.

[0277] Table 11

[0278] As can be seen from the above, when the speed limit temperatures include speed limit temperature C, speed limit temperature D, speed limit temperature E, and speed limit temperature F, the corresponding relationship A can be: speed limit temperature C corresponds to the second speed gear, speed limit temperature D corresponds to the third speed gear, speed limit temperature E corresponds to the fourth speed gear, and speed limit temperature F corresponds to the fifth speed gear. When the temperature is lower than speed limit temperature C, the corresponding speed gear is the first speed gear.

[0279] For example, when the network speeds corresponding to the various network speed levels are as shown in Table 9 above, the corresponding relationship A may be as shown in Table 12 below:

[0280] Table 12

[0281] Therefore, the electronic device can adjust the network speed of one or more second applications running in the background according to the first temperature and the corresponding relationship A shown in Table 12. Assume that there are multiple second applications whose network speed is to be adjusted. When it is detected that the first temperature (for example, 35 degrees) is less than the speed limit temperature C (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the first gear, that is, the unlimited speed gear. At this time, the electronic device may not adjust the network speed of each second application, that is, each second application can still upload or download at the original network speed.

[0282] When it is detected that the first temperature rises to the speed limit temperature C, the electronic device can determine that the target network speed gear corresponding to each second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature C). At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the second gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of each second application to 5MB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of each second application to 900KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of each second application to 400KB / s.

[0283] When it is detected that the first temperature rises to the speed limit temperature D (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D). At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the third gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of the second application to 1MB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of the second application to 400KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of the second application to 200KB / s.

[0284] When it is detected that the first temperature rises to the speed limit temperature E (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the fourth gear (that is, the network speed gear corresponding to the speed limit temperature E). At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the fourth gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of the second application to 200KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of the second application to 50KB / s.

[0285] When it is detected that the first temperature rises to the speed limit temperature F (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to each second application is the fifth gear (that is, the network speed gear corresponding to the speed limit temperature F). At this time, the electronic device can adjust the network speed of each second application to the network speed corresponding to the fifth gear. For example, when the network speed B is 10MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed B is 3MB / s, the electronic device can adjust the network speed of the second application to 80KB / s. For example, when the network speed B is 1MB / s, the electronic device can adjust the network speed of the second application to 10KB / s.

[0286] For example, when the network speeds corresponding to the various network speed levels are as shown in Table 10 above, the corresponding relationship A may be as shown in Table 13 below:

[0287] Table 13

[0288] Therefore, the electronic device can adjust the network speed of a second application running in the background based on the first temperature and the corresponding relationship A shown in Table 13. When it is detected that the first temperature (for example, 35 degrees) is lower than the speed limit temperature C (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear, that is, the unlimited speed gear. At this time, the electronic device may not adjust the network speed of the second application.

[0289] When it is detected that the first temperature rises to the speed limit temperature C, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (i.e., the network speed gear corresponding to the speed limit temperature C). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 2MB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 700KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 400KB / s.

[0290] When it is detected that the first temperature rises to the speed limit temperature D (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 800KB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 200KB / s.

[0291] When it is detected that the first temperature rises to the speed limit temperature E (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (that is, the network speed gear corresponding to the speed limit temperature E). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fourth gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 50KB / s.

[0292] When it is detected that the first temperature rises to the speed limit temperature F (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear (that is, the network speed gear corresponding to the speed limit temperature F). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear. For example, when the network speed A is 5MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 50KB / s. For example, when the network speed A is 1MB / s, the electronic device can adjust the network speed of the second application to 10KB / s.

[0293] For example, when the network speeds corresponding to the various network speed levels are as shown in Table 11 above, the corresponding relationship A may be as shown in Table 14 below:

[0294] Table 14

[0295] Therefore, the electronic device can adjust the network speed of a second application running in the background based on the first temperature and the corresponding relationship A shown in Table 6. When it is detected that the first temperature (for example, 35 degrees) is lower than the speed limit temperature C (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear, that is, the unlimited speed gear. At this time, the electronic device may not adjust the network speed of the second application.

[0296] When it is detected that the first temperature rises to the speed limit temperature C, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature C). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear. For example, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 2MB / s. For example, when the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 800KB / s. For example, when the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 200KB / s.

[0297] When it is detected that the first temperature rises to the speed limit temperature D (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear. For example, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 800KB / s. For example, when the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 200KB / s. For example, when the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 100KB / s.

[0298] When it is detected that the first temperature rises to the speed limit temperature E (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (that is, the network speed gear corresponding to the speed limit temperature E). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fourth gear. For example, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 300KB / s. For example, when the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 80KB / s. For example, when the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 50KB / s.

[0299] When it is detected that the first temperature rises to the speed limit temperature F (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear (that is, the network speed gear corresponding to the speed limit temperature F). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear. For example, when the network speed B is 10MB / s and the network speed A is 4MB / s, the electronic device can adjust the network speed of the second application to 100KB / s. For example, when the network speed B is 3MB / s and the network speed A is 2MB / s, the electronic device can adjust the network speed of the second application to 30KB / s. For example, when the network speed B is 1MB / s and the network speed A is 500KB / s, the electronic device can adjust the network speed of the second application to 10KB / s.

[0300] Exemplarily, the electronic device may be pre-set with a correspondence between the speed limit temperature and the network speed gear under different real-time network speeds (hereinafter referred to as correspondence B). Among them, the real-time network speed may refer to the current network speed of the electronic device (hereinafter referred to as the first network speed). Therefore, after determining that the application scenario is an overload scenario, the electronic device can obtain the first network speed of the electronic device, and can determine the target network speed gear corresponding to the second application based on the first network speed, the first temperature and the correspondence B, so as to adjust the network speed of the second application according to the target network speed gear. For example, the network speed of the second application can be adjusted to the network speed corresponding to the target network speed gear.

[0301] It is understandable that when the current network speed of the electronic device is faster, it can be considered that the network resources of the electronic device are more sufficient, and therefore, a looser restriction can be placed on the network speed of the second application; when the current network speed of the electronic device is slower, it can be considered that the network resources in the electronic device are less sufficient, and therefore, a stricter restriction can be placed on the network speed of the second application. That is, when the current network speed of the electronic device is slower, the electronic device can reduce the network speed of the second application to limit the second application's occupation of network resources, avoid the second application competing with the first application for network resources, and cause the temperature of the electronic device to rise too quickly, reduce the temperature rise rate of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.

[0302] It should be noted that under different real-time network speeds, the correspondence between the speed limit temperature and the network speed gear can be determined according to the actual scenario. For example, you can refer to the preset scenario D (i.e., the overload scenario) in the subsequent embodiment 2, and the correspondence between the speed limit temperature and the second network speed gear under each first network speed gear.

[0303] Optionally, the second application running in the background does not necessarily occupy network resources. For the second application that does not occupy network resources, the network speed adjustment may not be performed. In other words, when adjusting the network speed of the second application, the electronic device may only adjust the network speed of the second application that occupies network resources.

[0304] In one example, an electronic device may be provided with an application whitelist, which may include identification information (such as name and / or code information) of applications that need to occupy network resources when running in the background. That is, when adjusting the network speed of a second application running in the background, the electronic device may obtain the identification information of the second application, and determine whether the second application is an application in the application whitelist based on the identification information of the second application. When it is determined that the second application is an application in the application whitelist, the electronic device may adjust the network speed of the second application based on the first temperature. That is, the target network speed gear corresponding to the second application may be determined based on the first temperature, and the network speed of the second application may be adjusted based on the target network speed gear corresponding to the second application.

[0305] For example, when the application whitelist includes identification information corresponding to application A, application B, application C, application D, and application E, and the second application running in the background of the electronic device includes application A, application B, and application F, the electronic device can determine that application A and application B are in the application whitelist, while application F is not. Therefore, the electronic device can adjust the network speed of application A and application B based on the first temperature.

[0306] It is understandable that the applications in the application whitelist can be specifically determined based on the actual scenario. Optionally, big data analysis can be used to determine the applications that still need to occupy network resources when running in the background, and the identification information of the applications can be added to the application whitelist. For example, through big data analysis, it can be determined that applications such as gallery applications and game applications need to occupy network resources when running in the background. Therefore, the electronic device can determine that the application whitelist includes the identification information corresponding to the gallery application, the identification information corresponding to the game application, and so on.

[0307] In another example, when adjusting the network speed of a second application, the electronic device may determine whether the second application currently needs to occupy network resources. If the second application currently needs to occupy network resources, the electronic device may adjust the network speed of the second application based on the first temperature. If the second application currently does not need to occupy network resources, the electronic device may not adjust the network speed of the second application.

[0308] For example, when the second application running in the background includes application A, application B, and application C, when adjusting the network speed of the second application, the electronic device can determine whether application A, application B, and application C currently need to occupy network resources. Assuming that application A currently does not need to occupy network resources, while application B and application C currently need to occupy network resources, the electronic device can adjust the network speed of application B and the network speed of application C based on the first temperature.

[0309] It should be noted that this embodiment does not impose any specific restrictions on the manner in which the electronic device determines whether an application occupies network resources, and the determination may be made based on actual scenarios.

[0310] In one example, the second application that needs to adjust the network speed may include one or more. When the second application that needs to adjust the network speed includes multiple, after determining the target network speed gear according to the first temperature, the electronic device can adjust the network speed of these multiple second applications according to the target network speed gear. For example, the electronic device can adjust the network speed of these multiple second applications to the network speed corresponding to the target network speed gear.

[0311] For example, in the scenario where the speed limit temperature includes speed limit temperature A and speed limit temperature B, the corresponding relationship A is: the network speed gear corresponding to speed limit temperature A is the second gear, and the network speed gear corresponding to speed limit temperature B is the third gear. When the temperature is below speed limit temperature A, the corresponding network speed gear is the first gear, if the second application running in the background can include application A, application B and application C, assuming that the electronic device determines that the target network speed gear corresponding to the second application is the second gear based on the first temperature, and determines that application A and application C are applications in the application whitelist, at this time, the electronic device can adjust the network speed of application A and the network speed of application C to the network speed corresponding to the second gear.

[0312] S404: When a change in the first temperature is detected, the electronic device redetermines the target network speed level corresponding to the second application according to the changed first temperature, and adjusts the network speed of the second application according to the redetermined target network speed level.

[0313] It should be understood that when the first application is running in the foreground, the electronic device can detect the temperature of the electronic device in real time or periodically, that is, obtain the first temperature in real time or periodically.

[0314] Optionally, after adjusting the network speed of the second application according to the first temperature, if a change in the first temperature is detected, the electronic device can re-determine the target network speed gear corresponding to the second application based on the re-acquired first temperature, so as to adjust the network speed of the second application according to the re-determined target network speed gear.

[0315] For example, after adjusting the network speed of the second application to the second gear (for example, the network speed gear corresponding to the speed limit temperature C) according to the first temperature, if it is detected that the first temperature rises to the speed limit temperature D, the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D), and can adjust the network speed of the second application to the network speed corresponding to the third gear, so as to reduce the network speed of the second application when the temperature of the electronic device rises, thereby reducing the second application's occupation of network resources. If it is detected that the first temperature decreases, and the decreased first temperature is less than the speed limit temperature C (that is, the speed limit temperature corresponding to the second gear), the electronic device can determine the target network speed gear corresponding to the second application based on the re-acquired first temperature, and can adjust the network speed of the second application based on the re-determined target network speed gear, so as to increase the network speed of the second application when the temperature of the electronic device decreases, thereby ensuring the upload or download speed of the second application.

[0316] That is, after limiting the network speed of the second application to a certain target speed level, if the temperature of the electronic device continues to rise due to reasons such as an increase in the load of the electronic device, the electronic device can continue to reduce the network speed of the second application, thereby reducing the rate of temperature increase of the electronic device. When the temperature of the electronic device decreases due to reasons such as a decrease in the load of the electronic device, the electronic device can gradually restore the network speed of the second application to ensure the upload or download speed of the second application.

[0317] For example, when the speed limit temperature includes speed limit temperature A and speed limit temperature B, the network speed gear corresponding to speed limit temperature A is the second gear, and the network speed gear corresponding to speed limit temperature B is the third gear, when it is detected that the first temperature (for example, 35 degrees) is lower than the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (that is, the unlimited speed gear). At this time, the electronic device may not adjust the network speed of the second application.

[0318] When it is detected that the first temperature rises to the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature A). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear, for example, to 500KB / s.

[0319] After adjusting the network speed of the second application to the network speed corresponding to the second gear (for example, 500KB / s), if it is detected that the first temperature drops below the speed limit temperature A, for example, the first temperature is detected to drop to 36 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (that is, the unlimited speed gear). At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the first gear, that is, the second application can be restored to the unlimited speed state to ensure the upload or download speed of the second application.

[0320] If it is detected that the first temperature continues to rise to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature B). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear, for example, to 100KB / s, to further reduce the network speed of the second application, reduce the second application's occupation of network resources, and thus reduce the temperature rise rate of the electronic device.

[0321] After adjusting the network speed of the second application to the network speed corresponding to the third gear (for example, 100KB / s), if it is detected that the first temperature drops below the speed limit temperature B, for example, the first temperature is detected to drop to 45 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature A). At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the second gear, for example, to 500KB / s, so as to gradually restore the network speed of the second application when the temperature of the electronic device drops, thereby ensuring the upload or download speed of the second application.

[0322] It is understandable that during the use of an electronic device, the temperature of the electronic device generally fluctuates slightly, and such fluctuations can also cause the first temperature to be less than a certain speed limit temperature. In other words, the first temperature being less than a certain speed limit temperature may be caused by such small fluctuations, rather than by a reduction in the load on the electronic device. Therefore, when such small temperature fluctuations cause the first temperature to be less than a certain speed limit temperature, re-adjusting the network speed of the second application will result in frequent adjustments to the network speed of the second application, reducing the accuracy of the network speed adjustment and degrading the user experience.

[0323] In another example, to improve the accuracy of network speed adjustment and enhance the user experience, the electronic device can be set with recovery temperatures corresponding to each speed limit temperature. After adjusting the network speed of the second application to the speed level corresponding to a certain speed limit temperature, the electronic device will adjust the network speed of the second application based on the newly acquired first temperature only when the first temperature drops to or below the recovery temperature corresponding to the speed limit temperature, thereby avoiding frequent adjustments to the network speed of the second application.

[0324] It is understandable that the recovery temperature corresponding to each speed limit temperature can be specifically determined according to the actual scenario, and this embodiment does not impose any limitation on this.

[0325] For example, when the speed limit temperature includes speed limit temperature A and speed limit temperature B, speed limit temperature A is 37 degrees and speed limit temperature B is 46 degrees, the electronic device can determine, based on the actual scenario, that the recovery temperature corresponding to speed limit temperature A (hereinafter referred to as recovery temperature A) is 35 degrees and the recovery temperature corresponding to speed limit temperature B (hereinafter referred to as recovery temperature B) is 38 degrees.

[0326] That is to say, when it is detected that the first temperature is lower than the speed limit temperature A (for example, 37 degrees), for example, when the first temperature is detected to be 34 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (that is, the unlimited speed gear). At this time, the electronic device may not adjust the network speed of the second application.

[0327] When it is detected that the first temperature rises to the speed limit temperature A (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature A). At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear to reduce the network speed of the second application.

[0328] After adjusting the network speed of the second application to the network speed corresponding to the second gear, if it is detected that the first temperature drops to the recovery temperature A (for example, 35 degrees) or below, the electronic device can determine that the target network speed corresponding to the second application is the first gear (that is, unlimited speed gear) based on the re-acquired first temperature (for example, 35 degrees). At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the first gear, that is, restore the network speed of the second application to the unlimited speed state.

[0329] If it is detected that the first temperature continues to rise to the speed limit temperature B (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature B) based on the re-acquired first temperature. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear to further reduce the network speed of the second application, reduce the second application's occupation of network resources, and reduce the temperature rise rate of the electronic device.

[0330] After adjusting the network speed of the second application to the network speed corresponding to the third gear, if it is detected that the first temperature drops to the recovery temperature B (for example, 38 degrees) or below, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature A) based on the re-acquired first temperature. At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the second gear.

[0331] After restoring the network speed of the second application to the network speed corresponding to the second gear, if it is detected that the first temperature drops to the recovery temperature A (for example, 35 degrees) or below, the electronic device can determine that the target network speed gear corresponding to the second application is the first gear, that is, the unlimited speed gear, based on the re-acquired first temperature. At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the first gear, that is, restore the network speed of the second application to the unlimited speed state.

[0332] For example, when the speed limit temperature includes speed limit temperature C, speed limit temperature D, speed limit temperature E and speed limit temperature F, where speed limit temperature C is 37 degrees, speed limit temperature D is 40 degrees, speed limit temperature E is 43 degrees, and speed limit temperature F is 46 degrees, the electronic device can determine, based on the actual scenario, that the recovery temperature corresponding to speed limit temperature C (hereinafter referred to as recovery temperature C) is 35 degrees, the recovery temperature corresponding to speed limit temperature D (hereinafter referred to as recovery temperature D) is 38 degrees, the recovery temperature corresponding to speed limit temperature E (hereinafter referred to as recovery temperature E) is 41 degrees, and determine that the recovery temperature corresponding to speed limit temperature F (hereinafter referred to as recovery temperature F) is 44 degrees.

[0333] That is to say, when it is detected that the first temperature (for example, 36 degrees) is lower than the speed limit temperature C (i.e., 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., no speed limit) based on the first temperature. At this time, the electronic device may not adjust the network speed of the second application.

[0334] When it is detected that the first temperature rises to the speed limit temperature C (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature C) based on the first temperature. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear.

[0335] After adjusting the network speed of the second application to the network speed corresponding to the second gear, if it is detected that the first temperature drops to the recovery temperature C (for example, 35 degrees) or below, for example, if it is detected that the first temperature drops to 35 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the first gear based on the first temperature. At this time, the electronic device can restore the network speed of the second application to an unlimited speed state.

[0336] If it is detected that the first temperature continues to rise to the speed limit temperature D (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D) based on the first temperature. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear.

[0337] After adjusting the network speed of the second application to the network speed corresponding to the third gear, if it is detected that the first temperature drops to the recovery temperature D (for example, 38 degrees) or below, for example, if it is detected that the first temperature drops to 38 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear (that is, the network speed gear corresponding to the speed limit temperature C) based on the first temperature. At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the second gear.

[0338] If it is detected that the first temperature continues to rise to the speed limit temperature E (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (that is, the network speed gear corresponding to the speed limit temperature E) based on the first temperature. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fourth gear.

[0339] After adjusting the network speed of the second application to the network speed corresponding to the fourth gear, if it is detected that the first temperature drops to the recovery temperature E (for example, 41 degrees) or below, for example, if it is detected that the first temperature drops to 41 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (that is, the network speed gear corresponding to the speed limit temperature D) based on the first temperature. At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the third gear.

[0340] If it is detected that the first temperature continues to rise to the speed limit temperature F (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear (that is, the network speed gear corresponding to the speed limit temperature F) based on the first temperature. At this time, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear.

[0341] After adjusting the network speed of the second application to the network speed corresponding to the fifth gear, if it is detected that the first temperature drops to the recovery temperature F (for example, 44 degrees) or below, for example, if it is detected that the first temperature drops to 44 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (that is, the network speed gear corresponding to the speed limit temperature E) based on the first temperature. At this time, the electronic device can restore the network speed of the second application to the network speed corresponding to the fourth gear.

[0342] In this embodiment, when there is a first application running in the foreground and a second application running in the background in the electronic device, the electronic device can determine the application scenario to which the first application belongs. When the application scenario to which the first application belongs is a heavy load scenario, the electronic device can obtain the current temperature of the electronic device and adjust the network speed of the second application according to the current temperature to reduce the network speed of the second application, avoid the background application and the foreground application from competing for network resources, so that the network resources meet the needs of the foreground application, ensure the smoothness of the operation of the foreground application, and reduce the temperature rise rate of the electronic device to ensure the overall performance of the electronic device, avoid the electronic device from reducing the frequency due to high temperature, resulting in problems such as slow response or freezing of the electronic device, and improve the user experience.

[0343] [Example 2]

[0344] Please refer to Figure 5, which shows a method for adjusting the network speed of a background application provided in Example 2 of the present application. This method can be applied to the above-mentioned electronic device, which may include a first application and a second application. The first application may be an application running in the foreground of the electronic device, and the second application may be an application running in the background of the electronic device. As shown in Figure 5, the method may include:

[0345] S501: When a first application is running in the foreground of an electronic device, the electronic device determines an application scenario to which the first application belongs.

[0346] For example, the application scenario to which the first application belongs may be one of the preset application scenarios, wherein the preset application scenario may be specifically determined according to an actual scenario.

[0347] Optionally, a preset application scenario can be determined based on the application's demand for network resources and resources such as the processor in the electronic device when the application is running in the foreground. For example, the preset application scenario may include a game or short video scenario (hereinafter referred to as preset scenario A), a long video or download scenario (hereinafter referred to as preset scenario B), a graphic application scenario (hereinafter referred to as preset scenario C), and a heavy load scenario (hereinafter referred to as preset scenario D).

[0348] It should be understood that the specific content of the preset scene D can refer to the specific content of the overloaded scene described in Example 1. In particular, since in this embodiment, the application scene to which the game application or short video application belongs can be a game or short video scene, the preset scene D differs from the overloaded scene in Example 1 in that: when the first application is a game application or a short video application, the application scene to which the first application belongs can be a game or short video scene, rather than the preset scene D. In other words, except for the first application being a game application or a short video application, the overloaded scenes described in Example 1 can all be the preset scene D in this embodiment.

[0349] For example, the preset scenario D may be a scenario in which multiple applications are running in the foreground. That is, the electronic device may determine whether the application scenario to which the first application belongs is the preset scenario D based on the number of first applications running in the foreground. When the number of first applications running in the foreground is greater than or equal to the preset number, the electronic device may determine that the application scenario to which the first application belongs is the preset scenario D. The preset number may be determined to be any value, such as 2 or 3, based on the actual scenario.

[0350] Exemplarily, the preset scene D may be a scene in which multiple applications are run in the foreground in a split-screen manner. For example, when the electronic device runs a game application and a video application in the foreground in a split-screen manner, the electronic device may determine that the application scene to which the first application belongs is the preset scene D.

[0351] For example, the preset scene D may be a scene in which multiple applications are running in the foreground through pop-up windows. For example, when the electronic device is running a game application in the foreground and displays relevant information of a communication application through a pop-up window, the electronic device may determine that the application scene to which the first application belongs is the preset scene D.

[0352] For example, the preset scenario D may be a scenario in which multiple applications are run in the foreground via split-screen and pop-up windows. For example, when the electronic device runs a game application and a video application in the foreground via split-screen and displays relevant information of a communication application via a pop-up window, the electronic device may determine that the application scenario to which the first application belongs is the preset scenario D.

[0353] Exemplarily, the preset scene may be a scene of a preset application running in the foreground. That is, the electronic device may determine whether the application scene to which the first application belongs is preset scene D based on identification information of the application running in the foreground. When the first application running in the foreground is a preset application, the electronic device may determine that the application scene to which the first application belongs is preset scene D. The preset application may be determined based on the actual scene. For example, it may be determined based on the actual scene that the preset application includes a camera application. Therefore, when the first application running in the foreground is a camera application, the electronic device may determine that the application scene to which the first application belongs is preset scene D.

[0354] Exemplarily, the preset scene D may be a scene in which a preset function is executed in the foreground. That is, the electronic device may determine whether the application scene to which the first application belongs is the preset scene D based on the CPU usage of the preset function. For example, the preset function occupies a large CPU load when executed in the foreground. Therefore, when the preset function is executed in the foreground, the electronic device may determine that the application scene to which the first application belongs is the preset scene D. The preset functions may include a super desktop function, a car screen projection function, or a first unlocking function.

[0355] For example, when the front desk executes the super desktop function, car screen projection function or first unlocking function of the first application (such as a system application), the electronic device can determine that the application scenario to which the first application belongs is the preset scenario D.

[0356] Exemplarily, the preset scenario D may be a scenario in which a foreground application executes a preset task in the background. That is, the electronic device may determine whether the application scenario to which the first application belongs is the preset scenario D based on the CPU usage of the preset task. For example, a preset task occupies a large CPU load when executed in the background. Therefore, when the first application executes the preset task in the background, the electronic device may determine that the application scenario to which the first application belongs is the preset scenario D. The preset task may include application installation or application update, etc. For example, when the first application executes application installation or application update in the background, the electronic device may determine that the application scenario to which the first application belongs is the preset scenario D.

[0357] For example, the electronic device may determine, based on the actual load of the electronic device, whether the application scenario to which the first application belongs is the preset scenario D. When the actual load of the electronic device is greater than the preset load, the electronic device may determine that the application scenario to which the first application belongs is the preset scenario D. The preset load may be specifically determined based on the actual scenario, and this embodiment does not impose any specific limitation on this.

[0358] It should be noted that the method of determining that the application scenario to which the above-mentioned first application belongs is the preset scenario D is only explained as an example and should not be understood as a limitation on this embodiment. This embodiment does not impose specific limitations on the method of determining the application scenario to which the first application belongs, and it can be determined according to the actual scenario.

[0359] For example, the electronic device may determine the first application based on identification information such as the name and / or code of the first application running in the foreground, thereby determining the application scenario to which the first application belongs. For example, the electronic device may perform content recognition on the first application to determine the first application, thereby determining the application scenario to which the first application belongs.

[0360] For example, when the first application is determined to be a game application based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the application scenario to which the first application belongs is preset scenario A (i.e., a game or short video scenario).

[0361] For example, when the first application is determined to be a download application based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the application scenario to which the first application belongs is preset scenario B (i.e., long video or download scenario).

[0362] For example, when the first application is determined to be a browser based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the application scenario to which the first application belongs is preset scenario C (i.e., graphic and text application scenario).

[0363] For example, when it is determined that the first application includes a game application and a browser based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the number of first applications is greater than a preset number, that is, it can determine that the application scenario to which the first application belongs is the preset scenario D.

[0364] For example, when the first application is determined to include a game application, a download application, and a communication application based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the number of first applications is greater than a preset number, that is, it can determine that the application scenario to which the first application belongs is the preset scenario D.

[0365] For example, when it is determined that the first application includes a camera application based on identification information such as the name and / or code of the first application, or by identifying the content of the first application, the electronic device can determine that the first application is a preset application, that is, it can determine that the application scene to which the first application belongs is the preset scene D.

[0366] S502: The electronic device obtains a first network speed and a first temperature of the electronic device, where the first network speed is the current network speed of the electronic device, and the first temperature is the current temperature of the electronic device.

[0367] Optionally, the first temperature can be a temperature obtained by the electronic device in real time, or it can be a temperature obtained periodically by the electronic device. It will be understood that this embodiment does not impose any restrictions on the specific value of the period for obtaining the temperature (hereinafter referred to as period A), which can be determined according to the actual scenario. For example, the period A can be determined to be 5 seconds according to the actual scenario, that is, the electronic device can obtain the first temperature every 5 seconds. For example, the period A can be determined to be 10 seconds according to the actual scenario, that is, the electronic device can obtain the first temperature every 10 seconds. For example, the period A can be determined to be 1 minute according to the actual scenario, that is, the electronic device can obtain the first temperature every one minute, and so on.

[0368] Similarly, the first network speed can be the network speed obtained by the electronic device in real time, or it can be the network speed obtained periodically by the electronic device. It will be understood that this embodiment does not impose any restrictions on the specific value of the period for obtaining the network speed (hereinafter referred to as period B), which can be determined according to the actual scenario. For example, the period B can be determined to be 5 seconds according to the actual scenario, that is, the electronic device can obtain the first network speed every 5 seconds. For example, the period B can be determined to be 30 seconds according to the actual scenario, that is, the electronic device can obtain the first network speed every 30 seconds. For example, the period B can be determined to be 5 minutes according to the actual scenario, that is, the electronic device can obtain the first network speed every 5 minutes, and so on.

[0369] That is, when the first application is running in the foreground, the electronic device can detect the temperature of the electronic device in real time or periodically, that is, obtain the first temperature in real time or periodically. Similarly, when the first application is running in the foreground, the electronic device can detect the network speed of the electronic device in real time or periodically, that is, obtain the first network speed in real time or periodically.

[0370] S503: The electronic device adjusts the second network speed of the second application according to the application scenario, the first network speed, and the first temperature.

[0371] Optionally, the second application may include one or more applications. That is, the electronic device may adjust the network speed of multiple applications running in the background based on the application scenario, the first network speed, and the first temperature. Alternatively, the electronic device may adjust the network speed of one application among the applications running in the background based on the application scenario, the first network speed, and the first temperature.

[0372] In one example, when the application scenarios to which a first application belongs are different, the first application's demand for network resources varies, and therefore, the network speed limit imposed on the second application also varies. Optionally, when the first application's demand for network resources is high, a stricter limit can be imposed on the second application's network speed to reduce the second application's use of network resources, guarantee the first application's network demand, ensure the smooth operation of the first application, and reduce the temperature rise rate of the electronic device, thereby safeguarding the overall performance of the electronic device. When the first application's demand for network resources is low, a looser limit can be imposed on the second application's network speed. That is, when the first application's network demand is low, the second application can occupy more network resources to guarantee the second application's network speed, allowing the second application to upload or download at a faster speed. In other words, the higher the first application's demand for network resources, the stricter the network speed limit imposed on the second application, i.e., the slower the second application's network speed; the lower the first application's demand for network resources, the looser the network speed limit imposed on the second application, i.e., the faster the second application's network speed.

[0373] In another example, when the current network speed of the electronic device is different, the network speed limit for the second application is also different. Optionally, when the current network speed of the electronic device is higher, the current network resources are more likely to meet the network requirements of the first application and the second application. Therefore, the network speed limit for the second application can be looser, that is, the network speed of the second application can be greater, so as to ensure the smooth operation of the first application and the upload or download speed of the second application. When the current network speed of the electronic device is lower, the current network resources may be less able to meet the network requirements of the first application and the second application. At this time, in order to ensure the smooth operation of the first application, the network speed of the second application can be strictly limited to reduce the network speed of the second application and reduce the second application's occupation of network resources.

[0374] In another example, when the current temperature of the electronic device is different, the network speed limit for the second application is also different. Optionally, when the current temperature of the electronic device is higher, in order to ensure the overall performance of the electronic device, the network speed of the second application can be more strictly restricted; when the current temperature of the electronic device is lower, the network speed of the second application can be more loosely restricted. That is, as the temperature of the electronic device increases, the electronic device can gradually reduce the network speed of the second application to limit the second application's occupation of network resources, avoid the second application and the first application competing for network resources, causing the temperature of the electronic device to rise too quickly, reduce the temperature rise rate of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.

[0375] It should be noted that in the game or short video scenario (i.e., preset scenario A), that is, when the game application or short video application is running in the foreground, the foreground application generally requires high bandwidth for a long time to ensure the smoothness of the game or short video. In addition, because users generally click on the display interface frequently during games or short videos, the processor frequency and screen refresh rate of the electronic device are also high. Therefore, in preset scenario A, the foreground application has a greater demand for network resources, processor resources and other resources.

[0376] In long video or download scenarios (i.e., preset scenario B), the foreground application generally requires high bandwidth for a long time, but the user does not frequently click on the display interface. In other words, the processor frequency and screen refresh rate of the electronic device can be lower than those of the electronic device in preset scenario A. Therefore, in preset scenario B, the foreground application's demand for network resources, processor resources, and other resources can be lower than those in preset scenario A.

[0377] In the graphics and text application scenario (i.e., preset scenario C), the foreground application generally only requires high bandwidth for a short period of time or only requires low bandwidth. In other words, the foreground application has low requirements for network resources, processor resources, and other resources. Therefore, in preset scenario C, the foreground application's requirements for network resources, processor resources, and other resources can be lower than those in preset scenario B.

[0378] In the heavy-load scenario (ie, preset scenario D), the load on the electronic device is heavy, which can be understood as the foreground application having a greater demand for network resources, processor resources and other resources.

[0379] In one example, the electronic device may determine by default that the network resources and processor resources required by the foreground application in preset scenario D may be higher than those required by the foreground application in preset scenario A, the network resources and processor resources required by the foreground application in preset scenario A may be higher than those required by the foreground application in preset scenario B, and the network resources and processor resources required by the foreground application in preset scenario B may be higher than those required by the foreground application in preset scenario C. Therefore, under the same first network speed and the same first temperature, in preset scenario D, the electronic device's restriction on the network speed of the second application may be stricter than the restriction on the network speed of the second application in preset scenario A; in preset scenario A, the electronic device's restriction on the network speed of the second application may be stricter than the restriction on the network speed of the second application in preset scenario B; and in preset scenario B, the electronic device's restriction on the network speed of the second application may be stricter than the restriction on the network speed of the second application in preset scenario C.

[0380] That is to say, under the same first network speed and the same first temperature, the network speed of the second application in the preset scenario D may be lower than the network speed of the second application in the preset scenario A, the network speed of the second application in the preset scenario A may be lower than the network speed of the second application in the preset scenario B, and the network speed of the second application in the preset scenario B may be lower than the network speed of the second application in the preset scenario C.

[0381] In another example, the electronic device may determine by default that the network resources and processor resources required by the foreground application in preset scenario A may be higher than those required by the foreground application in preset scenario D, the network resources and processor resources required by the foreground application in preset scenario D may be higher than those required by the foreground application in preset scenario B, and the network resources and processor resources required by the foreground application in preset scenario B may be higher than those required by the foreground application in preset scenario C. Therefore, under the same first network speed and the same first temperature, in preset scenario A, the electronic device's restriction on the network speed of the second application may be stricter than the electronic device's restriction on the network speed of the second application in preset scenario D; in preset scenario D, the electronic device's restriction on the network speed of the second application may be stricter than the electronic device's restriction on the network speed of the second application in preset scenario B; and in preset scenario B, the electronic device's restriction on the network speed of the second application may be stricter than the electronic device's restriction on the network speed of the second application in preset scenario C.

[0382] That is to say, under the same first network speed and the same first temperature, the network speed of the second application in preset scenario A may be lower than the network speed of the second application in preset scenario D, the network speed of the second application in preset scenario D may be lower than the network speed of the second application in preset scenario B, and the network speed of the second application in preset scenario B may be lower than the network speed of the second application in preset scenario C.

[0383] It should be noted that the four preset application scenarios described above, namely, preset scenario A, preset scenario B, preset scenario C, and preset scenario D, are provided for illustrative purposes only and should not be construed as limiting this embodiment. This embodiment may also determine that the number of preset application scenarios includes any number, such as three, five, or six, depending on the actual scenario.

[0384] Below, taking the preset application scenarios including preset scenario A, preset scenario B, preset scenario C and preset scenario D, the network resources and processor and other resources required by the foreground application in preset scenario D are higher than the network resources and processor and other resources required by the foreground application in preset scenario A, the network resources and processor and other resources required by the foreground application in preset scenario A are higher than the network resources and processor and other resources required by the foreground application in preset scenario B, and the network resources and processor and other resources required by the foreground application in preset scenario B are higher than the network resources and processor and other resources required by the foreground application in preset scenario C as an example, the specific process of the electronic device adjusting the second network speed of the second application according to the application scenario, the first network speed and the first temperature is described in detail.

[0385] Exemplarily, the electronic device may be provided with a correspondence between the speed limit temperature and the second network speed gear in each preset scenario under each first network speed gear. Therefore, after determining the first network speed and the first temperature of the electronic device, as well as the application scenario to which the first application belongs, the electronic device can determine the first network speed gear where the first network speed is located, and can determine the target correspondence between the speed limit temperature and the second network speed gear based on the first network speed gear where the first network speed is located and the application scenario, so that the target network speed gear corresponding to the second application can be determined based on the first temperature and the target correspondence, so as to adjust the network speed of the second application according to the target network speed gear. For example, the network speed of the second application can be adjusted to the network speed corresponding to the target network speed gear.

[0386] It is understandable that the first network speed gear, the speed limit temperature, and the second network speed gear can be specifically determined according to the actual scenario, and this embodiment does not impose any restrictions on this.

[0387] For example, according to actual scenarios, the first network speed gear may be determined to include gear A, gear B, and gear C. The network speed corresponding to gear A is greater than the network speed corresponding to gear B, and the network speed corresponding to gear B is greater than the network speed corresponding to gear C.

[0388] For example, according to the actual scenario, the network speed corresponding to gear A can be determined to be 10M / s or above, the network speed corresponding to gear B is [3M / s, 10M / s), and the network speed corresponding to gear C is [0M / s, 3M / s).

[0389] For example, according to actual scenarios, the speed limit temperatures may include speed limit temperature G, speed limit temperature H, speed limit temperature I, and speed limit temperature J. Speed ​​limit temperature G may be lower than speed limit temperature H, speed limit temperature H may be lower than speed limit temperature I, and speed limit temperature I may be lower than speed limit temperature J.

[0390] For example, based on actual scenarios, the speed limit temperature G may be determined to be 37 degrees, the speed limit temperature H may be determined to be 40 degrees, the speed limit temperature I may be determined to be 43 degrees, and the speed limit temperature J may be determined to be 46 degrees.

[0391] For example, the second network speed gear may be determined to include the first gear, the second gear, the third gear, the fourth gear, the fifth gear, and the sixth gear according to actual scenarios. The network speed corresponding to the first gear is greater than the network speed corresponding to the second gear, the network speed corresponding to the second gear is greater than the network speed corresponding to the third gear, the network speed corresponding to the third gear is greater than the network speed corresponding to the fourth gear, the network speed corresponding to the fourth gear is greater than the network speed corresponding to the fifth gear, and the network speed corresponding to the fifth gear is greater than the network speed corresponding to the sixth gear.

[0392] It should be noted that the first network speed gear mentioned above includes gear A, gear B and gear C, the speed limit temperature includes speed limit temperature G, speed limit temperature H, speed limit temperature I and speed limit temperature J, and the second network speed gear includes first gear, second gear, third gear, fourth gear, fifth gear and sixth gear. These are only explained for example and should not be understood as limitations on this embodiment.

[0393] The following will be explained as an example in which the first network speed gear includes gear A, gear B and gear C, the speed limit temperature includes speed limit temperature G, speed limit temperature H, speed limit temperature I and speed limit temperature J, and the second network speed gear includes gear 1, gear 2, gear 3, gear 4, gear 5 and gear 6.

[0394] For example, in each first network speed level, in each preset scenario, the corresponding relationship between the speed limit temperature and the second network speed level may be as shown in Table 15:

[0395] Table 15

[0396] That is, when the first network speed gear is A, in the preset scene D (i.e., the overload scene), the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fourth gear, the second network speed gear corresponding to the speed limit temperature H is the fourth gear, the second network speed gear corresponding to the speed limit temperature I is the fifth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0397] In the preset scenario A (i.e., the game or short video scenario), the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the third gear, the second network speed gear corresponding to the speed limit temperature H is the fourth gear, the second network speed gear corresponding to the speed limit temperature I is the fifth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0398] In the preset scenario B (i.e., long video or download scenario), the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the second gear, the second network speed gear corresponding to the speed limit temperature H is the third gear, the second network speed gear corresponding to the speed limit temperature I is the fourth gear, and the second network speed gear corresponding to the speed limit temperature J is the fifth gear.

[0399] In the preset scenario C (i.e., the graphic application scenario), the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the first gear, the second network speed gear corresponding to the speed limit temperature H is the second gear, the second network speed gear corresponding to the speed limit temperature I is the third gear, and the second network speed gear corresponding to the speed limit temperature J is the fourth gear.

[0400] When the first network speed gear is B, in the preset scenario D, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fifth gear, the second network speed gear corresponding to the speed limit temperature H is the fifth gear, the second network speed gear corresponding to the speed limit temperature I is the sixth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0401] In the preset scenario A, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fourth gear, the second network speed gear corresponding to the speed limit temperature H is the fourth gear, the second network speed gear corresponding to the speed limit temperature I is the fifth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0402] In the preset scenario B, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the third gear, the second network speed gear corresponding to the speed limit temperature H is the fourth gear, the second network speed gear corresponding to the speed limit temperature I is the fifth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0403] In the preset scenario C, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the second gear, the second network speed gear corresponding to the speed limit temperature H is the third gear, the second network speed gear corresponding to the speed limit temperature I is the fourth gear, and the second network speed gear corresponding to the speed limit temperature J is the fifth gear.

[0404] When the first network speed gear is C, in the preset scenario D, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fifth gear, the second network speed gear corresponding to the speed limit temperature H is the sixth gear, the second network speed gear corresponding to the speed limit temperature I is the sixth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0405] In the preset scenario A, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fifth gear, the second network speed gear corresponding to the speed limit temperature H is the fifth gear, the second network speed gear corresponding to the speed limit temperature I is the sixth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0406] In the preset scenario B, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the fourth gear, the second network speed gear corresponding to the speed limit temperature H is the fifth gear, the second network speed gear corresponding to the speed limit temperature I is the sixth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0407] In the preset scenario C, the correspondence between the speed limit temperature and the second network speed gear can be: the second network speed gear corresponding to the speed limit temperature G is the third gear, the second network speed gear corresponding to the speed limit temperature H is the fourth gear, the second network speed gear corresponding to the speed limit temperature I is the fifth gear, and the second network speed gear corresponding to the speed limit temperature J is the sixth gear.

[0408] That is to say, for the preset scenario D, when the first network speed gear is A, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0409] When the first network speed gear is B, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed corresponding to the second application to the speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the speed corresponding to the sixth gear.

[0410] When the first network speed gear is C, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the speed corresponding to the sixth gear.

[0411] For preset scenario A, when the first network speed gear is A, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0412] When the first network speed gear is B, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed corresponding to the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0413] When the first network speed gear is C, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature H (for example, 43 degrees), the electronic device can limit the network speed of the second application to the speed corresponding to the sixth gear.

[0414] For preset scenario B, when the first network speed gear is A, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the second gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear.

[0415] When the first network speed gear is B, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed corresponding to the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed corresponding to the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0416] When the first network speed gear is C, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0417] For preset scenario C, when the first network speed gear is A, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the first gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the second gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear.

[0418] When the first network speed gear is B, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed corresponding to the second application to the network speed corresponding to the second gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed corresponding to the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear.

[0419] When the first network speed gear is C, when the first temperature reaches the speed limit temperature G (for example, 37 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the third gear; when the first temperature reaches the speed limit temperature H (for example, 40 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fourth gear; when the first temperature reaches the speed limit temperature I (for example, 43 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the fifth gear; when the first temperature reaches the speed limit temperature J (for example, 46 degrees), the electronic device can limit the network speed of the second application to the network speed corresponding to the sixth gear.

[0420] It should be noted that for preset scenarios A, B, C, and D, regardless of whether the first network speed gear corresponding to the first network speed is A, B, or C, as long as the first temperature is lower than the speed limit temperature G (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear. In other words, when the first temperature does not reach the minimum speed limit temperature, the electronic device may not limit the network speed of the second application.

[0421] Optionally, the network speed corresponding to each second network speed gear can be set by default by the electronic device. For example, the electronic device can set the first gear to be unlimited speed, the second gear to be 4MB / s, the third gear to be 2M / s, the fourth gear to be 300KB / s, the fifth gear to be 100KB / s, and the sixth gear to be 0KB / s, that is, the sixth gear can be used to pause uploading or downloading.

[0422] Optionally, the network speed corresponding to each second network speed gear can be determined according to the network speed corresponding to the first network speed gear. For example, it can be determined according to the minimum network speed corresponding to gear A in the first network speed gear. For example, when the minimum network speed corresponding to gear A is 10MB / s, the electronic device can determine that the first gear in the second network speed gear is an unlimited speed gear, the second gear corresponds to a network speed of 5MB / s, the third gear corresponds to a network speed of 2M / s, the fourth gear corresponds to a network speed of 500KB / s, the fifth gear corresponds to a network speed of 100KB / s, and the sixth gear corresponds to a network speed of 0KB / s, that is, the sixth gear can be a file for pausing uploads or downloads.

[0423] In one example, when the application scenario to which the first application belongs is preset scenario D, the electronic device can also adjust the network speed of the second application according to the network speed adjustment method described in Example 1. That is, when the application scenario to which the first application belongs is preset scenario A, preset scenario B, and preset scenario C, the electronic device can adjust the network speed of the second application according to the first network speed and the first temperature. When the application scenario to which the first application belongs is preset scenario D, the electronic device can adjust the network speed of the second application according to the first temperature. For specific details, please refer to the description in Example 1 and will not be repeated here.

[0424] For example, when the first network speed gear is A, B, or C, in preset scenario D, the electronic device can determine that the second network speed gear corresponding to speed limit temperature G, speed limit temperature H, and speed limit temperature I are the same, for example, they all correspond to the fourth gear, and the second network speed gear corresponding to speed limit temperature J is the fifth gear. Therefore, under each first network speed gear, in each preset scenario, the correspondence between the speed limit temperature and the second network speed gear can be as shown in Table 16 below:

[0425] Table 16

[0426] Optionally, the second application running in the background does not necessarily occupy network resources. For the second application that does not occupy network resources, the network speed adjustment may not be performed. In other words, when adjusting the network speed of the second application, the electronic device may only adjust the network speed of the second application that occupies network resources.

[0427] It should be noted that the specific content of adjusting the network speed only for the second application occupying network resources can be found in Example 1, which is related to adjusting the network speed only for the second application occupying network resources. For the sake of simplicity, it will not be repeated here.

[0428] S504. When a change in the first temperature is detected, the electronic device determines a target network speed level corresponding to the second application based on the first network speed, the application scenario, and the changed first temperature, and adjusts the network speed of the second application based on the re-determined target network speed level.

[0429] It should be understood that when the first application is running in the foreground, the electronic device can detect the current temperature of the electronic device in real time or periodically, that is, obtain the first temperature in real time or periodically. Optionally, after adjusting the network speed of the second application based on the first network speed, application scenario, and first temperature, if a change in the first temperature is detected, the electronic device can determine the target network speed gear corresponding to the second application based on the first network speed, application scenario, and the re-acquired first temperature, and adjust the network speed of the second application based on the re-determined target network speed gear.

[0430] For example, when it is determined that the application scenario to which the first application belongs is the preset scenario A and the first network speed gear where the first network speed is located is gear A, if it is determined that the first temperature (for example, 36 degrees) is lower than the speed limit temperature G (for example, 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., no speed limit) based on the first network speed, the preset scenario A and the first temperature (for example, 36 degrees), that is, the network speed of the second application can be not limited.

[0431] If it is detected that the first temperature has risen to the speed limit temperature G, the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (i.e., the second network speed gear corresponding to the speed limit temperature G) based on the first network speed, the preset scenario A, and the first temperature (e.g., 37 degrees Celsius). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the third gear, for example, to 2MB / s.

[0432] After adjusting the network speed of the second application to the third gear (e.g., 2MB / s), if the first temperature is detected to decrease, and the decreased first temperature is less than the speed limit temperature G, for example, if the first temperature is detected to decrease to 36 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the first gear, i.e., the unlimited speed gear, based on the first network speed, the preset scenario A, and the re-acquired first temperature (e.g., 36 degrees). Therefore, the electronic device can restore the network speed of the second application to the unlimited speed state, so as to increase the network speed of the second application when the temperature of the electronic device decreases, thereby ensuring the upload or download speed of the second application.

[0433] If it is detected that the first temperature has risen to the speed limit temperature H (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (i.e., the second network speed gear corresponding to the speed limit temperature H) based on the first network speed, the preset scenario A, and the re-acquired first temperature (for example, 40 degrees). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fourth gear, for example, to 500KB / s, so as to reduce the network speed of the second application when the temperature of the electronic device rises, thereby reducing the second application's occupation of network resources.

[0434] After adjusting the network speed of the second application to the fourth gear (for example, 500KB / s), if it is detected that the first temperature has dropped, and the lowered first temperature is less than the speed limit temperature H, but greater than or equal to the speed limit temperature G, for example, if it is detected that the first temperature has dropped to 39 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the third gear (i.e., the second network speed gear corresponding to the speed limit temperature G) based on the first network speed, the preset scenario A, and the re-acquired first temperature (for example, 39 degrees). Therefore, the electronic device can restore the network speed of the second application to the network speed corresponding to the third gear, for example, to 2MB / s.

[0435] If it is detected that the first temperature continues to rise to speed limit temperature I (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear (i.e., the second network speed gear corresponding to speed limit temperature I) based on the first network speed, preset scenario A, and the newly acquired first temperature (for example, 43 degrees). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear, for example, to 100KB / s, so as to further reduce the network speed of the second application when the temperature of the electronic device further increases.

[0436] After limiting the network speed of the second application to the fifth gear (for example, 100KB / s), if it is detected that the first temperature has dropped, and the lowered first temperature is less than the speed limit temperature I, but greater than or equal to the speed limit temperature H, for example, if it is detected that the first temperature has dropped to 42 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear (i.e., the network speed gear corresponding to the speed limit temperature H) based on the first network speed, the preset scenario A, and the re-acquired first temperature (for example, 42 degrees). Therefore, the electronic device can restore the network speed of the second application to the network speed corresponding to the fourth gear, for example, to 500KB / s.

[0437] If it is detected that the first temperature continues to rise to the speed limit temperature J (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the sixth gear (i.e., the second network speed gear corresponding to the speed limit temperature J) based on the first network speed, the preset scenario A, and the newly acquired first temperature (for example, 46 degrees). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the sixth gear, for example, to 0 KB / s, to suspend uploading or downloading of the second application.

[0438] After adjusting the network speed of the second application to the sixth gear (for example, 0KB / s), if it is detected that the first temperature has dropped, and the lowered first temperature is less than the speed limit temperature J, but greater than or equal to the speed limit temperature I, for example, if it is detected that the first temperature has dropped to 45 degrees, the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear (i.e., the second network speed gear corresponding to the speed limit temperature I) based on the first network speed, the preset scenario A and the re-acquired first temperature (for example, 45 degrees). Therefore, the electronic device can restore the network speed of the second application to the network speed corresponding to the fifth gear, for example, to 100KB / s, so as to gradually restore the network speed of the second application when the temperature of the electronic device drops.

[0439] It is understandable that during the use of an electronic device, the temperature of the electronic device generally fluctuates slightly, and such fluctuations can also cause the first temperature to be less than a certain speed limit temperature. In other words, the first temperature being less than a certain speed limit temperature may be caused by such small fluctuations, rather than by a reduction in the load on the electronic device. Therefore, when such small temperature fluctuations cause the first temperature to be less than a certain speed limit temperature, re-adjusting the network speed of the second application will result in frequent adjustments to the network speed of the second application, reducing the accuracy of the network speed adjustment and degrading the user experience.

[0440] In another example, to improve the accuracy of network speed adjustment and enhance the user experience, the electronic device can be set with recovery temperatures corresponding to each speed limit temperature. After adjusting the network speed of the second application to the second network speed level corresponding to a certain speed limit temperature, when the first temperature drops to or below the recovery temperature corresponding to the speed limit temperature, the electronic device will adjust the network speed of the second application based on the first network speed, the application scenario, and the newly acquired first temperature, thereby avoiding frequent adjustments to the network speed of the second application.

[0441] It should be understood that the recovery temperature corresponding to each speed limit temperature can be specifically determined according to the actual scenario, and this embodiment does not impose any limitation on this.

[0442] For example, when the speed limit temperature G is 37 degrees, the speed limit temperature H is 40 degrees, the speed limit temperature I is 43 degrees, and the speed limit temperature J is 46 degrees, the recovery temperature corresponding to the speed limit temperature G (hereinafter referred to as recovery temperature G) can be determined to be 35 degrees, the recovery temperature corresponding to the speed limit temperature H (hereinafter referred to as recovery temperature H) is 38 degrees, the recovery temperature corresponding to the speed limit temperature I (hereinafter referred to as recovery temperature I) is 41 degrees, and the recovery temperature corresponding to the speed limit temperature J (hereinafter referred to as recovery temperature J) is determined to be 44 degrees.

[0443] That is to say, after adjusting the network speed of the second application to the second network speed level corresponding to the speed limit temperature G, when the first temperature drops to the recovery temperature G or below, that is, when the first temperature drops to 35 degrees or below, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.

[0444] After adjusting the network speed of the second application to the second network speed level corresponding to the speed limit temperature H, when the first temperature drops to the recovery temperature H or below, that is, when the first temperature drops to 38 degrees or below, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.

[0445] After adjusting the network speed of the second application to the second network speed level corresponding to the speed limit temperature I, when the first temperature drops to the recovery temperature I or below, that is, when the first temperature drops to 41 degrees or below, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.

[0446] After adjusting the network speed of the second application to the second network speed level corresponding to the speed limit temperature J, when the first temperature drops to the recovery temperature J or below, that is, when the first temperature drops to 44 degrees or below, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.

[0447] For example, when it is determined that the application scenario to which the first application belongs is the preset scenario B (i.e., long video or download scenario) and the first network speed gear of the first network speed is gear B, if it is determined that the first temperature (e.g., 36 degrees) is lower than the speed limit temperature G (e.g., 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., unlimited speed gear) based on the first network speed (i.e., gear B), the preset scenario B and the first temperature, that is, the network speed of the second application can be not limited.

[0448] If the first temperature is detected to have risen to the speed limit temperature G, the electronic device can determine that the target network speed gear for the second application is the third gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (e.g., 37 degrees Celsius). Therefore, the electronic device can adjust the network speed of the second application to the speed corresponding to the third gear, for example, to 2MB / s.

[0449] After adjusting the network speed of the second application to the third gear (e.g., 2MB / s), if it is detected that the first temperature has dropped to the recovery temperature G (e.g., 35 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., unlimited speed gear) based on the first network speed (i.e., gear B), the preset scenario B, and the re-acquired first temperature (e.g., 35 degrees). Therefore, the electronic device can restore the network speed of the second application to the network speed corresponding to the first gear, that is, restore the network speed of the second application to the unlimited speed state.

[0450] If it is detected that the first temperature has risen to the speed limit temperature H (for example, 40 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (for example, 40 degrees). Therefore, the electronic device can adjust the network speed of the second application to the speed corresponding to the fourth gear, for example, to 500KB / s, so as to reduce the network speed of the second application when the temperature of the electronic device rises, thereby reducing the second application's occupation of network resources.

[0451] After adjusting the network speed of the second application to the fourth gear (e.g., 500KB / s), if the first temperature is detected to drop to the recovery temperature H (e.g., 38 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the third gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (e.g., 38 degrees). Therefore, the electronic device can restore the network speed of the second application to the speed corresponding to the third gear, for example, to 2M / s.

[0452] If it is detected that the first temperature continues to rise to the speed limit temperature I (for example, 43 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (for example, 43 degrees). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the fifth gear, for example, to 100KB / s.

[0453] After adjusting the network speed of the second application to the fifth gear (e.g., 100 KB / s), if the first temperature is detected to drop to recovery temperature I (e.g., 41 degrees Celsius), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (e.g., 41 degrees Celsius). Therefore, the electronic device can restore the network speed of the second application to the speed corresponding to the fourth gear, for example, to 500 KB / s.

[0454] If it is detected that the first temperature continues to rise to the speed limit temperature J (for example, 46 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the sixth gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (for example, 46 degrees). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the sixth gear, for example, to 0 KB / s.

[0455] After adjusting the network speed of the second application to the sixth gear (e.g., 0 KB / s), if the first temperature is detected to drop to the recovery temperature J (e.g., 44 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fifth gear based on the first network speed (i.e., gear B), the preset scenario B, and the newly acquired first temperature (e.g., 44 degrees). Therefore, the electronic device can restore the network speed of the second application to the speed corresponding to the fifth gear, for example, to 100 KB / s.

[0456] S505. When a change in the first network speed is detected, the electronic device redetermines the target network speed gear corresponding to the second application according to the changed first network speed, the application scenario, and the first temperature, and adjusts the network speed of the second application according to the redetermined target network speed gear.

[0457] It should be understood that when the first application is running in the foreground, the electronic device can detect the current network speed of the electronic device in real time or periodically, that is, obtain the first network speed in real time or periodically.

[0458] Optionally, after adjusting the network speed of the second application according to the first network speed, application scenario and first temperature, if a change in the first network speed is detected, the electronic device can re-determine the target network speed gear corresponding to the second application based on the re-acquired first network speed, application scenario and first temperature, so as to adjust the network speed of the second application according to the re-determined target network speed gear.

[0459] For example, when it is determined that the application scenario to which the first application belongs is the preset scenario C (i.e., the graphic application scenario), the first network speed gear where the first network speed is located is gear A, and the first temperature reaches the speed limit temperature G (e.g., 37 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the first gear (i.e., unlimited speed gear) based on the first network speed (i.e., gear A), the application scenario (i.e., the preset scenario C) and the first temperature (e.g., 37 degrees), that is, the network speed of the second application can be unlimited.

[0460] When a change in the first network speed is detected, and the first network speed gear at which the changed first network speed is located is gear B, assuming that the first temperature has not changed, the electronic device can determine that the target network speed gear corresponding to the second application is the second gear based on the first network speed (i.e., gear B), the application scenario (i.e., preset scenario C), and the first temperature (e.g., 37 degrees Celsius). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to the second gear, for example, to 5M / s.

[0461] When a change in the first network speed is detected, and the first network speed gear at which the changed first network speed is located is gear C, assuming that the first temperature has not changed, the electronic device can determine that the target network speed gear corresponding to the second application is gear three based on the first network speed (i.e., gear C), the application scenario (i.e., preset scenario C), and the first temperature (e.g., 37 degrees Celsius). Therefore, the electronic device can adjust the network speed of the second application to the network speed corresponding to gear three, for example, to 2M / s.

[0462] It should be noted that when both the first network speed and the first temperature change, the electronic device can re-determine the target network speed gear corresponding to the second application based on the changed first network speed, the changed first temperature and the application scenario, so as to adjust the network speed of the second application according to the re-determined target network speed gear.

[0463] In this embodiment, when there is a first application running in the foreground and a second application running in the background in the electronic device, the electronic device can determine the application scenario to which the first application belongs, and obtain the first network speed and first temperature of the electronic device, so as to determine the actual demand of the first application for network resources based on the application scenario to which the first application belongs, and thus accurately adjust the network speed of the second application based on the actual demand of the first application for network resources, as well as the first network speed and first temperature of the electronic device, to ensure that the network resources meet the needs of the first application, ensure the smoothness of the operation of the first application, reduce the temperature rise rate of the electronic device, protect the overall performance of the electronic device, avoid the electronic device from reducing the frequency due to high temperature, resulting in problems such as slow response or freezing of the electronic device, and improve the user experience.

[0464] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0465] Corresponding to the network speed adjustment method for background applications described in the above embodiment, the embodiment of the present application also provides a network speed adjustment device for background applications, and each module of the device can correspond to each step of the network speed adjustment method for background applications.

[0466] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0467] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0468] The present application also provides an electronic device comprising at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, the electronic device implements the steps of any of the above-described method embodiments. For example, the structure of the electronic device may be as shown in FIG1 .

[0469] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a computer, the computer is enabled to implement the steps of any of the above method embodiments.

[0470] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device implements the steps of any of the above method embodiments.

[0471] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may at least include: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable storage medium cannot be an electric carrier signal or a telecommunication signal.

[0472] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0473] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0474] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0475] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0476] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for adjusting the network speed of a background application, characterized in that: Applied to electronic equipment, the method comprises: Determining whether the electronic device is in a heavy load scenario; When the electronic device is in a heavy load scenario, obtaining a first temperature of the electronic device, where the first temperature is a current temperature of the electronic device; According to the first temperature, the network speed of a second application is adjusted, where the second application is an application running in the background of the electronic device.

2. The method according to claim 1, characterized in that: The determining whether the electronic device is in a heavy load scenario includes: Determine the number of apps running in the foreground; When the number of applications running in the foreground is greater than or equal to a preset number, it is determined that the electronic device is in an overload scenario.

3. The method according to claim 1, characterized in that The determining whether the electronic device is in a heavy load scenario includes: When the application running in the foreground is a preset application, it is determined that the electronic device is in a heavy load scenario.

4. The method according to claim 3, characterized in that The preset application includes a camera application, a game application or a short video application.

5. The method according to claim 1, characterized in that The determining whether the electronic device is in a heavy load scenario includes: Determine the function corresponding to the current task of the electronic device; When the function is a preset function, it is determined that the electronic device is in a heavy load scenario.

6. The method according to claim 5, characterized in that The preset functions include a super desktop function, a car screen projection function or a first unlocking function.

7. The method according to claim 1, characterized in that The determining whether the electronic device is in a heavy load scenario includes: Determine the tasks that the foreground application is performing in the background; When the task is a preset task, it is determined that the electronic device is in an overload scenario, and the preset task includes application installation or application update.

8. The method according to any one of claims 1 to 7, characterized in that The adjusting the network speed of the second application according to the first temperature includes: Determine a first speed limit temperature corresponding to the first temperature; Determining a first target network speed corresponding to the second application according to the first speed limit temperature and the first corresponding relationship; adjusting the network speed of the second application to not exceed the first target network speed; The first corresponding relationship is the corresponding relationship between the speed limit temperature and the network speed.

9. The method according to claim 8, characterized in that After adjusting the network speed of the second application to not exceed the first target network speed, the method further includes: Obtaining a first recovery temperature corresponding to the first speed limit temperature; Acquire a second temperature of the electronic device, where the second temperature is a temperature measured after the electronic device adjusts the network speed of the second application; determining whether the second temperature is less than or equal to the first recovery temperature; When the second temperature is less than or equal to the first recovery temperature, determining a second speed limit temperature corresponding to the second temperature; Determining a second target network speed corresponding to the second application according to the second speed limit temperature and the first corresponding relationship; The network speed of the second application is adjusted to not exceed the second target network speed.

10. The method according to any one of claims 1 to 9, characterized in that Before adjusting the network speed of the second application according to the first temperature, the method further includes: Determine that the second application is one or more applications in an application whitelist.

11. The method according to any one of claims 1 to 10, characterized in that The adjusting the network speed of the second application according to the first temperature includes: Acquire a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device; Adjust the network speed of the second application according to the first network speed and the first temperature.

12. The method according to claim 11, characterized in that The adjusting the network speed of the second application according to the first network speed and the first temperature includes: Determine a first network speed gear corresponding to the first network speed; Determining a second corresponding relationship according to the first network speed gear, where the second corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed; Determine a third speed limit temperature corresponding to the first temperature; Determining a third target network speed corresponding to the second application according to the third speed limit temperature and the second corresponding relationship; The network speed of the second application is adjusted to not exceed the third target network speed.

13. The method according to claim 12, characterized in that The electronic device also includes: a second network speed gear, the second network speed gear is different from the first network speed gear, and the third corresponding relationship corresponding to the second network speed gear is different from the second corresponding relationship.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: Determine a first application scenario to which a first application belongs, where the first application is an application running in the foreground of the electronic device; Acquire a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device; The adjusting the network speed of the second application according to the first temperature includes: Adjust the network speed of the second application according to the first application scenario, the first network speed, and the first temperature.

15. The method according to claim 14, characterized in that The adjusting the network speed of the second application according to the first application scenario, the first network speed, and the first temperature includes: Determine a fourth corresponding relationship corresponding to the first application scenario, where the fourth corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed in the first application scenario; The network speed of the second application is adjusted according to the first network speed, the first temperature and the fourth corresponding relationship.

16. The method according to claim 15, characterized in that The electronic device also includes: a second application scenario, the second application scenario is different from the first application scenario, and a sixth corresponding relationship corresponding to the second application scenario is different from the fourth corresponding relationship.

17. The method according to claim 15, characterized in that The adjusting the network speed of the second application according to the first network speed, the first temperature, and the fourth corresponding relationship includes: Determine a third network speed gear corresponding to the first network speed; Determine a fifth corresponding relationship according to the third network speed gear and the fourth corresponding relationship, where the fifth corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed in the first application scenario and the third network speed gear; Determine a fourth speed limit temperature corresponding to the first temperature; Determining a fourth target network speed corresponding to the second application according to the fourth speed limit temperature and the fifth corresponding relationship; The network speed of the second application is adjusted to not exceed the fourth target network speed.

18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the electronic device implements the network speed adjustment method for the background application according to any one of claims 1 to 17.

19. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a computer, the computer implements the network speed adjustment method for a background application according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Application control method and device

    CN106293803A

  • Heat dissipation control method and device

    CN107608861A

  • Task management method and device

    CN110083444A

  • Temperature control method and device, storage medium and electronic equipment

    CN110928387A

  • Temperature control method and device and storage medium

    CN111601377A