CN112631609B - Compiling method, compiling device, compiling terminal and storage medium - Google Patents

Compiling method, compiling device, compiling terminal and storage medium Download PDF

Info

Publication number
CN112631609B
CN112631609B CN202110008345.1A CN202110008345A CN112631609B CN 112631609 B CN112631609 B CN 112631609B CN 202110008345 A CN202110008345 A CN 202110008345A CN 112631609 B CN112631609 B CN 112631609B
Authority
CN
China
Prior art keywords
operating system
compiling
terminal
partition
hot spot
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.)
Active
Application number
CN202110008345.1A
Other languages
Chinese (zh)
Other versions
CN112631609A (en
Inventor
张金山
韩冰天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110008345.1A priority Critical patent/CN112631609B/en
Publication of CN112631609A publication Critical patent/CN112631609A/en
Application granted granted Critical
Publication of CN112631609B publication Critical patent/CN112631609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/61Installation
    • 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 disclosure relates to a compiling method, device, terminal and storage medium. The compiling method provided by the disclosure is applied to the terminal, and the terminal is provided with a first operating system and a second operating system; the first operating system corresponds to the first system partition, and the second operating system corresponds to the second system partition; the terminal currently runs a first operating system; the compiling method comprises the following steps: updating the second operating system and mounting the second system partition after the second operating system is updated; acquiring a hotspot description file of at least one application program, wherein the hotspot description file is used for recording a hotspot code of the application program; before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate the native code executed under the second operating system.

Description

Compiling method, compiling device, compiling terminal and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a compiling method, a compiling device, a compiling terminal and a compiling storage medium.
Background
The android system can record codes which are frequently used in the execution process of the application program, namely hot codes, and compile the hot codes to generate native codes when the terminal is in a charged and idle (idle) state, so that the performance of the application program can be improved in the next use.
However, on the one hand, when the mobile phone downloads an update package on a remote server through an Over-the-Air (OTA) technology to update the version of the system, the file recording the hot code and the local code generated based on the hot code are deleted, and the hot code can be compiled again after the updated mobile phone is in a charged and idle state again; on the other hand, with the development of battery technology, the battery capacity is larger and the charging speed is faster, and fewer users charge the mobile phone in the whole night, so that the situation that the mobile phone enters a charging state and is in an idle state is reduced, hot codes cannot be compiled in time easily, and the performance of application programs is further affected.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
According to one or more embodiments of the present disclosure, there is provided a compiling method applied to a terminal, the terminal being installed with a first operating system and a second operating system; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system; the method comprises the following steps:
updating the second operating system and mounting the second system partition after the second operating system is updated;
acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program;
before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate a local code executed under the second operating system.
According to one or more embodiments of the present disclosure, there is provided a compiling apparatus applied to a terminal having a first operating system and a second operating system installed therein; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system; the device comprises:
the second system mounting unit is used for updating the second operating system and mounting the second system partition after the second operating system is updated;
the description file acquisition unit is used for acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program;
and the compiling unit is used for compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system before restarting the terminal so as to generate the native code executed under the second operating system.
According to one or more embodiments of the present disclosure, there is provided a mobile terminal, characterized in that the mobile terminal includes:
At least one memory and at least one processor;
wherein the memory is for storing program code, and the processor is for invoking the program code stored by the memory to perform a compiling method provided in accordance with one or more embodiments of the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer storage medium storing program code which, when run on a computer device, causes the computer device to perform a compiling method provided according to one or more embodiments of the present disclosure.
According to the compiling method provided by one or more embodiments of the present disclosure, before the terminal is restarted after the second operating system is updated, the second operating system is utilized to compile the hot spot code of the application program based on the hot spot description file of the application program, so as to generate the native code executed under the second system, thereby avoiding that the hot spot description file cannot be compiled in time due to the deletion of the system update, and compiling the hot spot code for the new system during the system update, without waiting for the terminal to be in a charged and idle state, so that the compiling of the native code can be completed in the first time, and the application performance can be improved in time.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a compiling method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a compiling method according to another embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating an exemplary structure of a compiling apparatus according to an embodiment of the present disclosure
Fig. 4 is a schematic structural diagram of a terminal device for implementing an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. The term "responsive to" and related terms mean that one signal or event is affected to some extent by another signal or event, but not necessarily completely or directly. If event x occurs "in response to" event y, x may be directly or indirectly in response to y. For example, the occurrence of y may ultimately lead to the occurrence of x, but other intermediate events and/or conditions may exist. In other cases, y may not necessarily result in the occurrence of x, and x may occur even though y has not yet occurred. Furthermore, the term "responsive to" may also mean "at least partially responsive to". The term "determining" broadly encompasses a wide variety of actions, which may include calculating, computing, processing, deriving, exploring, looking up (e.g., looking up in a table, database or other data structure), ascertaining, and the like, as well as receiving (e.g., receiving information), accessing (e.g., accessing data in memory), and the like, as well as parsing, selecting, choosing, establishing, and the like. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In the following, several technical terms related to the present disclosure will be explained first.
1. Hot Code (Hot Spot Code)
A hot code may refer to code that is executed more than a preset threshold number of times during the start-up or use of an application, including but not limited to functions, methods, code blocks, classes, etc. For example, in a Client (Client) mode, the android system takes code that is executed more than 1500 times as a hot spot code; in a Server (Server) mode, the android system takes codes with execution times exceeding 10000 times as hot spot codes.
2. Native Code (Native Code)
The native code is computer programming code that is compiled to run a special processor (e.g., intel x 86-level processor) and its special instruction set. Native code is code that has been compiled into processor-specific machine code and can be executed directly by a virtual machine.
3. Pre-compilation or AOT compilation (Ahead-of-time compilation)
Precompilation refers to the act of converting higher level programming language (e.g., C or C++) or intermediate code (e.g., java bytecode or. NET Framework Common Intermediate Language (CIL) code) into native code to generate a binary that can be executed natively. Compiling the intermediate code during program execution (e.g., just-in-time compilation) may reduce the performance of the application, while precompilation eliminates the need for this step by taking place before execution rather than during execution.
The compiling method provided by one or more embodiments of the present disclosure is applied to a terminal, including but not limited to, a terminal such as a television, a smart large screen, a mobile phone, a computer, an electronic reader, a PDA (personal digital assistant), a PAD (tablet computer), etc.; the terminal is provided with a first operating system and a second operating system, wherein the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition. The first operating system and the second operating system may be the same version or different versions of the same class of operating system.
In some embodiments, the first system partition and the second system partition may be two separate sets of system partitions. Illustratively, each set of system partitions includes a respective boot partition, a system partition, a vendor partition, and the like.
In some embodiments, the terminal currently runs the first operating system, referring to fig. 1, which shows a compiling method 100 provided according to one or more embodiments of the present disclosure, the compiling method 100 includes:
step S101: updating the second operating system and mounting the second system partition after the second operating system is updated;
in this step, after the second operating system is updated, the second system partition is mounted so that the files of the second system partition can be accessed, which is equivalent to the fact that the terminal runs the first operating system and the second operating system at the same time.
In some embodiments, the system update data may be obtained based on a first operating system currently running on the terminal and written to the second system partition. It should be noted that, when the system update data is written into the second system partition, the second system partition is not yet mounted, that is, the current terminal only mounts the first operating system, and only the first operating system is in an active state.
The terminal may illustratively download a system update package on the remote server via an Over-the-Air (OTA) technique and write the system update package to the second system partition.
Step S102: and acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program.
Illustratively, the hotspot description file is a profile file, which is used for recording the hotspot code of a certain application program, and may be used for profile-guide compiling.
In some embodiments, the hotspot description files are stored under respective directories of the corresponding application, with the application's directory being located within a partition of user data (userdata). The user data partition is used for storing user data, including application programs installed by users and data generated during use; the user data partition may be shared by the first operating system and the second operating system.
Further, in some embodiments, a hotspot description of at least one application may be obtained from the user data partition.
It should be noted that, in this step, the hotspot description files of all the applications installed in the terminal may be obtained, or the hotspot description files of one or more specific applications may be obtained, which is not limited in this disclosure.
Step S103: before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate a local code executed under the second operating system.
For example, AOT compilation may be employed to compile dalvik byte codes (dalvik bytecode) in the dex file as hot codes into assembler instructions recognizable by the processor for execution, i.e., native codes.
It should be noted that, this step may be performed by compiling the hot code of all applications installed in the terminal, or may be performed by compiling the hot code of one or more specific applications, which is not limited in this disclosure.
In some embodiments, the generated native code may be saved in a specific folder, so as to prevent the native code from being deleted caused by restarting the updated operating system. Illustratively, the particular folder may be located in the second system partition.
According to the compiling method provided by one or more embodiments of the present disclosure, before the terminal is restarted after the second operating system is updated, the second operating system is utilized to compile the hot spot code of the application program based on the hot spot description file of the application program, so as to generate the native code executed under the second system, thereby avoiding that the hot spot description file cannot be compiled in time due to the deletion of the system update, and compiling the hot spot code for the new system during the system update, without waiting for the terminal to be in a charged and idle state, so that the compiling of the native code can be completed in the first time, and the application performance can be improved in time.
In some embodiments, the method 100 further comprises:
Step S104: restarting the terminal;
Illustratively, the first operating system may pop up a dialog box for restarting the terminal in response to a user confirming a restart instruction.
Step S105: after restarting the terminal, loading an updated second operating system;
Step S106: and storing the native code into a catalog of the corresponding application program.
In this embodiment, after the terminal is restarted, the second operating system is started from the second system partition, and the first system partition is not mounted, so that the switching from the first operating system to the updated second operating system is completed, and the compiled native code is stored in the catalog of the corresponding application program, so that the native code can be directly executed when the updated second operating system starts and uses the corresponding application program, thereby timely improving the application program performance.
In some embodiments, the terminal is configured to update the first system partition and the second system partition alternately, so that by performing the steps described above each time the system is updated, the updated system can be provided with the native code of each application program, thereby improving the performance of the application program.
In some embodiments, the first operating system and the second operating system are a/B systems of an android platform.
The a/B system update (also referred to as a seamless update) of the android platform ensures that a system that can be started and used normally remains on disk during an Over The Air (OTA) update by setting two sets of system partitions (slot a and slot B) to reduce the likelihood that the device will not start after the update. Under an A/B system, the system runs from the "current" slot, but during normal operation, the running system does not access the partition in the unused slot. This approach prevents updates from being problematic by reserving unused slots as backup slots: if an error occurs during the update or immediately after the update is completed, the system may roll back to the original slot and continue to operate normally. Thus in an A/B system of an android platform, only one system partition is mounted at a time.
In this regard, according to one or more embodiments of the present disclosure, by modifying the system partition mounting logic of the a/B system of the android platform, in the case where the first system partition is already mounted, the second system partition is mounted at the same time after the update of the second operating system is completed, so that the second operating system may be utilized to compile the hot code of the application according to the hot spot description, so as to generate the native code executed under the second operating system, and further implement the compilation of the native code during the "seamless update" of the system, without waiting until the updated terminal is again in a charged and idle state, so that the compilation of the native code can be completed at the first time, and the application performance is timely improved.
Referring to fig. 2, fig. 2 illustrates a compiling method 200 provided in accordance with another embodiment of the present disclosure, applied to a terminal installed with a first operating system corresponding to a first system partition and a second operating system corresponding to a second system partition; the terminal having a user data partition shared by the first operating system and the second operating system; the compiling method 200 includes:
step S201: under the condition that the terminal is mounted with a first system partition, acquiring a system update package based on a first operating system, and writing the system update package into a second system partition;
Step S202: after the system update package is written, a second system partition is mounted;
step S203: acquiring a hot spot description file of at least one application program from a user data partition;
Step S204: compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system to generate a native code executed under the second operating system;
step S205: restarting the terminal;
Step S206: after restarting the terminal, starting the updated second operating system from the second system partition, and not mounting the first system partition;
Step S207: and storing the native code into a catalog of the corresponding application program.
According to the compiling method provided by one or more embodiments of the present disclosure, under the condition that the first system partition is already installed, the second system partition is installed at the same time after the second operating system is updated, so that the second operating system can be utilized to compile the application program based on the hot spot description file of the application program in the shared user data partition to generate the native code, so that the updated second operating system loaded after the terminal is restarted can execute the native code, thereby avoiding the situation that the hot spot description file cannot be compiled in time due to the deletion of the system update, compiling the hot spot code for the new system during the seamless updating of the system, and compiling the hot spot code without waiting for the terminal to be in a charging and idle state.
Correspondingly, fig. 3 shows a compiling apparatus 300 provided according to one or more embodiments of the present disclosure, applied to a terminal, the terminal being installed with a first operating system and a second operating system; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system; the apparatus 300 includes:
a second system mounting unit 301, configured to update the second operating system and mount the second system partition after the second operating system is updated;
A description file obtaining unit 302, configured to obtain a hotspot description file of at least one application program, where the hotspot description file is used to record a hotspot code of the application program;
And the compiling unit 303 is configured to compile, based on the updated second operating system, the hot spot code of at least one application program according to the hot spot description file before the terminal is restarted, so as to generate a native code executed under the second operating system.
According to the compiling device provided by one or more embodiments of the present disclosure, before the terminal is restarted after the second operating system is updated, the second operating system is utilized to compile the hot spot code of the application program based on the hot spot description file of the application program, so as to generate the native code executed under the second system, thereby avoiding that the hot spot description file cannot be compiled in time due to the deletion of the system update, and compiling the hot spot code for the new system during the system update, without waiting for the terminal to be in a charged and idle state, so that the compiling of the native code can be completed in the first time, and the application performance can be improved in time.
In some embodiments, the terminal has a user data partition shared by the first operating system and the second operating system; the hotspot description file is stored in the user data partition; the description file obtaining unit 302 is further configured to obtain a hotspot description file of at least one application program from the user data partition.
In some embodiments, the apparatus 300 further comprises:
a restarting unit, configured to restart the terminal;
The second system loading unit is used for loading the updated second operating system after the terminal is restarted;
and the storage unit is used for storing the local codes into the catalogs of the corresponding application programs.
In this embodiment, after the terminal is restarted, the second operating system is started from the second system partition, and the first system partition is not mounted, so that the switching from the first operating system to the updated second operating system is completed, and the compiled native code is stored in the catalog of the corresponding application program, so that the native code can be directly executed when the updated second operating system starts and uses the corresponding application program, thereby timely improving the application program performance.
In some embodiments, the first operating system and the second operating system may be the same version or different versions of the same class of operating systems.
In some embodiments, the second system mount unit 302 includes:
An update data acquisition unit configured to acquire system update data based on the first operating system;
and the data writing unit is used for writing the system update data into the second system partition.
In some embodiments, the terminal is configured to update the first system partition and the second system partition alternately, so that the compiling apparatus provided according to the embodiments of the present disclosure may enable the updated system to have the native code of each application program, thereby improving the performance of the application program.
In some embodiments, the first operating system and the second operating system are a/B systems of an android platform.
The a/B system update (also referred to as a seamless update) of the android platform ensures that a system that can be started and used normally remains on disk during an Over The Air (OTA) update by setting two sets of system partitions (slot a and slot B) to reduce the likelihood that the device will not start after the update. Under an A/B system, the system runs from the "current" slot, but during normal operation, the running system does not access the partition in the unused slot. This approach prevents updates from being problematic by reserving unused slots as backup slots: if an error occurs during the update or immediately after the update is completed, the system may roll back to the original slot and continue to operate normally. Thus in an A/B system of an android platform, only one system partition is mounted at a time.
In this regard, according to the compiling apparatus provided in one or more embodiments of the present disclosure, by modifying the system partition mounting logic of the a/B system of the android platform, in the case where the first system partition is already mounted, the second system partition is mounted at the same time after the second operating system is updated, so that the second operating system may be utilized to compile the hot code of the application according to the hot spot description, so as to generate the native code executed under the second operating system, and further implement the compiling of the native code during the "seamless update" of the system, without waiting until the updated terminal is again in the charging and idle state, and thus the compiling of the native code may be completed at the first time, and the application performance may be timely improved.
For embodiments of the device, reference is made to the description of method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate modules may or may not be separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Accordingly, according to one or more embodiments of the present disclosure, there is provided a terminal device comprising:
At least one memory and at least one processor;
Wherein the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the compiling method provided according to one or more embodiments of the present disclosure.
Referring now to fig. 4, a schematic diagram of a mobile terminal 400 suitable for use in implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, devices such as televisions, smart screens, cell phones, computers, electronic readers, PDAs (personal digital assistants), PADs (tablet computers), and the like. The terminal illustrated in fig. 4 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the terminal apparatus 400 may include a processing device (e.g., a central processor, a graphic processor, etc.) 401, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the terminal apparatus 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the terminal device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows a terminal device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperTextTransferProtocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the terminal device; or may exist alone without being fitted into the terminal device.
The computer-readable medium carries one or more programs which, when executed by the terminal device, cause the terminal device to: updating the second operating system and mounting the second system partition after the second operating system is updated; acquiring a hotspot description file of at least one application program, wherein the hotspot description file is used for recording a hotspot code of the application program; before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate the native code executed under the second operating system.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer device, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of a unit is not limited to the unit itself in some cases, for example, the second system mount unit may also be described as "a unit for updating the second operating system and mounting the second system partition when the second operating system update is completed".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a compiling method applied to a terminal, the terminal being installed with a first operating system and a second operating system; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system; the method comprises the following steps: updating the second operating system and mounting the second system partition after the second operating system is updated; acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program; before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate a local code executed under the second operating system.
According to one or more embodiments of the present disclosure, the terminal has a user data partition shared by the first operating system and the second operating system; the hotspot description file is stored in the user data partition; the obtaining the hotspot description file of the at least one application program comprises the following steps: and acquiring a hot spot description file of at least one application program from the user data partition.
A compiling method provided according to one or more embodiments of the present disclosure further includes: restarting the terminal; after restarting the terminal, loading an updated second operating system; and storing the native code into a catalog of the corresponding application program.
According to one or more embodiments of the present disclosure, the first operating system and the second operating system are the same class of operating systems.
According to one or more embodiments of the present disclosure, the terminal currently running the first operating system includes: the terminal only mounts the first system partition currently.
According to one or more embodiments of the present disclosure, the updating the second operating system includes: acquiring system update data based on the first operating system; and writing the system update data into the second system partition.
In accordance with one or more embodiments of the present disclosure, the terminal is configured to alternately update the first system partition and the second system partition.
According to one or more embodiments of the present disclosure, the first operating system and the second operating system are a/B systems of an android platform.
According to one or more embodiments of the present disclosure, there is provided a compiling apparatus applied to a terminal having a first operating system and a second operating system installed therein; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system; the device comprises: the second system mounting unit is used for updating the second operating system and mounting the second system partition after the second operating system is updated; the description file acquisition unit is used for acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program; and the compiling unit is used for compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system before restarting the terminal so as to generate the native code executed under the second operating system.
According to one or more embodiments of the present disclosure, there is provided a terminal, characterized in that the mobile terminal includes: at least one memory and at least one processor; wherein the memory is for storing program code, and the processor is for invoking the program code stored by the memory to perform a compiling method provided in accordance with one or more embodiments of the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer storage medium, characterized in that the non-transitory computer storage medium stores program code that, when run on a computer device, causes the computer device to perform a compiling method provided according to one or more embodiments of the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (11)

1. The compiling method is applied to the terminal and is characterized in that the terminal is provided with a first operating system and a second operating system; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system;
the method comprises the following steps:
updating the second operating system and mounting the second system partition after the second operating system is updated;
acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program;
before restarting the terminal, compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system so as to generate a local code executed under the second operating system.
2. The compiling method according to claim 1, wherein the compiling step is performed by a compiling device,
The terminal having a user data partition shared by the first operating system and the second operating system;
the hotspot description file is stored in the user data partition;
the obtaining the hotspot description file of the at least one application program comprises the following steps: and acquiring a hot spot description file of at least one application program from the user data partition.
3. The compiling method according to claim 1, further comprising:
restarting the terminal;
after restarting the terminal, loading an updated second operating system;
and storing the native code into a catalog of the corresponding application program.
4. The compiling method according to claim 1, wherein the compiling step is performed by a compiling device,
The first operating system and the second operating system are the same type of operating system.
5. The compiling method of claim 1, wherein the terminal currently running the first operating system comprises:
the terminal only mounts the first system partition currently.
6. The compiling method of claim 1, the updating the second operating system comprising:
Acquiring system update data based on the first operating system;
and writing the system update data into the second system partition.
7. The compiling method according to claim 1, wherein the compiling step is performed by a compiling device,
The terminal is configured to alternately update the first system partition and the second system partition.
8. The compiling method according to claim 1, wherein the compiling step is performed by a compiling device,
The first operating system and the second operating system are A/B systems of an android platform.
9. A compiling device applied to a terminal, wherein the terminal is provided with a first operating system and a second operating system; the first operating system corresponds to a first system partition, and the second operating system corresponds to a second system partition; the terminal currently runs the first operating system;
The device comprises:
the second system mounting unit is used for updating the second operating system and mounting the second system partition after the second operating system is updated;
the description file acquisition unit is used for acquiring a hot spot description file of at least one application program, wherein the hot spot description file is used for recording hot spot codes of the application program;
and the compiling unit is used for compiling the hot spot code of at least one application program according to the hot spot description file based on the updated second operating system before restarting the terminal so as to generate the native code executed under the second operating system.
10. A terminal, characterized in that the mobile terminal comprises:
At least one memory and at least one processor;
Wherein the memory is for storing program code and the processor is for invoking the program code stored in the memory to perform the compiling method of any one of claims 1 to 8.
11. A non-transitory computer storage medium comprising,
The non-transitory computer storage medium stores program code which, when run on a computer device, causes the computer device to perform the compiling method of any one of claims 1 to 8.
CN202110008345.1A 2021-01-05 2021-01-05 Compiling method, compiling device, compiling terminal and storage medium Active CN112631609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110008345.1A CN112631609B (en) 2021-01-05 2021-01-05 Compiling method, compiling device, compiling terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110008345.1A CN112631609B (en) 2021-01-05 2021-01-05 Compiling method, compiling device, compiling terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112631609A CN112631609A (en) 2021-04-09
CN112631609B true CN112631609B (en) 2024-06-18

Family

ID=75290642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110008345.1A Active CN112631609B (en) 2021-01-05 2021-01-05 Compiling method, compiling device, compiling terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112631609B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900673B (en) * 2021-06-15 2022-10-28 荣耀终端有限公司 System installation package management method, device, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967141A (en) * 2017-11-27 2018-04-27 北京小米移动软件有限公司 Operating system update method, apparatus and terminal
CN108614705A (en) * 2017-02-07 2018-10-02 腾讯科技(深圳)有限公司 A kind of data compilation processing method and terminal
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777981A (en) * 2014-01-13 2014-05-07 中南大学 Multi-operation-system remote loading implementation method suitable for X86 framework
CN111158714B (en) * 2019-11-28 2023-04-21 上海能塔智能科技有限公司 Method and device for upgrading software of OTA (over the air) of vehicle-mounted domain controller, storage medium and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614705A (en) * 2017-02-07 2018-10-02 腾讯科技(深圳)有限公司 A kind of data compilation processing method and terminal
CN107967141A (en) * 2017-11-27 2018-04-27 北京小米移动软件有限公司 Operating system update method, apparatus and terminal
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server

Also Published As

Publication number Publication date
CN112631609A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN111611145B (en) Breakdown information collection method and device, storage medium and electronic equipment
CN110865837B (en) Method and terminal for system upgrade
CN110851204B (en) Application starting method and device and application packaging method and device
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN111274503B (en) Data processing method, device, electronic equipment and computer readable medium
CN111240766B (en) Application starting method and device, electronic equipment and computer readable storage medium
CN110908734A (en) Application combination method and device based on plug-in, terminal equipment and storage medium
CN114625536B (en) Video memory allocation method, device, medium and electronic equipment
CN111198777A (en) Data processing method, device, terminal and storage medium
CN110968331A (en) Method and device for running application program
CN112631609B (en) Compiling method, compiling device, compiling terminal and storage medium
CN112905220B (en) Thermal restoration method, device, equipment and storage medium
CN111400091B (en) Factory setting restoration method, factory setting restoration device and mobile terminal
CN112631608A (en) Compiling method, device, terminal and storage medium
CN113391882B (en) Virtual machine memory management method and device, storage medium and electronic equipment
CN113127430A (en) Mirror image information processing method and device, computer readable medium and electronic equipment
CN116679930A (en) Front-end project construction method and device, electronic equipment and storage medium
CN111240738B (en) File processing method, device, equipment and medium
CN111626787B (en) Resource issuing method, device, medium and equipment
CN111831655B (en) Data processing method, device, medium and electronic equipment
CN114625433B (en) Application program starting method and system
CN112559394B (en) System library access method and device and electronic equipment
CN111767093B (en) Data processing method, apparatus and storage medium
WO2024119895A1 (en) Operating system upgrade method, device, and storage medium
CN113407309A (en) Virtual machine memory application method and device, storage medium and electronic equipment

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
GR01 Patent grant