User equipment, server, control method of the user equipment, and control method of the server
Patent Information
- Application Number
- CN201980075214.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-11-16
- Filing Date
- 2019-11-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2039-11-08
AI Technical Summary
The hardware limitations of UE result in a long AOT compilation time, a large amount of machine code, and consume memory resources.
Based on the history of the user's application running, the files that the user often use are identified and AOT compiled (AOT) in advance; the server performs AOT compilation on the frequently used applications based on the application history of multiple UEs and sends the compilation results to the UE.
By compiling frequently used applications and files in advance, the compilation time of UE when running applications is reduced, memory resources are saved, and application operation speed is improved.
Smart Images

Figure CN113015957B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a user equipment (UE) and a server that perform ahead-of-time (AOT) compilation on source code of an application. Background Art
[0002] Generally, the UE compiles source code of an application having a bytecode format into a machine language such as a native code or a machine code in order to run the application.
[0003] Methods of compiling source code of an application include a just-in-time (JIT) compilation method for performing compilation each time the application runs, and an AOT compilation method for compiling source code of the application before running of the application.
[0004] Compared to the JIT compilation method, the AOT compilation method can provide previously compiled machine code, thereby making the application run faster without recompiling the application.
[0005] However, due to hardware limitations of the UE, the AOT compilation method may have a long compilation time, and due to the large amount of resulting machine code, the AOT compilation method may consume memory resources of the UE. Summary of the invention
[0006] Technical issues
[0007] Provided are a user device and a control method thereof, which perform ahead-of-time (AOT) compilation on files frequently used by a user based on the user's history of running applications; and a server and a control method thereof, which perform AOT compilation on frequently used applications based on the history of running applications in multiple user devices and send the compilation results to the user devices.
[0008] Technical Solution
[0009] According to one aspect of the present disclosure, a user equipment (UE) is provided, including a storage device and a controller, which can: identify a first assembly file having a first usage frequency equal to or greater than a predetermined threshold among multiple assembly files of a first application; compile the first assembly file ahead of time (AOT) based on the first assembly file having the first usage frequency equal to or greater than the predetermined threshold; obtain a first compilation result based on the AOT compilation of the first assembly file; store the first compilation result in the storage device; and run the first application based on a request to run the first application by using the first compilation result stored in the storage device.
[0010] The controller may identify whether a second compilation result of a second assembly file corresponding to the specific function is stored in the storage device based on receiving a user request to execute a specific function among a plurality of functions of the first application while executing the first application.
[0011] The controller may run the first application using the second compilation result of the second assembly file corresponding to the specific function based on identifying that the second compilation result is stored in the storage device.
[0012] The controller may just-in-time (JIT) compile the second assembly file corresponding to the specific function based on recognizing that the second compilation result of the second compilation file is not stored in the storage device, and run the first application based on the JIT compilation of the second assembly file corresponding to the specific function.
[0013] The first application may have a bytecode format.
[0014] The controller may run a virtual machine (VM) based on the first application having a bytecode format, and AOT-compile the first assembly file using the VM.
[0015] The controller may just-in-time (JIT) compile a second assembly file corresponding to the function using a VM running the first application based on receiving a user request to run a function of the first application that does not correspond to a second compilation result stored in the storage device while running the first application.
[0016] The controller may identify a second assembly file having a second usage frequency less than a predetermined threshold among the plurality of assembly files of the first application, and remove a second compilation result corresponding to the second assembly file from the storage device.
[0017] The UE may also include a communication device configured to communicate with a server, and the controller may control the communication device to transmit application running history information to the server based on running the first application, including at least one of an application identifier, assembly file information identifying the assembly file used by the UE, or device version information of the UE.
[0018] The device version information may include at least one of a firmware version, a middleware version, or an application programming interface (API) version of the UE.
[0019] The controller may control the communication device to transmit an application download request message for the second application to the server, and receive information associated with a compilation of the second application compatible with a device version of the UE based on the application download request message.
[0020] The controller may identify a second assembly file of the plurality of assembly files of the second application based on information associated with compilation of the second application; and AOT-compile the second assembly file.
[0021] According to one aspect of the present disclosure, a server is provided, comprising a storage device; a communication device configured to communicate with a plurality of user equipments (UEs) via a network; and a controller, which can: receive application execution history information from a plurality of UEs; identify applications having a usage frequency equal to or greater than a predetermined threshold based on the application execution history information; compile the source code of the application into a compilation result ahead of time (AOT) based on the usage frequency equal to or greater than the predetermined threshold; compile the source code of the application based on the AOT to obtain the compilation result; and store the compilation result in the storage device.
[0022] The application execution history information may include at least one of an application identifier of the application, assembly file information associated with an assembly file of the application, or device version information of a UE configured to execute the application.
[0023] The device version information may include at least one of a firmware version, a middleware version, or an application programming interface (API) version of the UE configured to run the application.
[0024] The controller may identify an assembly file having another usage frequency equal to or greater than another predetermined threshold among a plurality of assembly files of the application based on the assembly file information, and AOT-compile the assembly file.
[0025] The controller may compare usage frequencies of a plurality of applications corresponding to the same application identifier and the same device version with a predetermined threshold value and identify the application based on the compared usage frequencies.
[0026] The controller may generate a virtual machine (VM) having the same device version corresponding to the application based on device version information corresponding to the application.
[0027] The controller can obtain compilation results compatible with the same device version by using VM.
[0028] The controller may receive an application download request message for an application from at least one UE via the communication device, and control the communication device to transmit a compilation result compatible with a device version of the at least one UE and corresponding to the application to the at least one UE.
[0029] According to one aspect of the present disclosure, there is provided a control method for a user device including a storage device and a communication device configured to communicate with a server, the control method comprising: identifying a first assembly file having a usage frequency equal to or greater than a predetermined threshold among multiple assembly files of a first application; ahead of time (AOT) compiling the first assembly file based on the usage frequency equal to or greater than the predetermined threshold; obtaining a compilation result based on the AOT compilation of the first assembly file; storing the compilation result in the storage device; and running the first application based on a request to run the first application by using the compilation result stored in the storage device.
[0030] The control method may further include identifying whether a second compilation result of a second assembly file corresponding to the specific function is stored in the storage device based on receiving a user request to execute a specific function among multiple functions of the first application while executing the first application.
[0031] The control method may include executing the first application using a second compilation result of a second assembly file corresponding to the specific function based on identifying that the second compilation result is stored in the storage device.
[0032] The control method may include just-in-time (JIT) compiling the second assembly file based on recognizing that the second compilation result is not stored in the storage device, and executing the first application based on the JIT-compiled second assembly file.
[0033] The first application may have a bytecode format.
[0034] The control method may further include generating a virtual machine (VM) configured to perform AOT compilation based on the first application having a bytecode format.
[0035] The control method may further include performing JIT compilation by using a VM that executes the first application based on receiving a user request to execute a function that does not correspond to the compilation result stored in the storage device while executing the first application.
[0036] The control method may further include determining, based on a usage frequency of the assembly file, an assembly file having a compilation result to be deleted stored in the storage device among the plurality of assembly files of the first application.
[0037] The control method may further include controlling the communication device to transmit application execution history information to the server based on executing the first application, including at least one of an application identifier, assembly file information identifying the assembly file, or device version information of the UE.
[0038] The device version information may include at least one of a firmware version, a middleware version, or an application programming interface (API) version of the UE.
[0039] The control method may further include controlling the communication device to transmit an application download request message for the second application to the server, and receiving, via the communication device, information associated with a compilation compatible with a device version of the UE and corresponding to the second application.
[0040] The control method may further include identifying an assembly file to be AOT-compiled among the plurality of assembly files of the second application based on information associated with the compilation corresponding to the second application.
[0041] Beneficial Effects
[0042] Provided are a user equipment (UE) and a server that can effectively manage a storage space of the UE by performing ahead-of-time (AOT) compilation based on a frequency of use of a user and managing AOT-compiled machine codes. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a diagram of an application execution system including a user equipment (UE) and a server according to an embodiment;
[0044] Figure 2 is a control block diagram of a UE according to an embodiment;
[0045] Figure 3 is a control block diagram of a server according to an embodiment;
[0046] Figure 4 is a diagram of source code of an application according to an embodiment;
[0047] Figure 5 is a diagram of a compiled result stored in a UE according to an embodiment;
[0048] Figure 6 is a diagram of a signal flow for ahead-of-time (AOT) compilation according to an embodiment;
[0049] Figure 7 is a diagram of a signal flow for sending a compilation result according to an embodiment;
[0050] Figure 8 is a flowchart showing a case where a compilation result stored in a storage device is updated in a control method of a UE according to an embodiment;
[0051] Fig. 9 is a flowchart showing a case where a compilation result stored in a storage device is updated in a control method of a UE according to an embodiment;
[0052] Fig.10 is a flowchart showing a case where an application download request is provided to a server in a control method of a UE according to an embodiment;
[0053] Fig.11 is a flowchart showing a case where AOT compilation is performed in a control method of a server according to an embodiment;
[0054] Fig.12 is a flowchart illustrating a case where a compilation result is sent to a UE in a control method of a server according to an embodiment. DETAILED DESCRIPTION
[0055] The embodiments and features as described and illustrated in the present disclosure are provided as examples, and it should be understood that various modifications are possible.
[0056] It should also be understood that the term "connect" or its derivatives may refer to both direct and indirect connections, and that indirect connections include connections via wireless communication networks.
[0057] The terms used herein may describe specific embodiments and are not intended to limit the present disclosure. It should also be understood that the singular forms "a", "an", and "the" may also include plural forms unless the context clearly indicates otherwise. It should be further understood that the terms "include" and / or "comprises" as used herein may specify the presence of stated features, integers, steps, operations, elements, and / or components, but may not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0058] Terms including ordinal numbers such as "first" and "second" can be used to explain various components, but the components are not limited by these terms. The terms can be used for the purpose of distinguishing one component from another component. Therefore, without departing from the teachings of the present disclosure, the first element, component, region, layer or segment discussed below may also be referred to as a second element, component, region, layer or segment.
[0059] In addition, terms such as "-part", "-block", "-member", "-module", etc. may refer to a unit configured to perform at least one function or operation. For example, the term may refer to at least one unit at least partially implemented in hardware, such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc., software stored in a memory, or at least one processor.
[0060] The reference numerals used for the method steps can be used to identify the corresponding steps, but do not limit the order of the steps. Therefore, unless the context clearly stipulates otherwise, the written order can also be implemented in other ways.
[0061] Reference will now be made in detail to the various embodiments illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
[0062] Figure 1 is a diagram of an application execution system 10 including a user equipment (UE) 100 and a server 200 according to an embodiment.
[0063] Reference Figure 1 , the application execution system 10 may include a plurality of UEs (UE 100-1, UE 100-2, and UE 100-3), a server 200, and a network 300.
[0064] Each of the UEs 100 may be connected to the server 200 via the network 300. For example, the UE 100 may be connected to the network 300 via a wireless connection or a wired connection to communicate with the server 200 via wireless communication or wired communication.
[0065] Wireless communication may include cellular communication using at least one of Long Term Evolution (LTE), LTE-Advanced (LTE-A), Code Division Multiple Access (CDMA), Wideband CDMA (WCDMA), Universal Mobile Telecommunications System (UMTS), Wireless Broadband (WiBro), Global System for Mobile Communications (GSM), etc. In an embodiment, wireless communication may include at least one of Wireless Local Area Network (Wi-Fi), Bluetooth, Bluetooth Low Energy (BLE), ZigBee, Near Field Communication (NFC), Magnetic Secure Transmission, Radio Frequency (RF), Body Area Network (BAN) communication, etc. In an embodiment, wireless communication may include Global Navigation Satellite System (GNSS) communication. GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (Glonass), Beidou Navigation Satellite System (hereinafter also referred to as "Beidou"), or Galileo (European Global Satellite-based Navigation System), etc.
[0066] Wired communication may include at least one of Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), Recommended Standard (RS) 232, power line communication, plain old telephone service (POTS), and the like.
[0067] The network 300 may include at least one of a telecommunication network, a computer network (eg, a local area network (LAN), a wide area network (WAN), etc.), the Internet, a telephone network, and the like.
[0068] In an embodiment, the UE 100 may include a portable terminal or a fixed terminal.
[0069] The portable terminal shown as UE 100-1 can be a mobile electronic device that is easy to carry, and can include a video phone, a cellular phone, a smart phone, a wideband code division multiple access (WCDMA) terminal, a universal mobile telecommunications service (UMTS) terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a digital multimedia broadcasting (DMB) terminal, an e-book, a portable computer (e.g., a laptop computer, a tablet computer, etc.), smart glasses, a digital camera, etc.
[0070] A fixed terminal such as UE 100 - 2 or UE 100 - 3 may be an electronic device that is relatively fixed at a specific location, such as a desktop personal computer, a smart TV, etc.
[0071] The UE 100 may run the application requested by the user based on the user's input. The UE 100 may transmit a download request message to the server 200 to request download of the application, receive a compilation result such as a machine code corresponding to the application, and run the application.
[0072] Although Figure 1 Three UEs (UE 100 - 1 , UE 100 - 2 , and UE 100 - 3 ) are shown in FIG. 1 , but other embodiments include a different number of UEs 100 connected to the server 200 via the network 300 .
[0073] In an embodiment, the server 200 may be connected to a plurality of UEs 100 via a network 300. For example, the server 200 may be connected to the network 300 via a wireless connection or a wired connection to communicate with the UEs 100.
[0074] The server 200 may receive application execution history information from each of the plurality of UEs 100 , identify applications frequently used by users based on the received pieces of application execution history information, and perform AOT compilation on the identified applications to obtain compilation results such as machine codes.
[0075] The server 200 may transmit the compilation result corresponding to the identified application to the UE 100 based on receiving the download request message for the identified application from the UE 100. Therefore, since the application can be run without requiring the UE 100 to perform compilation, the UE 100 may run the application more quickly. The operation of the server 200 will be described in more detail elsewhere herein.
[0076] As described above, AOT compilation may refer to translating the source code of an application into a machine language such as machine code before the application is run. AOT compilation may include loading the source code of the application, parsing the source code of the application to create an abstract syntax tree (AST), and converting the source code of the application into machine code by using the AST. However, the compilation method is not limited thereto, and may include any method for converting the source code of the application into machine code.
[0077] In addition, AOT compilation is a pre-compilation method by which the source code of an application is compiled into a machine language such as machine code before running the application, allowing the application to run the AOT-compiled machine code without compilation based on a command to run the application received from a user.
[0078] Preloading may refer to an operation of loading data from a hard disk into a random access memory (RAM) in advance based on satisfying certain conditions. Preloading may include an operation of automatically downloading content data from an external device such as a server 200 for the UE 100. In other words, preloading may refer to loading data into a RAM in advance, and may occupy a memory and a central processing unit (CPU), which may be different from AOT compilation that stores compiled machine code.
[0079] Figure 2 is a control block diagram of the UE 100 according to an embodiment.
[0080] Reference Figure 2 UE 100 may include: a communication device 110 configured to perform communication with a server 200; a controller 120 configured to run an application and AOT compile the assembly file based on assembly file information identifying the assembly file for running the application; a storage device 130 configured to store compilation results such as machine code; an input device 140 configured to receive input from a user; a speaker 150 configured to output audible content based on the running of the application; and a display 160 configured to output visual content based on the running of the application.
[0081] In an embodiment, the communication device 110 may perform wireless communication or wired communication with the server 200 via the network 300 .
[0082] The communication device 110 may communicate with the server 200 under the control of the controller 120. Specifically, as described in more detail elsewhere herein, the communication device 110 may transmit application execution history information or an application download request message to the server 200 under the control of the controller 120, and receive a compilation result such as a machine code corresponding to the application from the server 200.
[0083] The communication device 110 may include a cellular module, a Wi-Fi module, a Bluetooth module, a GNSS module, an NFC module, an RF module, and the like.
[0084] In an embodiment, the cellular module, Wi-Fi module, Bluetooth module, GNSS module and / or NFC module may be integrated in a single integrated circuit (IC), IC package, etc. The RF module may transmit and / or receive communication signals such as RF signals. The RF module may include a transceiver, a power amplifier module (PAM), a frequency filter, a low noise amplifier (LNA), an antenna, etc. In an embodiment, the cellular module, Wi-Fi module, Bluetooth module, GNSS module and / or NFC module may transmit and / or receive RF signals via a separate RF module.
[0085] Furthermore, in an embodiment, the communication device 110 may include a USB module, an HDMI module, an RS-232 module, a POTS module, etc. configured to perform wired communication.
[0086] In an embodiment, the controller 120 may include a CPU, an application processor (AP), a communication processor (CP), etc. The controller 120 may perform operations related to control and / or communication of at least one of other components of the UE 100 or data processing.
[0087] The controller 120 may control hardware components and software components connected to the controller 120 by running an operating system (OS) or an application program and perform data processing and operations. The controller 120 may be implemented in a system on chip (SoC).
[0088] In an embodiment, the controller 120 may further include a graphics processing unit (GPU) and / or an image signal processor. The controller 120 may load a command or data received from at least one of the other components of the volatile memory, then process the command or data, and store the result data in the non-volatile memory.
[0089] In an embodiment, the controller 120 can identify one of a plurality of assembly files included in the source code of the application and having a usage frequency equal to or greater than a predetermined threshold, and if no compilation result corresponding to the assembly file is stored in the storage device 130, the compilation result is obtained by AOT compiling the assembly file, and the compilation result is stored in the storage device 130.
[0090] Specifically, the controller 120 can identify the assembly files to be AOT compiled based on information associated with the usage frequencies in multiple assembly files included in the source code of the application, obtain the compilation results by AOT compiling the identified assembly files, store the compilation results in the storage device 130, and in response to a request to run the application, use the compilation results stored in the storage device 130 to run the application.
[0091] In this case, if the compilation result corresponding to the function of the application exists in the storage device 130, the controller 120 can use the compilation result to run the application. Alternatively, if the compilation result corresponding to the function of the application does not exist in the storage device 130, the controller 120 can run the application by compiling an assembly file corresponding to the function of the application among the plurality of assembly files.
[0092] Specifically, based on a request from a user to execute a specific function among a plurality of functions supported by an application after the application is executed, the controller 120 may identify whether a compilation result of an assembly file corresponding to the specific function is stored in the storage device 130 .
[0093] If a compilation result of an assembly file corresponding to a specific function is stored in the storage device 130 , the controller 120 may execute an application using the compilation result.
[0094] If the compilation result of the assembly file corresponding to the specific function is not stored in the storage device 130 , the controller 120 may run the application by JIT-compiling the assembly file corresponding to the specific function.
[0095] The application that is the target of AOT compilation may correspond to an application in bytecode format. Specifically, the application to be AOT compiled may be in bytecode format, which may be run by being compiled in a virtual machine (VM).
[0096] Therefore, the controller 120 may execute a VM that performs AOT compilation on an application of a bytecode format type.
[0097] Furthermore, based on a request to execute a function that does not correspond to a compilation result stored in the storage device 130 after an application in a bytecode format is executed, the controller 120 may perform JIT compilation using a VM that executes the application.
[0098] The source code of the application may include multiple assembly files to provide various functions. For example, the source code of the application may include multiple assembly files, such as an assembly file that provides a specific function and another assembly file that provides another function.
[0099] As described above, the UE 100 can identify the assembly files corresponding to the frequently used functions in the source code of the application, perform AOT compilation, which is a pre-compilation method, on the frequently used assembly files, and store the compilation results for use when re-running the functions of the application. The compilation of assembly files based on the frequency of use will be described in more detail elsewhere in this document.
[0100] The controller 120 may identify an assembly file having a usage frequency less than a predetermined threshold value and delete the compilation result of the assembly file from the storage device 130 based on the compilation result stored in the storage device 130 .
[0101] In other words, based on the usage frequency of the assembly files, the controller 120 may identify any one of the plurality of assembly files included in the source code of the application, the compilation result of which stored in the storage device 130 is to be deleted.
[0102] As described above, by updating the compilation results such as machine codes stored in the storage device 130 in consideration of the frequency of use of the application or assembly file by the user, the UE 100 can delete the compilation results of the application or assembly file that is less frequently used than other applications or assembly files. In this way, the UE 100 can use the storage device space more adaptively and efficiently, thereby saving memory resources.
[0103] In an embodiment, the controller 120 may control the communication device 110 to transmit application execution history information to the server 200 , including at least one of an application identifier, an assembly file identifying the used assembly file, or device version information of the UE 100 .
[0104] The device version information may include information identifying a firmware version, a middleware version, an application programming interface (API) version, an OS version, a device version, a hardware version, etc. of the UE 100 .
[0105] The server 200 may obtain application execution history information from a plurality of UEs 100, identify frequently used applications based on the received application execution history information, and perform AOT compilation on the identified applications. The AOT compilation of the server 200 will be described in more detail elsewhere herein.
[0106] In an embodiment, the controller 120 may control the communication device 110 to transmit a download request message for the application to the server 200. The download request message may include device version information of the UE 100.
[0107] In addition, the communication device 110 may receive a compilation result corresponding to an application compatible with the device version of the UE 100 from the server 200. Receiving the compilation result from the server will be described in more detail elsewhere herein.
[0108] As described above, the controller 120 of the UE 100 may include at least one memory for storing a program for performing the above and following operations, and at least one processor for executing the program. The memory and the processor may be integrated in a single chip or physically distributed.
[0109] The storage device 130 may include a volatile memory and / or a non-volatile memory. For example, the storage device 130 may store commands or data associated with at least one of the other components of the UE 100.
[0110] The storage device 130 may include an internal memory or an external memory. The internal memory may include at least one of a volatile memory (such as a dynamic RAM (DRAM), a static RAM (SRAM), a synchronous DRAM (SDRAM), etc.) or a non-volatile memory (such as a one-time programmable ROM (OTPROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), a mask ROM, a flash ROM, a flash memory, a hard disk drive, a solid state drive (SSD), etc.).
[0111] The external memory may include a flash drive such as a Compact Flash card (CF), a Secure Digital card (SD), a Micro SD, a Mini SD, an Extreme Digital card (xD), a Multi Media Card (MMC), a Memory Stick, etc. The external memory may be functionally and / or physically connected to the UE 100 via various interfaces.
[0112] In an embodiment, the storage device 130 may store software and / or programs. The programs may include, for example, firmware, kernels, middleware, APIs, and / or applications (or applications).
[0113] Firmware may refer to a program used to control hardware components of the UE 100 when the UE 100 is activated. The firmware may be enhanced to provide improved performance and debugging, and may be updated with new versions.
[0114] The kernel may control or manage system resources such as a processor, memory, etc., which are used to execute operations or functions implemented in other programs such as firmware, middleware, API, or application, etc. In addition, the kernel may provide an interface for the firmware, middleware, API, or application to access corresponding components of the UE 100 to control or manage system resources.
[0115] The middleware may function as an intermediary for allowing an API or application to communicate with a kernel to exchange data. In addition, the middleware may process one or more task requests received from an application in a priority order. For example, the middleware may assign a priority for using a system resource (such as a processor or a memory) of the UE 100 to at least one application and process one or more task requests.
[0116] The API may refer to an interface for application control of functions provided from firmware, kernel, or middleware, and may include at least one interface or function (eg, instruction) for file control, window control, image processing, text control, and the like.
[0117] In addition, the storage device 130 may store an OS for controlling resources related to the UE 100 and / or various applications or applications driven in the OS. The OS may include, for example, Android TM 、iOS TM , Windows TM , Symbian TM 、Tizen TM , or Bada TM .
[0118] At least a portion of the storage device 130 may be preloaded on the UE 100 , or may be downloaded from an external electronic device such as the server 200 .
[0119] In addition, version information identifying the version of each of the firmware, middleware, API, and application stored in the storage device 130 may be stored. In other words, the storage device 130 may store version information of the UE 100, including information identifying a firmware version, a kernel version, a middleware version, an API version, or an application version.
[0120] In an embodiment, the storage device 130 may store the compilation results of the application. Specifically, the storage device 130 may store the compilation results of the AOT-compiled application, such as machine code, based on the operation of the controller 120. The storage device 130 may store the compilation results of each of the multiple applications stored in the UE 100, and may also store the compilation results of each assembly file in the source code of each application. The compilation results stored in the storage device 130 will be described in more detail elsewhere in this document.
[0121] In an embodiment, the input device 140 may transmit a command or data input from a user or an external device to other components of the UE 100 .
[0122] The input device 140 may include a touch panel, a (digital) pen sensor, a button, a wireless input device, an ultrasonic input device, and the like. The touch panel may utilize at least one of a capacitive method, a resistive method, an infrared method, or an ultrasonic method. The touch panel may also include a control circuit. The touch panel may also include a tactile layer for providing a sense of touch to the user. The (digital) pen sensor may be a part of the touch panel 252, or include a separate thin plate for identification. The button may include a physical button, an optical button, or a keyboard. The wireless input device may receive a command from a user input based on an input signal from an electronic device such as a remote controller, which is attached to the UE 100 but separated from the UE 100. The wireless input device may include a separate communication module configured to receive a signal from an electronic device. The ultrasonic input device may detect an ultrasonic wave originating from an input tool via a microphone to identify data corresponding to the detected ultrasonic wave.
[0123] In an embodiment, the input device 140 may receive a command to execute a specific function of an application and a command to download an application from a user of the UE 100. The command received from the user is not limited thereto, and there may be various commands depending on the function to be executed in the UE 100.
[0124] The speaker 150 may convert between a sound signal and an electrical signal. The speaker 150 may process sound information input or output via a receiver, earphone, microphone, or the like.
[0125] In an embodiment, speaker 150 may provide audible content output to the user based on the application being run.
[0126] The display 160 may include a liquid crystal display (LCD), a light emitting diode (LED) display, an organic LED display, a micro-electromechanical system (MEMS) display, an electronic paper display, etc. The display 160 may display various contents such as text, images, videos, icons, symbols, etc. to the user.
[0127] In other words, display 160 may provide visual content output to the user based on the running application.
[0128] The display 160 may include a touch screen that can detect a touch, gesture, proximity, or hovering input by an electronic pen or a body part of a user.
[0129] Figure 3 is a control block diagram of the server 200 according to the embodiment.
[0130] Reference Figure 3 , the server 200 may include: a communication device 210, configured to communicate with multiple UEs 100 via a network 300; a controller 220, configured to identify an application having a usage frequency equal to or greater than a predetermined threshold based on information associated with an application execution history received from each of the multiple UEs 100, and obtain a compilation result by AOT compiling the determined application; and a storage device 230, configured to store the compilation result.
[0131] In an embodiment, the communication device 210 may perform wireless communication or wired communication with the UE 100 via the network 300 .
[0132] For example, the communication device 210 may communicate with the UE 100 under the control of the controller 220. Specifically, as described in more detail elsewhere herein, the communication device 210 may receive application execution history information or application download request messages from a plurality of UEs 100, and transmit a compilation result such as a machine code corresponding to the application to the UE 100 that sent the application download request message.
[0133] The communication device 210 may include a cellular module, a Wi-Fi module, a Bluetooth module, a GNSS module, an NFC module, an RF module, and the like.
[0134] In an embodiment, the cellular module, Wi-Fi module, Bluetooth module, GNSS module and / or NFC module may be integrated in a single integrated circuit (IC), IC package, etc. The RF module may transmit and / or receive communication signals such as RF signals. The RF module may include a transceiver, a PAM, a frequency filter, an LNA, an antenna, etc. In an embodiment, the cellular module, Wi-Fi module, Bluetooth module, GNSS module and / or NFC module may transmit and / or receive RF signals via a separate RF module.
[0135] Furthermore, in an embodiment, the communication device 210 may include a USB module, an HDMI module, an RS-232 module, a POTS module, etc. for wired communication.
[0136] In an embodiment, the controller 220 may include one or more of a CPU, an application processor (AP), or a communication processor (CP). The controller 220 may perform operations or data processing associated with control and / or communication of at least one of the other components of the server 200.
[0137] The controller 220 may control hardware components and software components connected to the controller 220 by running an OS or an application program, and perform data processing and operations. The controller 220 may be implemented in a system on chip (SoC).
[0138] In an embodiment, the controller 220 may also include a GPU and / or an image signal processor. The controller 220 may load a command or data received from at least one of the other components in a volatile memory, then process the command or data, and store the result data in a non-volatile memory.
[0139] In an embodiment, the controller 220 of the server 200 can identify an application having a usage frequency equal to or greater than a predetermined threshold based on application execution history information received from each of the multiple UEs 100, and obtain a compilation result by AOT compiling the source code of the identified application based on the compilation result corresponding to the application not stored in the storage device 230.
[0140] The application execution history information may include at least one of an application identifier for the application, assembly file information associated with the assembly file, or device version information of the UE 100 in which the application is executed.
[0141] Specifically, the controller 220 may identify an assembly file having a usage frequency equal to or greater than a predetermined threshold among a plurality of assembly files included in the source code of the application identified based on the assembly file information, and obtain a compilation result of the application by AOT compiling the assembly file.
[0142] Specifically, the controller 220 may AOT-compile an application having a relatively high usage frequency based on the application execution history information received from the plurality of UEs 100 to obtain a compilation result such as a machine code of the application.
[0143] In addition to obtaining a compilation result of the application such as a machine code by AOT compiling the entire source code of the application, the controller 220 may also obtain a compilation result of the application by AOT compiling an assembly file with a relatively high usage frequency in the source code of the application. The latter compilation result may include machine codes corresponding to some of the multiple assembly files included in the source code of the application.
[0144] Furthermore, the controller 220 may identify an application that is a target of AOT compilation by comparing a usage frequency of each application corresponding to the same application identifier and device version information with a predetermined threshold.
[0145] Specifically, the controller 220 may classify a plurality of applications based on the application type and device version information of the UE 100 in which the application is executed, and compare the usage frequency of each classified application with a predetermined threshold.
[0146] In this case, the controller 220 may identify whether to perform AOT compilation on each application having the same application type and the same device version information.
[0147] In an embodiment, the controller 220 may generate a VM having a device version corresponding to the application identified as a target to be AOT compiled, based on the device version information corresponding to the identified application.
[0148] Specifically, the controller 220 may identify a device version in which an application identified as a target to be AOT compiled may run based on the device version information, and generate a VM having the identified device version.
[0149] For example, the controller 220 may generate a VM having a firmware version, a middleware version, an API version, and / or a kernel version for the identified application.
[0150] VM may refer to a virtualization of a physical machine in software, which provides an operating environment identical to a device version, such as a firmware version, a middleware version, an API version, and a kernel version, for an identified application.
[0151] That is, the VM may refer to virtual resources implemented in software by being allocated a processor, a memory, a disk I / O, etc., and it has the same operating environment as the device version of the UE 100 .
[0152] The controller 220 may perform AOT compilation in the VM generating the same result as compilation in the UE 100 having the same device version, and the compilation result generated in the VM may be compatible with the UE 100 having the same device version as the VM.
[0153] In other words, the controller 220 of the server 200 may generate a compilation result compatible with the device version of the UE 100 using the VM.
[0154] In an embodiment, the communication device 210 may receive a download request message for the identified application from at least one of the UEs 100 .
[0155] Specifically, the communication device 210 may receive a download request message for an application from at least one UE 100 , and the compilation result of the application is stored in the storage device 230 .
[0156] The download request message may include device version information of the UE 100 sending the message, and an identifier of the requested application.
[0157] In an embodiment, the controller 220 may control the communication device 210 to transmit to the UE 100 a compilation result that is compatible with a device version of at least one UE 100 and corresponds to the identified application.
[0158] Therefore, the UE 100 may not need to compile the source code of the application, but may use the compiled result for the application, thereby allowing the application to run faster.
[0159] That is, in order to reduce the need for UE 100 to perform compilation, server 200 can perform AOT compilation of the application, thereby allowing the controller 120 and storage device 130 of UE 100 to be more adaptively utilized, and thereby saving resources allocated to compilation. Transmitting compilation results to at least one of UE 100 will be described in more detail elsewhere in this document.
[0160] As described above, the controller 220 of the server 200 may include at least one memory for storing a program for performing the above and following operations, and at least one processor for executing the program. The processor and the memory may be integrated in a single chip or physically distributed.
[0161] The storage device 230 may include a volatile memory and / or a non-volatile memory. For example, the storage device 230 may store commands or data associated with at least one of the other components of the server 200.
[0162] The storage device 230 may include an internal memory or an external memory. The internal memory may include at least one of a volatile memory (such as DRAM, SRAM, SDRAM, etc.) or a non-volatile memory (such as OTPROM, PROM, EPROM, EEPROM, mask ROM, flash ROM, flash memory, hard disk drive, or SSD).
[0163] The external memory may include a flash drive such as CF, SD, micro SD, mini SD, xD, Multi Media Card (MMC), memory stick, etc. The external memory may be functionally and / or physically connected to the server 200 via various interfaces.
[0164] In addition, the storage device 230 may store an OS for controlling resources associated with the server 200 and / or various applications or application programs driven in the OS.
[0165] At least a portion of the storage device 230 may be preloaded on the server 200 or may be downloaded from an external electronic device such as an external server.
[0166] In an embodiment, the storage device 230 may store compilation results of applications identified based on application execution history information received from multiple UEs 100. The storage device 230 may store the compilation results of each of the multiple applications, and may also store the compilation results of each assembly file in the source code of each application. The compilation results stored in the storage device 230 will be described in more detail elsewhere herein.
[0167] Figure 4 is a diagram of source code 400 of an application according to an embodiment.
[0168] Reference Figure 4 , the source code 400 of the application may include a plurality of assembly files 410 to 440 .
[0169] Specifically, the source code 400 of each of the plurality of application programs stored in the storage device 130 of the UE 100 may include a plurality of assembly files. Figure 4 Four assembly files 410 to 440 are shown in FIG. 4 , but other embodiments include a different number of assembly files included in the source code of an application.
[0170] The application can provide various functions based on the way the application runs and / or the way the user interacts with the application. For example, an application for content reproduction can reproduce images based on the user's input and can reproduce music based on another input of the user.
[0171] In this case, the source code 400 of the application for content reproduction may include assembly files Assembly #1 410, Assembly #2 420, and Assembly #3 430 for reproducing an image.
[0172] Each of the assembly files 410, 420, and 430 may include different source codes to perform functions associated with reproducing an image. For example, assembly #1 410 may include source codes for reproducing an image, assembly #2 420 may include source codes for reproducing a sound, and assembly #3 430 may include source codes for receiving image information and sound information.
[0173] Furthermore, the source code 400 of the application for content reproduction may include assembly files Assembly #2 420, Assembly #3 430, and Assembly #4 440 for reproducing music.
[0174] Each of the assembly files 420, 430, and 440 may include different source codes to perform functions associated with reproducing music. For example, assembly #2 420 may include source codes for reproducing music, assembly #3 430 may include source codes for receiving music information, and assembly #4 440 may include source codes for adjusting an equalizer.
[0175] As described above, each application stored in the storage device 130 in the UE 100 may include a plurality of assembly files corresponding to the functions to be used. The assembly files corresponding to the respective functions to be used may be different from each other. However, although the corresponding functions to be used are different, some assembly files may be commonly used.
[0176] Figure 5 is a diagram of a coding result stored in the UE 100 according to an embodiment.
[0177] Reference Figure 5 UE 100 may store the compilation result (such as the machine code corresponding to the application) in storage device 130. The compilation result may be received from server 200, or may be stored by UE 100 after UE 100 compiles the source code of the application.
[0178] The compilation result may be provided separately based on the type of the corresponding application, and may include the compilation result of the entire source code of the corresponding application, or may include the compilation result of an assembly file frequently used in the source code of the application.
[0179] The UE 100 may run the application using the compiled result stored in the storage device 130 without compiling the application.
[0180] The compiled results stored in the storage device 130 can be adaptively updated based on the frequency of use of the application by the user. In this way, the UE 100 can utilize the memory storage space more efficiently and adaptively.
[0181] Specifically, the controller 120 can identify one with a usage frequency equal to or greater than a predetermined threshold among multiple assembly files included in the source code of the application, obtain a compilation result by AOT compiling the assembly file based on the compilation result corresponding to the assembly file not stored in the storage device 130, and store the compilation result in the storage device 130.
[0182] More specifically, the controller 120 can identify the assembly files to be AOT compiled based on the usage frequency of multiple assembly files included in the source code of the application, obtain the compilation result by AOT compiling the identified assembly files, store the compilation result in the storage device 130, and run the application based on the compilation result stored in the storage device 130 to respond to a request to run the application.
[0183] In this case, if the compilation result corresponding to the function of the application is stored in the storage device 130, the controller 120 can use the compilation result to run the application. Alternatively, if the compilation result corresponding to the function of the application is not stored in the storage device 130, the controller 120 can run the application by compiling the assembly file corresponding to the function of the application among the plurality of assembly files.
[0184] The predetermined threshold may correspond to a usage frequency identified as frequently used by the user within a certain period, and may be preset during a design phase or preset by the user via the input device 140 .
[0185] Specifically, the controller 120 may identify the usage frequency of each application based on the application execution history information, and identify the usage frequency of the assembly file based on the function corresponding to the assembly file being executed by the application.
[0186] In this case, the controller 120 may classify the applications and the assembly files by the application identifiers and the assembly file identifiers, respectively.
[0187] Therefore, the controller 120 can identify applications and assembly files having a usage frequency equal to or greater than a predetermined threshold in the source code of the application. In other words, the controller 120 can identify applications and assembly files of applications having a relatively high usage frequency based on the application execution history.
[0188] The controller 120 may obtain a compilation result by AOT compiling the assembly file of the identified application and store the compilation result in the storage device 130. However, if the compilation result corresponding to the assembly file of the application is already stored in the storage device 130, the controller 120 may avoid compiling the assembly file of the application.
[0189] As described above, UE 100 may identify assembly files corresponding to frequently used functions in the source code of the application, perform AOT compilation, which is a pre-compilation method, on the frequently used assembly files, and store the compilation results for use when re-running the functions of the application.
[0190] For example, when the usage frequency of assembly #1 of application APP#1 is equal to or greater than a predetermined threshold, assembly #1 of APP#1 may be AOT compiled into a compilation result such as machine code #1, which may be sequentially stored in storage device 130 .
[0191] The controller 120 may identify an assembly file having a usage frequency less than a predetermined threshold, and delete the compilation result of the assembly file from the storage device 130 based on the compilation result stored in the storage device 130 .
[0192] In other words, the controller 120 may identify an assembly file having a compilation result stored in the storage device 130 to be deleted among a plurality of assembly files included in the source code of the application based on a usage frequency of the assembly file that is less than a threshold value.
[0193] For example, if the usage frequency of assembly #2 of APP#1 is less than a predetermined threshold, and machine code #2 (which is a compilation result corresponding to assembly #2 of APP#1) is stored in storage device 130, machine code #2 may be deleted from storage device 130.
[0194] As described above, by updating the compilation results such as machine codes stored in the storage device 130 based on the frequency of use of the application or assembly file by the user, the UE 100 can delete the compilation results of the application or assembly file that has been rarely used. In this way, the UE 100 can use the storage device space more adaptively and efficiently.
[0195] Furthermore, the controller 120 may execute the application using the compilation result stored in the storage device 130 based on a request to execute the application.
[0196] For example, if the compilation result corresponding to the function of the application is stored in the storage device 130, the controller 120 can use the compilation result to run the application. Alternatively, if the compilation result corresponding to the function of the application is not stored in the storage device 130, the controller 120 can compile the assembly file corresponding to the function of the application among the plurality of assembly files and run the application.
[0197] Specifically, based on a request from a user to execute a specific function among a plurality of functions supported by an application after the application is executed, the controller 120 may identify whether a compilation result of an assembly file corresponding to the specific function is stored in the storage device 130 .
[0198] If a compilation result of an assembly file corresponding to a specific function is stored in the storage device 130 , the controller 120 may execute an application using the compilation result.
[0199] If the compilation result of the assembly file corresponding to the specific function is not stored in the storage device 130 , the controller 120 may execute the application by JIT-compiling the assembly file corresponding to the specific function.
[0200] The application that is the target of AOT compilation may correspond to an application in bytecode format. Specifically, the application to be AOT compiled may be in bytecode format, which may be run by compiling in a VM.
[0201] Therefore, the controller 120 may execute a VM that performs AOT compilation on an application of a bytecode format type.
[0202] Furthermore, based on a request to execute a function that does not correspond to a compilation result stored in the storage device 130 after the application of the bytecode is executed, the controller 120 may perform JIT compilation using a VM that executes the application.
[0203] Figure 6 Diagram of signal flow for AOT compilation according to an embodiment.
[0204] Reference Figure 6 , a plurality of UEs 100 - 1 , UE 100 - 2 , and UE 100 - 3 may generate application execution history information based on application execution in operation 610 .
[0205] The application execution history information may include at least one of an application identifier of the application, assembly file information associated with a used assembly file, or device version information of the UE 100 in which the application is executed.
[0206] Specifically, each of the multiple UEs 100-1, UE 100-2, and UE 100-3 may generate application execution history information, including at least one of an application identifier for the running application, assembly file information representing an assembly file of the running application (the assembly file information corresponds to a running function), or device version information of the UE 100 of the running application.
[0207] The device version information may include information associated with a firmware version, a middleware version, or an API version of the UE 100 .
[0208] In an embodiment, a plurality of UEs 100 - 1 , UE 100 - 2 , and UE 100 - 3 may transmit application execution history information in operation 620 .
[0209] Specifically, when one of multiple UEs 100-1, UE 100-2 and UE 100-3 runs an application, UE 100 transmits application running history information to server 200, including at least one of an application identifier, assembly file information representing the assembly file used, or device version information of UE 100 in which the application runs.
[0210] Therefore, server 200 can receive application execution history information from multiple UEs 100-1, 100-2, and 100-3. Specifically, server 200 can receive information associated with applications executed in UE 100 and information associated with assembly files used by UE from each of UE 100-1, UE 100-2, and UE 100-3.
[0211] In an embodiment, the server 200 may identify an application having a usage frequency equal to or greater than a predetermined threshold based on the application execution history information in operation 630. In other words, the server 200 may identify an application frequently used as a target to be AOT compiled based on the application execution history information.
[0212] Furthermore, the controller 220 of the server 200 may identify an application that is a target of AOT compilation by comparing the usage frequency of each application corresponding to the same application identifier and device version information with a predetermined threshold value.
[0213] Specifically, the controller 220 may classify a plurality of applications based on the application type and device version information of the UE 100 in which the application is executed, and compare the usage frequency of each classified application with a predetermined threshold value.
[0214] In this way, the controller 220 may identify whether to perform AOT compilation on each of the applications having the same application type and the same device version information.
[0215] In an embodiment, the server 200 may obtain a compilation result by AOT-compiling the identified application in operation 640 .
[0216] In an embodiment, the controller 220 of the server 200 can identify an application having a usage frequency equal to or greater than a predetermined threshold based on application execution history information received from each of the multiple UEs 100, and obtain a compilation result by AOT compiling the source code of the identified application based on the compilation result corresponding to the identified application not stored in the storage device 230.
[0217] Specifically, the controller 220 may identify an assembly file having a usage frequency equal to or greater than a predetermined threshold among multiple assembly files included in the source code of the application identified based on the application execution history information, and obtain a compilation result of the application by AOT compiling the assembly file.
[0218] Specifically, the controller 220 may AOT-compile an application having a relatively high usage frequency into a compilation result such as a machine code based on the application execution history information received from the plurality of UEs 100 .
[0219] In addition to obtaining a compilation result of the application such as a machine code by AOT compiling the entire source code of the application, the controller 220 can also obtain a compilation result of the application by AOT compiling an assembly file with a relatively high usage frequency in the source code of the application. The latter compilation result may include machine codes corresponding to some of the multiple assembly files included in the source code of the application.
[0220] In an embodiment, the controller 220 may generate a VM having a device version corresponding to the application identified as a target to be AOT compiled, based on the device version information corresponding to the identified application.
[0221] Specifically, the controller 220 may identify a device version of the UE 100 in which the application identified as a target to be AOT compiled may be executed based on the device version information, and generate a VM having the identified device version.
[0222] For example, the controller 220 may generate a VM having a firmware version, a middleware version, an API version, and / or a kernel version for the identified application.
[0223] VM may refer to a virtualization of a physical machine in software, which provides an operating environment identical to a device version, such as a firmware version, a middleware version, an API version, and a kernel version, for an identified application.
[0224] That is, the VM may refer to virtual resources implemented in software by being allocated a processor, a memory, a disk I / O, etc., and it has the same operating environment as the device version.
[0225] Then, the controller 220 may perform AOT compilation which generates the same result as the compilation in the UE 100 having the device version of the VM, and the compilation result generated in the VM may be compatible with the UE 100 having the same device version as the VM.
[0226] In other words, the controller 220 of the server 200 may generate a compilation result compatible with the device version of the UE 100 using the VM.
[0227] In an embodiment, the server 200 may store the compiled result in the storage device 230 in operation 650. Based on the download request message from the UE 100, the stored compiled result may be transmitted to the UE 100.
[0228] Although Figure 6 Three UEs (UE 100-1, UE 100-2 and UE 100-3) are shown in FIG. 1 , but other embodiments include different numbers of UEs 100.
[0229] Figure 7 is a diagram of a signal flow for transmitting a compilation result according to an embodiment.
[0230] Reference Figure 7 , the UE 100 may receive a user input identifying an application download request in operation 710 .
[0231] Specifically, UE 100 may receive user input via input device 140 identifying an application download request.
[0232] The UE 100 may transmit an application download request to the server 200 in operation 720 .
[0233] Specifically, in an embodiment, the controller 120 may control the communication device 110 to transmit an application download request message for an application to the server 200. The application download request message may include a UE identifier identifying the UE 100, device version information of the UE 100, and an application identifier.
[0234] In an embodiment, the server 200 may identify the device version of the UE 100 in operation 730. Specifically, the server 200 may identify the device version of the UE 100 that sends the download request message, such as a firmware version, a middleware version, an API version, a kernel version, etc., based on the device version information of the UE 100 included in the application download request message.
[0235] In an embodiment, the server 200 may identify a compilation result that is compatible with the device version of the UE 100 and corresponds to the application in operation 740 .
[0236] Specifically, based on the identified device version of the UE 100 , the controller 220 of the server 200 may identify a compilation result generated by a VM having the same device version as the UE 100 that transmits the application download request message.
[0237] A VM having the same device version as the UE 100 can perform AOT compilation of the application, which generates the same result as the compilation of the application by the UE 100. In this way, the compilation result generated in the VM can be compatible with the UE 100 having the same device version as the VM.
[0238] In this case, the controller 220 may identify a compilation result corresponding to the application requested by the UE 100 based on the application identifier included in the application download request message.
[0239] In an embodiment, the server 200 may transmit the identified compilation result in operation 750 .
[0240] Specifically, the controller 220 of the server 200 may control the communication device 210 to transmit the identified compilation result to the UE 100 that sent the application download request message. The controller 220 may identify the UE 100 that sent the application download request message based on the UE identifier included in the application download request message.
[0241] In an embodiment, the UE 100 may execute the application based on the identified compilation result in operation 760 .
[0242] Specifically, the controller 120 of the UE 100 may execute the application based on the compilation result received from the server 200 without compiling the source code of the application itself. Information generated from the running function of the application may be output through the speaker 150 or the display 160 of the UE 100.
[0243] Therefore, the UE 100 may not need to compile the source code of the application, but may use the compiled result for the application, thereby allowing the application to run faster.
[0244] That is, to reduce the need for UE 100 to perform compilation itself, server 200 may perform AOT compilation of the application, thereby allowing controller 120 and storage device 130 of UE 100 to be more adaptively and efficiently utilized, and thereby conserving resources otherwise allocated to compilation.
[0245] In addition, the controller 120 of the UE 100 may use the compilation result of the application corresponding to the application download request message to identify the assembly file to be AOT compiled from the plurality of assembly files of the application. In other words, the compilation result may represent the assembly file to be AOT compiled.
[0246] A control method of the UE 100 and the server 200 according to an embodiment will now be described. When describing the control method of the UE 100 and the control method of the server 200, the above-mentioned UE 100 and the server 200 may be applied. Figures 1 to 7 The description may also be applied to the control method of the UE 100 or the server 200, and redundant description may be omitted.
[0247] Figure 8is a flowchart showing a case where a compiled result stored in the storage device 130 is updated in a control method of the UE 100 according to an embodiment.
[0248] Reference Figure 8 , the controller 120 of the UE 100 may generate assembly file information associated with an assembly file used during execution of an application in operation 810 .
[0249] The assembly file information may include an application identifier identifying an application having an assembly file, and may identify an assembly file used during execution of the application among a plurality of assembly files included in a source code of the application program.
[0250] In other words, the controller 120 may identify an assembly file associated with a function based on execution of an application and generate assembly file information identifying the assembly file. Thus, the controller 120 may identify a usage frequency of each assembly file included in each application.
[0251] In an embodiment, the controller 120 of the UE 100 may identify a first assembled file having a usage frequency equal to or greater than a predetermined threshold based on the assembled file information in operation 820 .
[0252] Specifically, the controller 120 can identify the assembly file to be AOT compiled among multiple assembly files included in the source code of the application based on information associated with the usage frequency, obtain a compilation result by AOT compiling the identified assembly file, store the compilation result in the storage device 130, and use the compilation result stored in the storage device 130 to run the application in response to a request to run the application.
[0253] In this case, if the compilation result corresponding to the function associated with the assembly file of the application is stored in the storage device 130, the controller 120 can use the compilation result to run the application. Alternatively, if the compilation result corresponding to the function associated with the assembly file of the application is not stored in the storage device 130, the controller 120 can run the application by compiling the assembly file corresponding to the function of the application among the plurality of assembly files.
[0254] The predetermined threshold value may correspond to a usage frequency identified as frequently used by the user within a certain period, and may be preset during a design phase or may be preset by the user via the input device 140 .
[0255] Specifically, the controller 120 may identify the usage frequency of each application based on the application execution history information, and may also identify the usage frequency of an assembly file based on a function corresponding to the assembly file being executed by the application.
[0256] In this case, the controller 120 may classify the applications and the assembly files by the application identifiers and the assembly file identifiers, respectively.
[0257] Therefore, the controller 120 can identify an application with a usage frequency equal to or greater than a predetermined threshold and a first assembly file in the source code of the application. In other words, the controller 120 can identify an application with a high usage frequency and a first assembly file of the application based on the application execution history information.
[0258] If the controller identifies that the first compilation result corresponding to the first assembly file is not stored in the storage device 130 in operation 830 (operation 830-NO), the controller 120 of the UE 100 may obtain the first compilation result by AOT-compiling the first assembly file in operation 840.
[0259] The controller 120 may store the first compilation result in the storage device 130 in operation 850 .
[0260] The controller 120 may obtain a first compilation result by AOT compiling the first assembly file of the application and store the first compilation result in the storage device 130. Alternatively, if the controller 120 identifies that the first compilation result is stored in the storage device 130 in operation 830 (operation 830-YES), the controller 120 may avoid AOT compiling the first assembly file.
[0261] As described above, UE 100 can identify assembly files that often correspond to frequently used functions in the source code of the application, perform AOT compilation, which is a previous compilation method, on the frequently used assembly files, and store the compilation results for use when re-running the functions of the application.
[0262] Fig. 9 is a flowchart showing a case where a compilation result stored in the storage device 130 is updated in a control method of the UE 100 according to an embodiment;
[0263] Reference Fig. 9 , the controller 120 of the UE 100 may generate assembly file information identifying an assembly file during execution of an application in operation 910 .
[0264] In an embodiment, the controller 120 of the UE 100 may identify a second assembled file having a usage frequency less than a predetermined threshold value based on the assembled file information in operation 920 .
[0265] The predetermined threshold may correspond to a usage frequency identified as not frequently used by the user within a certain period, and may be preset during a design phase or may be preset by the user via the input device 140 .
[0266] Therefore, the controller 120 can identify applications with a usage frequency less than a predetermined threshold and second assembly files in the source code of the applications. In other words, the controller 120 can identify applications with low usage frequency and second assembly files of the applications based on the application execution history information.
[0267] If the controller 120 identifies that the second compilation result corresponding to the second assembly file is stored in the storage device 130 in operation 930 (operation 930 —YES), the controller 120 of the UE 100 may delete the second compilation result from the storage device 130 in operation 940 .
[0268] In other words, the controller 120 may identify an assembly file associated with the compilation result to be deleted stored in the storage device 130 from among a plurality of assembly files included in the source code of the application based on the usage frequency of the assembly file.
[0269] As described above, by updating the compilation results such as machine codes stored in the storage device 130 in consideration of the frequency of use of the application or assembly file by the user, the UE 100 can delete the compilation results of the application or assembly file that has been rarely used. In this way, the UE 100 can more adaptively and effectively utilize the storage device space.
[0270] Fig.10 is a flowchart showing a case where an application download request is provided to a server 200 in a control method of a UE 100 according to an embodiment;
[0271] Reference Fig.10 , the UE 100 may receive a user input identifying an application download request in operation 1010 .
[0272] Specifically, UE 100 may receive user input via input device 140 identifying an application download request.
[0273] The UE 100 may transmit an application download request message to the server 200 in operation 1020 .
[0274] Specifically, in an embodiment, the controller 120 may control the communication device 110 to transmit an application download request message to the server 200. The application download request message may include a UE identifier identifying the UE 100, device version information of the UE 100, and an application identifier.
[0275] In an embodiment, the UE 100 may receive a compilation result that is compatible with the device version of the UE 100 and corresponds to the application from the server 200 in operation 1030 .
[0276] Specifically, the communication device 110 may receive a compilation result from the server 200 that is compatible with the device version of the UE 100 and corresponds to the application.
[0277] The UE 100 may execute the application based on the compilation result in operation 1040 .
[0278] Specifically, the controller 120 of the UE 100 may execute the application based on the compilation result received from the server 200 and may avoid compiling the source code of the application. Information generated from the execution of the function of the application may be output through the speaker 150 or the display 160 of the UE 100.
[0279] Therefore, the UE 100 may not need to compile the source code of the application, but may use the compiled result for the application, thereby allowing the application to run faster.
[0280] That is, to reduce the need for UE 100 to perform compilation, server 200 may perform AOT compilation of the application, thereby enabling controller 120 and storage device 130 of UE 100 to be more adaptable and efficiently utilized, and thereby saving resources originally allocated to compilation.
[0281] In addition, the controller 120 of the UE 100 may use the compilation result of the application corresponding to the application download request message to identify the assembly file to be AOT compiled from the plurality of assembly files of the application. In other words, the compilation result may represent the assembly file to be AOT compiled.
[0282] Fig.11 is a flowchart illustrating a case where AOT compilation is performed in a control method of the server 200 according to an embodiment.
[0283] Reference Fig.11 , the server 200 may receive application execution history information from a plurality of UEs 100 in operation 1110 .
[0284] The application execution history information may include at least one of an application identifier of the application, assembly file information associated with the assembly file, or device version information of the UE 100 .
[0285] Specifically, each of the plurality of UEs 100 may generate application execution history information including at least one of an application identifier of the application, assembly file information corresponding to a function representing an assembly file of the application, or device version information of the UE 100 .
[0286] The device version information may include information associated with a firmware version, a middleware version, or an API version of the UE 100 .
[0287] Therefore, the server 200 may obtain application execution history information from a plurality of UEs 100. Specifically, the server 200 may obtain, from each of the plurality of UEs 100, information associated with an application executed by the UE and information associated with an assembly file used by the UE 100.
[0288] In an embodiment, the server 200 may identify an application having a usage frequency equal to or greater than a predetermined threshold based on the application execution history information in operation 1120. In other words, the server 200 may identify frequently used applications as targets to be AOT compiled based on the application execution history information.
[0289] Furthermore, the controller 220 of the server 200 may identify an application that is a target of AOT compilation by comparing the usage frequency of each application corresponding to the same application identifier and device version information with a predetermined threshold value.
[0290] Specifically, the controller 220 may classify a plurality of applications based on the application type and device version information of the UE 100 in which the application is executed, and compare the usage frequency of each classified application with a predetermined threshold value.
[0291] In this way, the controller 220 can identify whether to perform AOT compilation on each application having the same application type and the same device version information.
[0292] If the controller 220 identifies that the compilation result corresponding to the identified application is not stored in the storage device 230 in operation 1130 (operation 1130 -NO), the server 200 may generate a virtual machine (VM) having a device version for the identified application in operation 1140 .
[0293] In other words, the controller 220 may generate a VM having a device version corresponding to the application identified as a target to be AOT-compiled based on the device version information corresponding to the identified application.
[0294] Specifically, the controller 220 may identify a device version of the UE 100 in which the application identified as a target to be AOT compiled may be executed based on the device version information, and generate a VM having the identified device version.
[0295] For example, the controller 220 may generate a VM having a firmware version, a middleware version, an API version, and / or a kernel version for the identified application.
[0296] VM may refer to a virtualization of a physical machine in software, which provides an operating environment identical to a device version, such as a firmware version, a middleware version, an API version, and a kernel version, for an identified application.
[0297] That is, the VM may refer to virtual resources implemented in software by being allocated a processor, a memory, a disk I / O, etc., and it has the same operating environment as the device version.
[0298] In an embodiment, the server 200 may AOT-compile the source code of the identified application by using the VM to obtain a compilation result in operation 1150 .
[0299] Specifically, the controller 220 may identify an assembly file having a usage frequency equal to or greater than a predetermined threshold among a plurality of assembly files included in the source code of the application identified based on the assembly file information, and obtain a compilation result of the application by AOT compiling the assembly file.
[0300] Specifically, the controller 220 may AOT-compile an application having a high usage frequency into a compilation result such as a machine code of the application based on the application execution history information received from the plurality of UEs 100 .
[0301] In addition to obtaining a compilation result of the application such as a machine code by AOT compiling the entire source code of the application, the controller 220 can also obtain a compilation result of the application by AOT compiling an assembly file with a high usage frequency in the source code of the application. The latter compilation result may include machine codes corresponding to some of the multiple assembly files included in the source code of the application.
[0302] The controller 220 may perform AOT compilation which generates the same result as compilation in the UE 100 having the same device version as the virtual machine, and the compilation result generated in the VM may be compatible with the UE 100 having the same device version as the virtual machine.
[0303] In other words, the controller 220 of the server 200 may generate a compilation result compatible with the device version using the VM.
[0304] In an embodiment, the server 200 may store the compiled result in the storage device 230 in operation 1160. Upon receiving the download request message from the UE 100, the stored compiled result may be transmitted to the UE 100.
[0305] If the controller 220 identifies that the compilation result corresponding to the identified application is stored in the storage device 230 in operation 1130 (operation 1130 -YES), the server 200 may avoid generating a VM.
[0306] Fig.12 is a flowchart illustrating a case where a compilation result is transmitted to a UE 100 in a control method of a server 200 according to an embodiment.
[0307] Reference Fig.12, the server 200 may receive an application download request message from the UE 100 in operation 1210 .
[0308] Specifically, in an embodiment, the communication device 210 may receive an application download request message from the UE 100. The application download request message may include a UE identifier identifying the UE 100, device version information of the UE 100, and an application identifier.
[0309] In an embodiment, the server 200 may identify the device version of the UE 100 based on the application download request message in operation 1220. Specifically, the server 200 may identify the device version of the UE 100 that sends the application download request message, such as a firmware version, a middleware version, an API version, a kernel version, etc., based on the device version information of the UE 100 included in the application download request message.
[0310] In an embodiment, the server 200 may identify a compilation result that is compatible with the device version of the UE 100 and corresponds to the application in operation 1230 .
[0311] Specifically, based on the identified device version of the UE 100 , the controller 220 of the server 200 may identify a compilation result of VM generation having the device version of the UE 100 that transmits the application download request message.
[0312] The VM having the same device version as the UE 100 may perform AOT compilation, which generates the same result as the compilation by the UE 100, and the compilation result generated in the VM may be compatible with the UE 100 having the same device version as the VM.
[0313] In this case, the controller 220 may identify a compilation result corresponding to the application requested by the UE 100 based on the application identifier included in the application download request message.
[0314] In an embodiment, the server 200 may transmit the identified compilation result to the UE 100 in operation 1240 .
[0315] Specifically, the controller 220 of the server 200 may control the communication device 210 to transmit the identified compilation result to the UE 100 that sent the application download request message. The controller 220 may identify the UE 100 that sent the download request message based on the UE identifier included in the application download request message.
[0316] Therefore, the UE 100 may not need to compile the source code of the application, but may use the compiled result for the application, thereby allowing the application to run faster.
[0317] That is, to reduce the need for UE 100 to perform compilation, server 200 may perform AOT compilation of the application, thereby enabling the controller 120 and storage device 130 of UE 100 to be more adaptable and efficiently utilized, and thereby saving resources originally allocated to compilation.
[0318] In addition, the controller 120 of the UE 100 may use the compilation result of the application corresponding to the application download request message to identify the assembly file to be AOT compiled from the multiple assembly files of the application. In other words, the compilation result may represent the assembly file to be AOT compiled.
[0319] Meanwhile, the embodiments of the present disclosure may be implemented in the form of a non-transitory computer-readable medium, which is configured to store instructions to be executed by a computer. The instructions may be stored in the form of program code, and when executed by a processor, a program module may be generated to perform the operations of the embodiments of the present disclosure. The recording medium may correspond to a non-transitory computer-readable recording medium.
[0320] The non-transitory computer-readable recording medium includes any type of recording medium on which data that can be read by a computer thereafter is stored. For example, the non-transitory computer-readable recording medium may be a ROM, RAM, a magnetic tape, a magnetic disk, a flash memory, an optical data storage device, or the like.
[0321] According to an embodiment of the present disclosure, AOT compilation is performed based on the user's frequency of use of applications and functions and the machine code after AOT compilation is managed. A UE, a server, a control method for the UE, and a control method for the server can be provided to effectively use the storage device space of the UE.
[0322] Embodiments have been described above, but those skilled in the art will appreciate and realize that various modifications may be made without departing from the scope of the disclosure. Therefore, it should be apparent to those skilled in the art that the scope of the disclosure is defined by the following claims.
Claims
1. A user equipment UE, comprising: Storage devices; as well as Processor, configured as: identifying a first assembled file having a first usage frequency equal to or greater than a predetermined threshold among a plurality of assembled files of a first application, the first application having a first assembled file and a second assembled file; Running a virtual machine VM to process a first application in a bytecode format; AOT-compile the first assembly file in advance based on the first assembly file having a first usage frequency equal to or greater than a predetermined threshold using the VM; Compile the first assembly file based on AOT to obtain a first compilation result; Storing the first compilation result in a storage device; as well as In response to receiving a request to execute the first application, the first application is executed by using the first compilation result stored in the storage device and a second compilation result obtained based on identifying a second assembly file corresponding to the specific function through just-in-time (JIT) compilation.
2. The UE according to claim 1, wherein: The processor is configured to identify whether a second compilation result of a second assembly file corresponding to a specific function is stored in a storage device based on receiving a user request to execute a specific function among a plurality of functions of the first application while executing the first application.
3. The UE according to claim 2, wherein: The processor is configured to run the first application using a second compilation result of a second assembly file corresponding to the specific function based on identifying that the second compilation result is stored in the storage device.
4. The UE according to claim 1, wherein: The processor is configured as follows: Based on receiving a user request to execute a function of the first application that does not correspond to a second compilation result stored in the storage device while executing the first application, a second assembly file corresponding to the function is JIT-compiled using a VM executing the first application.
5. The UE according to claim 1, wherein: The processor is configured as follows: A second assembly file having a second usage frequency less than a predetermined threshold is identified among the plurality of assembly files of the first application, and a second compilation result corresponding to the second assembly file is removed from the storage device.
6. The UE according to claim 1, further comprising: a communication device configured to communicate with the server, The processor is configured to control the communication device to transmit application running history information including at least one of an application identifier, assembly file information identifying an assembly file used by the UE, or device version information of the UE to the server based on running the first application.
7. The UE according to claim 6, wherein: The device version information includes at least one of a firmware version, a middleware version, or an application programming interface API version of the UE.
8. The UE according to claim 6, wherein: The processor is configured as follows: controlling the communication device to transmit an application download request message for the second application to the server, and Information associated with a compilation of a second application is received based on the application download request message, wherein the compilation of the second application is compatible with a device version of the UE.
9. The UE according to claim 8, wherein: The processor is configured as follows: Based on the information associated with the compilation of the second application, a third assembly file is identified among the plurality of assembly files of the second application, and the third assembly file is AOT compiled.
10. A server, comprising: Storage devices; A communication device configured to communicate with a plurality of user equipments UE via a network; as well as Processor, configured as: receiving application execution history information from the plurality of UEs; identifying an application having a usage frequency equal to or greater than a predetermined threshold based on the application execution history information; Running a virtual machine VM to process a first application in a bytecode format; AOT-compile source code ahead of time using the VM based on a first assembly file having a usage frequency equal to or greater than a predetermined threshold; Compile the source code of the application based on AOT to obtain the source code; The compilation result is stored in a storage device.
11. A control method for a user equipment UE, the UE comprising a storage device and a communication device configured to communicate with a server, the control method comprising: identifying a first assembled file having a first usage frequency equal to or greater than a predetermined threshold among a plurality of assembled files of a first application, the first application having a first assembled file and a second assembled file; Running a virtual machine VM to process a first application in a bytecode format; Using the VM to AOT-compile the first assembly file in advance based on the first usage frequency being equal to or greater than a predetermined threshold; Compile the first assembly file based on AOT to obtain a first compilation result; Storing the first compilation result in a storage device; as well as In response to receiving a request to execute the first application, the first application is executed by using the first compilation result stored in the storage device and a second compilation result obtained based on identifying a second assembly file corresponding to the specific function through just-in-time (JIT) compilation.
12. The control method according to claim 11, further comprising: Based on receiving a user request to execute a specific function among a plurality of functions of the first application while executing the first application, it is identified whether a second compilation result of a second assembly file corresponding to the specific function is stored in a storage device.
13. The control method according to claim 12, wherein: Running the first application includes: Based on identifying that the second compilation result is stored in the storage device, the first application is run using the second compilation result of the second assembly file corresponding to the specific function.
14. The control method according to claim 11, further comprising: Based on the first application having a bytecode format, generating a virtual machine VM configured to perform AOT compilation; as well as Based on receiving a user request to execute a function that does not correspond to the compilation result stored in the storage device while the first application is executed, JIT compilation is performed by using the VM that executes the first application.
Citation Information
Patent Citations
Selective execution of ahead-of-time compiled code
US20170269950A1
Just in time cloud compilation
US9038038B1