CN114895948A - Application program processing method and device, electronic equipment and readable storage medium - Google Patents

Application program processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114895948A
CN114895948A CN202210706479.5A CN202210706479A CN114895948A CN 114895948 A CN114895948 A CN 114895948A CN 202210706479 A CN202210706479 A CN 202210706479A CN 114895948 A CN114895948 A CN 114895948A
Authority
CN
China
Prior art keywords
processing
electronic device
program
application
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210706479.5A
Other languages
Chinese (zh)
Inventor
胡道旭
王彬
杨福藤
李杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210706479.5A priority Critical patent/CN114895948A/en
Publication of CN114895948A publication Critical patent/CN114895948A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses an application program processing method and device, electronic equipment and a readable storage medium. The method comprises the following steps: detecting whether the electronic equipment meets a program processing condition or not in response to the completion of the data update of the first operating system; and if the program processing condition is met, processing the application program in the electronic equipment so that the application program is adaptive to the first operating system after the data is updated. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.

Description

Application program processing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application processing method and apparatus, an electronic device, and a readable storage medium.
Background
Electronic devices are generally upgraded to enable the updating of functions. In the process of upgrading the system of the electronic equipment, processing operation is performed on the application program in the electronic equipment. However, the timing of triggering the processing operation on the application program is not flexible enough.
Disclosure of Invention
In view of the foregoing problems, the present application provides an application processing method, an application processing apparatus, an electronic device, and a readable storage medium to improve the foregoing problems.
In a first aspect, the present application provides an application processing method, applied to an electronic device, the method including: detecting whether the electronic equipment meets a program processing condition or not in response to the completion of the data update of the first operating system; and if the program processing condition is met, processing the application program in the electronic equipment so that the application program is adaptive to the first operating system after the data is updated.
In a second aspect, the present application provides an application processing apparatus, running on an electronic device, the apparatus including: a condition detection unit for detecting whether the electronic device satisfies a program processing condition in response to completion of data update of the first operating system; and the program processing unit is used for processing the application program in the electronic equipment if the program processing condition is met so as to enable the application program to adapt to the first operating system with the updated data.
In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium having program code stored therein, wherein the method described above is performed when the program code is executed.
According to the application program processing method and device, the electronic device and the readable storage medium, whether the electronic device meets the program processing condition is detected in response to the completion of data updating of the first operating system, and if the program processing condition is met, the application program in the electronic device is processed so that the application program can adapt to the first operating system subjected to data updating. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an operating environment of an application processing method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an application processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a switching control in an embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for processing an application according to another embodiment of the present application;
FIG. 5 is a flow chart illustrating a method for processing an application according to yet another embodiment of the present application;
FIG. 6 is a flow chart illustrating a method for processing an application according to yet another embodiment of the present application;
fig. 7 is a schematic diagram illustrating an application scenario of the application processing method according to an embodiment of the present application;
fig. 8 is a block diagram showing a structure of an application processing apparatus proposed in the present application;
fig. 9 is a block diagram showing another application processing apparatus proposed in the present application;
fig. 10 shows a block diagram of an electronic device for executing an application processing method according to an embodiment of the present application.
Fig. 11 is a storage unit for storing or carrying a program code for implementing an application processing method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the development of technology, developers can continuously develop new functions for electronic devices, and system upgrade can be performed on the electronic devices in order to enable the electronic devices to realize the new functions. After the system upgrade is performed on the electronic device, in order to enable the application program in the electronic device to adapt to the upgraded operating system, the application program in the electronic device is processed. For example, a compilation optimization (dex2oat) may be performed on an application in the electronic device.
However, the inventor finds in research that the related electronic device is not flexible enough in the timing of performing application processing after the system upgrade is completed. For example, the related electronic device usually performs processing of the application program immediately after completing system upgrade, which not only is not flexible in processing time, but also causes the overall time for system upgrade to be longer.
Therefore, the application processing method, the application processing device, the electronic device and the readable storage medium are provided, and in response to completion of data update of the first operating system, whether the electronic device meets a program processing condition is detected, and if the program processing condition is met, the application program in the electronic device is processed to adapt to the first operating system subjected to data update. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.
A scenario related to the embodiment of the present application will be described below.
Referring to fig. 1, the scenario of fig. 1 includes a plurality of electronic devices 100 and a server 200. Wherein, a plurality of electronic devices 100 interact data with the server 200 through the network. The application program is provided in each of the plurality of electronic apparatuses 100. In one manner, the server 200 may transmit the file 110 for updating the operating system to the electronic device 100 after detecting that the operating system has data update, and then the electronic device 100 may update the local operating system with the data according to the file 110. Furthermore, the electronic device 100 may synchronize some information in the process of operation to the server 200 as a way. For example, the electronic apparatus 100 may transmit processing whether or not to perform an application after performing data update of the operating system to the server 200, and in the case where the application processing is performed, the number of applications processed and the list may be synchronized to the server 200. Alternatively, the electronic device 100 may store the information to be transmitted in the file 120, so that the transmission of the information is realized by transmitting the file 120 to the server 200.
The present disclosure will now be described with reference to specific embodiments.
Referring to fig. 2, an application processing method provided by the present application is applied to an electronic device, and the method includes:
s110: in response to completion of the first operating system data update, detecting whether the electronic device satisfies a program processing condition.
In the embodiment of the present application, the first operating system may be understood as an operating system currently used in the electronic device, or may also be understood as an operating system currently in an idle state in the electronic device. In one way, if there is only one operating system in the electronic device, the first operating system in the electronic device may be understood as the operating system currently in use, where the operating system in use may be understood as the operating system on which the electronic device depends when implementing the given function. For example, when an application program is run in an electronic device, the application program is controlled by an operating system used by the electronic device. The control includes starting, memory allocation, and shutdown of the application program. Alternatively, the electronic device includes a plurality of operating systems, for example, a first operating system and a second operating system, and the electronic device currently uses the second operating system.
The updating of the data of the first operating system may include upgrading the data of the first operating system or downgrading the data of the first operating system. Performing a data upgrade on the first operating system may be understood as replacing data of the first operating system with an updated version, and correspondingly performing a data downgrade on the first operating system may be understood as replacing data of the first operating system with a historical version.
In addition, the first operating system in the embodiment of the present application may perform data update of the operating system by an OTA (Over-the-Air Technology) manner.
In the embodiment of the present application, the program processing condition is a condition for detecting whether or not to start processing an application program of the electronic device. It should be noted that, after the first operating system of the electronic device performs data update, the electronic device subsequently uses the first operating system that will perform data update, and during the process of using the first operating system that performs data update, the application program in the electronic device will run in the first operating system that performs data update, and in order to make the application program in the electronic device better adapt to the first operating system that performs data update, the application program in the electronic device will be processed after the first operating system performs data update.
One principle of detecting whether to start processing an application program of the electronic device is to enable the electronic device to process the application program without affecting normal use of the electronic device by a user. By one approach, the program processes conditions, including at least one of: the temperature of the electronic equipment meets a first temperature condition; the electric quantity of the electronic equipment meets a first electric quantity condition; and the electronic device is in an idle state.
The first temperature condition may include that the current temperature of the electronic device is not greater than a first temperature threshold, or that the current temperature of the electronic device is within a first temperature interval. In addition, the electronic device uses processing resources (e.g., resources such as a processor) of the electronic device in the process of processing the application program. Therefore, the electronic device generates more heat, and in this case, if the electronic device itself is already at a relatively high temperature, the electronic device still performs processing of the application program, which may cause the heat generation of the electronic device to be more serious, and further may affect the experience of the user using the electronic device.
The first power condition may include that the current power of the electronic device is not lower than a first power threshold, or that the current power of the electronic device is within a first power interval. It should be noted that, in the process of processing the application program, the electronic device may use processing resources (e.g., resources such as a processor) of the electronic device, so that the electronic device may consume more power, in this case, if the electronic device itself already has insufficient power, and still performing the processing of the application program may cause the power consumption of the electronic device to be faster, and further may affect the user experience of using the electronic device.
Furthermore, in the embodiment of the present application, whether the electronic device is in the idle state may be determined in various ways.
As one way, it may be determined that the electronic device is in an idle state in a case where it is detected that the screen of the electronic device is in a screen-rest state. Optionally, in this manner, under the condition that the electronic device is in the screen-off state, the duration that the screen of the electronic device is in the screen-off state may be further detected, and if the duration that the screen of the electronic device is in the screen-off state is greater than the specified duration, it is determined that the electronic device is in the idle state. It should be noted that in some cases, the screen of the electronic device may be temporarily stopped, for example, when the user is not convenient to hold the electronic device, the electronic device may be stopped and placed elsewhere. For another example, the user may turn the screen of the electronic device to a screen by a wrong operation. Therefore, under the condition that the screen of the electronic equipment is detected to be in the screen-saving state, the duration of the screen of the electronic equipment in the screen-saving state is further detected, and whether the electronic equipment is in the idle state or not is determined more accurately.
Alternatively, the time duration that the electronic device is in the stationary state may be detected to determine whether the electronic device is in the idle state. It should be noted that, a user may hold the electronic device during using the electronic device, and then the electronic device may shake from time to time, so that if the electronic device detects that the electronic device is still for a long time, it may be determined that the user is not currently using the electronic device, and then it may be determined that the electronic device is in an idle state.
As yet another way, whether the electronic device is currently in an idle state may be detected to determine whether the electronic device is in an idle state. It should be noted that, in some time periods, the user may not use the electronic device. For example, in the late night, the user is already in the sleep state and the electronic device is used, in this case, the time between 0 and 6 a.m. may be used as the idle period to determine that the electronic device is in the idle state during the idle period. Optionally, the electronic device may further record the running time of the application, and then use the longest time period during 24 hours during which the application is not recorded to run as the idle time period. That is, in this case, the electronic device may obtain a plurality of periods in which the application is not recorded to be operated, and then select the longest period from the plurality of periods in which the application is not recorded to be operated as the idle period. Wherein, the time period in which the application program is not recorded represents that no application program is operated in the time period. Wherein the absence of application execution may include at least one of absence of foreground application execution and absence of background application execution.
S120: and if the program processing condition is met, processing the application program in the electronic equipment so that the application program is adaptive to the first operating system after the data is updated.
When the electronic device is detected to meet the program processing condition currently, the representation of the currently executed application program does not greatly affect the use of the electronic device by the user, and the application program in the electronic device can be started to be processed.
It should be noted that, the processing of the application program is to make the processed application program adaptable to the first operating system after data update. In the embodiment of the present application, there may be various embodiments for processing an application program.
One way, processing the application includes performing compilation optimization on the application. It should be noted that, in the process of running the application program, in order to enable the code of the application program to be run by the electronic device, the code of the application program is converted into the machine code, and if the code of the application program is converted into the machine code in real time each time the application program is run, the running time of the application program may be increased. In this way, the machine code corresponding to the application program can be obtained in advance by performing compilation optimization on the application program. Moreover, after the first operating system of the electronic device performs data updating, the obtained machine code can be more suitable for the first operating system after the data updating by performing compiling optimization on the application program. For example, after the data of the first operating system is updated, the system file included in the first operating system after the data update is changed or the program function supported by the first operating system after the data update is changed, and then the application program is compiled and optimized again, so that the machine code obtained by the compilation and optimization can be adapted to the rule defined by the changed system file in the first operating system after the data update, or the machine code obtained by the compilation and optimization can realize the program function supported by the first operating system after the data update.
As yet another approach, processing the application includes modifying a configuration file of the application to make parameters in the configuration file more adaptive to the first operating system after the data update. It should be noted that some operation modes of the application program during the operation process may be determined based on the configuration file corresponding to the application program. For example, some parameters of the application program in the running process may be recorded in the configuration file corresponding to the application program, where the parameters include allocated memory, the rights of the electronic device that can be used, and the like. After the first operating system performs data update, the first operating system performing the data update may redefine a control manner of the application program, where the control manner includes the amount of memory that can be allocated by the application program in the running process, or a memory allocation manner of the application program, or a right that can be realized by the application program. In order to enable the application program to better adapt to the control mode redefined by the first operating system after data updating, the configuration file of the application program may be modified.
It should be noted that, for the electronic device, the first operating system and the second operating system may be included, and in one case, the electronic device may perform data update on one operating system when the other operating system is used, so that the data update operation performed on the operating system does not affect the normal use of the electronic device by the user. For example, the electronic device may be run based on the second operating system before detecting whether the electronic device satisfies the program processing condition in response to completion of the data update of the first operating system. In this way, the switching control is displayed in response to completion of data update of the first operating system, and if a touch operation is performed on the switching control, the electronic device is triggered to switch to the first operating system after data update to run.
For example, as shown in fig. 3, after the electronic device completes data update of the first operating system, in a case of switching to a display system update information display interface, prompt information with content of "system data update completed" may be displayed in the system update information display interface, and a switching control named "switching system" is displayed, if a group is used for touch operation of the switching control, the electronic device may be triggered to restart, and after restarting, the electronic device may be switched to run based on the first operating system after data update. The switching control is displayed, so that a user can manually trigger the electronic equipment to immediately switch the system after the data of the first operating system is updated according to the use requirement of the user, the system does not need to be switched after the application program is processed, and the time for upgrading the system due to the processing of the application program is prolonged.
In one embodiment, the processing the application program in the electronic device when the program processing condition is satisfied further includes: and the electronic equipment is switched to run based on the first operating system after the data updating. In this way, after the electronic device completes processing of the application program, the electronic device is automatically restarted, and then is switched to operate based on the first operating system subjected to data update.
It should be noted that, after it is detected that the program processing condition is satisfied, the first operating system may be mounted, so that the electronic device may read a file included in the first operating system after data update, so as to process the application program based on the file.
In the application processing method provided in this embodiment, in response to completion of data update of the first operating system, whether the electronic device meets a program processing condition is detected, and if the program processing condition is met, the application program in the electronic device is processed, so that the application program is adapted to the first operating system after the data update. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.
Referring to fig. 4, an application processing method provided by the present application is applied to an electronic device, and the method includes:
s210: in response to completion of the first operating system data update, detecting whether the electronic device satisfies a program processing condition.
S220: and if the program processing condition is met, processing the application program in the electronic equipment so that the application program is adaptive to the first operating system after the data is updated.
S230: in the process of processing an application program in the electronic equipment, whether the electronic equipment meets a processing stop condition is detected.
As described above, since the electronic device generates more heat and consumes more power during the processing of the application, it is possible to detect whether the processing stop condition is satisfied during the processing of the application after the electronic device has been triggered to perform the processing of the application in order to avoid excessive heat generation and excessive power consumption of the electronic device due to the processing of the application. That is, the processing stop condition is a condition for triggering the electronic apparatus to stop the processing in the course of performing the program processing. By one approach, the process stop condition includes at least one of the following conditions: the temperature of the electronic equipment meets the second temperature condition, the electric quantity of the electronic equipment meets the second electric quantity condition, and the electronic equipment is in a use state.
The second temperature condition may include that the current temperature of the electronic device is greater than a second temperature threshold, or that the current temperature of the electronic device is within a second temperature interval. The second temperature threshold may be the same as or different from the first temperature threshold, for example, the second temperature threshold may be greater than the first temperature threshold. Correspondingly, the lowest temperature value in the second temperature interval may be higher than the highest temperature value in the first temperature interval.
Furthermore, in the embodiment of the present application, whether the electronic device is in the use state may be determined in various ways.
As one way, it may be determined that the electronic device is in a use state in a case where it is detected that a screen of the electronic device is in a bright screen. Optionally, in this manner, under the condition that the electronic device is in a bright screen, the duration that the screen of the electronic device is in the bright screen may be further detected, and if the duration that the screen of the electronic device is in the bright screen is greater than the specified duration, it is determined that the electronic device is in the use state. It should be noted that in some cases, the screen of the electronic device may briefly turn on, for example, when the user temporarily views the received message. As another example, the user may briefly light up the screen for a query of some time or weather, etc. Therefore, under the condition that the screen of the electronic equipment is detected to be in the bright screen state, the duration of the screen of the electronic equipment in the bright screen state is further detected, and whether the electronic equipment is in the use state or not is more accurately determined.
Alternatively, the time length of the electronic device in the standing state may be detected to determine whether the electronic device is in the use state. It should be noted that, a user may hold the electronic device during using the electronic device, and then the electronic device may shake from time to time, so that if the electronic device detects that the electronic device is still for a long time, it may be determined that the user is not currently using the electronic device, and then it may be determined that the electronic device is in an idle state. Correspondingly, if the electronic equipment detects that the time length of the electronic equipment in the standing state is not more than the specified time length, the electronic equipment can be determined to be in the use state.
As still another way, whether the electronic device is currently in use may be detected for a predetermined idle period. It should be noted that, in some time periods, the user may not use the electronic device. For example, in late night, the user is already in a sleep state and then the electronic device is used, in this case, a time period from 0 point to 6 points in the morning may be used as an idle time period to determine that the electronic device is in an idle state in the idle time period, and correspondingly, if the current time is not in the idle time period, the electronic device is determined to be in a use state.
Optionally, the electronic device may further record the running time of the application, and then use the longest time period during 24 hours during which the application is not recorded to run as the idle time period. That is, in this case, the electronic device may obtain a plurality of periods in which the application is not recorded to be operated, and then select the longest period from the plurality of periods in which the application is not recorded to be operated as the idle period. Wherein, the time period in which the application program is not recorded represents that no application program is operated in the time period. Wherein the absence of application execution may include at least one of absence of foreground application execution and absence of background application execution.
S240: and if the electronic equipment is detected to meet the processing stop condition, stopping processing.
It should be noted that, after the electronic device stops processing the application program, the temperature of the electronic device may be effectively reduced, and the electronic device may have a longer duration, or may not seize processing resources of the electronic device, so that the user may be effectively prevented from being affected by using the electronic device, and the user experience may be improved.
As described above, in the embodiment of the present application, there may be a plurality of processing contents for processing an application program. Different processing contents are different for the resource consumption (processor resources, power, etc.) of the electronic device. For example, compiling an application to optimize may consume more resources than modifying a configuration file of an electronic device. For an operating system, the updated content may be different each time a data update is made. For example, in some cases, after updating data of the first operating system, only compilation optimization or configuration file modification may be performed on the application program, and in other cases, after updating data of the first operating system, both compilation optimization and configuration file modification may be performed on the application program.
The electronic device may determine the current program processing condition according to the content of the first operating system performing data update this time under the condition that the different processing contents cause different resource consumptions of the electronic device and thus different temperature rise and power consumption degrees of the electronic device. The more resources are consumed in the process of processing the application program, the higher the triggering difficulty represented by the determined program processing condition is, and the influence on the normal use of the electronic equipment caused by the processing of the application program is reduced.
For example, taking the example that the program processing conditions include the aforementioned first temperature condition, if the processing to be performed on the application program after the data update of the first operating system is acquired includes modifying the configuration file of the application program, the first temperature threshold included in the first temperature condition is T1, if the processing to be performed on the application program after the data update of the first operating system is acquired includes performing compilation optimization on the application program, the first temperature threshold included in the first temperature condition is T2, and if the processing to be performed on the application program after the data update of the first operating system is acquired includes performing compilation optimization on the application program and modifying the configuration file of the application program, the first temperature threshold included in the first temperature condition is T3. Wherein T1 is greater than T2 and T2 is greater than T3. As can be seen from this example, as the resources to be consumed in the processing of the application increase, the lower the determined first temperature threshold value is, and thus the higher the threshold for triggering the processing of the application is, so as to prevent the temperature of the electronic device from increasing too high due to the processing operation of the application.
For another example, taking the program processing condition including the foregoing first electric quantity threshold as an example, if the processing that needs to be performed on the application after the data update of the first operating system is obtained and includes modifying the configuration file of the application, the first electric quantity threshold included in the first electric quantity condition is E1, if the processing that needs to be performed on the application after the data update of the first operating system is obtained and includes compiling and optimizing the application, the first electric quantity threshold included in the first electric quantity condition is E2, and if the processing that needs to be performed on the application after the data update of the first operating system is obtained and includes compiling and optimizing the application and modifying the configuration file of the application, the first electric quantity threshold included in the first electric quantity condition is E3. Wherein E1 is less than E2 and E2 is less than E3. As can be seen from this example, as the resources to be consumed in the processing of the application increase, the higher the determined first power threshold is, and thus the higher the threshold for triggering the application processing is, so as to prevent the remaining power of the electronic device after the application processing is too low due to the processing operation of the application.
In this case, if it is detected that the program processing condition is satisfied again by the electronic device, the remaining unprocessed application programs may be continuously processed. The remaining unprocessed applications may not be processed further.
According to the application program processing method provided by the embodiment, after the first operating system is upgraded, the application program is not processed immediately, but the processing of the application program is triggered when the electronic device is detected to meet the program processing condition, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved. In addition, in the embodiment, in the process of processing the application program, when it is detected that the processing stop condition is met, the application processing can be stopped in real time, so that the temperature abnormality of the electronic device, or the excessive reduction of the electric quantity, or the influence on the use of the electronic device by the user, caused by the continuous processing of the application program, can be avoided.
Referring to fig. 5, an application processing method provided by the present application is applied to an electronic device, and the method includes:
s310: in response to completion of the first operating system data update, detecting whether the electronic device satisfies a program processing condition.
S320: and if the program processing condition is met, determining a target application program from the application programs in the electronic equipment.
In the case where the processing of the application is large, if all the applications are processed, the resource consumed by the electronic device may be large. As one mode, if the program processing condition is satisfied, determining a target application program from application programs in the electronic device includes: and if the program processing conditions are met, selecting a preset number of application programs from the application programs in the electronic equipment as target application programs. In this way, the electronic device may process only a portion of the applications to reduce the number of applications that are processed.
In the case where only a part of the applications in the electronic device are processed, there may be various ways of determining the target application that needs to be processed.
As one approach, the electronic device may select a preset number of applications from the applications in the electronic device as target applications based on the resources consumed by the applications during the compilation process. In this way, the electronic device may acquire the resources to be consumed by each application program for processing, then perform ranking based on the resources consumed by each application program in the processing process, and then use the preset number of application programs ranked in the top as the target application program. Exemplary applications in the electronic device include application a, application B, application C, application D, and application E. The results obtained by sorting the resources consumed by each of the application programs a, B, C, D and E in the application program processing process include: application E consumes more resources than application D, application D consumes more resources than application a, application a consumes more resources than application B, and application B consumes more resources than application C. In this case, if the preset number of selected processes is 3, the determined target application programs may include application program E, application program D, and application program a.
Alternatively, the electronic device may determine the target application according to the frequency of use or the number of uses of the application. It should be noted that, in the case that the number of the applications in the electronic device is large, the applications that the user may use frequently are also part of the applications, and another part of the applications may be used occasionally and may not be used by the user even for a long time. Alternatively, the electronic device may sort the applications based on the frequency or number of times of use of the applications, and then use a preset number of applications sorted in the top as the target applications.
Exemplary applications in the electronic device include application a, application B, application C, application D, and application E. The results obtained by sorting the respective use frequencies of the application program a, the application program B, the application program C, the application program D, and the application program E include: the frequency of use of application a is greater than the frequency of use of application C, the frequency of use of application C is greater than the frequency of use of application B, the frequency of use of application B is greater than the frequency of use of application E, and the frequency of use of application E is greater than the frequency of use of application D. In this case, if the preset number of selected processes is 3, the determined target application programs may include application program a, application program C, and application program B.
S330: and processing the target application program so that the application program adapts to the first operating system after the data is updated.
According to the application program processing method provided by the embodiment, after the first operating system is upgraded, the application program is not processed immediately, but the processing of the application program is triggered when the electronic device is detected to meet the program processing condition, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved. In addition, in this embodiment, instead of processing all the application programs in the electronic device, only a part of the application programs (target application programs) may be selected for processing, and thus the effectiveness of the application programs after the operating system data update is performed may be improved.
Referring to fig. 6, an application processing method provided by the present application is applied to an electronic device, and the method includes:
s410: in response to completion of the first operating system data update, detecting whether the electronic device satisfies a program processing condition.
S420: and if the program processing condition is met, acquiring a first application program and a second application program in the application programs included in the electronic equipment.
As indicated above, not all applications in an electronic device are used by a user often. In this case, in addition to processing a part of the applications and not processing the other part of the applications as shown in the foregoing embodiment, each application may be processed in a different manner as shown in this embodiment, and the applications in the electronic device may be divided into a first application and a second application in order to facilitate the different processing manners for the different applications.
S430: the method comprises the steps of processing a first application program based on a first processing mode and processing a second application program based on a second processing mode, wherein the first processing mode and the second processing mode respectively correspond to different processing contents.
Take the example that processing the application includes compiling the application to optimize. The first processing mode adopted by the first application program comprises compiling and optimizing the first application program based on a verify mode, and the second processing mode adopted by the second application program comprises compiling and optimizing the second application program based on a speed-profile mode. And only running DEX code verification of the first application program in the process of compiling and optimizing the first application program based on the verify mode. In the process of compiling and optimizing the second application program based on the speed-profile mode, besides running DEX code verification of the second application program, AOT (ahead of time) compiling is carried out on part of methods in the code of the second application program.
In the embodiment of the present application, the first application and the second application may be determined in various ways.
As one way, the first application and the second application may be divided based on the frequency of use of the applications. In this way, the application program with the use frequency lower than the frequency threshold value can be used as the first application program, and the application program with the use frequency higher than the frequency threshold value can be used as the second application program, and correspondingly, the content of the processing corresponding to the first processing mode is less than the content of the processing corresponding to the second processing mode. As another way, the first application and the second application may be divided based on the number of uses of the applications. In this manner, an application program whose number of uses is lower than the number threshold may be used as the first application program, and an application program whose number of uses is higher than the number threshold may be used as the second application program. As yet another approach, the first application and the second application may be divided based on the most recent time of use of the applications. In this manner, an application program whose last usage time is earlier than the time threshold may be used as the first application program, and an application program whose last usage time is later than the time threshold may be used as the second application program.
Furthermore, the first application program and the second application program can be determined jointly by combining at least two items of the use frequency, the use times and the last use time. For example, an application program with a frequency of use lower than a frequency threshold, a number of uses lower than a number of times threshold, and a last time of use earlier than a time threshold may be used as the first application program, and another application program may be used as the second application program. Furthermore, the application program with the usage frequency lower than the frequency threshold and the usage frequency lower than the frequency threshold may be used as the first application program, and another application program may be used as the candidate application program, and then the application program with the latest usage time earlier than the time threshold in the candidate application program may also be used as the first application program, and the application program with the latest usage time later than the time threshold in the candidate application program may be used as the second application program. Correspondingly, in this mode, the content of the processing corresponding to the first processing mode is less than the content of the processing corresponding to the second processing mode.
According to the application program processing method provided by the embodiment, after the first operating system is upgraded, the application program is not processed immediately, but the processing of the application program is triggered when the electronic device is detected to meet the program processing condition, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved. In addition, in the embodiment, in the processing process of the application program after the data update of the operating system is completed, the application program is divided into the first application program and the second application program, so that the processing of the application program can be performed with pertinence to different application programs, and the flexibility of the processing of the application program is further improved.
It should be noted that, in order to make the set program processing conditions better adapt to the actual situation, as a way to detect whether the electronic device satisfies the program processing conditions in response to the completion of the data update of the first operating system, the method includes: in response to completion of the first operating system data update, it is detected whether the electronic device satisfies a locally stored program processing condition. In this manner, the electronic device can receive the updated program processing conditions pushed by the server and replace the locally stored program processing conditions with the updated program processing conditions. It should be noted that, the electronic device may send the application processing condition performed after the operating system is updated to the server, so that the server may know the implementation condition of the currently determined program processing condition, and further determine whether to update the current program processing condition according to the implementation condition.
For example, if the number of applications that need to be processed corresponding to the current program processing condition is 10, but only 2 applications are actually processed based on the current program processing condition, or the processing of the applications is not triggered, and it may be that the current program processing condition does not adapt, the updated program processing condition may be pushed to the electronic device, so that the electronic device determines whether to trigger the processing of the applications based on the updated program processing condition.
Next, a flowchart of a scenario involved in the embodiment of the present application will be described with reference to fig. 7. In the scenario shown in fig. 7, the electronic device may include an a operating system and a B operating system. As shown in fig. 7, the electronic device may first receive the server data. Wherein the received server data may include data to upgrade the B operating system. After the electronic device receives the server data, as a way, the data of the B operating system can be upgraded. After the data of the B operating system is completed, the electronic equipment can be switched to the B operating system in response to manual operation of a user, so that the electronic equipment can be switched to the B operating system in time to run.
Alternatively, the electronic device may detect a condition of the electronic device after receiving the server data to determine whether the electronic device satisfies the program processing condition. The electronic device can acquire the current configuration to detect whether the sub-device meets the program processing condition. And, the configuration can be pushed by the server. In the case where the electronic device satisfies the program processing condition, application processing (e.g., compiling optimization of the application) may be started. In the processing process of the application program, one condition is that the electronic device can smoothly complete the processing of the established application program, another condition is that the user can manually trigger the switching of the operating system in the processing process, and still another condition is that the electronic device automatically stops processing the application program, and no matter which of the three conditions is, the switching to the upgraded B operating system can be triggered. It is understood that after the electronic device switches to the upgraded B operating system, the a operating system is in an idle state.
Referring to fig. 8, an application processing apparatus 500 provided by the present application runs on an electronic device, and the apparatus 500 includes:
a condition detecting unit 510, configured to detect whether the electronic device satisfies a program processing condition in response to completion of data update of the first operating system;
the program processing unit 520 is configured to process the application program in the electronic device if the program processing condition is met, so that the application program adapts to the first operating system after the data is updated.
As one mode, the program processing unit 520 is further configured to detect whether the electronic device satisfies a processing stop condition during processing of the application program in the electronic device; and if the electronic equipment is detected to meet the processing stop condition, stopping processing. Wherein the processing stop condition includes at least one of the following conditions: the temperature of the electronic equipment meets a second temperature condition; the electric quantity of the electronic equipment meets a second electric quantity condition; and the electronic device is in use.
As one mode, the program processing unit 520 is specifically configured to determine a target application program from application programs in the electronic device if the program processing condition is met; and processing the target application program. Optionally, the program processing unit 520 is specifically configured to select a preset number of application programs from the application programs in the electronic device as the target application program if the program processing condition is met. Optionally, the program processing unit 520 is specifically configured to select a preset number of application programs from the application programs in the electronic device as target application programs based on resources consumed by the application programs in the compiling process.
As one mode, the program processing unit 520 is specifically configured to, if the program processing condition is met, obtain a first application program and a second application program in application programs included in the electronic device; the method comprises the steps of processing a first application program based on a first processing mode and processing a second application program based on a second processing mode, wherein the first processing mode and the second processing mode respectively correspond to different processing contents.
In one way, the condition detecting unit 510 is specifically configured to detect whether the electronic device satisfies the locally stored program processing condition in response to completion of the first operating system data update. In this manner, the condition detecting unit 510 is further specifically configured to receive the updated program processing conditions pushed by the server, and replace the locally stored program processing conditions with the updated program processing conditions.
In one mode, the program processing unit 520 is further configured to switch to run based on the first operating system after the application program in the electronic device is processed.
As shown in fig. 9, the apparatus 500 further comprises:
and the control display unit 530 is configured to display a switching control in response to completion of data update of the first operating system, and if a touch operation is performed on the switching control, trigger the electronic device to switch to the first operating system after data update to operate.
In this embodiment, an application processing apparatus detects whether an electronic device meets a program processing condition in response to completion of data update of a first operating system, and processes an application in the electronic device if the program processing condition is met, so that the application adapts to the first operating system after data update. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.
An electronic device provided by the present application will be described with reference to fig. 10.
Referring to fig. 10, based on the foregoing application processing method and apparatus, another electronic device 200 capable of executing the foregoing application processing method is further provided in the embodiment of the present application. The electronic device 200 includes one or more processors 102 (only one shown), memory 104, and network module 106 coupled to each other. The memory 104 stores programs that can execute the content of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
Processor 102 may include one or more processing cores, among other things. The processor 102 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
The network module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as a wireless access point. The network module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The network module 106 may also be used as a network adapter for the electronic device 200 to access the network directly through a line connection. The network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network.
Referring to fig. 11, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
In summary, the application processing method, the application processing apparatus, the electronic device, and the readable storage medium provided by the application detect whether the electronic device satisfies a program processing condition in response to completion of data update of a first operating system, and process an application in the electronic device if the program processing condition is satisfied, so that the application is adapted to the first operating system after data update. Therefore, by the above method, after the first operating system is upgraded, the processing of the application program is triggered when the electronic device is detected to meet the program processing condition instead of immediately processing the application program, so that the flexibility of determining the time for triggering the processing operation on the application program after the system is upgraded is improved.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. An application processing method applied to an electronic device, the method comprising:
detecting whether the electronic equipment meets a program processing condition or not in response to the completion of the data update of the first operating system;
and if the program processing condition is met, processing the application program in the electronic equipment so that the application program is adaptive to the first operating system after the data is updated.
2. The method of claim 1, wherein the program handles conditions including at least one of:
the temperature of the electronic equipment meets a first temperature condition;
the electric quantity of the electronic equipment meets a first electric quantity condition; and
the electronic device is in an idle state.
3. The method of claim 1, further comprising:
detecting whether the electronic equipment meets a processing stop condition or not in the process of processing an application program in the electronic equipment;
and if the electronic equipment is detected to meet the processing stop condition, stopping processing.
4. The method according to claim 3, wherein the processing stop condition comprises at least one of:
the temperature of the electronic equipment meets a second temperature condition;
the electric quantity of the electronic equipment meets a second electric quantity condition; and
the electronic device is in a use state.
5. The method according to claim 1, wherein the processing the application program in the electronic device if the program processing condition is satisfied comprises:
if the program processing condition is met, determining a target application program from application programs in the electronic equipment;
and processing the target application program.
6. The method of claim 5, wherein determining a target application from the applications in the electronic device if the program processing condition is satisfied comprises:
and if the program processing conditions are met, selecting a preset number of application programs from the application programs in the electronic equipment as target application programs.
7. The method according to claim 6, wherein the selecting a preset number of applications from the applications in the electronic device as target applications comprises:
and selecting a preset number of application programs from the application programs in the electronic equipment as target application programs based on the resources consumed by the application programs in the compiling process.
8. The method according to claim 1, wherein the processing the application program in the electronic device if the program processing condition is satisfied comprises:
if the program processing condition is met, acquiring a first application program and a second application program in the application programs included in the electronic equipment;
the method comprises the steps of processing the first application program based on a first processing mode, and processing the second application program based on a second processing mode, wherein the first processing mode and the second processing mode respectively correspond to different processing contents.
9. The method of any of claims 1-8, wherein detecting whether the electronic device satisfies program processing conditions in response to completion of the first operating system data update further comprises:
the electronic device operates based on a second operating system.
10. The method of claim 9, further comprising:
displaying a switching control in response to completion of the first operating system data update;
and if the touch operation is acted on the switching control, triggering the electronic equipment to switch to the first operating system for running after the data updating.
11. The method of any of claims 1-8, wherein detecting whether the electronic device satisfies a program processing condition in response to completion of the first operating system data update comprises:
detecting whether the electronic equipment meets a program processing condition of local storage or not in response to the completion of the data updating of the first operating system;
the method further comprises the following steps:
receiving updated program processing conditions pushed by a server;
replacing the locally stored program processing conditions with the updated program processing conditions.
12. The method according to any one of claims 1-8, wherein processing the application program in the electronic device if the program processing condition is satisfied further comprises:
and the electronic equipment is switched to run based on the first operating system after the data updating.
13. An application processing apparatus, operable on an electronic device, the apparatus comprising:
a condition detection unit for detecting whether the electronic device satisfies a program processing condition in response to completion of data update of the first operating system;
and the program processing unit is used for processing the application program in the electronic equipment if the program processing condition is met so as to enable the application program to adapt to the first operating system after the data is updated.
14. An electronic device comprising one or more processors and memory;
wherein one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-12.
15. A computer-readable storage medium, having program code stored therein, wherein the program code when executed by a processor performs the method of any of claims 1-12.
CN202210706479.5A 2022-06-21 2022-06-21 Application program processing method and device, electronic equipment and readable storage medium Pending CN114895948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210706479.5A CN114895948A (en) 2022-06-21 2022-06-21 Application program processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210706479.5A CN114895948A (en) 2022-06-21 2022-06-21 Application program processing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114895948A true CN114895948A (en) 2022-08-12

