CN116661844A - Configuration file processing method, application program updating method, device and server - Google Patents

Configuration file processing method, application program updating method, device and server Download PDF

Info

Publication number
CN116661844A
CN116661844A CN202310626220.4A CN202310626220A CN116661844A CN 116661844 A CN116661844 A CN 116661844A CN 202310626220 A CN202310626220 A CN 202310626220A CN 116661844 A CN116661844 A CN 116661844A
Authority
CN
China
Prior art keywords
configuration file
application program
file
server
new version
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
CN202310626220.4A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202310626220.4A priority Critical patent/CN116661844A/en
Publication of CN116661844A publication Critical patent/CN116661844A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The application discloses a configuration file processing method, an application program updating method, a device, a server, electronic equipment and a readable storage medium, belonging to the technical field of computers, wherein the method comprises the following steps: the method comprises the steps that a server obtains a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment runs an old version of the first application program; and under the condition that the version of the first application program is updated, the server generates a second configuration file based on the first configuration file, wherein the second configuration file is the configuration file of the new version of the first application program.

Description

Configuration file processing method, application program updating method, device and server
Technical Field
The application belongs to the technical field of computers, and particularly relates to a configuration file processing method, an application program updating device, a server, electronic equipment and a readable storage medium.
Background
Currently, in an Android running environment (ART) virtual machine, the ART virtual machine can compile Dalvik Executable (dex) bytecodes of an application program into local machine instructions according to a hot spot method in a configuration file of the application program, so that the ART virtual machine can be directly used when the application program runs, and the running speed of the application program is improved. The configuration file has two generation modes: one way is for the server to issue directly to the ART virtual machine along with the application installation package; the other mode is that the server only issues an installation package of the application program, and the ART virtual machine is actively generated according to the use preference of the user after the running time of the application program reaches a certain time.
However, for a configuration file directly issued by a server at the time of installation, since the configuration file is often a result of random training, the configuration file is often quite different from the user's use preference, and cannot achieve the optimization effect closest to the user's use preference; for the configuration file actively generated by the ART virtual machine according to the user's use preference after actively running the application program for a period of time, because the code is not optimized for explaining the execution code when starting for the first time, but compiled during the running process of the application program, a great deal of system resources are occupied, and the application program is blocked when running. Thus, the existing method for generating the configuration file of the application program cannot consider the use preference of the user and the smoothness of operation.
Disclosure of Invention
The embodiment of the application aims to provide a configuration file processing method, an application program updating device, a server, electronic equipment and a readable storage medium, which can enable a new version of application program to consider the use preference of a user and the smoothness of operation after the version of the application program is updated.
In a first aspect, an embodiment of the present application provides a method for processing a configuration file, where the method includes: the method comprises the steps that a server obtains a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment runs an old version of the first application program; and under the condition that the version of the first application program is updated, the server generates a second configuration file based on the first configuration file, wherein the second configuration file is the configuration file of the new version of the first application program.
In a second aspect, an embodiment of the present application provides an application program updating method, including: the method comprises the steps that electronic equipment receives a target file sent by a server, and the electronic equipment is provided with a first application program of an old version; the electronic equipment updates the old version first application program into a new version first application program based on the target file; wherein the target file comprises any one of the following: the server generates a second configuration file according to the first configuration file of the old version first application program; the method comprises the steps of installing a package and compiling a file of a new-version first application program, wherein the compiling file is obtained by compiling the new-version first application program based on a second configuration file by a server.
In a third aspect, an embodiment of the present application provides a configuration file processing apparatus, including: the device comprises an acquisition module and a generation module; the electronic equipment comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment runs an old version of the first application program; and the generating module is used for generating a second configuration file based on the first configuration file acquired by the acquiring module under the condition that the version of the first application program is updated, wherein the second configuration file is the configuration file of the new version of the first application program.
In a fourth aspect, an embodiment of the present application provides an application updating apparatus, including: a receiving module and an updating module; the electronic equipment is provided with a first application program of an old version; the updating module is used for updating the old version first application program into the new version first application program based on the target file received by the receiving module; wherein the target file comprises any one of the following: the server generates a second configuration file according to the first configuration file of the old version first application program; the method comprises the steps of installing a package and compiling a file of a new-version first application program, wherein the compiling file is obtained by compiling the new-version first application program based on a second configuration file by a server.
In a fifth aspect, embodiments of the present application provide a server comprising a processor, a communication interface and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect.
In a sixth aspect, an embodiment of the present application provides a server, where the server includes a communication interface, where the communication interface is configured to send a target file.
In a seventh aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the second aspect.
In an eighth aspect, an embodiment of the present application provides an electronic device, including a communication interface configured to receive a target file.
In a ninth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor, implement the steps of the method as described in the first aspect, or implement the steps of the method as described in the second aspect.
In a tenth aspect, embodiments of the present application provide a chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute programs or instructions to implement the method according to the first aspect or to implement the steps of the method according to the second aspect.
In an eleventh aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect or to implement the steps of the method according to the second aspect.
In a twelfth aspect, an embodiment of the present application provides a communication system, including a server and an electronic device, where the server is configured to perform the steps of the method for processing a configuration file according to the first aspect, and the electronic device is configured to perform the steps of the method for updating an application program according to the second aspect.
In the embodiment of the application, a server acquires a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment runs an old version of the first application program; and the server generates a second configuration file based on the first configuration file under the condition that the version of the first application program is updated, wherein the second configuration file is the configuration file of the new version of the first application program. According to the scheme, the server can acquire the configuration file generated when the electronic equipment runs the old version application program, and multiplexing the configuration file of the old version application program under the condition of updating the version of the application program to generate the configuration file of the new version application program. Therefore, the time for generating the configuration file and the resources of the server can be saved, the configuration file containing the updated version of the user use preference can be generated quickly, and the electronic equipment can update the application program directly according to the configuration file containing the user use preference when updating the application program, so that the smoothness of the operation of the application program is improved.
Drawings
FIG. 1 is a flowchart of a method for processing a configuration file according to an embodiment of the present application;
FIG. 2 is an example flow chart of a method for processing a configuration file according to an embodiment of the present application;
FIG. 3 is a flowchart of an application update method according to an embodiment of the present application;
FIG. 4 is an example flowchart of an application update method provided by an embodiment of the present application;
FIG. 5 is an example schematic diagram of a method for processing a configuration file and a method for updating an application program according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a method for processing configuration files according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an application updating device according to an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
FIG. 9 is a second schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type not limited to the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
Some terms/nouns involved in embodiments of the application are explained below.
1. Android Run Time (ART) virtual machine
After the ART virtual machine is enabled, the ART virtual machine is precompiled once when the application is installed, i.e., the code is first converted into machine language and stored locally when the application is installed. In this way, the ART virtual machine does not need to be compiled once each time the application is run.
2. Precompiled (AOT) technique
AOT technology refers to technology that converts code of an application program into code that can be directly executed by a machine before the application program runs. AOT technology can improve the performance of an application because compiled code typically executes faster than dynamically translated code and can reduce the launch time of an application because compilation at runtime is not required.
3. Oat file
The Android operating system creates an oat file to speed up loading time of an application PacKage (APK file) of an application program. When installing an application, the ART virtual machine can automatically optimize the application data and create a corresponding oat file.
4. verify mode
The verify mode is a test mode, in which the ART virtual machine can perform static verification on the bytecode of the application program, and compile the application program when the application program runs, so that the running speed is slower.
5. speed-profile mode
The speed-profile mode is that the ART virtual machine carries out AOT compiling on the method information listed in the configuration file on the basis of the verify mode, and codes of the application program are converted into machine language, so that the ART virtual machine can directly run the application program.
The method for processing the configuration file, the method for updating the application program, the device and the server provided by the embodiment of the application are described in detail through specific embodiments and application scenes thereof by combining the attached drawings.
The configuration file processing method, the application program updating method, the device and the server provided by the embodiment of the application can be applied to the scene of updating the application program.
Currently, android systems typically employ ART virtual machines to run applications through AOT technology. Before compiling an application program, the application program is generally in a verify mode, and in the verify mode, an ART virtual machine can compile Dalvik Executable (dex) byte codes of the application program in the running process of the application program, so that a great deal of system resources are occupied in the compiling process easily, and the running of the application program is blocked. The ART virtual machine can adopt an AOT technology, and after the dex byte code of the application program is compiled into a machine language by a hot spot method in a configuration file of the application program, the mode of the application program can be converted into a speed-profile mode, and in the speed-profile mode, the ART virtual machine can directly use the instruction when the application program runs, so that the starting speed and the running speed of the application program can be improved.
In the related art, the process of compiling by the AOT technique requires the use of a dex2oat tool. The dex2oat tool is configured by a profile hot spot method, compiles the dex byte code of the application program into a machine language to generate an oat file, and enables the application program to be changed into a speed-profile mode for the ART virtual machine to be used when the application program runs. The profile hotspot method configuration file generally has two generation modes, the first is actively generated according to the use preference of the user after the electronic device actively runs the application program for a period of time. The second is to simulate the user to use the application program by the server so as to collect the hot spot method when the application program runs to generate a configuration file, and then the configuration file is directly issued by the server or the cloud end when the application program is installed.
However, for the method for generating the profile hotspot method configuration file, although the profile hotspot method configuration file generated according to the historical use of the user is better in accordance with the use preference of the user to the application program, the effect is better after compiling into the speed-profile mode, but the configuration file corresponding to the application program can be generated after a period of use by the user is required, and the code for explaining and executing the application program is not optimized when the application program is started for the first time, but the code is compiled in the process of running the application program, so that a great deal of system resources are occupied, the running of the application program is blocked, and the user experience is affected. For the method for generating the profile hotspot method configuration file, although compiling can be performed when the application program is installed, so that the application program can be compiled into a speed-profile mode after being installed, and therefore the running speed of the application program is improved, and blocking is avoided. Thus, the existing method for generating the configuration file of the application program cannot consider the use preference of the user and the smoothness of operation.
In the configuration file processing method provided by the embodiment of the application, the electronic equipment can upload the configuration file of the application program before the version update to the server, when the server detects the version update of the application program, the server can acquire the configuration file generated when the electronic equipment runs the application program of the old version, and generates a new configuration file by multiplexing the configuration file of the application program of the old version, thereby shortening the time required for generating the configuration file, and avoiding the time and resource consumption of the server to retrain the application program after the version update so as to generate the new configuration file. And because the multiplexed configuration file is generated according to the historical use of the user of the electronic equipment, the compiling result of the application program according to the new configuration file is closer to the use preference of the user, thereby avoiding the problem of low hit rate caused by that the hot spot method in the configuration file obtained by machine training does not accord with the user preference when in actual use. In addition, when the application program with updated version is installed, the server issues a new configuration file generated by multiplexing the configuration file before the updated version into the electronic device, and the electronic device can compile the application program with the new version into a speed-profile mode according to the new configuration file, so that compiling optimization conforming to the use preference of a user can be timely performed, excessive occupation of resources of the server is not needed, the time required by the server for generating the new configuration file is reduced, and the running speed of the application program is improved.
An embodiment of the present application provides a method for processing a configuration file, and fig. 1 shows a flowchart of the method for processing a configuration file provided by the embodiment of the present application, where the method may be applied to a server. As shown in fig. 1, the method for processing a configuration file according to the embodiment of the present application may include the following steps 100 and 101.
Step 100, the server obtains a first configuration file of the first application program.
The first configuration file is generated when the electronic equipment runs the old version of the first application program.
In some embodiments of the present application, the first application may be one or more applications among applications already downloaded in the electronic device.
The first application may be, for example, a communication application downloaded in the electronic device; alternatively, the first application may be a video application running in the electronic device.
In some embodiments of the present application, the configuration file is a configuration file of an application program, which may include hot spot method information in the application program. The hot spot method information may include method information with a plurality of repetition times in the running process of the application program.
For example, the hotspot method information may include personalized settings corresponding to user usage preferences and user settings for user names and passwords; alternatively, the hotspot method information may include key information of a third party system call and a running log of the application.
It may be appreciated that the first configuration file is a configuration file of a first application program before the updated version in the electronic device, and the configuration file may include settings corresponding to usage preferences of the user.
In some embodiments of the present application, the step 100 may include a step 100a described below.
Step 100a, the server receives a first configuration file of a first application program sent by the electronic device.
In some embodiments of the present application, the server may receive the generated first configuration file after compiling the code of the old version first application program sent by the electronic device according to the user history user use preference of the first application program.
In some embodiments of the present application, the server may receive the regenerated first configuration file of the electronic device when the usage preference of the user is greatly changed, and after receiving the regenerated first configuration file sent by the electronic device, the server may replace the received first configuration file with the previous first configuration file.
In some embodiments of the present application, the first configuration file sent by the electronic device and received by the server may carry the device identifier of the electronic device, so as to mark the electronic device to which the first configuration file belongs.
Therefore, the server can receive the first configuration file of the first application program sent by the electronic equipment, so that the configuration file of the old version application program stored in the server can be ensured to be the latest configuration file, and the generated new configuration file can be enabled to be most suitable for the use habit of a user when the configuration file is reused.
Step 101, the server generates a second configuration file based on the first configuration file under the condition that the version of the first application program is updated.
The second configuration file is a configuration file of the new version first application program.
In some embodiments of the present application, the above-mentioned version update of the first application refers to a version upgrade of the first application to optimize the performance of the first application, thereby providing the user with a better use experience.
Illustratively, the first application version update may include modifications or refinements to code of the first application, and may also include adding new functionality to the first application.
In the embodiment of the present application, the "generating the second configuration file based on the first configuration file" may represent: the server may generate a second configuration file for the new version of the first application by multiplexing the first configuration file for the old version of the first application. Thus, the time for generating the configuration file can be saved, and the generated configuration file accords with the use preference of the user.
In some embodiments of the present application, the step 101 may include a step 101a described below.
Step 101a, when a first configuration file exists in the server and the file size of the first configuration file is within a first range, generating a second configuration file based on the first configuration file.
In some embodiments of the present application, the server may determine a multiplexing condition before multiplexing the first configuration file, that is, the server performs multiplexing of the first configuration file if the multiplexing condition is satisfied.
In some embodiments of the present application, the server generates the second configuration file based on the first configuration file when the first configuration file exists and the file size of the first configuration file is within the first range.
For example, the server may perform multiplexing of the first profile in case that the file size of the first profile is 0 to 500 kb.
It will be appreciated that the file size of the first configuration file needs to be greater than 0kb to ensure that the first configuration file is not an empty file; the file size of the first configuration file is also required to be smaller than or equal to a certain value, so as to avoid the extension of the update time caused by the overlarge first configuration file.
In some embodiments of the present application, the first range may be default to the server, may be set by a user, or may be determined by the server according to big data. The embodiment of the present application is not particularly limited.
In some embodiments of the present application, the server may generate the second configuration file based on the first configuration file upon receiving an installation package request of the electronic device.
In some embodiments of the present application, the installation package request may be used to request an installation package for a new version of the first application.
In some embodiments of the application, the installation package may include at least one of: the method comprises the steps of downloading addresses of a new version first application program, compressing packages of the new version first application program, compressing packages of files changed or added in the new version first application program, and patches containing codes of the new version first application program.
In practical implementation, the installation package may include any file capable of implementing update of an application program, and embodiments of the present application are not limited in particular.
In some embodiments of the present application, the installation package request carries a device identifier of an electronic device that sends the installation package request. The device identification may include: device name, device number, etc.
It is understood that the server may generate the second configuration file based on the first configuration file corresponding to the electronic device upon receiving the installation package request of the electronic device. That is, the electronic device that generates the first configuration file is the same electronic device as the electronic device that issued the installation package request.
In some embodiments of the present application, the server may also generate the second configuration file based on the first configuration file before receiving the installation package request of the electronic device. And then, after receiving the installation package request of the electronic equipment, executing corresponding operation directly according to the second configuration file.
In this way, since the server may have the first configuration file in the server, and the file size of the first configuration file is within the first range, the second configuration file is generated based on the first configuration file. Therefore, the server can multiplex the configuration file of the old version application program and generate the configuration file of the new version application program under the condition that the configuration file of the old version application program exists and the file size of the configuration file of the old version application program is proper, so that the time for generating the configuration file can be saved by multiplexing the configuration file.
In some embodiments of the present application, the step 101 may include the following steps 101b and 101c.
Step 101b, the server determines first hot spot method information in an installation package of the new version first application program according to the first configuration file under the condition that the version of the first application program is updated.
The first hotspot method information is matched with the hotspot method information in the first configuration file.
In some embodiments of the present application, the first hotspot method information may be one or more pieces of method information in an installation package of the new-version first application, and the first configuration file also includes the same piece of method information as the one or more pieces of method information.
In some embodiments of the present application, the server may determine the first hotspot method information in the installation package of the new version first application program by decompressing the installation package of the new version first application program, analyzing the first configuration file, obtaining a method therein and a class to which the method belongs.
Specifically, the server may parse the first configuration file to obtain a hotspot method and class in the first configuration file, and the server may decompress an installation package of the new version of the first application program to obtain a dex file of the first application program, find a method and class identical to the hotspot method and class in the first configuration file from the dex file, and determine the found method and class as first hotspot method information.
Step 101c, the server generates a second configuration file based on the first hot spot method information.
In some embodiments of the present application, the server may write the first hotspot method information into the configuration file of the new version of the first application, i.e., generate the second configuration file.
In this way, the server can determine the method information matched with the hot spot method information in the first configuration file in the installation package of the new version first application program as the first hot spot method information, and generate the second configuration file based on the first hot spot method information. Therefore, the method information matched with the configuration file of the old version application program in the installation package of the new version application program can be multiplexed into the configuration file of the new version application program, and the purpose of multiplexing the configuration file of the old version application program is achieved, so that the generated configuration file of the new version application program accords with the use preference of a user, and the time and resources for generating the configuration file by the server are saved.
In the configuration file processing method provided by the embodiment of the application, the server can acquire the configuration file generated when the electronic equipment runs the old version application program, and multiplex the configuration file of the old version application program under the condition of updating the version of the application program to generate the configuration file of the new version application program. Therefore, the time for generating the configuration file and the resources of the server can be saved, the configuration file containing the updated version of the user use preference can be generated quickly, and the electronic equipment can update the application program directly according to the configuration file containing the user use preference when updating the application program, so that the smoothness of the operation of the application program is improved.
In some embodiments of the present application, after the step 101, the method for processing a profile provided in the embodiment of the present application may further include the following step 102.
Step 102, the server sends the target file to the electronic device.
Wherein, the target file may include any one of the following: an installation package and a second configuration file of the new version first application program; and the installation package and the compiling file of the new version first application program.
In some embodiments of the present application, the compiling file may be obtained by compiling the new version of the first application program based on the second configuration file by the server.
In some embodiments of the present application, after the server sends the target file to the electronic device, the electronic device may receive the target file and update the first application according to the target file.
In some embodiments of the present application, the compiled file may include a file after compiling the code of the application program, such as an odex file, a vdex file, an art file, and the like.
It may be appreciated that the server may directly send the installation package of the new version of the first application program and the second configuration file to the electronic device after multiplexing the first configuration file to generate the second configuration file; and the new version application program can be compiled on line directly according to the second configuration file, and the compiling file obtained by compiling and the installation package of the new version first application program are directly sent to the electronic equipment, so that the time and resources consumed by the self compiling of the electronic equipment are saved, and the fluency of running the first application program is improved.
For example, the server may decompress the installation package of the new version of the first application program, and obtain the first application program; and then the server can compile the new version first application program according to the second configuration file, store the compiled file in the server, and send the compiled file to the electronic equipment along with the installation package of the new version first application program.
In some embodiments of the present application, the step 102 may include a step 102a described below.
Step 102a, the server sends the target file to the electronic device when the second configuration file is generated within the first time period and the configuration file multiplexing rate is greater than or equal to the first preset.
The configuration file multiplexing rate is the ratio of multiplexing hot spot method information in the first configuration file and total hot spot method information in the first configuration file in the second configuration file.
In some embodiments of the present application, an error occurs in the process of generating the second configuration file, or the multiplexed first configuration file is too large, which may result in a longer time required for generating the second configuration file, so that the server may monitor the time taken for generating the second configuration file, and send the target file to the electronic device if the time taken for generating the configuration file does not exceed the first duration.
In some embodiments of the present application, the first duration may be default to the server, may be set by a user, or may be determined by the server according to big data. The embodiment of the present application is not particularly limited.
It should be noted that, the server may count the time consumed for generating the second configuration file after generating the second configuration file; the time spent in generating the second profile may also be counted. Further, the server may forgo generating the second profile after the time spent generating the second profile exceeds the first time period.
In some embodiments of the present application, the above-mentioned configuration file multiplexing rate may be a ratio of the same hot spot method information in the second configuration file as that in the first configuration file to all hot spot method information in the first configuration file, that is, a ratio of the first hot spot method information to all hot spot method information in the first configuration file, that is, a ratio of the second configuration file to hot spot method information in the first configuration file.
In some embodiments of the present application, the first threshold may be default to the server, may be set manually, or may be determined by the server according to big data. The embodiment of the present application is not particularly limited.
For example, assuming that the first threshold is 70%, 8000 pieces of hot spot method information are included in the first profile, and 6400 pieces of hot spot method information are included in the second profile, which are the same as the hot spot method information in the first profile. And if the same hot spot method information in the second configuration file and the same hot spot method information in the first configuration file account for 80% of all hot spot method information in the first configuration file, namely the configuration file multiplexing rate is 80%, the server can determine that the configuration file multiplexing rate is greater than a first threshold, namely the configuration file multiplexing rate is greater than or equal to the first threshold, and the server can send the target file to the electronic equipment.
In this way, the server can generate the second configuration file within the first time period, and the target file is sent to the electronic device when the configuration file multiplexing rate is greater than or equal to the first threshold value, that is, the server can send the target file to the electronic device when the generated hot spot method information in the second configuration file is correct and accords with the use preference of the user. Therefore, the server can generate a new configuration file by multiplexing the configuration file of the old version application program in a short time, and the corresponding file information is sent to the electronic equipment under the condition of higher configuration file multiplexing rate, so that the electronic equipment can directly update the new version application program according to the configuration file containing the user use preference, and the time for generating the configuration file can be saved while the user use preference is considered.
In some embodiments of the present application, the server deletes the first configuration file and sends an installation package of the new version of the first application program to the electronic device if the second configuration file is not generated in the first period of time or the configuration file multiplexing rate is smaller than the first preset.
It may be appreciated that the server may determine that multiplexing the first configuration file fails when the second configuration file is not generated within the first period of time or the configuration file multiplexing rate is less than the first threshold, and the server may delete the first configuration file and delete the second configuration file that has been generated or is being generated, and send only the installation package of the new version of the first application program to the electronic device.
In this way, since the server may not generate the second configuration file within the first period of time, or if the configuration file multiplexing rate is smaller than the first threshold, only the installation package of the new version first application program is sent to the electronic device, that is, only the installation package of the new version first application program is sent to the electronic device if multiplexing of the first configuration file fails. Therefore, the generation of errors or configuration files which do not accord with the use preference of the user can be avoided, and the waste of time and resources when the server generates the configuration files is caused.
In the configuration file processing method provided by the embodiment of the application, the server can acquire the configuration file generated when the electronic equipment runs the old version application program, and multiplex the configuration file of the old version application program under the condition of updating the version of the application program to generate the configuration file of the new version application program. Therefore, the time for generating the configuration file and the resources of the server can be saved, the configuration file containing the updated version of the user use preference can be generated quickly, and the electronic equipment can update the application program directly according to the configuration file containing the user use preference when updating the application program, so that the smoothness of the operation of the application program is improved.
The method for processing a profile provided by the embodiment of the present application is described in detail below. As shown in fig. 2, the profile processing method may include steps 201 to 208 described below.
Step 201, a server receives a first configuration file sent by an electronic device.
Step 202, the server detects that the version of the first application program is updated.
Step 203, the server decompresses the installation package of the new version first application program, loads the dex file in the installation package and acquires all the method information when the first configuration file exists and the file size of the first configuration file is in the first range.
In some embodiments of the present application, the server may obtain all method information in the dex file in the installation package and the class corresponding thereto.
Step 204, the server loads the stored first configuration file and acquires the hot spot method information.
In some embodiments of the present application, the server may obtain hotspot method information and a class corresponding thereto in the first configuration file.
Step 205, the server matches the hot spot method in the first configuration file with the class and the method in the dex file of the installation package of the new version first application program, and determines the first hot spot method information.
Step 206, the server generates a second configuration file according to the first hotspot method information.
Step 207, the server stores the multiplexed second configuration file when the second configuration file is generated within the first time period and the configuration file multiplexing rate is greater than or equal to the first threshold.
Step 208, the server prepares for updating, and sends the target file to the electronic device.
It should be noted that, for other descriptions of steps 201 to 208, reference is made to the descriptions of steps 100 to 102 in the above embodiments.
In this way, the server can acquire the configuration file generated when the electronic device runs the old version application program, and multiplex the configuration file of the old version application program under the condition of updating the version of the application program, so as to generate the configuration file of the new version application program. Therefore, the time for generating the configuration file and the resources of the server can be saved, the configuration file containing the updated version of the user use preference can be generated quickly, and the electronic equipment can update the application program directly according to the configuration file containing the user use preference when updating the application program, so that the smoothness of the operation of the application program is improved.
The embodiment of the application provides an application program updating method, and fig. 3 shows a flowchart of the application program updating method provided by the embodiment of the application, and the method can be applied to electronic equipment. As shown in fig. 3, the method for updating an application program provided in the embodiment of the present application may include the following steps 300 and 301.
Step 300, the electronic equipment receives the target file sent by the server.
Wherein, the target file may include any one of the following: the method comprises the steps of installing a package and a second configuration file of a new version first application program, and installing the package and compiling the file of the new version first application program.
In some embodiments of the present application, the second configuration file is generated by the server according to a first configuration file of the old version first application program; the compiling file is obtained by compiling the new version first application program by the server based on the second configuration file.
In some embodiments of the application, the second profile is a profile of a new version of the first application, the second profile being generated by the server based on the first profile, the first profile being generated by the electronic device based on user history using usage preferences of the first application.
For the installation package, the first configuration file, the second configuration file, and the compiled file, reference may be made to the description in the related embodiments in the server side described above.
Step 301, the electronic device updates the old version first application program to the new version first application program based on the target file.
In some embodiments of the present application, the electronic device may update and run the first application based on receiving the target file.
In an exemplary embodiment, when the target file received by the electronic device includes the installation package of the new version first application program and the second configuration file, the electronic device may precompiled the new version first application program according to the second configuration file when installing the new version first application program, and update the new version first application program into the speed-profile mode, so as to increase the running speed of the new version application program.
In some embodiments of the present application, the target file may include an installation package and a compiled file of the new version first application program. The above step 301 may include steps 301a and 301b described below.
Step 301a, the electronic device updates the old version first application program to the new version first application program according to the installation package of the new version first application program.
In some embodiments of the present application, the electronic device may update the old version first application program to the new version first application program according to a code file, a native resource file, a certificate, and other files in the installation package of the new version first application program.
Step 301b, the electronic device runs the new version first application program based on the compiled file.
In some embodiments of the present application, in the case where the target file received by the electronic device includes the installation package and the compiling file of the new version first application program, the electronic device may directly load the compiling file after installing the new version first application program, and directly update the first application program into the speed-profile mode, so as to reduce the time for generating the new configuration file by the new version first application program, and simultaneously reduce the time for compiling the new version first application program locally by the electronic device, and reduce the power consumption for compiling the first application program locally.
It should be noted that, if the electronic device only receives the installation package of the new version first application program sent by the server, the electronic device may directly compile the first application program into a verify mode, and compile the first application program in the process of running the first application program.
In this way, the electronic device can receive the installation package of the new version first application program and the second configuration file or the installation package and the compiling file of the new version first application program, which are sent by the server, so that the electronic device can directly multiplex the configuration file containing the user use preference generated by the configuration file of the old version application program, compile the new version application program, thereby reducing the time for waiting for the generation of the configuration file after the new version application program is installed, and enabling the generated configuration file to give consideration to the user use preference; or the electronic equipment can directly run the new version application program through the compiling file, so that the time and resources consumed by the electronic equipment for compiling the application program by itself are saved, and the blocking of the running application program is reduced.
In some embodiments of the present application, before the step 300, the method for updating an application program provided in the embodiment of the present application may further include the following steps 302 and 303.
Step 302, the electronic device receives a first input from a user.
In some embodiments of the present application, the first input may be used to trigger the electronic device to send an installation package request to the server to update the first application. The first input may also be referred to as a first operation.
Illustratively, the first input includes, but is not limited to: the touch input of the user on the screen of the electronic device through the touch device such as a finger or a stylus, or the voice instruction input by the user, or the specific gesture input by the user, or other feasibility inputs can be specifically determined according to the actual use requirement, and the embodiment of the application is not limited. The specific gesture in the embodiment of the application can be any one of a single-click gesture, a sliding gesture, a dragging gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture and a double-click gesture; the click input in the embodiment of the application can be single click input, double click input or any time click input, and the like, and can also be long-press input or short-press input.
For example, the first input may be a user click input to update an application control to trigger the electronic device to send an installation package request to the server. In practical implementation, the method can be determined according to practical use requirements, and the embodiment of the application is not limited.
For example, the first input may be a voice input of the user to the first application program, and the voice content of the voice input may be: "update first application", the electronic device may receive the voice input and send an installation package request to the server. In practical implementation, the method can be determined according to practical use requirements, and the embodiment of the application is not limited.
Step 303, the electronic device sends an installation package request to the server in response to the first input.
Wherein the installation package request is used for requesting an installation package of the new version first application program.
In some embodiments of the present application, after the electronic device sends an installation package request to the server, the server may receive the installation package request and send the target file to the electronic device.
Therefore, the electronic equipment can send the installation package request to the server after receiving the first input of the user, so that the electronic equipment can update the application program when the user needs to update the application program, and waste of time and resources required by updating is avoided.
In some embodiments of the present application, before the step 300, the method for updating an application program provided in the embodiment of the present application may further include a step 304 described below.
Step 304, the electronic device sends a configuration file of the first application program to the server.
In some embodiments of the present application, the electronic device may send the generated first configuration file after compiling code of the old version first application program according to the user history user usage preference of the first application program to the server.
In some embodiments of the present application, the electronic device may send the regenerated first configuration file to the server when the usage preference of the user is greatly changed, so that the server may replace the received first configuration file with the previous first configuration file after receiving the regenerated first configuration file sent by the electronic device.
In some embodiments of the present application, in the first configuration file sent by the electronic device to the server, the device identifier of the electronic device may be carried, so as to mark the electronic device to which the first configuration file belongs.
Therefore, the electronic equipment can send the configuration file of the first application program to the server, so that the configuration file of the old version application program stored in the server can be ensured to be the latest configuration file, and the generated new configuration file can be enabled to be most suitable for the use habit of a user when the configuration file is reused.
In some embodiments of the present application, the target file includes an installation package of the new version first application program and a second configuration file. After the step 300, the method for updating an application program according to the embodiment of the present application may further include the following step 305.
In step 305, when the computing capability of the electronic device is smaller than the second threshold, the electronic device compiles the installation package of the new version of the first application program based on the second configuration file in the process of updating the version of the first application program, so as to obtain and store the compiled file.
In some embodiments of the present application, the computing capability of the electronic device may be determined according to the computing capability of a chip of the processor of the electronic device.
Illustratively, assuming that the chip of the electronic device processor is a central processing unit (Central Processing Unit, CPU) chip, the computing capability of the CPU chip may be determined according to parameters such as the CPU architecture, the number of CPU cores, the CPU computing frequency, and the like.
For example, the CPU chip of the electronic device may be 64-bit, four-core, and the operating frequency is 3.0GHz.
In some embodiments of the present application, the second threshold may be default to the server, may be set by a user, or may be determined by the server according to big data. The embodiment of the present application is not particularly limited.
For example, assuming that the second threshold is 2.8GHz, if the computing capability of the CPU chip of the electronic device is 3.0GHz, the electronic device may determine that the computing capability of the electronic device is greater than the second threshold, and before running the new version of the first application program, the electronic device may compile an installation package of the new version of the first application program based on the second configuration file, to obtain the compiled file. In some embodiments of the present application, "compiling an installation package of a new version of a first application based on a second configuration file, resulting in a compiled file" may be understood as: the electronic equipment decompresses the program package of the first application program, installs the first application program, and when the first application program is installed, the electronic equipment can compile codes of the first application program into a machine language according to the method information in the second configuration file to obtain compiled files containing the files such as the odex file, the vdex file and the like, so that the electronic equipment can directly run the new version of the first application program according to the obtained compiled files.
In some embodiments of the present application, the computing power of the electronic device being less than the second threshold may indicate that: the computing capability of the electronic device is insufficient to support the electronic device to compile the first application program when the first application program is operated, otherwise, the electronic device is easy to cause the blocking when the first application program is operated, and the experience of a user is affected. Therefore, the electronic device can precompiled the first application program under the condition that the computing capability of the electronic device is smaller than the second threshold value, and the obtained compiling file is stored, so that the electronic device can directly operate the first application program through the compiling file, and the operation speed and fluency of the first application program can be improved.
For example, the electronic device may use an AOT technology to precompiled the first application, compile the first application into a speed-profile mode, and improve the running speed and smoothness of the first application.
In some embodiments of the present application, after the electronic device compiles the installation package of the new version of the first application program based on the second configuration file, the resulting compiled file may be saved in the electronic device.
Therefore, the electronic device can directly operate the new version first application program according to the compiling file without compiling again when operating the new version first application program because the second configuration file generated by multiplexing the first configuration file through the server can perform one-time precompiled on the new version first application program and save the obtained compiling file under the condition that the operation capability of the electronic device is smaller than the second threshold value. Therefore, the time for generating the configuration file is saved, the electronic equipment can present the same user use preference as the old version application program when running the new version application program, and the speed and fluency of running the application program of the electronic equipment can be improved because the electronic equipment can directly run the new version application program according to the compiling file.
In some embodiments of the present application, the target file includes an installation package of the new version first application program and a second configuration file. After the step 300, the method for updating an application program according to the embodiment of the present application may further include a step 306 described below.
Step 306, the electronic device directly runs the new version first application program after updating the old version first application program to the new version first application program based on the target file under the condition that the computing capability of the electronic device is greater than or equal to the second threshold value.
It can be appreciated that, in the case where the computing capability of the electronic device is greater than or equal to the second threshold, the electronic device may smoothly run the new version of the first application in the verify mode. Therefore, the new version of the first application program does not need to be compiled based on the second configuration file, and can be directly operated.
Therefore, the electronic device can directly run the new version application program under the condition that the computing capacity of the electronic device is larger than or equal to the second threshold value, and compiling is not needed based on the configuration file of the new version application program, so that the space of the electronic device caused by compiling generated files can be reduced, and the utilization rate of the electronic device resources is improved.
In some embodiments of the present application, the target file may include an installation package of the new version of the first application program and the second configuration file. After the step 300, the method for updating an application program according to the embodiment of the present application may further include a step 307 described below.
Step 307, the electronic device compiles an installation package of the new version first application program based on the second configuration file under the condition that the computing capability of the electronic device is greater than or equal to the second threshold value and the electronic device is in an idle state, and obtains and stores the compiled file.
In some embodiments of the application, the idle state of the electronic device may refer to the electronic device being in an inactive state.
For example, the electronic device may determine whether the electronic device is in an idle state according to whether the electronic device is out of screen, unused for a long time, sufficient power, and a temperature exceeding a preset temperature threshold.
For example, after the electronic device is turned off, if the electronic device is not used for more than 5 minutes and the electric quantity is more than 50%, and the temperature is not more than 35 ℃, the electronic device is judged to be in an idle state at this time.
In some embodiments of the present application, the electronic device may install the new version first application program after receiving the installation package of the new version first application program and the second configuration file sent by the server when the computing capability of the electronic device is greater than or equal to the first threshold, and may not immediately compile if no input is received to run the new version first application program by the user. The electronic device may compile the new version of the first application program when the electronic device is determined to be in the idle state, so as to obtain and store a compiled file.
It can be understood that the computing capability of the electronic device can be operated smoothly in the verify mode only when the computing capability is greater than or equal to the second threshold. Therefore, when the computing capability of the electronic device is greater than or equal to the second threshold, the electronic device can not compile when the new version of the first application program is installed, but compile when the electronic device is in an idle state, so that the time for occupying corresponding resources when the new version of the first application program is installed is shortened.
It should be noted that, if the electronic device receives the input of the user to run the new version first application program after the new version first application program is installed, the new version first application program may be run according to the method described in the above step 305, which is not described herein again.
Therefore, the electronic equipment can compile the installation package of the new version first application program based on the second configuration file under the condition that the computing capacity of the electronic equipment is smaller than the second threshold value and the electronic equipment is in the idle state, so that the compiled file is obtained and saved. Therefore, the process of installing the new version application program can be separated from the process of compiling the new version application program, the installation time is reduced, and the problem of blocking caused by other operations performed by a user when the electronic equipment is compiled can be avoided because the new version application program is compiled when the electronic equipment is in an idle state, so that the running speed and fluency of the application program can be improved.
The application update method provided by the present application is exemplarily described below in connection with specific examples. As shown in fig. 4, the application update method may include steps 401 to 406 described below.
Step 401, the electronic device receives an installation package and a second configuration file of a new version first application program sent by a server.
Step 402, the electronic device installs the new version first application program.
Step 403, the electronic device compiles an installation package of the new version first application program based on the second configuration file under the condition that the computing capability of the electronic device is smaller than the second threshold value.
In some embodiments of the present application, after the electronic device receives the installation package of the new version first application program and the second configuration file sent by the server, the electronic device may determine, according to the computing capability of the electronic device, whether to compile the first application program when the new version first application program is installed. The electronic device may operate the first application in the verify mode, that is, only interpret the execution code without compiling when installed, if the computing capability of the electronic device is greater than or equal to the second threshold; the electronic device may run the first application in the speed-profile mode, i.e. compile at installation, if the computing power of the electronic device is smaller than the second threshold.
And step 404, under the condition that the electronic device obtains the compiling file, compiling the new version first application program into a speed-profile mode based on the compiling file.
In step 405, if the computing capability of the electronic device is greater than or equal to the second threshold, or the compiled file is not obtained, the electronic device compiles the new version of the first application program into a verify mode based on the compiled file.
Step 406, the electronic device updating the first application program ends.
In this way, the electronic device can receive the installation package of the new version first application program and the second configuration file or the installation package and the compiling file of the new version first application program, which are sent by the server, so that the electronic device can directly multiplex the configuration file containing the user use preference generated by the configuration file of the old version application program, compile the new version application program, thereby reducing the time for waiting for the generation of the configuration file after the new version application program is installed, and enabling the generated configuration file to give consideration to the user use preference; or the electronic equipment can directly run the new version application program through the compiling file, so that the time and resources consumed by the electronic equipment for compiling the application program by itself are saved, and the blocking of the running application program is reduced.
The embodiment of the application provides a configuration file processing method and an application program updating method, and fig. 5 shows a flow chart of the configuration file processing method and the application program updating method. As shown in fig. 5, the method for processing a configuration file and the method for updating an application program according to the embodiments of the present application may include the following steps 501 to 506.
Step 501, the electronic device sends a first configuration file of a first application program to a server.
Step 502, the server obtains a first configuration file of a first application program.
Step 503, the server generates a second configuration file based on the first configuration file in the case of updating the version of the first application program.
In some embodiments of the present application, the step 503 may include a step 503a described below.
In step 503a, if the first configuration file exists in the server, and the file size of the first configuration file is within the first range, the server generates a second configuration file based on the first configuration file.
In some embodiments of the present application, the step 503 may further include the following steps 503b and 503c.
Step 503b, the server determines, according to the first configuration file, first hotspot method information in the installation package of the new version first application program.
The first hotspot method information is matched with the hotspot method information in the first configuration file.
Step 503c, the server generates a second configuration file based on the first hotspot method information.
Step 504, the server sends the target file to the electronic device.
Wherein the target file includes any one of the following: an installation package and a second configuration file of the new version first application program; the method comprises the steps of installing a package and compiling a file of a new version first application program, wherein the compiling file is obtained by compiling the new version first application program based on a second configuration file.
In some embodiments of the present application, the step 504 may include a step 504a described below.
Step 504a, the server sends the target file to the electronic device when the second configuration file is generated in the first time period and the configuration file multiplexing rate is greater than or equal to the first threshold;
the configuration file multiplexing rate is the ratio of multiplexing hot spot method information in the first configuration file and total hot spot method information in the first configuration file in the second configuration file.
Step 505, the electronic device receives the target file sent by the server.
Step 506, the electronic device updates the old version first application program to the new version first application program based on the target file.
In some embodiments of the application, the target file includes an installation package and a compiled file of the new version first application. The above step 506 may include steps 506a and 506b described below.
In step 506a, the electronic device updates the old version first application program to the new version first application program according to the installation package of the new version first application program.
Step 506b, the electronic device runs the new version first application program based on the compiled file.
In some embodiments of the application, the object file includes an installation package and a second configuration file for the new version of the first application. The step 506 may further include a step 506c described below.
In step 506c, when the computing capability of the electronic device is smaller than the second threshold, the electronic device compiles the installation package of the new version of the first application program based on the second configuration file in the process of updating the version of the first application program, so as to obtain and store the compiled file.
In some embodiments of the application, the object file includes an installation package and a second configuration file for the new version of the first application. The step 506 may further include a step 506d described below.
Step 506d, when the computing capability of the electronic device is greater than or equal to a second threshold, and the electronic device is in an idle state, compiling an installation package of the new version of the first application program based on the second configuration file, and obtaining and storing a compiled file.
Therefore, the electronic equipment can upload the configuration file of the application program before the version update to the server, when the server detects that the version update of the application program is performed, the server can acquire the configuration file generated when the electronic equipment runs the application program of the old version, and generates a new configuration file by multiplexing the configuration file of the application program of the old version, so that the time required for generating the configuration file is shortened, and the problem that the server consumes time and resources to retrain the application program after the version update to generate the new configuration file is avoided. And because the multiplexed configuration file is generated according to the historical use of the user of the electronic equipment, the compiling result of the application program according to the new configuration file is closer to the use preference of the user, thereby avoiding the problem of low hit rate caused by that the hot spot method in the configuration file obtained by machine training does not accord with the user preference when in actual use. In addition, when the application program with updated version is installed, the server issues a new configuration file generated by multiplexing the configuration file before the updated version into the electronic device, and the electronic device can compile the application program with the new version into a speed-profile mode according to the new configuration file, so that compiling optimization conforming to the use preference of a user can be timely performed, excessive occupation of resources of the server is not needed, the time required by the server for generating the new configuration file is reduced, and the running speed of the application program is improved.
It should be noted that, for other descriptions of steps 501 to 506, refer to the descriptions of steps 100 to 102 and steps 300 to 302 in the above embodiments.
According to the configuration file processing method provided by the embodiment of the application, the execution main body can be a configuration file processing device. In the embodiment of the present application, a configuration file processing method executed by a configuration file processing device is taken as an example, and the configuration file processing device provided by the embodiment of the present application is described.
Fig. 6 shows a schematic diagram of a possible configuration of a profile processing apparatus according to an embodiment of the present application. As shown in fig. 6, the profile processing apparatus 60 may include: an acquisition module 61 and a generation module 62.
The acquiring module 61 is configured to acquire a first configuration file of a first application program, where the first configuration file is generated when the electronic device runs an old version of the first application program; the generating module 62 is configured to generate, based on the first configuration file acquired by the acquiring module 61, a second configuration file in the case of updating the version of the first application program, where the second configuration file is a configuration file of the new version of the first application program.
In one possible implementation manner, the apparatus further includes: a transmitting module;
The sending module is configured to send, after the generating module 62 generates the second configuration file based on the first configuration file, a target file to the electronic device, where the target file includes any one of the following:
an installation package and a second configuration file of the new version first application program;
the method comprises the steps of installing a package and compiling a file of a new version first application program, wherein the compiling file is obtained by compiling the new version first application program based on a second configuration file.
In one possible implementation, the generating module 62 is specifically configured to generate the second configuration file based on the first configuration file when the first configuration file exists and the file size of the first configuration file is within the first range.
In one possible implementation, the generating module 62 is specifically configured to:
determining first hot spot method information in an installation package of a new version of the first application program according to the first configuration file, wherein the first hot spot method information is matched with the hot spot method information in the first configuration file;
and generating a second configuration file based on the first hot spot method information.
In one possible implementation manner, the sending module is specifically configured to send the target file to the electronic device when the second configuration file is generated within the first time period and the configuration file multiplexing rate is greater than or equal to the first threshold;
The configuration file multiplexing rate is the ratio of multiplexing hot spot method information in the first configuration file and total hot spot method information in the first configuration file in the second configuration file.
In one possible implementation manner, the obtaining module 61 is configured to receive a first configuration file of a first application program sent by the electronic device.
The embodiment of the application provides a configuration file processing device, which can acquire a configuration file generated when an electronic device runs an old version application program, and multiplex the configuration file of the old version application program under the condition of updating the version of the application program to generate the configuration file of a new version application program. Therefore, the time for generating the configuration file and the resources of the server can be saved, the configuration file containing the updated version of the user use preference can be generated quickly, and the electronic equipment can update the application program directly according to the configuration file containing the user use preference when updating the application program, so that the smoothness of the operation of the application program is improved.
Fig. 7 shows a schematic diagram of a possible configuration of an application updating apparatus according to an embodiment of the present application. As shown in fig. 7, the application updating apparatus 70 may include: a receiving module 71 and an updating module 72.
The receiving module 71 is configured to receive a target file sent by the server, where the electronic device installs an old version of the first application program; an updating module 72, configured to update the old version first application program to the new version first application program based on the target file; wherein the target file comprises any one of the following: the server generates a second configuration file according to the first configuration file of the old version first application program; the method comprises the steps of installing a package and compiling a file of a new-version first application program, wherein the compiling file is obtained by compiling the new-version first application program based on a second configuration file by a server.
In one possible implementation manner, the target file includes an installation package and a compiled file of the new version first application program;
the update module 72 is specifically configured to:
updating the old version first application program into the new version first application program according to the installation package of the new version first application program;
based on the compiled file, a new version of the first application is run.
In one possible implementation manner, the apparatus further includes: a transmitting module;
the sending module is configured to send, to the server, a first configuration file of the first application program, where the first configuration file is generated when the electronic device runs the old version of the first application program, before the receiving module 71 receives the target file sent by the server.
In one possible implementation manner, the target file includes an installation package of the new version first application program and a second configuration file;
the updating module 72 is further configured to compile an installation package of the new version of the first application program based on the second configuration file in a process of updating the version of the first application program when the computing capability of the electronic device is less than the second threshold after the receiving module 71 receives the target file sent by the server, so as to obtain and store the compiled file.
In one possible implementation manner, the target file includes an installation package of the new version first application program and a second configuration file;
the updating module 72 is further configured to compile an installation package of the new version of the first application program based on the second configuration file after the receiving module 71 receives the target file sent by the server, and obtain and store the compiled file when the computing capability of the electronic device is greater than or equal to the second threshold and the electronic device is in an idle state.
The embodiment of the application provides an application program updating device, because an electronic device can receive an installation package of a new version first application program and a second configuration file or an installation package and a compiling file of the new version first application program, which are sent by a server, the electronic device can directly multiplex a configuration file containing user use preference generated by the configuration file of an old version application program, compile the new version application program, thereby reducing the time for waiting for the generation of the configuration file after the new version application program is installed, and enabling the generated configuration file to give consideration to the user use preference; or the electronic equipment can directly run the new version application program through the compiling file, so that the time and resources consumed by the electronic equipment for compiling the application program by itself are saved, and the blocking of the running application program is reduced.
The application updating device in the embodiment of the application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The application updating device in the embodiment of the application can be a device with an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The application program updating device provided by the embodiment of the application can realize the processes realized by the embodiment of the application program updating method, achieve the same technical effects, and avoid repetition, and are not repeated here.
Optionally, as shown in fig. 8, the embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, where the memory 802 stores a program or instructions that can be executed on the processor 801, for example, when the communication device 800 is an electronic device, the program or instructions implement the steps of the method embodiment on the electronic device side when executed by the processor 801, and achieve the same technical effects. When the communication device 800 is a server, the program or the instructions when executed by the processor 801 implement the steps of the method embodiment on the server side, and achieve the same technical effects, and are not repeated herein.
It should be noted that, the electronic device in the embodiment of the present application includes a mobile electronic device and a non-mobile electronic device.
Fig. 9 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
Those skilled in the art will appreciate that the electronic device 900 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 910 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
The radio frequency unit 901 is used for receiving a target file sent by a server, and the electronic equipment is provided with a first application program of an old version; a processor 910 configured to update the old version first application program to the new version first application program based on the target file; wherein the target file comprises any one of the following: the server generates a second configuration file according to the first configuration file of the old version first application program; the method comprises the steps of installing a package and compiling a file of a new-version first application program, wherein the compiling file is obtained by compiling the new-version first application program based on a second configuration file by a server.
In one possible implementation manner, the target file includes an installation package and a compiled file of the new version first application program;
the processor 910 is specifically configured to:
updating the old version first application program into the new version first application program according to the installation package of the new version first application program;
based on the compiled file, a new version of the first application is run.
In a possible implementation manner, the radio frequency unit 901 is further configured to send, to the server, a first configuration file of the first application program, where the first configuration file is generated when the electronic device runs the old version of the first application program, before receiving the target file sent by the server.
In one possible implementation manner, the target file includes an installation package of the new version first application program and a second configuration file;
the above processor 910 is further configured to compile an installation package of the new version of the first application program based on the second configuration file in a process of updating the version of the first application program when the computing capability of the electronic device is smaller than the second threshold after the rf unit 901 receives the target file sent by the server, so as to obtain and store the compiled file.
In one possible implementation manner, the target file includes an installation package of the new version first application program and a second configuration file;
The above processor 910 is further configured to compile an installation package of the new version of the first application program based on the second configuration file after the rf unit 901 receives the target file sent by the server, and when the computing capability of the electronic device is greater than or equal to the second threshold and the electronic device is in an idle state, obtain and store the compiled file.
The embodiment of the application provides electronic equipment, which can receive an installation package of a new version first application program and a second configuration file or an installation package and a compiling file of the new version first application program, which are sent by a server, so that the electronic equipment can directly multiplex the configuration file containing user use preference generated by the configuration file of the old version application program, compile the new version application program, thereby reducing the time for waiting for the generation of the configuration file after the new version application program is installed, and enabling the generated configuration file to give consideration to the user use preference; or the electronic equipment can directly run the new version application program through the compiling file, so that the time and resources consumed by the electronic equipment for compiling the application program by itself are saved, and the blocking of the running application program is reduced.
It should be appreciated that in an embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. Touch panel 9071, also referred to as a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 909 may include a volatile memory or a nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memories. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 909 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 910.
Fig. 10 shows a schematic structural diagram of a server according to an embodiment of the present application.
As shown in fig. 10, the server 1000 includes: antenna 101, radio frequency device 102, baseband device 103, processor 104, and memory 105. Antenna 101 is coupled to radio frequency device 102. In the uplink direction, the radio frequency device 102 receives information via the antenna 101, and transmits the received information to the baseband device 103 for processing. In the downlink direction, the baseband device 103 processes information to be transmitted, and transmits the processed information to the radio frequency device 102, and the radio frequency device 102 processes the received information and transmits the processed information through the antenna 101.
The method performed by the server in the above embodiments may be implemented in a baseband apparatus 103, the baseband apparatus 103 comprising a baseband processor.
The baseband device 103 may, for example, comprise at least one baseband board, on which a plurality of chips are disposed, as shown in fig. 10, where one chip, for example, a baseband processor, is connected to the memory 105 through a bus interface, so as to call a program in the memory 105 to perform the server operation shown in the above method embodiment.
The server may also include a network interface 106, such as a common public radio interface (Common Public Radio Interface, CPRI).
Specifically, the server 1000 of the embodiment of the present application further includes: instructions or programs stored in the memory 105 and executable on the processor 104, the processor 104 invokes the instructions or programs in the memory 105 to perform the method performed by the modules shown in fig. 6, and achieve the same technical effects, so repetition is avoided and will not be described here.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the above configuration file processing method and application program updating method embodiment, and can achieve the same technical effect, so that repetition is avoided, and no further description is provided herein.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as computer readable memory ROM, random access memory RAM, magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the configuration file processing method and the application program updating method embodiment can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described configuration file processing method and application program updating method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, 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. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in part in the form of a computer software product stored on a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (16)

