Network speed adjustment method of background application, electronic equipment and readable storage medium
By judging the reloaded scenario of electronic devices and adjusting the network speed of the backend application, the application lag or interruption caused by the increase in the temperature of electronic devices is solved, and the user experience and overall machine performance are improved.
Patent Information
- Application Number
- CN202310957412.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
When the temperature of electronic devices increases, the network speed control is performed by directly limiting the network speed, resulting in lag or interruption of the application users are using, affecting the user's experience.
By determining whether the electronic device is a reloaded scenario and adjusting the network speed of the background application according to the current temperature, the temperature increase of the electronic device is reduced and the application will be avoided from being stuck or interrupted.
It effectively avoids the problem of stuck or interruption of electronic equipment caused by high temperatures, improves the user experience, and ensures the overall performance of electronic equipment.
Smart Images

Figure CN119449729A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of terminal technology, and in particular, relates to a network speed adjustment method for a background application, an electronic device, and a computer-readable storage medium. Background Art
[0002] At present, when the temperature of electronic devices rises, the network speed of applications in the electronic devices will be controlled to avoid high temperature frequency limiting. However, the existing network speed control is relatively coarse-grained, generally directly limiting the network speed of electronic devices, that is, uniformly controlling the network speed of all applications in electronic devices, resulting in problems such as freezes or interruptions in the applications that users are currently using, affecting the user experience. Summary of the invention
[0003] 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. The network speed of the background application can be adjusted to reduce the temperature rise rate of the electronic device, avoid problems such as freezes or interruptions in the application currently being used by the user, and improve the user experience.
[0004] 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:
[0005] Determining whether the electronic device is in a heavy load scenario;
[0006] 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;
[0007] According to the first temperature, a network speed of a second application is adjusted, where the second application is an application running in the background of the electronic device.
[0008] In the above-mentioned background application network speed adjustment method, 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, reducing the network speed of the second application running in the background, avoiding background applications from occupying 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 other problems, thereby improving the user experience.
[0009] In one example, determining whether the electronic device is in an overload scenario may include:
[0010] Determine the number of apps running in the foreground;
[0011] 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.
[0012] In the network speed adjustment method for background applications provided in this example, when more applications are running in the foreground, the load of the electronic device will be greater, and when fewer applications are running in the foreground, the load of the electronic device will be smaller. Therefore, the electronic device can determine whether the electronic device is in a heavy load scenario based on the number of applications running in the foreground.
[0013] In another example, determining whether the electronic device is in an overload scenario may include:
[0014] When the application running in the foreground is a preset application, it is determined that the electronic device is in a heavy load scenario.
[0015] Optionally, the preset application includes a camera application, a game application or a short video application.
[0016] 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 a heavy load 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.
[0017] In another example, determining whether the electronic device is in an overload scenario may include:
[0018] Determine the function corresponding to the current task of the electronic device;
[0019] When the function is a preset function, it is determined that the electronic device is in a heavy load scenario.
[0020] Optionally, the preset functions include a super desktop function, a car screen projection function or a first unlocking function.
[0021] 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 overloaded 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.
[0022] In another example, determining whether the electronic device is in an overload scenario may include:
[0023] Determine the tasks that the foreground application is performing in the background;
[0024] 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.
[0025] In the network speed adjustment method for background applications provided in this example, when the preset task of the foreground application (such as application installation or application update) is executed in the background, it will occupy a large CPU load, 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 overloaded based on whether the task executed by the foreground application in the background is a preset task.
[0026] In a possible implementation, adjusting the network speed of the second application according to the first temperature may include:
[0027] Determine a first speed limit temperature corresponding to the first temperature;
[0028] Determining a first target network speed corresponding to the second application according to the first speed limit temperature and the first corresponding relationship;
[0029] adjusting the network speed of the second application to not exceed the first target network speed;
[0030] The first corresponding relationship is the corresponding relationship between the speed limit temperature and the network speed.
[0031] 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.
[0032] It should be understood that 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 from competing for network resources, resulting in the temperature of the electronic device rising too fast, reduce the temperature rise speed of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.
[0033] Exemplarily, after adjusting the network speed of the second application to not exceed the first target network speed, the method may further include:
[0034] Obtaining a first recovery temperature corresponding to the first speed limit temperature;
[0035] 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;
[0036] determining whether the second temperature is less than or equal to the first recovery temperature;
[0037] 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;
[0038] Determining a second target network speed corresponding to the second application according to the second speed limit temperature and the first corresponding relationship;
[0039] The network speed of the second application is adjusted to not exceed the second target network speed.
[0040] In the network speed adjustment method of the background application 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 according to the changed temperature, so as to adjust the network speed of the second application according to the re-determined target network speed gear, so that when the temperature of the electronic device increases, the network speed of the second application can be further reduced, reducing the occupation of network resources by the second application. When the temperature of the electronic device decreases, the network speed of the second application can be increased to ensure the upload or download speed of the second application.
[0041] Exemplarily, before adjusting the network speed of the second application according to the first temperature, the method may further include:
[0042] Determine that the second application is one or more applications in the application whitelist.
[0043] 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 may be provided in the electronic device, and the application whitelist may include identification information (such as name and / or code information) 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.
[0044] In another possible implementation, adjusting the network speed of the second application according to the first temperature may include:
[0045] Acquire a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device;
[0046] Adjust the network speed of the second application according to the first network speed and the first temperature.
[0047] Exemplarily, adjusting the network speed of the second application according to the first network speed and the first temperature includes:
[0048] Determine a first network speed gear corresponding to the first network speed;
[0049] 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;
[0050] Determine a third speed limit temperature corresponding to the first temperature;
[0051] Determining a third target network speed corresponding to the second application according to the third speed limit temperature and the second corresponding relationship;
[0052] The network speed of the second application is adjusted to not exceed the third target network speed.
[0053] 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 corresponding relationship, 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.
[0054] It is understandable that when the current network speed of the electronic device is higher, 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 lower, 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 lower, 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 and the first application from competing for network resources, resulting in the temperature of the electronic device rising too fast, reduce the temperature rise speed of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.
[0055] 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 where 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 where the first network speed is located, thereby determining the target network speed level corresponding to the second application 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.
[0056] 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 the embodiments of the present application do not impose any restrictions on this.
[0057] For example, according to the actual scenario, it can be determined that the first network speed gear includes 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).
[0058] Therefore, the electronic device may 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 may 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 may 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 may be called correspondence A3).
[0059] 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.
[0060] Optionally, the electronic device also 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.
[0061] In another possible implementation, the method may further include:
[0062] 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;
[0063] Acquire a first network speed of the electronic device, where the first network speed is a current network speed of the electronic device;
[0064] The adjusting the network speed of the second application according to the first temperature includes:
[0065] Adjust the network speed of the second application according to the first application scenario, the first network speed, and the first temperature.
[0066] 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 the 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 according to the first application scenario to which the first application belongs, thereby accurately adjusting the network speed of the second application according to the actual demand of the first application for network resources and the first network speed and the first temperature of the electronic device, ensuring that network resources meet the needs of the first application, ensuring the smoothness of the operation of the first application, reducing the temperature rise speed of the electronic device, ensuring the overall performance of the electronic device, avoiding frequency reduction of the electronic device due to high temperature, resulting in slow response or jamming of the electronic device, and improving user experience.
[0067] 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:
[0068] 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;
[0069] The network speed of the second application is adjusted according to the first network speed, the first temperature and the fourth corresponding relationship.
[0070] 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:
[0071] Determine a third network speed gear corresponding to the first network speed;
[0072] 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;
[0073] Determine a fourth speed limit temperature corresponding to the first temperature;
[0074] Determining a fourth target network speed corresponding to the second application according to the fourth speed limit temperature and the fifth corresponding relationship;
[0075] The network speed of the second application is adjusted to not exceed the fourth target network speed.
[0076] Optionally, the electronic device further 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.
[0077] 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.
[0078] 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, and the device may include:
[0079] A heavy load scenario judgment module, used to judge whether the electronic device is in a heavy load scenario;
[0080] A first temperature acquisition module, used for acquiring 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;
[0081] 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.
[0082] 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.
[0083] In another example, the overload scenario judgment module is further used to determine that the electronic device is in an overload scenario when the application running in the foreground is a preset application.
[0084] Optionally, the preset application includes a camera application, a game application or a short video application.
[0085] 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.
[0086] Optionally, the preset functions include a super desktop function, a car screen projection function or a first unlocking function.
[0087] In another example, the overload scenario judgment module is also used to determine the task performed by the application running in the foreground in the background; 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.
[0088] In a 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 corresponding relationship; adjust the network speed of the second application to not exceed the first target network speed; wherein the first corresponding relationship is a corresponding relationship between the speed limit temperature and the network speed.
[0089] Exemplarily, the device may further include:
[0090] A recovery temperature acquisition module, used to acquire a first recovery temperature corresponding to the first speed limit temperature;
[0091] A second temperature acquisition module, used 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;
[0092] A second temperature judgment module, used to determine whether the second temperature is less than or equal to the first recovery temperature;
[0093] 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;
[0094] 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;
[0095] 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.
[0096] Exemplarily, the device may further include:
[0097] The second application determination module is used to determine that the second application is one or more applications in the application whitelist.
[0098] 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 a 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.
[0099] 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.
[0100] Optionally, the electronic device also 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.
[0101] In another possible implementation, the device may further include:
[0102] An application scenario determination module, used 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;
[0103] A first network speed acquisition module, used to acquire a first network speed of the electronic device, where the first network speed is the current network speed of the electronic device;
[0104] 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.
[0105] 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.
[0106] 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.
[0107] Optionally, the electronic device further 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.
[0108] 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, wherein when the processor executes the computer program, the electronic device implements the method for adjusting the network speed of a background application described in any one of the first aspects above.
[0109] 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 method for adjusting the network speed of a background application described in any one of the first aspects above.
[0110] 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.
[0111] 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
[0112] Figure 1 It is a structural diagram of an electronic device to which the network speed adjustment method of a background application provided in an embodiment of the present application is applicable;
[0113] Figure 2 This is a schematic diagram of the software architecture to which the network speed adjustment method for background applications provided in an embodiment of the present application is applicable. Figure 1 ;
[0114] Figure 3 This is a schematic diagram of the software architecture to which the network speed adjustment method for background applications provided in an embodiment of the present application is applicable. Figure 2 ;
[0115] Figure 4 It is a flowchart of a method for adjusting the network speed of a background application provided in Embodiment 1 of the present application;
[0116] Figure 5 It is a flowchart of the network speed adjustment method of the background application provided in Example 2 of the present application. DETAILED DESCRIPTION
[0117] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0118] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0119] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" 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 "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0120] 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.
[0121] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0122] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.
[0123] The steps involved in the method for adjusting the network speed of the background application provided in the embodiments of the present application are only examples. Not all steps are required to be executed, or not all information or messages are required. They can be increased or decreased as needed during use. The same step or steps or messages with the same function in different embodiments of the present application can be referenced and learned from each other.
[0124] 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. A person of ordinary skill in the art will appreciate 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.
[0125] Electronic devices generally run foreground applications and background applications. For example, during the operation of the foreground application, upload or download tasks can be performed through the background application. Among them, 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 quickly, 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.
[0126] To solve the above problems, when there are foreground applications and background applications in an electronic device, the network speed of the background application can be adjusted according to the temperature of the electronic device to prevent the temperature of the electronic device from rising too quickly, reduce the occupation of network resources by the background application, and thus reduce the possibility of problems such as slow response or freezing of the electronic device. Generally, the speed limit policy corresponding to the background application can be set in advance according to the temperature, so as to adjust the network speed of the background application according to the speed limit policy and the real-time temperature of the electronic device.
[0127] For example, four speed levels can be set for the network speed of 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. Among them, the speed limit strategy can be that when the temperature is less than 37 degrees Celsius (hereinafter referred to as degrees), the speed of background applications is not limited. When the temperature rises to 37 degrees, the network speed is adjusted to the first level. For every subsequent increase of 3 degrees in temperature, the speed limit increases by one level, so as to gradually limit the network speed of background applications.
[0128] That is to say, when the temperature is less than 37 degrees, the network speed of the background application is not 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 the background application can be the first gear, that is, when the temperature of the electronic device reaches 37 degrees, the network speed of the background application can be adjusted to 3MB / s. When the temperature rises to 40 degrees, the network speed of the background application can be the second gear, that is, when the temperature of the electronic device reaches 40 degrees, the network speed of the background application can be adjusted to 1MB / s. When the temperature rises to 43 degrees, the network speed of the background application can be the third gear, that is, when the temperature of the electronic device reaches 43 degrees, the network speed of the background application can be adjusted to 500KB / s. When the temperature rises to 46 degrees, the network speed of the background application can be the fourth gear, that is, when the temperature of the electronic device reaches 46 degrees, the network speed of the background application can be adjusted to 50KB / s.
[0129] This method of adjusting the network speed of background applications according to temperature can, to a certain extent, slow down the temperature rise of electronic devices and reduce the occupation of network resources by background applications, thereby reducing the average load of electronic devices and reducing power consumption, thereby reducing the possibility of electronic devices experiencing slow response or freezing. 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 limit the speed enough, resulting in limited network resources for foreground applications, causing the temperature of electronic devices to rise too quickly, which will still cause electronic devices to experience slow response or freezing.
[0130] In order to solve the above problems, the embodiment of the present application provides 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 the first temperature of the electronic device, 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, so as to accurately adjust the network speed of the second application according to the actual demand of the first application for network resources, and the first network speed and the first temperature of the electronic device, to ensure that the network resources meet the needs of the first application, to ensure the smoothness of the operation of the first application, and to reduce the temperature rise speed of the electronic device, to ensure the overall performance of the electronic device, to avoid the electronic device from reducing the frequency due to high temperature, resulting in problems such as slow response or jamming of the electronic device, to improve the user experience, and to have strong ease of use and practicality.
[0131] In the embodiments of the present application, the electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted 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.
[0132] The following first introduces the electronic device involved in the embodiment of the present application. Figure 1 , Figure 1 A schematic structural diagram of an electronic device 100 is shown.
[0133] 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, etc. Among them, 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, etc.
[0134] It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0135] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0136] 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.
[0137] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0138] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0139] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 160E and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 160E through the I2C interface, so that the processor 110 communicates with the touch sensor 160E through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0140] 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 through the UART interface to realize 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 through the DSI interface to realize the display function of the electronic device 100.
[0141] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the display screen 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.
[0142] The USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to transmit data between the electronic device 100 and a peripheral device. The interface may also be used to connect other electronic devices, such as an AR device, etc.
[0143] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0144] 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.
[0145] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0146] The mobile communication module 140 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0147] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor displays an image or video 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 set in the same device as the mobile communication module 140 or other functional modules.
[0148] 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 integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 150 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0149] 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 the network and other devices through wireless communication technology. The wireless communication technology 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).
[0150] The electronic device 100 implements the display function through a GPU, a display screen 170, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0151] The display screen 170 is used to display images, videos, etc. The 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 or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 170, where N is a positive integer greater than 1.
[0152] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0153] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0154] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0155] 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 through the external memory interface 120 to implement a data storage function, such as saving files such as videos in the external memory card.
[0156] 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.
[0157] The pressure sensor 160A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 160A can be set on the display screen 170. There are many types of pressure sensors 160A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 160A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 170, the electronic device 100 detects the touch operation intensity according to the pressure sensor 160A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 160A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0158] The gyro sensor 160B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 160B. The gyro sensor 160B can be used for navigation and somatosensory game scenes.
[0159] The acceleration sensor 160C can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0160] The temperature sensor 160D is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 160D to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 160D exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 160D to reduce power consumption and implement thermal protection.
[0161] For example, the electronic device 100 can determine the target network speed gear corresponding to the background application according to 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. Touch sensor 160E, also known as "touch device". Touch sensor 160E can be arranged on display screen 170, and touch sensor 160E and display screen 170 form a touch screen, also known as "touch screen". 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, touch sensor 160E can also be arranged on the surface of electronic device 100, which is different from the position of display screen 170.
[0162] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service 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 exemplify the software structure of the electronic device 100.
[0163] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0164] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0165] The application layer can include a series of application packages.
[0166] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0167] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0168] like Figure 2 As shown, 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.
[0169] 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 the user operation, 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.
[0170] The real-time processing subsystem is used to identify the application status, that is, to identify the foreground application and the background application, and can perform speed limit management based on the temperature and / or network speed obtained by the non-real-time processing subsystem, as well as the application scenario to which it belongs, such as determining the speed limit application list and the target network speed gear. In addition, the real-time processing subsystem can also send a speed limit instruction to the native layer to send the speed limit application list and the target network speed gear to the native layer. Among them, the applications in the speed limit application list are one or more of the application whitelist of the non-real-time processing subsystem.
[0171] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0172] 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.
[0173] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0174] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0175] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0176] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0177] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0178] 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.
[0179] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0180] The system library can include multiple functional modules, such as native layer, surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0181] The native layer can receive the speed limit instruction sent by the real-time processing subsystem, and 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.
[0182] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0183] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0184] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0185] A 2D graphics engine is a drawing engine for 2D drawings.
[0186] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0187] 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.
[0188] See also Figure 3 , Figure 3 The following is a schematic diagram showing a software architecture to which the network speed adjustment method for background applications provided in an embodiment of the present application is applicable. Figure 2 This schematic diagram only illustrates the modules involved in the embodiments of the present application.
[0189] like Figure 3 As shown, in the embodiment of the present application, the Android system is divided into an application framework layer, a system library, and a kernel layer. Among them, 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.
[0190] 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 the user operation, 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.
[0191] The real-time processing subsystem is used to identify the application status, that is, to identify the foreground application and the background application, and can perform speed limit management based on the temperature and / or network speed obtained by the non-real-time processing subsystem, as well as the application scenario to which it belongs, such as determining the speed limit application list and the target network speed gear. In addition, the real-time processing subsystem can also send a speed limit instruction to the native layer to send the speed limit application list and the target network speed gear to the native layer. Among them, the applications in the speed limit application list are one or more of the application whitelist of the non-real-time processing subsystem.
[0192] The native layer can receive the speed limit instruction sent by the real-time processing subsystem, and 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.
[0193] 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.
[0194] The following will describe in detail the network speed adjustment method for the background application provided in the embodiment of the present application in combination with the accompanying drawings and specific application scenarios.
[0195] [Example 1]
[0196] See also Figure 4 , Figure 4 A schematic flow chart of a method for adjusting the network speed of a background application provided in Embodiment 1 of the present application is shown. 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. Figure 4 As shown, the method may include:
[0197] 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.
[0198] Among them, determining the application scenario to which the first application belongs mainly determines whether the application scenario to which the first application belongs is an overload scenario.
[0199] 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, the 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 the overload scenario, the electronic device can reduce the network speed of the background application to reduce the occupation of network resources by the background application and ensure the demand for network resources by the foreground application. 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.
[0200] In one example, the overload scenario may be a scenario where multiple applications are running in the foreground. When more applications are running in the foreground, the load on the electronic device will be greater, and when fewer applications are running in the foreground, the load on the electronic device will be smaller. Therefore, the electronic device can determine whether the application scenario to which the first application belongs is an overload scenario based on the number of first applications running in the foreground.
[0201] Optionally, when the number of first applications running on the current platform is greater than or equal to a preset number, the electronic device can determine that the application scenario to which the first application belongs is an overload scenario. The preset number can be specifically determined according to the actual scenario. For example, the preset number can be determined to be 2 according to 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 can determine that the application scenario to which the first application belongs is an overload scenario.
[0202] It should be noted that the above setting of the preset number to 2 is only an exemplary explanation and should not be understood as a limitation to this embodiment. In this embodiment, the preset number can also be determined as any number such as 3 or 4 according to actual conditions. 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 can determine that the application scenario to which the first application belongs is an overload scenario.
[0203] In one example, the overload scenario may be a scenario in which multiple applications are run in the foreground in a split-screen manner. When the electronic device runs application A and application B in the foreground in a split-screen manner, 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 displays the application interface corresponding to application B in the second display area, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario.
[0204] In one example, the overload scenario may be a scenario where multiple applications are run in the foreground through pop-up windows. When the electronic device runs application A in the foreground, if the electronic device also displays relevant information of application B through 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 through a pop-up window (e.g., a floating window), the electronic device may determine that the application scenario to which the first application belongs is the overload scenario.
[0205] In one example, the overload scenario may 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 the 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 displays 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.
[0206] In another example, the overload scenario may be a scenario in which certain applications (hereinafter referred to as preset applications) are running in the foreground. That is, the electronic device may 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, etc. For example, the preset application occupies a large CPU load when running in the foreground. In this scenario, when the foreground runs any preset application, 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 may determine whether the first application is a preset application. When the first application is a preset application, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset application may be specifically determined according to the actual scenario. For example, it may be determined according to the actual scenario that the preset application includes a camera application, a game application, a short video application, etc.
[0207] For example, when the electronic device determines that the first application running in the foreground is a camera application, the electronic device can 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 can 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 can determine that the application scenario to which the first application belongs is an overload scenario.
[0208] In another example, the overload scenario may 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 may 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 may determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset function may be specifically determined according to the actual scenario. For example, the preset functions may include a super desktop function, a car screen projection function, or a first unlocking function, etc., according to the actual scenario.
[0209] 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.
[0210] It should be noted that the car screen projection may refer to projecting the content in the electronic device to the car device. The first unlocking may refer to the first unlocking in the electronic device after restarting the electronic device.
[0211] In another example, the overload scenario may 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 may 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 may determine 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 may determine whether the first application performs a preset task in the background. When the first application performs any preset task in the background, the electronic device may determine that the application scenario to which the first application belongs is an overload scenario. Among them, the preset task may be specifically determined based on the actual scenario. For example, the preset task may include application installation or application update, etc., according to the actual scenario.
[0212] For example, when the first application is running on the foreground, 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.
[0213] 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., which can be determined specifically according to the actual scenario.
[0214] 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 on 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.
[0215] For example, it is possible to determine whether the application scenario to which the first application belongs is a heavy-load scenario 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 the 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 specifically determined based on the actual situation, and this embodiment does not impose any restrictions on this.
[0216] 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.
[0217] Optionally, the first temperature may be a temperature acquired in real time by the electronic device, or may be a temperature acquired periodically by the electronic device. It is to be understood that this embodiment does not impose any restrictions on the specific value of the period, and it may be determined according to the actual scenario. For example, the period may be determined to be 5 seconds according to the actual scenario, that is, the electronic device may acquire the first temperature every 5 seconds. For example, the period may be determined to be 10 seconds according to the actual scenario, that is, the electronic device may acquire the first temperature every 10 seconds. For example, the period may be determined to be 1 minute according to the actual scenario, that is, the electronic device may acquire the first temperature every one minute, and so on.
[0218] 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 according to the first temperature obtained in real time or periodically.
[0219] S403: The electronic device adjusts the network speed of the second application according to the first temperature.
[0220] Optionally, the second application may include one or more. 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.
[0221] Exemplarily, a correspondence between the speed limit temperature and the network speed level (hereinafter referred to as the correspondence A) may be set in advance in the electronic device. Therefore, after determining the first temperature of the electronic device, the electronic device may determine the target network speed level corresponding to the second application according to the first temperature and the correspondence A, so as to adjust the network speed of the second application according to 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.
[0222] It is understandable that 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 from competing for network resources, causing the temperature of the electronic device to rise too quickly, reduce the temperature rise speed of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.
[0223] Optionally, the speed limit temperature and the network speed gear can be specifically determined according to the actual scenario. Exemplarily, 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 less than speed limit temperature B. Exemplarily, 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.
[0224] It should be understood that the specific values of the speed limit temperature A and the speed limit temperature B can be determined according to the actual scenario. For example, according to the actual scenario, the speed limit temperature A can be determined as 37 degrees and the speed limit temperature B can be determined as 46 degrees. Similarly, the network speed corresponding to each network speed gear can be determined according to the actual scenario, and this embodiment does not make specific restrictions on this.
[0225] For example, as shown in Table 1, the corresponding relationship A may 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 less than the speed limit temperature A, the network speed gear corresponding to the second application may be the first gear (for example, the unlimited speed gear).
[0226] Table 1
[0227] Speed limit temperature The network speed level corresponding to the second application Speed limit temperature A Second gear Speed limit temperature B Third gear
[0228] 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.
[0229] 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 may 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.
[0230] It should be noted that the speed limit temperature described above includes speed limit temperature A and speed limit temperature B, and the network speed gear includes the first gear and the second gear for exemplary explanation only, and should not be understood as limiting the embodiment. In this embodiment, the speed limit temperature and network speed gear can be determined according to the actual scenario.
[0231] 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 be unlimited speed by default, the network speed corresponding to the second gear to be 500KB / s, and the network speed corresponding to the third gear to be 100KB / s, so that when the temperature of the electronic device rises, the second application can upload or download at a lower network speed, etc., to avoid competing with the first application for network resources, reduce the temperature increase speed of the electronic device, and ensure the fluency of the first application.
[0232] 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 according to the 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 the network speed B. That is, when the 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 the 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.
[0233] 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.
[0234] Table 2
[0235] Network speed B The first gear corresponds to the network speed The second gear corresponds to the network speed The third level corresponds to the network speed 10MB / s Unlimited speed 700KB / s 300KB / s 3MB / s Unlimited speed 200KB / s 100KB / s 1MB / s Unlimited speed 100KB / s 50KB / s
[0236] In one embodiment, when the electronic device adjusts the network speed of a second application according to the first temperature, the electronic device can determine the network speed corresponding to each network speed gear according to the current network speed of the second application, or can determine the network speed corresponding to each network speed gear according to 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 according to 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 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 1MB / s, and the network speed corresponding to the third gear is 200KB / s. 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 300KB / s, and the network speed preset value B corresponding to the third gear is 100KB / s. 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 200KB / s, and the network speed corresponding to the third gear is 50KB / s.
[0239] Table 3
[0240] Internet speed A The first gear corresponds to the network speed The second gear corresponds to the network speed The third level corresponds to the network speed 5MB / s 5MB / s 1MB / s 200KB / s 2MB / s 2MB / s 300KB / s 100KB / s 1MB / s 1MB / s 200KB / s 50KB / s
[0241] 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 according to the network speed A and the 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.
[0242] For example, as shown in Table 4, 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 800KB / s, and the network speed corresponding to the third gear is 300KB / s. 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 200KB / s, and the network speed corresponding to the third gear is 100KB / s.
[0243] 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.
[0244] Table 4
[0245] Network speed B Internet speed A The first gear corresponds to the network speed The second gear corresponds to the network speed The third level corresponds to the network speed 10MB / s 4MB / s 4MB / s 800KB / s 300KB / s 3MB / s 2MB / s 2MB / s 200KB / s 100KB / s 1MB / s 500KB / s 500KB / s 100KB / s 50KB / s
[0246] From the above description, it can be known 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 not limited).
[0247] For example, when the network speeds corresponding to the network speed levels are as shown in Table 2 above, the corresponding relationship A may be as shown in Table 5 below:
[0248] Table 5
[0249]
[0250] 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 the second application to be adjusted includes multiple applications. 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.
[0251] 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.
[0252] For example, when the network speeds corresponding to the network speed levels are as shown in Table 3 above, the corresponding relationship A may be as shown in Table 6 below:
[0253] Table 6
[0254]
[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 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 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.
[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 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.
[0257] 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:
[0258] Table 7
[0259]
[0260] 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. 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. 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.
[0261] 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.
[0262] Optionally, according to actual scenarios, the speed limit temperature may include speed limit temperature C, speed limit temperature D, speed limit temperature E, and speed limit temperature F. Among them, speed limit temperature C is less than speed limit temperature D, speed limit temperature D is less than speed limit temperature E, and speed limit temperature E is less than speed limit temperature F. For example, speed limit temperature C may be 37 degrees, speed limit temperature D may be 40 degrees, speed limit temperature E may be 43 degrees, and speed limit temperature F may be 46 degrees.
[0263] Optionally, the network speed gears may include the first gear, the second gear, the third gear, the fourth gear, and the fifth gear according to actual scenarios. Among them, 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.
[0264] Exemplarily, when the speed limit temperature includes 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 can 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 less than the speed limit temperature C, the corresponding network speed gear is the first gear (for example, the unlimited speed gear).
[0265] Table 8
[0266] Speed limit temperature The network speed level corresponding to the second application Speed limit temperature C Second gear Speed limit temperature D Third gear Speed limit temperature E Fourth gear Speed limit temperature F Fifth gear
[0267] 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 may 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.
[0268] 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 that the first gear can be an unlimited speed gear, 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.
[0269] 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).
[0270] 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.
[0271] 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., unlimited speed), 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.
[0272] 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., unlimited speed), 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.
[0273] Table 9
[0274]
[0275] 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).
[0276] 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.
[0277] 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.
[0278] 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.
[0279] Table 10
[0280]
[0281] 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) and the current network speed of the second application (ie, network speed A).
[0282] 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.
[0283] 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.
[0284] 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.
[0285] Table 11
[0286]
[0287] As can be seen from the above, when the speed limit temperature includes speed limit temperature C, speed limit temperature D, speed limit temperature E and speed limit temperature F, the corresponding relationship A can 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 less than the speed limit temperature C, the corresponding network speed gear is the first gear.
[0288] For example, when the network speeds corresponding to the network speed levels are as shown in Table 9 above, the corresponding relationship A may be as shown in Table 12 below:
[0289] Table 12
[0290]
[0291] 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.
[0292] 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 (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 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.
[0293] 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.
[0294] 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.
[0295] 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.
[0296] For example, when the network speeds corresponding to the network speed levels are as shown in Table 10 above, the corresponding relationship A may be as shown in Table 13 below:
[0297] Table 13
[0298]
[0299] 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 13. 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 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.
[0300] 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.
[0301] 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.
[0302] 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.
[0303] 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.
[0304] For example, when the network speeds corresponding to the network speed levels are as shown in Table 11 above, the corresponding relationship A may be as shown in Table 14 below:
[0305] Table 14
[0306]
[0307]
[0308] 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, 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 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.
[0309] 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 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.
[0310] 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.
[0311] 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.
[0312] 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.
[0313] 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 relationship 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.
[0314] It is understandable that when the current network speed of the electronic device is higher, it can be considered that the network resources of the electronic device are more sufficient, and therefore, the network speed of the second application can be more loosely restricted; when the current network speed of the electronic device is lower, it can be considered that the network resources in the electronic device are less sufficient, and 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 lower, the electronic device can reduce the network speed of the second application to limit the occupation of network resources by the second application, avoid the second application and the first application from competing for network resources, resulting in the temperature of the electronic device rising too fast, reduce the temperature rise speed of the electronic device, reduce the maximum temperature of the electronic device, and improve the user experience.
[0315] 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.
[0316] Optionally, the second application running in the background does not necessarily occupy network resources, and the network speed does not need to be adjusted for the second application that does not occupy network resources. That is, when adjusting the network speed for the second application, the electronic device can only adjust the network speed for the second application that occupies network resources.
[0317] In one example, an application whitelist may be provided in the electronic device, and the application whitelist 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 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 can adjust the network speed of the second application according to the first temperature. That is, the target network speed gear corresponding to the second application can be determined according to the first temperature, and the network speed of the second application can be adjusted according to the target network speed gear corresponding to the second application.
[0318] For example, when the application whitelist includes identification information corresponding to application A, identification information corresponding to application B, identification information corresponding to application C, identification information corresponding to application D, and identification information corresponding to application E, assuming that the second application running in the background of the electronic device includes application A, application B, and application F, at this time, the electronic device can determine that application A and application B are applications in the application whitelist, and application F is not an application in the application whitelist. Therefore, the electronic device can adjust the network speed of application A and the network speed of application B according to the first temperature.
[0319] It is understandable that the applications in the application whitelist can be specifically determined according to 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.
[0320] In another example, when adjusting the network speed of the second application, the electronic device may determine whether the second application currently needs to occupy network resources. When the second application currently needs to occupy network resources, the electronic device may adjust the network speed of the second application according to the first temperature. When the second application currently does not need to occupy network resources, the electronic device may not adjust the network speed of the second application.
[0321] 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 respectively 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, and 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 according to the first temperature.
[0322] 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.
[0323] 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 the multiple second applications according to the target network speed gear. For example, the electronic device can adjust the network speed of the multiple second applications to the network speed corresponding to the target network speed gear.
[0324] 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, it is assumed 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.
[0325] 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.
[0326] 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.
[0327] 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 redetermine the target network speed gear corresponding to the second application based on the re-acquired first temperature, and adjust the network speed of the second application according to the redetermined target network speed gear.
[0328] 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 (i.e., 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, and reduce the occupation of network resources by the second application. If it is detected that the first temperature decreases, and the first temperature after the decrease is less than the speed limit temperature C (i.e., the speed limit temperature corresponding to the second gear), the electronic device can determine the target network speed gear corresponding to the second application according to the re-acquired first temperature, and can adjust the network speed of the second application according to 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, and ensure the upload or download speed of the second application.
[0329] That is, after limiting the network speed of the second application to a certain target network speed level, when 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 temperature increase rate 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.
[0330] 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 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 (i.e., unlimited speed gear). At this time, the electronic device may not adjust the network speed of the second application.
[0331] 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.
[0332] 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, it is detected that the first temperature drops 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.
[0333] 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, so as to further reduce the network speed of the second application and reduce the second application's occupancy of network resources, thereby reducing the temperature rise rate of the electronic device.
[0334] 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, it is detected that the first temperature drops 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.
[0335] It is understandable that during the use of an electronic device, the temperature of the electronic device will generally fluctuate slightly, and this fluctuation will 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 this smaller fluctuation, rather than by a reduction in the load of the electronic device. Therefore, when this smaller temperature fluctuation causes the first temperature to be less than a certain speed limit temperature, readjusting the network speed of the second application will cause frequent adjustments to the network speed of the second application, reducing the accuracy of the network speed adjustment and reducing the user experience.
[0336] In another example, in order to improve the accuracy of network speed adjustment and enhance user experience, the electronic device may be set with recovery temperatures corresponding to each speed limit temperature. After the network speed of the second application is adjusted to the 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 according to the re-acquired first temperature to avoid frequent adjustment of the network speed of the second application.
[0337] 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.
[0338] 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.
[0339] 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.
[0340] 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.
[0341] 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 gear corresponding to the second application is the first gear (i.e., 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.
[0342] 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 (i.e., 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.
[0343] 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.
[0344] After the network speed of the second application is restored 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.
[0345] 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 the speed limit temperature C (hereinafter referred to as recovery temperature C) is 35 degrees, the recovery temperature corresponding to the speed limit temperature D (hereinafter referred to as recovery temperature D) is 38 degrees, the recovery temperature corresponding to the speed limit temperature E (hereinafter referred to as recovery temperature E) is 41 degrees, and determine that the recovery temperature corresponding to the speed limit temperature F (hereinafter referred to as recovery temperature F) is 44 degrees.
[0346] 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, based on the first temperature, that the target network speed gear corresponding to the second application is the first gear (i.e., unlimited speed). At this time, the electronic device may not adjust the network speed of the second application.
[0347] 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.
[0348] 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.
[0349] 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.
[0350] 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 has dropped to the recovery temperature D (for example, 38 degrees) or below, for example, if it is detected that the first temperature has dropped 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.
[0351] 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.
[0352] 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 the first temperature is detected to drop 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.
[0353] 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.
[0354] 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 the first temperature is detected to drop 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.
[0355] 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 speed of the electronic device, 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 jamming of the electronic device, and improve the user experience.
[0356] [Example 2]
[0357] See also Figure 5 , Figure 5A method for adjusting the network speed of a background application provided in the second embodiment of the present application is shown. 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. Figure 5 As shown, the method may include:
[0358] 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.
[0359] Exemplarily, 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.
[0360] Optionally, the preset application scenario can be determined based on the demand for network resources and resources such as processors in electronic devices 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).
[0361] It should be understood that the specific content of the preset scene D can refer to the specific content of the overload scene described in Example 1. In this embodiment, since 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 is different from the overload 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 a short video scene, rather than the preset scene D. In other words, except that the first application is a game application and a short video application, the overload scenes described in Example 1 can all be the preset scene D in this embodiment.
[0362] Exemplarily, the preset scene D may be a scene in which multiple applications are running 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 according to 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 scene to which the first application belongs is the preset scene D. The preset number may be determined as any value such as 2 or 3 according to the actual scene.
[0363] 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.
[0364] Exemplarily, the preset scene D may be a scene in which multiple applications are run in the foreground through pop-up windows. For example, when the electronic device runs 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.
[0365] Exemplarily, the preset scene D may be a scene in which multiple applications are run in the foreground through split screen and pop-up windows. For example, when the electronic device runs a game application and a video application in the foreground through split screen 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.
[0366] 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 the preset scene D based on the identification information of the application running in the foreground. When the first application running in the foreground is the preset application, the electronic device may determine that the application scene to which the first application belongs is the 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 the camera application, the electronic device may determine that the application scene to which the first application belongs is the preset scene D.
[0367] 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 occupancy of the preset function. For example, the preset function occupies a large CPU load when executed in the foreground. Therefore, when the foreground executes the preset function, the electronic device may determine that the application scene to which the first application belongs is the preset scene D. Among them, the preset functions may include a super desktop function, a car screen projection function, or a first unlocking function, etc.
[0368] For example, when the front end executes the super desktop function, the car screen projection function or the first unlocking function of the first application (such as a system application), the electronic device can determine that the application scene to which the first application belongs is the preset scene D.
[0369] Exemplarily, the preset scenario D may be a scenario in which the 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 occupancy of the preset task. For example, the 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. Among them, the preset 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.
[0370] Exemplarily, the electronic device may determine whether the application scenario to which the first application belongs is the preset scenario D according to the actual load of the electronic device. 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 according to the actual scenario, and this embodiment does not impose any specific limitation on this.
[0371] It should be noted that the method of determining that the application scenario to which the 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.
[0372] Exemplarily, the electronic device may determine the first application based on the name and / or code of the first application running in the foreground, thereby determining the application scenario to which the first application belongs. Exemplarily, 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.
[0373] 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).
[0374] 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., a long video or download scenario).
[0375] 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., a graphic application scenario).
[0376] For example, when the first application is determined to include 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 preset scenario D.
[0377] 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 preset scenario D.
[0378] For example, when the first application is determined to include 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 preset scene D.
[0379] 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.
[0380] Optionally, the first temperature may be a temperature acquired in real time by the electronic device, or may be a temperature acquired periodically by the electronic device. It is to be understood that this embodiment does not impose any restrictions on the specific value of the period for acquiring the temperature (hereinafter referred to as period A), which may be determined according to the actual scenario. For example, period A may be determined to be 5 seconds according to the actual scenario, that is, the electronic device may acquire the first temperature every 5 seconds. For example, period A may be determined to be 10 seconds according to the actual scenario, that is, the electronic device may acquire the first temperature every 10 seconds. For example, period A may be determined to be 1 minute according to the actual scenario, that is, the electronic device may acquire the first temperature every one minute, and so on.
[0381] Similarly, the first network speed may be a network speed acquired by the electronic device in real time, or may be a network speed acquired periodically by the electronic device. It is to be understood that this embodiment does not impose any restrictions on the specific value of the period for acquiring the network speed (hereinafter referred to as period B), which can be determined according to the actual scenario. For example, period B can be determined to be 5 seconds according to the actual scenario, that is, the electronic device can acquire the first network speed every 5 seconds. For example, period B can be determined to be 30 seconds according to the actual scenario, that is, the electronic device can acquire the first network speed every 30 seconds. For example, period B can be determined to be 5 minutes according to the actual scenario, that is, the electronic device can acquire the first network speed every 5 minutes, and so on.
[0382] 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.
[0383] 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.
[0384] Optionally, the second application may include one or more. That is, the electronic device may adjust the network speed of multiple applications running in the background according to 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 according to the application scenario, the first network speed and the first temperature.
[0385] In one example, when the application scenarios to which the first application belongs are different, the first application has different requirements for network resources, and therefore, the network speed limit for the second application is also different. Optionally, when the first application has a high demand for network resources, a stricter limit can be imposed on the network speed of the second application to reduce the occupation of network resources by the second application, ensure the network requirements of the first application, ensure the smoothness of the operation of the first application, and reduce the temperature rise rate of the electronic device to ensure the overall performance of the electronic device. When the first application has a low demand for network resources, a looser limit can be imposed on the network speed of the second application, that is, when the network requirements of the first application are not high, the second application can occupy more network resources to ensure the network speed of the second application, so that the second application can upload or download at a faster speed. In other words, the higher the demand for network resources of the first application, the stricter the network speed limit for the second application, that is, the smaller the network speed of the second application will be; the lower the demand for network resources of the first application, the looser the network speed limit for the second application, that is, the larger the network speed of the second application will be.
[0386] 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 smoothness of the operation of the first application and ensure 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 smoothness of the 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 occupation of network resources by the second application.
[0387] 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 limited; when the current temperature of the electronic device is lower, the network speed of the second application can be more loosely limited. 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 occupancy of network resources, avoid the second application and the first application from 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.
[0388] It should be noted that in the game or short video scene (i.e., preset scene A), that is, when the game application or short video application is running in the foreground, the foreground application generally requires a long period of high bandwidth to ensure the smoothness of the game or short video. In addition, because users generally click on the display interface frequently in games or short videos, the processor frequency and screen refresh rate of the electronic device are also high. Therefore, in preset scene A, the foreground application has a greater demand for network resources and processor resources.
[0389] In the long video or downloading scenario (i.e., preset scenario B), the foreground application generally requires high bandwidth for a long time, but the user will not frequently click on the display interface, that is, the processor frequency and screen refresh rate of the electronic device can be lower than the processor frequency and screen refresh rate of the electronic device in preset scenario A. Therefore, in preset scenario B, the foreground application's demand for network resources, processors and other resources can be lower than the foreground application's demand for network resources, processors and other resources in preset scenario A.
[0390] In the graphic application scenario (i.e., preset scenario C), the foreground application generally only needs high bandwidth for a short period of time or only needs low bandwidth, that is, the foreground application has low requirements for network resources, processors, etc. Therefore, in preset scenario C, the foreground application's requirements for network resources, processors, etc. can be lower than those in preset scenario B.
[0391] 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.
[0392] In one example, the electronic device may determine by default that the network resources and processor and other resources required by the foreground application in the preset scenario D may be higher than the network resources and processor and other resources required by the foreground application in the preset scenario A, the network resources and processor and other resources required by the foreground application in the preset scenario A may be higher than the network resources and processor and other resources required by the foreground application in the preset scenario B, and the network resources and processor and other resources required by the foreground application in the preset scenario B may be higher than the network resources and processor and other resources required by the foreground application in the preset scenario C. Therefore, under the same first network speed and the same first temperature, in the preset scenario D, the network speed restriction of the electronic device on the second application may be stricter than the network speed restriction of the electronic device on the second application in the preset scenario A; in the preset scenario A, the network speed restriction of the electronic device on the second application may be stricter than the network speed restriction of the electronic device on the second application in the preset scenario B; in the preset scenario B, the network speed restriction of the electronic device on the second application may be stricter than the network speed restriction of the electronic device on the second application in the preset scenario C.
[0393] 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 D can be lower than the network speed of the second application in preset scenario A, the network speed of the second application in preset scenario A can 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 can be lower than the network speed of the second application in preset scenario C.
[0394] In another example, the electronic device may determine by default that the network resources and processor and other 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 and other 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 and other 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 network speed restriction of the electronic device on the second application may be stricter than that in preset scenario D; in preset scenario D, the network speed restriction of the electronic device on the second application may be stricter than that in preset scenario B; in preset scenario B, the network speed restriction of the electronic device on the second application may be stricter than that in preset scenario C.
[0395] 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.
[0396] It should be noted that the above-mentioned preset application scenarios include 4, namely, preset scenario A, preset scenario B, preset scenario C and preset scenario D, which are only explained as examples and should not be understood as limiting the embodiment. The embodiment can also determine that the preset application scenarios include any number such as 3, 5 or 6 according to actual scenarios.
[0397] 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 the preset scenario D are higher than the network resources and processor and other resources required by the foreground application in the preset scenario A, the network resources and processor and other resources required by the foreground application in the preset scenario A are higher than the network resources and processor and other resources required by the foreground application in the preset scenario B, and the network resources and processor and other resources required by the foreground application in the preset scenario B are higher than the network resources and processor and other resources required by the foreground application in the 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.
[0398] Exemplarily, the electronic device may be provided with a correspondence between the speed limit temperature and the second network speed level in each preset scenario under each first network speed level. 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 may determine the first network speed level where 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 and the application scenario where the first network speed is located, so that 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 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.
[0399] 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 limitation on this.
[0400] Exemplarily, according to actual scenarios, it can be determined that the first network speed gear includes 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.
[0401] For example, according to the actual scenario, it can be determined that the network speed corresponding to the A gear is 10M / s or above, the network speed corresponding to the B gear is [3M / s, 10M / s) and the network speed corresponding to the C gear is [0M / s, 3M / s).
[0402] Exemplarily, 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. Among them, 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.
[0403] For example, according to 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.
[0404] Exemplarily, 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 the actual scenario. Among them, 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.
[0405] 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 are only explained for example and should not be understood as a limitation on this embodiment.
[0406] The following will take the example that 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 first gear, second gear, third gear, fourth gear, fifth gear and sixth gear as an example for exemplary explanation.
[0407] For example, under 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:
[0408] Table 15
[0409]
[0410]
[0411] 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.
[0412] 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.
[0413] 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.
[0414] 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.
[0415] When the first network speed gear is B, in the preset scene 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.
[0416] 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.
[0417] 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.
[0418] 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.
[0419] When the first network speed gear is C, in the preset scene 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.
[0420] 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.
[0421] 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.
[0422] 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.
[0423] That is to say, for 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.
[0424] 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.
[0425] 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.
[0426] 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.
[0427] 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.
[0428] 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.
[0429] 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.
[0430] 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.
[0431] 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 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 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.
[0432] 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.
[0433] 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.
[0434] 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.
[0435] It should be noted that for preset scenarios A, B, C and D, no matter which of 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.
[0436] 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 by default, the network speed corresponding to the second gear to be 4MB / s, the network speed corresponding to the third gear to be 2M / s, the network speed corresponding to the fourth gear to be 300KB / s, the network speed corresponding to the fifth gear to be 100KB / s, and the network speed corresponding to the sixth gear to be 0KB / s, that is, the sixth gear can be used to suspend uploading or downloading.
[0437] 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 network speed corresponding to the second gear is 5MB / s, the network speed corresponding to the third gear is 2M / s, the network speed corresponding to the fourth gear is 500KB / s, the network speed corresponding to the fifth gear is 100KB / s, and the network speed corresponding to the sixth gear is 0KB / s, that is, the sixth gear can be a file for pausing upload or download.
[0438] 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. The specific content can be referred to the description in Example 1, which will not be repeated here.
[0439] For example, when the first network speed gear is A, B or C, in the preset scene D, the electronic device can determine that the second network speed gear corresponding to the speed limit temperature G, the speed limit temperature H and the speed limit temperature I are the same, such as all corresponding to the fourth gear, and the second network speed gear corresponding to the speed limit temperature J is the fifth gear. Therefore, under each first network speed gear, in each preset scene, the corresponding relationship between the speed limit temperature and the second network speed gear can be as shown in the following Table 16:
[0440] Table 16
[0441]
[0442]
[0443] Optionally, the second application running in the background does not necessarily occupy network resources, and the network speed does not need to be adjusted for the second application that does not occupy network resources. That is, when adjusting the network speed for the second application, the electronic device can only adjust the network speed for the second application that occupies network resources.
[0444] 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, and the relevant content of adjusting the network speed only for the second application occupying network resources is not repeated here for the sake of brevity.
[0445] S504: When a change in the first temperature is detected, the electronic device determines a target network speed level corresponding to the second application according to the first network speed, the application scenario, and the changed first temperature, and adjusts the network speed of the second application according to the re-determined target network speed level.
[0446] 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 according to the first network speed, application scenario and the 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 according to the first network speed, application scenario and 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.
[0447] 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 less 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., unlimited speed gear) based on the first network speed, preset scenario A and the first temperature (for example, 36 degrees), that is, the network speed of the second application may not be limited.
[0448] If it is detected that the first temperature rises 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) according to the first network speed, the preset scenario A and the first temperature (e.g., 37 degrees). 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.
[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, and the first temperature after the drop is less than the speed limit temperature G, for example, if it is detected that the first temperature has dropped 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 drops, and ensure the upload or download speed of the second application.
[0450] If it is detected that the first temperature rises 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) according to 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 occupation of network resources by the second application.
[0451] After adjusting the network speed of the second application to the fourth gear (e.g., 500KB / s), if it is detected that the first temperature has dropped, and the first temperature after the drop is less than the speed limit temperature H, but greater than or equal to the speed limit temperature G, for example, if the first temperature is detected to drop 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 (e.g., 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.
[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 (i.e., the second network speed gear corresponding to the speed limit temperature I) according to the first network speed, the preset scenario A and the re-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.
[0453] After limiting the network speed of the second application to the fifth gear (e.g., 100KB / s), if it is detected that the first temperature has dropped, and the first temperature after the drop is less than the speed limit temperature I, but greater than or equal to the speed limit temperature H, for example, if the first temperature is detected to drop 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 (e.g., 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.
[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 (i.e., the second network speed gear corresponding to the speed limit temperature J) according to the first network speed, the preset scenario A and the re-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 0KB / s, to suspend the upload or download of the second application.
[0455] 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 first temperature after the drop is less than the speed limit temperature J, but greater than or equal to the speed limit temperature I, for example, if 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 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.
[0456] It is understandable that during the use of an electronic device, the temperature of the electronic device will generally fluctuate slightly, and this fluctuation will 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 this smaller fluctuation, rather than by a reduction in the load of the electronic device. Therefore, when this smaller temperature fluctuation causes the first temperature to be less than a certain speed limit temperature, readjusting the network speed of the second application will cause frequent adjustments to the network speed of the second application, reducing the accuracy of the network speed adjustment and reducing the user experience.
[0457] In another example, in order to improve the accuracy of network speed adjustment and enhance user experience, the electronic device may be provided with recovery temperatures corresponding to each speed limit temperature. After the network speed of the second application is adjusted to the second network speed gear 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 according to the first network speed, application scenario and the first temperature that is re-acquired, so as to avoid frequent adjustment of the network speed of the second application.
[0458] 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.
[0459] 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.
[0460] 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 35 degrees, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.
[0461] 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.
[0462] 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 41 degrees, the electronic device will readjust the network speed of the second application according to the first network speed, application scenario and first temperature.
[0463] 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.
[0464] 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 less 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 may not be limited.
[0465] If it is detected that the first temperature rises 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 according to the first network speed (i.e., gear B), the preset scenario B, and the re-acquired first temperature (e.g., 37 degrees). 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.
[0466] 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 drops 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. B gear), 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.
[0467] If it is detected that the first temperature rises 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 according to the first network speed (i.e., gear B), the preset scenario B, 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 occupation of network resources by the second application.
[0468] After adjusting the network speed of the second application to the fourth gear (e.g., 500KB / s), if it is detected that the first temperature drops 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 according to the first network speed (i.e., gear B), the preset scene B, and the re-acquired first temperature (e.g., 38 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 2M / s.
[0469] 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 according to the first network speed (i.e., gear B), the preset scenario B, and the re-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.
[0470] After adjusting the network speed of the second application to the fifth gear (e.g., 100KB / s), if it is detected that the first temperature drops to the recovery temperature I (e.g., 41 degrees), the electronic device can determine that the target network speed gear corresponding to the second application is the fourth gear according to the first network speed (i.e., gear B), the preset scenario B, and the re-acquired first temperature (e.g., 41 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.
[0471] 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 according to the first network speed (i.e., gear B), the preset scenario B, and the re-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 0KB / s.
[0472] After adjusting the network speed of the second application to the sixth gear (e.g., 0KB / s), if it is detected that the first temperature drops 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 according to the first network speed (i.e., gear B), the preset scenario B, and the re-acquired first temperature (e.g., 44 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.
[0473] 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.
[0474] 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.
[0475] 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 redetermine the target network speed gear corresponding to the second application according to 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 redetermined target network speed gear.
[0476] For example, when it is determined that the application scenario to which the first application belongs is preset scenario C (i.e., a graphic application scenario), the first network speed gear of the first network speed 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., preset scenario C) and the first temperature (e.g., 37 degrees), that is, the network speed of the second application may not be limited.
[0477] When it is detected that the first network speed has changed, and the first network speed gear where 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 according to the first network speed (i.e. gear B), the application scenario (i.e. preset scenario C) and the first temperature (e.g. 37 degrees). 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.
[0478] When it is detected that the first network speed has changed, and the first network speed gear where 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 the third gear 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). 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 2M / s.
[0479] It should be noted that when both the first network speed and the first temperature change, the electronic device can redetermine 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 redetermined target network speed gear.
[0480] 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 the first 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, thereby accurately adjusting the network speed of the second application according to the actual demand of the first application for network resources and the first network speed and the first temperature of the electronic device, ensuring that network resources meet the needs of the first application, ensuring the smoothness of the operation of the first application, reducing the temperature rise speed of the electronic device, ensuring the overall performance of the electronic device, avoiding 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 improving the user experience.
[0481] 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 the present application.
[0482] Corresponding to the network speed adjustment method for background applications described in the above embodiments, an 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.
[0483] 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 the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0484] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which will not be repeated here.
[0485] The present application also provides an electronic device, the 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, wherein when the processor executes the computer program, the electronic device implements the steps in any of the above-mentioned method embodiments. Exemplarily, the structure of the electronic device can be as follows: Figure 1 shown.
[0486] 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 implements the steps in any of the above method embodiments.
[0487] An embodiment of the present application provides a computer program product. When the computer program product is executed on an electronic device, the electronic device implements the steps in any of the above method embodiments.
[0488] 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, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, 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 and a telecommunication signal.
[0489] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0490] Those of ordinary skill 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 to be beyond the scope of this application.
[0491] 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 only a logical function division. There may be other division methods in actual implementation, 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.
[0492] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0493] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope 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 the current temperature of the electronic device; According to the first temperature, a 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 applications include camera applications, game applications or short video applications.
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.