Family

ID=82729078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210706479.5A Pending CN114895948A (en) 2022-06-21 2022-06-21 Application program processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114895948A (en)

Similar Documents

Publication Publication Date Title
CN107943650B (en) Application program control method and device, storage medium and terminal
CN107479951B (en) Process control method and device, storage medium and electronic equipment
CN108762831B (en) Application program preloading method and device, storage medium and terminal
CN110377141B (en) Application processing method and device, electronic equipment and storage medium
EP3592004A1 (en) Broadcast processing method, device, storage medium and terminal device
CN107402791B (en) Application processing method and device, storage medium and terminal
CN113474756A (en) Application processing method and device, storage medium and electronic equipment
CN106933593A (en) A kind of system switching method and device based on mobile terminal
CN106937258B (en) A kind of control method of broadcast, device and mobile terminal
CN111273769B (en) Equipment control method and device, electronic equipment and storage medium
CN110569008A (en) screen data processing method and device and electronic equipment
CN110727605B (en) Memory recovery method and device and electronic equipment
CN114175748B (en) Communication frequency adjusting method, device, electronic equipment and storage medium
CN108011860B (en) Method, device and terminal for processing broadcast message
CN114895948A (en) Application program processing method and device, electronic equipment and readable storage medium
CN111045507A (en) List management and control method, device, mobile terminal and storage medium
CN115587049A (en) Memory recovery method and device, electronic equipment and storage medium
CN113377396B (en) Upgrading method and device, electronic equipment and storage medium
CN112052089B (en) Memory recovery method and device and electronic equipment
WO2021129489A1 (en) Application precompiling method and apparatus, electronic device, and storage medium
CN101527883B (en) Data receiving method and receiving terminal in mobile multimedia broadcasting system
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN114090054A (en) Intelligent equipment upgrading method and device, storage medium and electronic equipment
CN111221633A (en) Terminal control method and device, mobile terminal and storage medium
CN115836280A (en) Method and device for process control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination