An application adjustment method and device, electronic equipment and storage medium

By simulating user operations in an operating system simulator, and obtaining and utilizing operation event information to adjust application installation files, the problem of low application optimization efficiency in existing technologies is solved, and faster application installation and startup are achieved.

CN113986260BActive Publication Date: 2026-01-23SHENZHEN TCL NEW-TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111204207.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2026-01-23
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

In existing technologies, hybrid compilation technology requires users to install and use the application for a period of time before collecting user operation event information, resulting in low application optimization efficiency.

Method used

By simulating user operation events in a preset operating system simulator, operation event information is obtained, and the application installation file is adjusted based on this information to generate an adjusted application installation file.

Benefits of technology

It improved the efficiency of application optimization, reduced user waiting time, and increased application installation and startup speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986260B_ABST
    Figure CN113986260B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an application adjustment method and device, electronic equipment and a storage medium. An application installation file of a target application is obtained, the application installation file is installed into a preset operating system simulator to obtain a target operating system simulator, wherein the target operating system simulator has the target application. An operation event of a user for the target application is simulated in the target operating system simulator to obtain operation event information for the application. The application installation file is adjusted by using the target operating system simulator based on the operation event information to obtain an adjusted application installation file. The application installation file and the adjusted application installation file are sent to an application terminal, and the efficiency of optimizing the target application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to an application adjustment method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of information technology and the rapid development and popularization of internet technology, applications in electronic devices have flourished. As an extension of the functions of electronic devices, applications have not only promoted the prosperity and development of the information technology field, but also brought convenience to people's daily learning and life, becoming an indispensable part of people's daily learning and life.

[0003] In existing technologies, the common practice is to build an operating system on an electronic device and then use applications on that operating system. The latest version of the Android operating system employs hybrid compilation technology to compile applications for the operating system. However, this hybrid technology requires users to install and use the application for a period of time before user action event information can be collected and used to adjust the application's compilation based on this information. This reduces the efficiency of application optimization. Summary of the Invention

[0004] This application provides an application tuning method, apparatus, electronic device, and storage medium that can improve the efficiency of application optimization.

[0005] This application provides an application adjustment method, including:

[0006] Obtain the application installation file of the target application;

[0007] The application installation file is installed into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator contains the target application;

[0008] Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application;

[0009] Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file;

[0010] Send the application installation file and the adjusted application installation file to the application terminal.

[0011] Accordingly, this application embodiment also provides an application adjustment device, including:

[0012] The file acquisition unit is used to acquire the application installation file of the target application.

[0013] An installation unit is used to install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the target application;

[0014] The simulation unit is used to simulate user operation events for the target application in the target operating system simulator, and obtain operation event information for the target application.

[0015] The adjustment unit is used to adjust the application installation file based on the operation event information using the target operating system emulator to obtain the adjusted application installation file;

[0016] The sending unit is used to send the application installation file and the adjusted application installation file to the application terminal.

[0017] In one embodiment, the simulation unit includes:

[0018] A sending subunit is used to send an operation event stream to the target application in the target operating system emulator;

[0019] The mapping subunit is used to respond to the operation event stream using the target operating system simulator, and to map the operation event stream to the corresponding operation event function based on the response result;

[0020] The information generation subunit is used to generate operation event information of the target application based on the operation event function.

[0021] In one embodiment, the information generation subunit includes:

[0022] The identification module is used to identify the operation event function and obtain the identification information of the operation event function;

[0023] The conversion module is used to convert the identification information of the operation event function into the operation event information of the target application.

[0024] In one embodiment, the adjustment unit includes:

[0025] An information recognition subunit is used to recognize the operation event information and obtain the information content of the operation event information;

[0026] The matching subunit is used to match the information content of the operation event information with a preset information content threshold.

[0027] The adjustment subunit is used to adjust the application installation file based on the operation event information and the target operating system simulator when the information content of the operation event information matches the preset information content threshold, so as to obtain the adjusted application installation file.

[0028] In one embodiment, the adjustment subunit includes:

[0029] The mode determination module is used to determine the target compilation mode based on the operation event information when the amount of information in the operation event information matches a preset information amount threshold.

[0030] The calling module is used to invoke a preset adjustment compiler using the target operating system emulator;

[0031] The compilation module is used to compile the application installation file in the target compilation mode using the preset adjustment compiler to obtain the adjusted application installation file.

