CN117667193A - Application optimization method, device, equipment and storage medium - Google Patents

Application optimization method, device, equipment and storage medium Download PDF

Info

Publication number
CN117667193A
CN117667193A CN202211097941.2A CN202211097941A CN117667193A CN 117667193 A CN117667193 A CN 117667193A CN 202211097941 A CN202211097941 A CN 202211097941A CN 117667193 A CN117667193 A CN 117667193A
Authority
CN
China
Prior art keywords
target
application
applications
equipment
target equipment
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
CN202211097941.2A
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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202211097941.2A priority Critical patent/CN117667193A/en
Publication of CN117667193A publication Critical patent/CN117667193A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the disclosure relates to an application optimization method, an application optimization device and a storage medium, wherein the application optimization method comprises the following steps: in response to receiving a shutdown operation of the target device, controlling the target device to enter a preset false shutdown state, and screening at least one target application from a plurality of applications used by the target device in the startup state; and after the target application is optimized, controlling the target equipment to enter a true shutdown state. The method and the device for optimizing the target application can optimize the target application after the target equipment enters the preset false shutdown state, so that the problem that the target equipment is difficult to trigger the optimized application due to the fact that the target equipment is rarely in an idle state in the prior art can be solved, the effect of optimizing the target application in time and improving the running efficiency of the target application can be achieved, and user experience can be further improved.

Description

Application optimization method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to an application optimization method, an application optimization device and a storage medium.
Background
When the application runs in the android system, the application needs to be interpreted and executed in the virtual machine, the virtual machine can recognize the dex file, if the dex file is loaded into the memory in the application using process, the efficiency of the interpreted execution of the byte codes is very low, and the user experience is seriously affected, so that the application is usually optimized through the dex2oat at present, namely the byte codes of the dex file are converted into machine codes which can be executed by the virtual machine in advance when the device is in an idle state, so that the running stage is smoother, and the user experience is optimized.
However, for devices such as televisions which are rarely in an idle state, because of difficulty in triggering and optimizing the application, the frequency of optimizing the application is low, and the application cannot be optimized in time, so that the use experience of a user on the application is affected.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide an application optimization method, apparatus, device, and storage medium.
A first aspect of an embodiment of the present disclosure provides an application optimization method, including:
in response to receiving a shutdown operation of the target device, controlling the target device to enter a preset false shutdown state;
screening at least one target application from a plurality of applications used by the target equipment in a starting state;
and after the target application is optimized, controlling the target equipment to enter a true shutdown state.
A second aspect of the disclosed embodiments provides an application optimization apparatus, the apparatus comprising:
the first control module is used for controlling the target equipment to enter a preset false shutdown state in response to receiving the shutdown operation of the target equipment;
the screening module is used for screening at least one target application from a plurality of applications used by the target equipment in a starting state;
And the second control module is used for controlling the target equipment to enter a true shutdown state after the target application is optimized.
A third aspect of the disclosed embodiments provides an electronic device, the server comprising: a processor and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of the first aspect described above.
A fourth aspect of the disclosed embodiments provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, can implement the method of the first aspect described above.
In a fifth aspect, the present disclosure provides a computer program product comprising a computer program/instruction which, when executed by a processor, implements the method of the first aspect described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the application optimization method, the device, the equipment and the storage medium provided by the embodiment of the disclosure control the target equipment to enter a preset false shutdown state by responding to the received shutdown operation of the target equipment; screening at least one target application from a plurality of applications used by the target equipment in a starting state; and after the target application is optimized, controlling the target equipment to enter a true shutdown state. By adopting the technical scheme, the target application can be optimized after the target equipment enters the preset false shutdown state, so that the problem that the target equipment is difficult to trigger and optimize the application due to the fact that the target equipment is rarely in an idle state in the prior art is solved, the effect of optimizing the target application in time and improving the operation efficiency of the target application is achieved, and further the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of an application optimization method provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of another application optimization method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an application optimization device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a flowchart of an application optimization method provided by an embodiment of the present disclosure, where the method may be performed by an application optimization device, which may be implemented by software and/or hardware, and integrated in an electronic device. An electronic device may be understood as an exemplary device such as a cell phone, tablet, notebook, desktop, smart television, etc. As shown in fig. 1, the method provided in this embodiment includes the following steps:
s110, in response to receiving the shutdown operation of the target device, controlling the target device to enter a preset false shutdown state.
Specifically, the target device may be a device with any shutdown frequency greater than a preset shutdown frequency threshold, where a specific value of the preset shutdown frequency threshold may be set by a person skilled in the art according to the actual situation. For example, the target device may include a television, a virtual reality display device, etc., and the preset shutdown frequency threshold may be 3 times/week, etc., but is not limited thereto.
Specifically, the preset false shutdown state may include: the display screen of the target device is in a black screen state, and the target device stops making a sound, so that an illusion that the target device has been turned off can be made to the user.
S120, screening at least one target application from a plurality of applications used by the target equipment in a starting state.
Specifically, as used herein, the "plurality of applications used by the target device in the on state" refers to applications that have been currently installed and used by the target device in a history. For example, when the user uses the application a after the target device is powered on the X month X day and uses the application B after the target device is powered on the previous day of the X month X day, the "multiple applications used by the target device in the powered on state" includes the application a and the application B.
In some embodiments, S120 may include: at least one target application is randomly selected from the plurality of applications.
In other embodiments, S120 may include: and acquiring operation parameters representing the use conditions of a plurality of applications on the target device, and screening the target application from the plurality of applications based on the operation parameters, wherein the operation parameters comprise the size of a configuration file and/or the accumulated operation duration in a preset time period.
It can be appreciated that, compared with optimizing all applications on the target application, optimizing only the screened target application can reduce the number of applications needing to be optimized, thereby reducing the optimization time consumption and further avoiding that the target device cannot be really shut down for a long time.
And S130, after the target application is optimized, controlling the target equipment to enter a true shutdown state.
In some embodiments, optimizing the target application may include: all code fragments of the target application are optimized.
Specifically, precompiled is performed on all code segments in the installation package of the target application, independent of the configuration file, and may be considered as a full compilation mode.
It can be understood that all code segments of the target application are optimized, so that the target device can be efficiently operated when a user uses any function of the target application, and user experience is improved.
In other embodiments, optimizing the target application may include: and optimizing the code segments in the configuration file of the target application.
Specifically, for dex2oat, when a virtual machine in the electronic device finds a certain method or code segments run particularly frequently, the code segments are identified as "hotspot codes", and are recorded and saved in the configuration file, so that the configuration file includes code segments with execution times greater than a preset number of times threshold in application.
Specifically, only the code segments recorded in the configuration file of the target application are precompiled, while other code segments in the installation package of the target application do not execute precompiled, which may be regarded as a partial compiling mode.
It can be understood that only the code segments in the configuration file of the target application are optimized, so that the code quantity of the code to be precompiled can be further reduced, the optimization time consumption is further reduced, and the target device can be really shut down as soon as possible. In addition, because the code to be precompiled is the code frequently executed in the target application frequently used by the user, the use probability of the file obtained after precompiled is higher, and the problem of storage space waste caused by the fact that the file obtained after precompiled is not frequently used is avoided.
In still other embodiments, optimizing the target application may include: when the residual storage space of the target equipment is smaller than a preset storage space threshold value, optimizing code segments in a configuration file of the target application; and when the residual storage space of the target equipment is larger than or equal to a preset storage space threshold value, optimizing all code fragments of the target application.
It can be understood that the target application is determined to be partially compiled or fully compiled according to the size of the remaining storage space, and when the remaining storage space is sufficient, precompiled for all code segments in an installation package of the target application can be executed, so that a user can efficiently operate the target device when using any function of the target application, and when the remaining storage space is relatively tight, precompiled for codes which are not frequently used in applications frequently used by the user are not executed any more, so that the operation efficiency of the target application can be improved to a certain extent, and the storage space can be saved.
In still other embodiments, optimizing the target application may include: when the size of the configuration file of the target application is larger than a third threshold value, optimizing all code fragments of the target application; and when the size of the configuration file of the target application is smaller than or equal to a third threshold value, optimizing the code segments in the configuration file of the target application.
Specifically, the specific value of the third threshold may be set by those skilled in the art according to the actual situation, and is not limited herein. For example, the third threshold may include, but is not limited to, 50% of the total code segments of the target application, and so on.
It can be understood that when the size of the configuration file of the target application is greater than the third threshold, it indicates that the user uses the target application more deeply and more fully, and the probability of the function that is not frequently used before the user uses frequently later is greater, so that the probability of using all the machine codes obtained after precompiled all the codes of the target application is higher, so that the use frequency is higher, the problem of storage space waste is not easy to occur, and the user can directly run the corresponding machine code when using any function of the target application, thereby improving the running efficiency of the application.
Specifically, the target device is completely turned off in the true shutdown state. For example, controlling the target device to enter the shutdown state may include: and closing all the running application processes, then providing background service for the system, and requesting the shutdown to the main board so as to enable the main board to disconnect the power supply of the power supply and further enable the power supply to cut off the power supply of most devices in the target equipment.
It can be understood that, because the shutdown frequency of the target device is higher, by controlling the target device to enter a preset false shutdown state in response to receiving the shutdown operation of the target device, and optimizing the target application in the preset false shutdown state, the shutdown time can be fully utilized, and the optimization application can be frequently triggered, so that the target application is optimized in time, the operation efficiency of the target application is improved, and the effect that the faster and the smoother the target device is used, the faster the more the target device is used. And the target application is optimized in a preset false shutdown state, so that the normal operation of the target equipment can be prevented from being optimized and dragged, and an illusion that the target equipment is shutdown can be manufactured for a user, thereby completing the optimization in a user noninductive state and improving the user experience.
According to the embodiment of the disclosure, the target equipment is controlled to enter a preset false shutdown state by responding to the received shutdown operation of the target equipment; screening at least one target application from a plurality of applications used by the target equipment in a starting state; and after the target application is optimized, controlling the target equipment to enter a true shutdown state. By adopting the technical scheme, the target application can be optimized after the target equipment enters the preset false shutdown state, so that the problem that the target equipment is difficult to trigger and optimize the application due to the fact that the target equipment is rarely in an idle state in the prior art is solved, the effect of optimizing the target application in time and improving the operation efficiency of the target application is achieved, and further the user experience is improved.
In another embodiment of the present disclosure, controlling the target device to enter a preset pseudo-shutdown state includes: cutting off the connection between the display screen of the target equipment and the power supply, or providing a display signal corresponding to the black screen for the display screen of the target equipment; cutting off the connection of the audio device of the target apparatus to the power supply or stopping the supply of the audio signal to the audio device of the target apparatus.
Specifically, the cutting off the connection of the display screen of the target device to the power supply when the display screen is a liquid crystal screen may include: cutting off the connection between the backlight source and the power supply; when the display screen is an Organic Light-Emitting Diode (OLED) screen, cutting off the connection of the display screen of the target device and the power source may include: and cutting off the connection between the OLED screen and the power supply.
It will be appreciated that by the above setting about the preset false shutdown state, the display screen of the target device may be in a black screen state, and the target device may be stopped from making a sound, so that the target device stops all the pictures, and an illusion that the target device has been shutdown is made to the user. Moreover, by cutting off the connection between the display screen and the power supply of the target device and the connection between the audio device and the power supply of the target device, electric energy can be saved, and the occupation of the computing resources of the target device by the application can be reduced without conveying display signals to the display screen or providing audio signals to the audio device, so that the target device can apply more computing resources to the optimized target application, the optimization efficiency is improved, and the real shutdown of the target device can be realized as soon as possible.
Optionally, the controlling the target device to enter a preset false shutdown state further includes: closing an application process currently running on the target device; and/or; the power indicator lamp of the target device is disconnected from the power supply, or the supply of the drive signal to the power indicator lamp of the target device is stopped.
Specifically, the driving signal described herein refers to a signal capable of driving the power indication lamp to be lighted.
It can be understood that the currently running application process on the target device is closed, so that the occupation of the application on the computing resource of the target device can be further reduced, the optimization efficiency is further improved, and the real shutdown of the target device is realized earlier.
It can be further understood that by the arrangement of the power indicator, the power indicator can be in a turned-off state, so that the illusion that the manufactured target equipment is turned off is more vivid.
Fig. 2 is a flowchart of another application optimization method provided by an embodiment of the present disclosure. Embodiments of the present disclosure may be optimized based on the embodiments described above, and may be combined with various alternatives of one or more of the embodiments described above.
As shown in fig. 2, the application optimization method may include the following steps.
S210, responding to the received starting operation of the target equipment, and acquiring the latest use time corresponding to the application in the process of using the application on the target equipment.
The latest use time is the time when the application is used last time from the current time.
Specifically, in response to receiving a power-on operation for the target device, the target device may be controlled to be powered on.
In some embodiments, after the target device is powered on, in response to receiving a trigger operation on the application, an active component (i.e., activity) corresponding to the trigger operation is created, and a time at which the active component is created is taken as a latest usage time corresponding to the application.
In other embodiments, after the target device is powered on, the moment when the interactive interface of the application starts to be displayed on the display screen of the target device is taken as the latest use moment corresponding to the application.
S220, in response to receiving the shutdown operation of the target device, controlling the target device to enter a preset false shutdown state.
Specifically, S220 is similar to S110, and will not be described here again.
And S230, sorting the most recently used time corresponding to the plurality of applications from the near to the far according to the distance from the current time to obtain a sorting result.
Specifically, the closer the distance between the corresponding most recently used time and the current time is, the more forward the application is in the ranking result, the farther the distance between the corresponding most recently used time and the current time is, and the more backward the application is in the ranking result.
For example, the user uses the application a after the target device is started on the X month X day, uses the application B after the target device is started on the previous day of the X month X day, and uses the application C after the target device is started on the big previous day of the X month X day, and in the sorting result, the application a is located in front of the application B, and the application B is located in front of the application C.
S240, based on the sorting result, taking the preset number of applications as target applications.
Specifically, the specific values of the preset number may be set by those skilled in the art according to actual circumstances, and are not limited herein.
In some embodiments, the preset number is a fixed value that is uniformly set by one skilled in the art for all devices.
In other embodiments, the total number of applications for all applications on the target device is obtained; and determining a preset number according to the total number of applications, wherein the total number of applications is positively correlated with the preset number.
It can be appreciated that, since the situation that the user uses the application before the target device is turned off is not certain, for example, the user may continuously use a certain application before the target device is turned off, or may use the application D and then use the application E, after receiving the operation of turning off the target device, the applications are ranked from near to far according to the latest use time, and may be ranked only once, without ranking the applications in real time.
Of course, before S220, a person skilled in the art may sort the most recently used time corresponding to the applications from the near to the far according to the distance from the current time to update the sorting result, so that after receiving the shutdown operation of the target device, the target application may be screened based on the final sorting result.
S250, after optimizing the target application, controlling the target equipment to enter a true shutdown state.
Specifically, S250 is similar to S130, and will not be described here again.
According to the embodiment of the disclosure, the latest use time corresponding to the applications is sequenced from the near to the far according to the distance from the current time to obtain the sequencing result, and the previous preset number of applications are used as the target applications based on the sequencing result, so that the screened target applications are more favorite and commonly used recently by the user, and the probability that the user continues to use the target applications subsequently is higher, therefore, the target applications are optimized, the use probability of the file generated after optimization is higher, and the smoothness of the user in the process of using the target equipment is improved.
In still another embodiment of the present disclosure, screening at least one target application from a plurality of applications used by the target device in the power-on state may include: acquiring the sizes of configuration files of a plurality of applications, wherein the configuration files comprise code fragments of which the execution times in the applications are greater than a preset time threshold; and taking the application with the configuration file size larger than the first threshold value as a target application.
Specifically, the first threshold may be: the average profile size of the plurality of applications, or a fixed value set by those skilled in the art for the first threshold, or the like, but is not limited thereto.
It can be understood that when the size of the configuration file of the application is larger, the application is deeper and more fully used by the user and is more frequently used by the application, for example, when the user uses a certain video application, when the user frequently opens the login interface and slides the video interface up and down, the code segments corresponding to the two functions are stored in the configuration file, the size of the configuration file is relatively smaller, and when the user frequently opens the login interface, slides the video interface up and down, watches the live broadcast interface, rewards, comments, and the like, the code segments corresponding to the functions are stored in the configuration file, and the size of the configuration file is relatively larger. Therefore, the application with the configuration file size larger than the first threshold value is used as the target application, and the screened target application is the application which is preferred and commonly used by the user, so that the probability of the user to continue to use the target application is higher, and the target application is optimized, so that the use probability of the file generated after optimization is higher, and the smoothness of the user in the process of using the target equipment is improved.
In still another embodiment of the present disclosure, screening at least one target application from a plurality of applications used by the target device in the power-on state may include: acquiring accumulated operation time lengths of a plurality of applications in a preset time period; and taking the application with the accumulated running time length larger than the second threshold value as a target application.
In some embodiments, obtaining the accumulated running time of the plurality of applications in the preset time period includes: and acquiring the accumulated time length of the interactive interface of the display application of the target equipment within the preset time period, and acquiring the accumulated running time length of the application.
In an exemplary manner, in a preset time period, in response to receiving a triggering operation of an application identifier corresponding to a certain application, the target device displays an interactive interface of the application and continuously displays the duration t11, then in response to receiving a return homepage operation, the interactive interface of the application is turned to the background, then in response to receiving a recovery operation of the application, the target device displays the interactive interface of the application again and continuously displays the duration t12, and then the accumulated running duration of the application in the preset time period is t11+t12.
In other embodiments, obtaining the accumulated running lengths of the plurality of applications in the preset time period includes: acquiring the activity duration of at least one activity component of the application running in a preset time period, wherein the activity duration is the duration of the activity component from creation to destruction; and adding the activity duration of at least one activity component to obtain the accumulated running duration of the application.
Specifically, the activity component is activity. The activity duration may be obtained, for example, as follows: starting timing when the corresponding activity is created, and exiting timing when the activity is destroyed, so that the activity duration of the activity component can be obtained; or recording the creation time when the corresponding activity is created, recording the destruction time when the activity is destroyed, and calculating the difference between the destruction time and the creation time to obtain the activity duration of the activity component. But is not limited thereto.
For example, in the preset time period, a certain application running history runs activity1, activity2, activity3, the activity1 has an activity duration of t21, the activity2 has an activity duration of t22, and the activity3 has an activity duration of t23, so that the accumulated running duration of the application in the preset time period is t21+t22+t23.
Specifically, the second threshold may be: an average cumulative operating time length of the plurality of applications, or a fixed value set by a person skilled in the art for a preset cumulative operating time length threshold value, or the like, but is not limited thereto.
It can be understood that, when a user uses an application more often, the accumulated running time of the application in the preset time period is longer, so that the accumulated running time can reflect whether the user likes and uses the application frequently in most cases, therefore, the application with the accumulated running time longer than the second threshold is taken as the target application, the screened target application is the application that the user likes and uses frequently, the probability that the user continues to use the target application later is higher, and the target application is optimized, so that the use probability of the file generated after optimization is higher, and the smoothness of the user in the process of using the target device is improved.
In still another embodiment of the present disclosure, screening at least one target application from a plurality of applications used by the target device in the power-on state may include: acquiring the configuration file sizes of a plurality of applications; acquiring accumulated operation time lengths of a plurality of applications in a preset time period; and taking the application with the configuration file size larger than the first threshold value and the accumulated running time length larger than the second threshold value as a target application.
It can be understood that the application with the configuration file size larger than the first threshold and the accumulated running time length larger than the second threshold is used as the target application, and the target application which is preferred and commonly used by the user can be screened out more accurately, so that the use probability of the file generated after the target application is optimized is higher, and the smoothness of the user in the process of using the target equipment is improved.
In yet another embodiment of the present disclosure, optimizing a target application includes: detecting network operation parameters of target equipment; determining a target optimization mode according to network operation parameters; and carrying out optimization processing on the target application according to the target optimization mode.
In particular, the network operation parameters may include, but are not limited to, parameters for characterizing network quality, such as a network download speed, a network response speed, and the like.
Specifically, the network quality can be determined according to the network operation parameters, so that a target optimization mode is determined according to the network quality, wherein the target optimization mode can comprise a plurality of partial compiling modes and a full-quantity compiling mode, and preset code quantities, which correspond to different partial compiling modes and need to be compiled, are different. Therefore, when the network quality is better, the more the preset code quantity corresponding to the target optimization mode is determined according to the network quality, namely the larger the code quantity needed to be precompiled.
Specifically, performing the optimization process on the target application according to the target optimization mode may include: sending an acquisition request and configuration files corresponding to each target application to a server, wherein the acquisition request comprises an application identifier and a target optimization mode of the target application, and the acquisition request is used for enabling the server to return the target configuration files corresponding to each target application based on the target optimization mode; and optimizing the target application based on the target configuration file corresponding to the target application.
The server can acquire a plurality of configuration files corresponding to the target application from a plurality of different user devices (including target devices); summarizing the code segments in the configuration files, and then performing duplication removal to obtain candidate configuration files; and selecting code segments of a preset code quantity corresponding to the target optimization mode from the candidate configuration files to obtain target configuration files corresponding to the target application. Therefore, the code segments contained in the target configuration file are code segments which are frequently used by most users, the probability that the user corresponding to the target equipment uses the code segments in the target configuration file in the process of using the target application later is higher, and the target application is optimized, so that the use probability of the file generated after optimization is higher, and the smoothness in the process of using the target equipment by the user is improved.
It can be understood that by setting the target optimization mode according to the network operation parameters and optimizing the target application according to the target optimization mode, more code segments can be precompiled when the network quality is good, and the code quantity of the code segments required to be precompiled when the network quality is bad can be reduced, so that the time consumption for downloading the target configuration file from the server and the optimization time consumption can be reduced, and the target device can be really shut down as soon as possible.
Fig. 3 is a schematic structural diagram of an application optimizing apparatus according to an embodiment of the present disclosure, where the application optimizing apparatus may be understood as the electronic device or a part of functional modules in the electronic device. As shown in fig. 3, the application optimizing apparatus 300 includes:
a first control module 310, configured to control, in response to receiving a shutdown operation of the target device, the target device to enter a preset pseudo-shutdown state;
a screening module 320, configured to screen at least one target application from a plurality of applications used by the target device in a power-on state;
the second control module 330 is configured to control the target device to enter a true shutdown state after performing optimization processing on the target application.
According to the embodiment of the disclosure, the target equipment is controlled to enter a preset false shutdown state by responding to the received shutdown operation of the target equipment; screening at least one target application from a plurality of applications used by the target equipment in a starting state; and after the target application is optimized, controlling the target equipment to enter a true shutdown state. By adopting the technical scheme, the target application can be optimized after the target equipment enters the preset false shutdown state, so that the problem that the target equipment is difficult to trigger and optimize the application due to the fact that the target equipment is rarely in an idle state in the prior art is solved, the target application is optimized in time, the operation efficiency of the target application is improved, and the user experience is further improved.
In another embodiment of the present disclosure, the first control module 310 may include:
the first control submodule is used for cutting off the connection between the display screen of the target equipment and the power supply or providing display signals corresponding to the black screen for the display screen of the target equipment;
and the second control submodule is used for cutting off the connection between the audio device of the target equipment and the power supply or stopping providing the audio signal to the audio device of the target equipment.
In yet another embodiment of the present disclosure, the first control module 310 may further include:
the third control sub-module is used for closing the application process currently running on the target equipment;
and/or;
and the fourth control submodule is used for cutting off the connection between the power indicator lamp of the target equipment and the power supply or stopping providing a driving signal to the power indicator lamp of the target equipment.
In yet another embodiment of the present disclosure, the apparatus may further include:
the acquisition module is used for acquiring the latest use time corresponding to the application in the process of using the application on the target equipment in response to receiving the start-up operation of the target equipment before responding to receiving the shut-down operation of the target equipment, wherein the latest use time is the time when the application is used for the latest time from the current time;
Wherein, the screening module 320 may include:
the sequencing sub-module is used for sequencing the most recently used time corresponding to the plurality of applications from the near to the far according to the distance from the current time to obtain a sequencing result;
and the first determining submodule is used for taking the preset number of applications as target applications based on the sequencing result.
In yet another embodiment of the present disclosure, the screening module 320 may include:
the first acquisition submodule is used for acquiring the sizes of configuration files of a plurality of applications, wherein the configuration files comprise code fragments of which the execution times in the applications are greater than a preset time threshold;
and the second determining submodule is used for taking the application with the configuration file size larger than the first threshold value as a target application.
In yet another embodiment of the present disclosure, the screening module 320 may include:
the second acquisition sub-module is used for acquiring accumulated operation time lengths of a plurality of applications in a preset time period;
and the third determining submodule is used for taking the application with the accumulated running time longer than the second threshold value as a target application.
In yet another embodiment of the present disclosure, the apparatus may further include: the optimizing module is used for optimizing the target application, wherein the optimizing module can comprise:
The detection submodule is used for detecting network operation parameters of the target equipment;
a fourth determining submodule, configured to determine a target optimization mode according to the network operation parameter;
and the optimizing sub-module is used for optimizing the target application according to the target optimizing mode.
The device provided in this embodiment can execute the method of any one of the above embodiments, and the execution mode and the beneficial effects thereof are similar, and are not described herein again.
In addition to the methods and apparatus described above, embodiments of the present disclosure also provide a computer-readable storage medium having instructions stored therein that, when executed on a terminal device, cause the terminal device to implement the methods of any of the embodiments described above.
The disclosed embodiments also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the method of any of the embodiments described above.
The embodiment of the disclosure also provides an electronic device, which comprises: a memory in which a computer program is stored; a processor for executing the computer program, which when executed by the processor can implement the method of any of the above embodiments.
By way of example, fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure. Referring now in particular to fig. 4, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 400 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
in response to receiving a shutdown operation of the target device, controlling the target device to enter a preset false shutdown state;
screening at least one target application from a plurality of applications used by the target equipment in a starting state;
and after the target application is optimized, controlling the target equipment to enter a true shutdown state.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, may implement a method according to any one of the foregoing embodiments, and the implementation manner and beneficial effects of the method are similar, and are not described herein again.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. An application optimization method, comprising:
responding to the received shutdown operation of target equipment, and controlling the target equipment to enter a preset false shutdown state;
screening at least one target application from a plurality of applications used by the target equipment in a starting state;
and after the target application is optimized, controlling the target equipment to enter a true shutdown state.
2. The method of claim 1, wherein the controlling the target device to enter a preset pseudo-shutdown state comprises:
cutting off the connection between the display screen of the target equipment and a power supply, or providing a display signal corresponding to a black screen for the display screen of the target equipment;
And cutting off the connection of the audio device of the target device and the power supply, or stopping providing the audio signal to the audio device of the target device.
3. The method of claim 2, wherein the controlling the target device to enter a preset pseudo-shutdown state further comprises:
closing the application process currently running on the target equipment;
and/or;
and cutting off the connection between the power supply indicator lamp of the target device and the power supply, or stopping providing a driving signal to the power supply indicator lamp of the target device.
4. The method of claim 1, further comprising, prior to said responding to receiving a shutdown operation to a target device:
responding to the received starting operation of the target equipment, and acquiring the latest use time corresponding to the application in the process of using the application on the target equipment, wherein the latest use time is the time when the application is used for the latest time from the current time;
wherein, screening at least one target application from the plurality of applications used by the target device in the startup state includes:
sequencing the most recently used time corresponding to the applications from the near to the far according to the distance from the current time to obtain a sequencing result;
And taking the preset number of applications as the target applications based on the sorting result.
5. The method of claim 1, wherein screening at least one target application from a plurality of applications used by the target device in a power-on state comprises:
acquiring the configuration file sizes of the plurality of applications, wherein the configuration file comprises code fragments of which the execution times in the applications are greater than a preset time threshold;
and taking the application with the configuration file size larger than a first threshold value as the target application.
6. The method of claim 1, wherein screening at least one target application from a plurality of applications used by the target device in a power-on state comprises:
acquiring accumulated operation time lengths of the plurality of applications in a preset time period;
and taking the application with the accumulated running time length larger than a second threshold value as the target application.
7. The method according to any one of claims 1-6, wherein said optimizing said target application comprises:
detecting network operation parameters of the target equipment;
determining a target optimization mode according to the network operation parameters;
And carrying out optimization processing on the target application according to the target optimization mode.
8. An application optimizing apparatus, comprising:
the first control module is used for responding to the received shutdown operation of the target equipment and controlling the target equipment to enter a preset false shutdown state;
the screening module is used for screening at least one target application from a plurality of applications used by the target equipment in a starting state;
and the second control module is used for controlling the target equipment to enter a true shutdown state after optimizing the target application.
9. An electronic device, comprising:
a processor and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
11. A computer program product, characterized in that it comprises a computer program/instruction which, when executed by a processor, implements the method according to any of claims 1-7.
CN202211097941.2A 2022-09-08 2022-09-08 Application optimization method, device, equipment and storage medium Pending CN117667193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211097941.2A CN117667193A (en) 2022-09-08 2022-09-08 Application optimization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211097941.2A CN117667193A (en) 2022-09-08 2022-09-08 Application optimization method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117667193A true CN117667193A (en) 2024-03-08

Family

ID=90085121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211097941.2A Pending CN117667193A (en) 2022-09-08 2022-09-08 Application optimization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117667193A (en)

Similar Documents

Publication Publication Date Title
US10712915B2 (en) Information presentation using a client on a terminal
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
US11936922B2 (en) Live streaming room page loading method and apparatus, and terminal, server and storage medium
CN112083787B (en) Application program operation mode switching method and device, electronic equipment and storage medium
US10642662B2 (en) Method for application action synchronization, terminal device, and storage medium
CN109726390B (en) Document processing method, device, electronic equipment and storage medium
CN105786539B (en) File downloading method and device
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN105142184A (en) Flow control method and electronic device
CN114531614B (en) Video playing method, device, electronic equipment and storage medium
CN114390360B (en) Live voting method and device, electronic equipment and storage medium
CN110865846B (en) Application management method, device, terminal, system and storage medium
CN109657164B (en) Method, device and storage medium for publishing message
CN110825481A (en) Method and device for displaying page information corresponding to page tag and electronic equipment
US20230221828A1 (en) Content display method and apparatus, electronic device, andcomputer-readable storage medium
CN112463391A (en) Memory control method, memory control device, storage medium and electronic equipment
CN117667193A (en) Application optimization method, device, equipment and storage medium
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN114741686A (en) Method and device for detecting program white list and related equipment
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN103618961A (en) Method, system and browser for displaying video title
CN117707610A (en) Application optimization method, device, equipment and storage medium
CN112068688A (en) Power saving method and device, electronic equipment and computer readable medium
CN112732326B (en) Information display method and device
CN117707637A (en) Configuration file collection method, device, equipment and storage medium

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