1. A method for processing a configuration file, applied to a server, the method comprising:
acquiring a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment operates the old version of the first application program;
and under the condition that the version of the first application program is updated, generating a second configuration file based on the first configuration file, wherein the second configuration file is the configuration file of the new version of the first application program.
2. The method of claim 1, wherein after generating a second profile based on the first profile, the method further comprises:
transmitting a target file to the electronic device, wherein the target file comprises any one of the following:
an installation package of the first application program and the second configuration file are updated;
and the compiling file is obtained by compiling the new version of the first application program based on the second configuration file.
3. The method of claim 1, wherein generating a second profile based on the first profile comprises:
And generating a second configuration file based on the first configuration file when the first configuration file exists and the file size of the first configuration file is in a first range.
4. The method of claim 1, wherein generating a second profile based on the first profile comprises:
determining first hot spot method information in an installation package of the new version of the first application program according to the first configuration file, wherein the first hot spot method information is matched with the hot spot method information in the first configuration file;
and generating a second configuration file based on the first hot spot method information.
5. The method of claim 2, wherein the sending the target file to the electronic device comprises:
transmitting a target file to the electronic equipment under the condition that the second configuration file is generated in a first time period and the configuration file multiplexing rate is greater than or equal to a first threshold value;
the configuration file multiplexing rate is the ratio of multiplexing hot spot method information in the first configuration file and total hot spot method information in the first configuration file in the second configuration file.
6. The method of claim 1, wherein the obtaining a first profile of a first application comprises:
and receiving a first configuration file of the first application program sent by the electronic equipment.
7. An application program updating method applied to an electronic device, the method comprising:
receiving a target file sent by a server, wherein the electronic equipment is provided with a first application program of an old version;
updating the old version of the first application program into the new version of the first application program based on the target file;
wherein the target file includes any one of the following:
the new version of the installation package of the first application program and the second configuration file are generated by the server according to the first configuration file of the old version of the first application program;
and the compiling file is obtained by compiling the first application program with the new version based on the second configuration file by the server.
8. The method of claim 7, wherein the target file comprises an installation package and a compiled file of a new version of the first application program;
The updating the old version of the first application program to the new version of the first application program based on the target file comprises the following steps:
updating the old version of the first application program into the new version of the first application program according to the installation package of the new version of the first application program;
and running the new version of the first application program based on the compiled file.
9. The method of claim 7, wherein prior to receiving the target file sent by the server, further comprising:
and sending a first configuration file of a first application program to a server, wherein the first configuration file is generated when the electronic equipment runs the old version of the first application program.
10. The method of claim 7, wherein the target file comprises an installation package of the new version of the first application and the second configuration file;
after receiving the target file sent by the server, the method further includes:
and compiling an installation package of the new version of the first application program based on the second configuration file in the process of updating the version of the first application program under the condition that the computing capacity of the electronic equipment is smaller than a second threshold value, so as to obtain and store a compiled file.
11. The method of claim 7, wherein the target file comprises an installation package of the new version of the first application and the second configuration file;
after receiving the target file sent by the server, the method further includes:
and compiling an installation package of the new version of the first application program based on the second configuration file under the condition that the computing capacity of the electronic equipment is larger than or equal to a second threshold value and the electronic equipment is in an idle state, so as to obtain and store a compiled file.
12. A profile processing apparatus, the apparatus comprising: the device comprises an acquisition module and a generation module;
the acquiring module is used for acquiring a first configuration file of a first application program, wherein the first configuration file is generated when the electronic equipment operates the first application program of an old version;
the generating module is configured to generate a second configuration file based on the first configuration file acquired by the acquiring module, where the second configuration file is a configuration file of the new version of the first application program under the condition that the version of the first application program is updated.
13. An application updating apparatus, the apparatus comprising: a receiving module and an updating module;
The receiving module is used for receiving the target file sent by the server, and the electronic equipment is provided with the old version first application program;
the updating module is used for updating the old version of the first application program into the new version of the first application program based on the target file received by the receiving module;
wherein the target file includes any one of the following:
the new version of the installation package of the first application program and the second configuration file are generated by the server according to the first configuration file of the old version of the first application program;
and the compiling file is obtained by compiling the first application program with the new version based on the second configuration file by the server.
14. A server comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the profile processing method of any one of claims 1 to 6.
15. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the application updating method of any of claims 7 to 11.
16. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements the steps of the profile processing method according to any one of claims 1 to 6, or the steps of the application updating method according to any one of claims 7 to 11.
CN202310626220.4A 2023-05-30 2023-05-30 Configuration file processing method, application program updating method, device and server Pending CN116661844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310626220.4A CN116661844A (en) 2023-05-30 2023-05-30 Configuration file processing method, application program updating method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310626220.4A CN116661844A (en) 2023-05-30 2023-05-30 Configuration file processing method, application program updating method, device and server