[0032] In one embodiment, the application adjustment device further includes:

[0033] The simulator acquisition unit is used to acquire the initial operating system simulator;

[0034] The setting unit is used to set the initial operating system simulator to obtain the preset operating system simulator.

[0035] In one embodiment, the setting unit includes:

[0036] A custom subunit is used to customize the initial operating system simulator according to the application to obtain the customized operating system simulator;

[0037] The adjustment subunit is used to adjust the application installation logic of the customized operating system to obtain the preset operating system simulator.

[0038] Accordingly, this application also provides an electronic device, which includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the application adjustment methods provided in this application.

[0039] Accordingly, embodiments of this application also provide a storage medium storing a computer program, which, when executed by a processor, implements any of the application adjustment methods provided in embodiments of this application.

[0040] This application embodiment can obtain the application installation file; install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the application; simulate user operation events on the application in the target operating system emulator to obtain operation event information on the application; based on the operation event information, adjust the application installation file using the target operating system emulator to obtain an adjusted application installation file; and send the application installation file and the adjusted application installation file to the application terminal, thereby improving the efficiency of application optimization. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a schematic diagram of a scenario illustrating the application adjustment method provided in the embodiments of this application;

[0043] Figure 2 This is a flowchart illustrating the application adjustment method provided in the embodiments of this application;

[0044] Figure 3 This is another flowchart illustrating the application adjustment method provided in the embodiments of this application;

[0045] Figure 4 This is a schematic diagram of the application adjustment device provided in the embodiments of this application;

[0046] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. However, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0048] This application provides an application adjustment method, which can be executed by an application adjustment device integrated into an electronic device. The electronic device may include at least one of a terminal and a server. That is, the application adjustment method can be executed by either a terminal or a server.

[0049] The terminal can include personal computers, tablets, smart TVs, smartphones, smart home devices, wearable electronic devices, VR / AR devices, in-vehicle computers, and so on.

[0050] Among them, the server can be an interconnection server between multiple heterogeneous systems or a backend server, or it can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms, etc.

[0051] In one embodiment, such as Figure 1 As shown, the application adjustment device can be integrated into electronic devices such as terminals or servers to implement the application adjustment method proposed in the embodiments of this application. Specifically, the electronic device can obtain the application installation file of the application; install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the application; simulate user operation events for the application in the target operating system emulator to obtain operation event information for the application; based on the operation event information, adjust the application installation file using the target operating system emulator to obtain an adjusted application installation file; and send the application installation file and the adjusted application installation file to the application terminal.

[0052] The following will provide a detailed description of each example. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0053] This application embodiment describes the application adjustment method proposed in this application embodiment from the perspective of integrating the application adjustment device into the server.

[0054] like Figure 2 As shown, an application adjustment method is provided, the specific process of which includes:

[0055] 101. Obtain the application installation file of the target application.

[0056] An application (also known as an application program) is a computer program that performs one or more specific functions. It runs in interactive mode and can interact with the user of the application.

[0057] For example, an application can include application software on various application terminals. For example, an application can include various mobile phone software (APP), tablet software, laptop software, personal computer (PC) software, and so on.

[0058] For example, applications can include browsers, video playback software, game software, and so on.

[0059] For example, applications can also include mini-programs. A mini-program is an application that can be used without downloading or installing it. To provide users with more diverse business services, developers can create corresponding mini-programs for terminal applications (such as instant messaging applications, shopping applications, email applications, etc.). These mini-programs can be embedded as sub-applications within the terminal application, and by running the sub-application (i.e., the corresponding mini-program) within the application, corresponding business services can be provided to the user.

[0060] The target applications include those that require compilation optimization.

[0061] The application installation file includes the resources of the target application and the resources required to install the target application. For example, the application installation file may include Android application packages (apk), Apple application packages (IPA), and so on.

[0062] In one embodiment, when the application is built on the Android operating system, the application installation file can be an APK. An APK is an application package file format used by the Android operating system for distributing and installing mobile applications and middleware. For an Android application's code to run on an Android device, it must first be compiled and then packaged into a file that can be recognized and run by the Android system; this file format that can be recognized and run by the Android system is an "APK".

[0063] In one embodiment, the developer can upload the application's installation file to the server, and then the server can receive the application's installation file.

[0064] 102. Install the application installation file into the preset operating system emulator to obtain the target operating system emulator, which contains the target application.

[0065] Operating system emulators include emulators that can mimic the environment of an operating system on an application terminal. For example, an operating system emulator can be an Android emulator or an iOS emulator, etc.

[0066] The preset operating system simulator includes pre-configured operating system simulators.

[0067] In one embodiment, the target application proposed in this application may be an application on various application terminals. For example, the target application may be an application on a mobile phone. Or, for example, the target application may be an application on a computer. Or, for example, the target application may be an application for smart homes. Since the hardware structures of different application terminals may differ, the functions and operating modes of the operating systems on different application terminals may also differ. Therefore, the server needs to configure the operating system emulator for different application terminals to obtain a preset operating system emulator, thereby enabling the preset operating system emulator to be compatible with the hardware of the application terminal.

[0068] In one embodiment, the preset operating system emulator can be an Android emulator. An Android emulator is an emulator that can simulate the Android operating system on a Windows platform. For example, an Android emulator can simulate the Android phone's operating environment on a computer, allowing users to experience Android games and applications that run on a mobile phone on their computer.

[0069] The target operating system emulator includes an operating system emulator with the target application installed.

[0070] In one embodiment, since the application installation file includes the resources required to install the target application, the server installing the application installation file into the preset operating system emulator is equivalent to installing the target application into the preset operating system emulator, thereby obtaining a target operating system emulator with the target application.

[0071] For example, when the server installs the target application's APK into a preset Android emulator, it is equivalent to installing the target application into the preset Android emulator, thus obtaining an Android emulator with the target application.

[0072] 103. Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application.

[0073] Action events can include user actions on the target application that can be recognized by the target application. For example, action events can include user clicking on a control in the target application, user touching a control in the target application, or user making a gesture towards the target application.

[0074] The operation event information may include information that records user operations on the target application. For example, operation event information may include the time, order, and frequency of the operation events, etc.

[0075] In one embodiment, the operation event information may be hotspot function information. In one embodiment, when a user triggers an operation event on a target application, it may map to the triggering of a series of functions within the target application. For example, if the user triggers a control on the target application, the target application will execute a series of functions in response to the user's trigger. Hotspot functions may include functions that are executed frequently. Hotspot function information may include information about the hotspot functions. For example, hotspot function information may include the signature of the hotspot function, etc. The signature of the hotspot function may include the function name, parameter types, number of parameters, and parameter order, etc.

[0076] In this embodiment, the server can simulate user operation events for the target application in the target operating system simulator, thereby obtaining operation event information for the target application.

[0077] For example, the server can simulate user actions on the target application in the target Android emulator to obtain information about hot functions for the target application.

[0078] 104. Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file.

[0079] In one embodiment, after receiving operation event information, the server can adjust the application installation file based on the operation event information using a target operating system emulator to obtain an adjusted application installation file.

[0080] There are several ways to make adjustments. For example, you can modify parameters in the application installation file. Another example is to optimize the application installation file during compilation, and so on.

[0081] For example, when the target operating system emulator is an Android emulator and the application installation file is an APK file, the dex2oat (short for Dalvik Executable File to Optimized Art File) program can be used to compile and optimize the APK file to obtain a modified application installation file.

[0082] In one embodiment, an APK file can be viewed as a compressed archive containing one or more DEX (Dalvik VM executes) files.

[0083] Among them, dex2oat is a program that compiles and optimizes dex files.

[0084] In one embodiment, the Android operating system is developed based on the Java programming language, which uses the JVM (Java Virtual Machine). However, when building an Android operating system on a mobile phone, due to the limited hardware resources of the phone, directly using the JVM would result in a poor user experience. Therefore, the Dalvik virtual machine was optimized based on the JVM. The Dalvik virtual machine supports running Java applications converted to dex format. The dex format is a compression format specifically designed for the Dalvik virtual machine, suitable for systems with limited content and processor speed.

[0085] In one embodiment, when dex2oat is used to compile and optimize an APK file, the adjusted application installation file can be an OAT file.

[0086] The oat file can be the product of dex2oat compiling and optimizing the apk file.

[0087] 105. Send the application installation file and the adjusted application installation file to the application terminal.

[0088] In one embodiment, after the server obtains the adjusted application installation file, it can send the application installation file and the adjusted application installation file to the application terminal, so that the application terminal can use the application installation file to install the target application and optimize the target application based on the adjusted application installation file.

[0089] For example, when the application installation file is an APK file and the modified installation file is an OAT file, the server can send both the APK and OAT files to the application terminal. The application terminal can then use the APK file to install the target application and optimize it based on the OAT file during the installation process, thereby improving the application's installation speed, startup speed, and overall smoothness of use, etc.

[0090] This application proposes an application adjustment method. This method involves obtaining the application installation file of a target application; installing the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator contains the target application; simulating user operation events on the target application within the target operating system emulator to obtain operation event information for the target application; adjusting the application installation file using the target operating system emulator based on the operation event information to obtain an adjusted application installation file; and sending the original application installation file and the adjusted application installation file to an application terminal. In this application embodiment, by simulating user operation events on the target application within the target operating system to obtain operation event information for the target application, the efficiency of obtaining operation event information is improved, as it eliminates the need for the user to install the target application and use it for a period of time before collecting the user's operation event information. Furthermore, the operation event information allows for optimization and adjustment of the target application, thereby improving the efficiency of target application optimization.

[0091] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0092] This application will use the integration of the application adjustment method on a server as an example to illustrate the method of this application embodiment. Specifically, as shown... Figure 3 As shown, the process of the application adjustment method proposed in this application embodiment may include:

[0093] 201. Obtain the initial operating system emulator.

[0094] The initial operating system emulator includes an unconfigured operating system emulator. While it possesses the basic functions of an operating system emulator, it may not be compatible with the application terminal.

[0095] In one embodiment, the initial operating system emulator may be an Android operating system emulator.

[0096] In one embodiment, developers can set up an initial operating system emulator on a server, and then the server can obtain the initial operating system emulator.

[0097] 202. Configure the initial operating system emulator to obtain the preset operating system emulator.

[0098] In one embodiment, to ensure compatibility between the initial operating system emulator and the application terminal, the server can configure the initial operating system emulator to obtain a preset operating system emulator. Specifically, the step "configuring the initial operating system emulator to obtain a preset operating system emulator" may include:

[0099] The initial operating system emulator is customized according to the target application to obtain a customized operating system emulator.

[0100] Adjust the application installation logic of the customized operating system to obtain a preset operating system emulator.

[0101] In one embodiment, when the server performs custom processing on the initial operating system emulator according to the target application, the server can receive custom code set by the developer to modify the compilation environment of the initial operating system emulator. The server can then execute this custom code in the initial operating system emulator, thereby modifying the emulator's compilation environment and implementing custom processing of the initial operating system, thus obtaining a customized operating system emulator.

[0102] In one embodiment, when the initial operating system emulator is an Android emulator, since Android emulators generally only support installing APK files and do not support downloading OAT files at the same time as installing APK files, the application installation logic of the customized operating system emulator can be adjusted to obtain a preset operating system emulator.

[0103] The application installation logic includes the rules that must be followed when installing applications on a customized operating system. For example, when the customized operating system is an Android emulator, the typical application installation logic of an Android emulator only supports installing APK files and does not support downloading OAT files at the same time as installing APK files.

[0104] In one embodiment, the application installation logic of the customized operating system can be adjusted by modifying the code within the PackageManagerService service. For example, the PackageManagerService service can be used to copy the oat file to the installation path of the apk file, thus enabling the oat file to be downloaded simultaneously with the apk file installation.

[0105] 203. Obtain the application installation file of the target application.

[0106] For example, you can obtain the APK file of the target application.

[0107] 204. Install the application installation file into the preset operating system emulator to obtain the target operating system emulator, which contains the target application.

[0108] 205. Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application.

[0109] In one embodiment, by sending an operation event stream to a target operating system emulator, user operation events targeting a target application can be simulated in the target operating system emulator, thereby obtaining operation event information for the target application. Specifically, the step "simulating user operation events targeting a target application in the target operating system emulator and obtaining operation event information for the application" may include:

[0110] Send operation event streams to the target application in the target operating system emulator;

[0111] The target operating system simulator is used to respond to the operation event stream, and the operation event stream is mapped to the corresponding operation event function based on the response results;

[0112] Generate operation event information for the target application based on operation event functions.

[0113] The operation event stream includes signals that can simulate user actions.

[0114] In one embodiment, when the target operating system emulator is an Android emulator, Monkey technology can be used to send operation event streams to the target application in the Android emulator.

[0115] Monkey is a command-line tool in Android that can run in an emulator or on a physical device. It sends a pseudo-random stream of action events (also known as a user event stream) to the system, thereby simulating user actions on a target application.

[0116] In Monkey, this event flow can include touch events, gesture events, two-finger zoom events, trajectory events, screen rotation events, basic navigation events, main navigation events, system key events, Activity launch events, keyboard events, and other types of events.

[0117] Touch events refer to the action of pressing and releasing a point on the screen, which appears similar to clicking on a mobile phone.

[0118] Gesture events refer to actions such as pressing, moving randomly, or lifting on a certain part of the screen, i.e., linear swiping.

[0119] Among them, the two-finger zoom event refers to the operation of pressing down on two points on the screen at the same time, moving them at the same time, and finally lifting them at the same time, which is the zoom gesture operation on the application terminal.

[0120] Trajectory events consist of one or more random movements, sometimes accompanied by clicks.

[0121] The screen rotation event simulates the switching between landscape and portrait modes on an Android phone.

[0122] Among them, basic navigation events refer to the operation of clicking the up, down, left, and right buttons on the directional input device.

[0123] Keyboard events mainly involve keyboard-related operations, such as clicking an input box, the keyboard popping up, clicking outside the input box, and the keyboard retracting.

[0124] Other types of events include all events other than the 10 types mentioned above, such as key presses and buttons on other less frequently used devices.

[0125] In one embodiment, the server can use Monkey to randomly send operation event streams to the target application in the target operating system emulator, thereby simulating user operation events on the target application.

[0126] For example, the server can use Monkey to randomly send touch events, gesture events, two-finger zoom events, trajectory events, screen rotation events, basic navigation events, main navigation events, system key events, Activity launch events, keyboard events, and other types of events to the target operating system emulator, thereby simulating user operation events on the target application.

[0127] In one embodiment, since a user triggers an operation event on a target application, this may map to the triggering of a series of functions within the target application. Therefore, after the server sends the operation event stream to the target application in the target operating system emulator, the target operating system emulator vectorizes the operation event stream and maps it to the corresponding operation event functions based on the response.

[0128] Among them, the operation event function includes the functions needed to respond to operation events.

[0129] For example, for a target application built on the Android operating system, the operation event function can be a function in the dex file within the apk file.

[0130] In one embodiment, the operation event function may be a hotspot function.

[0131] For example, the server uses Monkey to send the operation event stream corresponding to the touch event to the target application of the target operating system. In the process of responding to this touch event, the target operating system is actually running multiple operation event functions in the target application.

[0132] In one embodiment, during the execution of multiple operation event functions in the target application by the target operating system, the server can collect the operation event functions running in the target operating system and generate operation event information of the target application based on the operation event functions.

[0133] In one embodiment, the server can identify the operation event function to obtain its identification information, and then convert the identification information into operation behavior information of the target application. Specifically, the step "generating operation event information of the target application based on the operation event function" may include:

[0134] The operation event functions are identified to obtain their identification information;

[0135] The identification information of the operation event function is converted into operation event information of the target application.

[0136] In one embodiment, when the operation event function is a hotspot function, the identification information of the operation event function can be the signature of the hotspot function. For example, the identification information of the operation event function may include the function name, parameter types, number of parameters, and parameter order, etc.

[0137] In one embodiment, when the operation event function can be a function in the dex file of the apk file, the server can obtain the identification information of the operation event function by identifying the index of the operation event function in the dex file.

[0138] In one embodiment, after obtaining the identification information of the operation event function, the server can convert the identification information of the operation event function into operation event information of the target application.

[0139] For example, when the target operating system emulator is an Android emulator, the server can record the identification information of the operation event functions in the profile of the Android emulator, thereby obtaining the operation event information of the target application.

[0140] The profile file is a file in the Android emulator that records the identification information of operation event functions. For example, the profile file can be used to record the indices of hot functions in the dex file.

[0141] 206. Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file.

[0142] In one embodiment, based on operation event information, the server can use a target operating system emulator to adjust the application installation file to obtain an adjusted application installation file.

[0143] In one embodiment, the step "adjusting the application installation file using a target operating system emulator based on operation event information to obtain an adjusted application installation file" may include:

[0144] The operation event information is identified to obtain the information content of the operation event information;

[0145] Match the amount of information in the operation event with a preset information threshold;

[0146] When the amount of information in the operation event matches the preset information threshold, the application installation file is adjusted using the target operating system emulator based on the operation event information to obtain the adjusted application installation file.

[0147] The amount of information in the operation event information can include the size of the operation event file. For example, when the server records the identification information of the operation event function into the profile in the Android emulator, the amount of information in the operation event can include the size of the profile file.

[0148] In one embodiment, when adjusting the application installation file based on operation event information, the adjustment is only justified when the operation event information accumulates to a certain level, thereby improving the reliability of the adjustment. Therefore, when adjusting the application installation file, operation event information can be identified to obtain its information content. Then, the information content of the operation event information is matched with a preset information content threshold.

[0149] In one embodiment, when the amount of information in the operation event information matches a preset information amount threshold, the application installation file can be adjusted based on the operation event information using a target operating system emulator to obtain an adjusted application installation file.

[0150] For example, the preset information threshold can be 2 megabytes (MB). When the information content of the profile file is greater than or equal to 2MB, the application installation file can be adjusted using the target operating system emulator based on the operation event information to obtain the adjusted application installation file.

[0151] In one embodiment, when the amount of information in the operation event information does not match the preset information amount threshold, the operation event information can continue to be collected, so that the amount of information in the operation event information matches the preset information amount threshold.

[0152] For example, if the preset information threshold is 2MB, and the information in the profile file is less than 2MB, the server can continue to collect operation event information so that the information in the operation event information matches the preset information threshold.

[0153] In one embodiment, when the amount of information in the operation event matches a preset information amount threshold, the step "when the amount of information in the operation event matches a preset information amount threshold, adjust the application installation file based on the operation event information using a target operating system emulator to obtain an adjusted application installation file" may include:

[0154] When the amount of information in the operation event matches the preset information threshold, the target compilation mode is determined based on the operation event information.

[0155] Use the target operating system emulator to call the preset adjustment compiler;

[0156] The application installation file is compiled in the target compilation mode using a preset adjustment compiler to obtain the adjusted application installation file.

[0157] In one embodiment, since the application installation file can be adjusted by compiling and optimizing it, the corresponding target compilation mode can be determined when adjusting the application installation file using the target operating system emulator.

[0158] The compilation mode can include the mode corresponding to the compilation optimization of the application installation file.

[0159] For example, when the application installation file is an APK file, the compilation mode can include quicken, speed, and speed-profile modes.

[0160] The quicken compilation mode can run the dex code in the APK and optimize some of the dex code, thereby improving the performance of the target application.

[0161] The speed compilation mode can run the dex code in the APK and compile all methods in the APK using dex2oat.

[0162] The speed-profile mode can run code in the APK and compile some methods in the APK using dex2oat based on the profile.

[0163] For example, when the operation event information is recorded in the profile in the Android emulator, the target compilation mode can be determined to be speed-profile mode.

[0164] In one embodiment, the server can utilize the target operating system emulator to invoke a preset tuning compiler. When the target operating system emulator is an Android emulator, this preset tuning compiler can be dex2oat.

[0165] For example, you can use dex2oat in the Android emulator to compile the target application in speed-profile mode, thereby obtaining the adjusted installation file.

[0166] 207. Send the application installation file and the adjusted application installation file to the application terminal.

[0167] In one embodiment, after obtaining the modified application installation file, the server can retrieve the modified application installation file from the target operating system emulator.

[0168] When a user downloads the target application on the application terminal, the server can send the modified application installation file and the application installation file to the application terminal. This allows the application terminal to optimize the target application by using the modified application installation file when installing the target application.

[0169] For example, when the application installation file is an APK file and the adjusted application installation file is an OAT file, the server can retrieve the generated OAT file from the Android emulator.

[0170] When a user downloads a target application from their phone, the server can send the APK file and the OAT file to the phone. The phone can then install the target application based on the APK file and optimize it during the installation process based on the OAT file.

[0171] In one embodiment, to more clearly describe the application adjustment method proposed in this application, when the operating system emulator is an Android emulator, the server can build a custom Android emulator created by the developer. This Android emulator can be used to generate profiles and oat files subsequently. Then, the application installation logic of the Android emulator can be adjusted so that the emulator can not only support installing APK files but also downloading oat files simultaneously. When the developer uploads the APK file to the server, the server can use the APK file to install the target application into the Android emulator and use the Monkey function to simulate user interaction with the target application within the Android emulator. Hotspot functions are recorded in the profile within the Android emulator to obtain hotspot function information. When the size of the profile file in the Android emulator matches a preset information threshold, the dex2oat function in the Android emulator can be called to compile the target application in speed-profile mode, thereby generating the oat file. Next, the server can retrieve the generated oat file from the Android emulator. When the user downloads the target application via their mobile phone, the server can send the oat file and APK file to the phone.

[0172] This application embodiment can obtain the application installation file; install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the application; simulate user operation events on the application in the target operating system emulator to obtain operation event information on the application; based on the operation event information, adjust the application installation file using the target operating system emulator to obtain an adjusted application installation file; and send the application installation file and the adjusted application installation file to the application terminal, thereby improving the efficiency of application optimization.

[0173] To better implement the application adjustment method provided in the embodiments of this application, one embodiment also provides an application adjustment device, which can be integrated into an electronic device. The meanings of the terms used are the same as in the application adjustment method described above, and specific implementation details can be found in the description of the method embodiments.

[0174] In one embodiment, an application adjustment device is provided, which can be specifically integrated into an electronic device, such as... Figure 4 As shown, the application adjustment device includes: a file acquisition unit 301, an installation unit 302, a simulation unit 303, an adjustment unit 304, and a sending unit 305, as detailed below:

[0175] File acquisition unit 301 is used to acquire the application installation file of the target application;

[0176] Installation unit 302 is used to install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the target application;

[0177] Simulation unit 303 is used to simulate user operation events for the target application in the target operating system simulator to obtain operation event information for the target application;

[0178] The adjustment unit 304 is used to adjust the application installation file based on the operation event information using the target operating system emulator to obtain the adjusted application installation file.

[0179] The sending unit 305 is used to send the application installation file and the adjusted application installation file to the application terminal.

[0180] In one embodiment, the simulation unit includes:

[0181] A sending subunit is used to send an operation event stream to the target application in the target operating system emulator;

[0182] The mapping subunit is used to respond to the operation event stream using the target operating system simulator, and to map the operation event stream to the corresponding operation event function based on the response result;

[0183] The information generation subunit is used to generate operation event information of the target application based on the operation event function.

[0184] In one embodiment, the information generation subunit includes:

[0185] The identification module is used to identify the operation event function and obtain the identification information of the operation event function;

[0186] The conversion module is used to convert the identification information of the operation event function into the operation event information of the target application.

[0187] In one embodiment, the adjustment unit includes:

[0188] An information recognition subunit is used to recognize the operation event information and obtain the information content of the operation event information;

[0189] The matching subunit is used to match the information content of the operation event information with a preset information content threshold.

[0190] The adjustment subunit is used to adjust the application installation file based on the operation event information and the target operating system simulator when the information content of the operation event information matches the preset information content threshold, so as to obtain the adjusted application installation file.

[0191] In one embodiment, the adjustment subunit includes:

[0192] The mode determination module is used to determine the target compilation mode based on the operation event information when the amount of information in the operation event information matches a preset information amount threshold.

[0193] The calling module is used to invoke a preset adjustment compiler using the target operating system emulator;

[0194] The compilation module is used to compile the application installation file in the target compilation mode using the preset adjustment compiler to obtain the adjusted application installation file.

[0195] In one embodiment, the application adjustment device further includes:

[0196] The simulator acquisition unit is used to acquire the initial operating system simulator;

[0197] The setting unit is used to set the initial operating system simulator to obtain the preset operating system simulator.

[0198] In one embodiment, the setting unit includes:

[0199] A custom subunit is used to customize the initial operating system simulator according to the application to obtain the customized operating system simulator;

[0200] The adjustment subunit is used to adjust the application installation logic of the customized operating system to obtain the preset operating system simulator.

[0201] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0202] The aforementioned testing and verification device enables the verification of test feedback data at the micro-granular level, improving the reliability of test feedback data in application verification testing and thus enhancing the accuracy of test results in application verification testing.

[0203] This application also provides an electronic device, which may include a terminal or a server; for example, the electronic device may be a server, such as an application adjustment server. Figure 5 As shown, it illustrates the structural diagram of the terminal involved in the embodiments of this application, specifically:

[0204] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0205] The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0206] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0207] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0208] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0209] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:

[0210] Obtain the application installation file of the target application;

[0211] The application installation file is installed into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator contains the target application;

[0212] Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application;

[0213] Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file;

[0214] Send the application installation file and the adjusted application installation file to the application terminal.

[0215] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0216] According to one aspect of this application, a computer program application or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.

[0217] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0218] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the application adjustment methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0219] Obtain the application installation file of the target application;

[0220] The application installation file is installed into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator contains the target application;

[0221] Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application;

[0222] Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file;

[0223] Send the application installation file and the adjusted application installation file to the application terminal.

[0224] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0225] Since the computer program stored in the storage medium can execute the steps in any of the application adjustment methods provided in the embodiments of this application, the beneficial effects that any of the application adjustment methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0226] The above provides a detailed description of an application adjustment method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An application adjustment method, characterized in that, include: Obtain the application installation file of the target application; The application installation file is installed into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator contains the target application; Simulate user actions on the target application in the target operating system simulator to obtain action event information for the target application; Based on the operation event information, the application installation file is adjusted using the target operating system emulator to obtain the adjusted application installation file; Send the application installation file and the adjusted application installation file to the application terminal; The step of simulating user operation events for the target application in the target operating system emulator to obtain operation event information for the application includes: Send an operation event stream to the target application in the target operating system emulator; The target operating system simulator is used to respond to the operation event stream, and the operation event stream is mapped to the corresponding operation event function based on the response result; The operation event information of the target application is generated based on the operation event function; The step of adjusting the application installation file using the target operating system emulator based on the operation event information to obtain the adjusted application installation file includes: The operation event information is identified to obtain the information content of the operation event information; The amount of information in the operation event information is matched with a preset information amount threshold; When the amount of information in the operation event information matches a preset information threshold, the application installation file is adjusted using the target operating system simulator based on the operation event information to obtain the adjusted application installation file.

2. The method as described in claim 1, characterized in that, The generation of operation event information for the application based on the operation event function includes: The operation event function is identified to obtain its identification information; The identification information of the operation event function is converted into the operation event information of the target application.

3. The method as described in claim 1, characterized in that, When the information content of the operation event information matches a preset information content threshold, the application installation file is adjusted based on the operation event information using the target operating system emulator to obtain an adjusted application installation file, including: When the amount of information in the operation event information matches a preset information amount threshold, the target compilation mode is determined based on the operation event information. The target operating system emulator is used to call a preset adjustment compiler; The application installation file is compiled in the target compilation mode using the preset adjustment compiler to obtain the adjusted application installation file.

4. The method as described in claim 1, characterized in that, Before obtaining the application installation file of the target application, the following steps are included: Obtain the initial operating system emulator; The initial operating system simulator is configured to obtain the preset operating system simulator.

5. The method as described in claim 4, characterized in that, The step of setting the initial operating system simulator to obtain the preset operating system simulator includes: The initial operating system simulator is customized according to the target application to obtain a customized operating system simulator. Adjust the application installation logic of the customized operating system to obtain the preset operating system simulator.

6. An application adjustment device, characterized in that, include: The file acquisition unit is used to acquire the application installation file of the target application. An installation unit is used to install the application installation file into a preset operating system emulator to obtain a target operating system emulator, wherein the target operating system emulator has the target application; The simulation unit is used to simulate user operation events for the target application in the target operating system simulator, and obtain operation event information for the target application. Send an operation event stream to the target application in the target operating system emulator; The target operating system simulator is used to respond to the operation event stream, and the operation event stream is mapped to the corresponding operation event function based on the response result; The operation event information of the target application is generated based on the operation event function; The adjustment unit is used to adjust the application installation file based on the operation event information using the target operating system emulator to obtain the adjusted application installation file; The operation event information is identified to obtain the information content of the operation event information; The amount of information in the operation event information is matched with a preset information amount threshold; When the amount of information in the operation event information matches a preset information threshold, the application installation file is adjusted using the target operating system emulator based on the operation event information to obtain the adjusted application installation file. The sending unit is used to send the application installation file and the adjusted application installation file to the application terminal.

7. An electronic device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the application adjustment method according to any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores multiple computer programs adapted for loading by a processor to execute the application adjustment method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Virus monitoring method and device

    CN106709343A

  • Method for rapidly improving application starting performance based on Android virtual machine

    CN111782297A

  • Compiling processing method and device, electronic equipment and storage medium

    CN112540769A

  • Application installation method and device, server and computer readable medium

    CN112631622A