Publications (1)

Publication Number Publication Date
CN116661844A true CN116661844A (en) 2023-08-29

Family

ID=87711239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310626220.4A Pending CN116661844A (en) 2023-05-30 2023-05-30 Configuration file processing method, application program updating method, device and server

Country Status (1)

Country Link
CN (1) CN116661844A (en)

Similar Documents

Publication Publication Date Title
US7779055B2 (en) Device memory management during electronic file updating
EP3128421A1 (en) Method, device, and system for achieving java application installation by cloud compilation
CN107992308B (en) Plug-in management method for android terminal application program
EP1316882A2 (en) System and method for emulating code
JP2004070944A (en) System and method for expanding operating system function for application
CN109791497B (en) Method, device and terminal for executing hot patch
CN114185491B (en) Partition file downloading method and device, storage medium and computer equipment
CN112256348B (en) Cloud service platform creation method and system, electronic equipment and storage medium
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
CN110888658B (en) Method and device for dynamically changing function modules in application program and storage medium
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN113434230A (en) Jump control method and device for H5 page, storage medium and electronic device
CN112162795A (en) Plug-in starting method and device, computer equipment and storage medium
CN112988169A (en) Application installation method and device, terminal equipment, server and storage medium
CN116643778B (en) Application program optimization method and electronic equipment
CN107423093B (en) Control method and apparatus, computer apparatus, and computer-readable storage medium
KR20020009741A (en) Apparatus for etalishing operating platform of mobile phone and wireless up-grading method of application thereby
CN113742716B (en) Code running method, device, electronic equipment, storage medium and program product
CN114489698A (en) Application program installation method and device
CN116661844A (en) Configuration file processing method, application program updating method, device and server
CN116401003A (en) Android application running method, system and storage medium based on desktop operating system
KR102663196B1 (en) User terminal device, server, control method of user terminal device and control method of server
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
CN112988686A (en) Plug-in processing method, device, equipment and storage medium
CN107493316B (en) Application operation management method, server and computer readable 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