An application optimization method, server and terminal device
Patent Information
- Application Number
- CN202510536388.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2026-10-27
AI Technical Summary
但是,如果下载的应用的PGO文件过大,会导致编译后产生的机器码膨胀,增加内存占用、磁盘占用以及编译时间,影响应用优化效率,而下载的应用的PGO文件过小,又会导致覆盖不了完全的应用使用场景,影响应用优化效果
[0039]上述第二方面至第十一方面及其可能的设计中的有益效果可以参考上述对第一方面及其任一可能的设计中所述的方法的有益效果的描述。
Smart Images

Figure CN122985170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to an application optimization method, server, and terminal device. Background Technology
[0002] Ahead-of-time (AOT) compilation refers to the process where application code is compiled into machine code before runtime, rather than during runtime. AOT technology can leverage profile-guided optimization (PGO) files for optimization guidance. For example, PGO files can utilize runtime information to instruct the compiler to perform more effective optimizations, thereby generating more efficient machine code.
[0003] Currently, servers can train application PGO files. These PGO files can be used to optimize all or part of the application's functionality. Terminal devices can download the application's PGO file along with the application's installation package from the server, allowing for optimized compilation during application installation and improved performance. However, if the downloaded application PGO file is too large, it will lead to bloated machine code after compilation, increasing memory and disk usage, as well as compilation time, thus affecting application optimization efficiency. Conversely, if the downloaded application PGO file is too small, it will not fully cover all application usage scenarios, impacting the optimization effect. Summary of the Invention
[0004] This application provides an application optimization method, server, and terminal device to improve application optimization efficiency and effectiveness.
[0005] In a first aspect, embodiments of this application provide an application optimization method applicable to a server or components within the server (e.g., units / modules, circuits, or chips). Taking a server as an example, the method includes: receiving first information from a first terminal device and receiving second information from a second terminal device; wherein the first information is used to request the download of a first application, and the second information is used to request the download of the first application; determining a first analysis-guided optimization PGO file based on third information, and determining a second PGO file based on fourth information; wherein the third information is used to indicate a first set of functions of the first application determined based on user profile information of a first user corresponding to the first terminal device, and the fourth information is used to indicate a second set of functions of the first application determined based on user profile information of a second user corresponding to the second terminal device, the first PGO file being used to optimize the first set of functions, and the second PGO file being used to optimize the second set of functions; sending the first PGO file to the first terminal device and sending the second PGO file to the second terminal device.
[0006] In this embodiment, after receiving download requests for the same application (e.g., the first application) from different users, the server can determine the PGO file for the first application for each user based on the set of functions needed (or optimized) by each user according to their user profile information. The server then sends the PGO file to each user so that they can optimize and compile the application using the PGO file during installation. For example, if user 1 needs functions 1 and 2 of the first application, and user 2 needs functions 2 and 3, the server can send user 1 a PGO file 1 for optimizing functions 1 and 2, and user 2 a PGO file 2 for optimizing functions 2 and 3. Since the PGO files sent to different users are for optimizing only a portion of the functions needed by each user, rather than all of them, this avoids the PGO file being too large or too small, improving application optimization efficiency and effectiveness.
[0007] In one possible implementation, the user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used, and the user profile information of the second user is used to indicate one or more of the applications that the second user has downloaded, the applications that have been used, or the functions of the applications that have been used.
[0008] In this implementation, the server can determine the set of functions of the first application that the user needs to use based on one or more of the following: applications the user has downloaded, applications the user has used, or functions of applications the user has used. For example, if a user has downloaded a news application and used its news browsing function, and when the user downloads a short video application, if the short video application includes a news browsing function, then the user may need to use the news browsing function of the short video application 1. Alternatively, the server can determine the set of functions of the first application that different users need to use through other methods, and this is not limited.
[0009] In one possible implementation, before determining the first PGO file based on the third information and the second PGO file based on the fourth information, the method further includes: determining fifth information; wherein the fifth information is used to indicate a third set of functions of the first application, and the number of users using the third set of functions is greater than a first threshold.
[0010] In this implementation, the server can determine the set of functions of the first application that most users need to use, and then determine the PGO file of the first application for each individual user based on the set of functions of the first application that most users need to use and the set of functions of the first application that individual users need to use. This ensures both the optimization of the set of functions of the first application that most users need to use and the optimization of the set of functions of the first application that individual users need to use, thereby improving the efficiency and effectiveness of application optimization.
[0011] In one possible implementation, if the third function set includes the first function and the second function, and the first function set does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or, if the third function set includes the first function and the second function, and the first function set includes the first function, and the first function set does not include the second function, the first PGO file is also used to optimize the second function.
[0012] In this implementation, when the server determines the first PGO file for the first user based on the third set of functions required by most users and the first set of functions required by the first user, if there are no functions in the third set that are identical to those in the first set, the server can determine that the first PGO file can be used not only to optimize the first set of functions but also to optimize all functions in the third set. In other words, when the usage needs of most users do not overlap with those of a single user, the server can expand the application optimization scope from all functions required by a single user to all functions required by both the single user and most users, covering as many application usage scenarios as possible and improving the application optimization effect.
[0013] If the third set of functions contains both identical and different functions from the first set, the server can determine that the first PGO file, in addition to optimizing the first set of functions for the first application, can also be used to optimize functions in the third set that differ from the first set. In other words, when the usage needs of most users overlap with those of a single user, the server can perform deduplication. This allows the server to expand the application optimization scope from all functions required by a single user to all functions required by a single user, as well as the different functions required by most users and those required by a single user, avoiding redundant optimization of the same functions and improving application optimization efficiency.
[0014] In one possible implementation, if the third function set includes the first function and the second function, and the second function set does not include the first function and the second function, the second PGO file is also used to optimize the first function and the second function; or, if the third function set includes the first function and the second function, and the second function set includes the first function, and the first function set does not include the second function, the second PGO file is also used to optimize the second function.
[0015] In this implementation, when the server determines the second PGO file for the first application for the second user based on the third set of functions required by most users and the second set of functions required by the first application for the second user, if there are no functions in the third set that are identical to those in the second set, the server can determine that the second PGO file can be used not only to optimize the second set of functions of the first application but also to optimize all functions in the third set. In other words, when the usage needs of most users do not overlap with those of a single user, the server can expand the application optimization scope from all functions required by a single user to all functions required by both the single user and most users, covering as many application usage scenarios as possible and improving the application optimization effect.
[0016] If the third feature set contains both identical and different features from the second feature set, the server can determine that the second PGO file, in addition to optimizing the second feature set of the first application, can also be used to optimize features in the third feature set that differ from the second feature set. In other words, when the usage needs of most users overlap with those of a single user, the server can perform deduplication. The server can expand the application optimization scope from all features required by a single user to all features required by a single user, as well as the different features required by most users and those required by a single user, avoiding redundant optimization of the same features and improving application optimization efficiency.
[0017] In one possible implementation, before determining the first PGO file based on the third information and the second PGO file based on the fourth information, the method further includes: receiving a third PGO file from a third terminal device, the third PGO file being a PGO file configured by the developer of the first application, the third PGO file being used to optimize a fourth set of functions of the first application.
[0018] In this implementation, the server can determine the fourth set of functions of the first application that the developer of the first application needs to optimize. Then, based on the set of functions of the first application that an individual user needs to use and the fourth set of functions of the first application that the developer of the first application needs to optimize, the server determines the PGO file of the first application for an individual user. This ensures both the optimization of the set of functions of the first application that an individual user needs to use and the optimization of the set of functions of the first application that the developer of the first application needs to optimize, thereby improving the efficiency and effectiveness of application optimization.
[0019] In one possible implementation, if the fourth function set includes the first function and the second function, and the first function set does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or, if the fourth function set includes the first function and the second function, and the first function set includes the first function, and the first function set does not include the second function, the first PGO file is also used to optimize the second function.
[0020] In this implementation, when the server determines that the developer of the first application needs to optimize the fourth set of functions in the first application, and the first user needs to use the first set of functions in the first application, if there are no functions in the fourth set that are identical to those in the first set, the server can determine that the first PGO file can be used not only to optimize the first set of functions in the first application, but also to optimize all functions in the fourth set. In other words, when the developer's optimization needs do not overlap with the user's needs, the server can expand the scope of application optimization from all functions required by the individual user to all functions required by both the individual user and the developer, covering as many application usage scenarios as possible and improving the application optimization effect.
[0021] If the fourth feature set contains both identical and different features from the first feature set, the server can determine that the first PGO file, in addition to optimizing the first feature set of the first application, can also be used to optimize features in the fourth feature set that are different from the first feature set. In other words, when a developer's optimization needs overlap with a single user's usage needs, the server can perform deduplication. The server can expand the application optimization scope from all features required by a single user to all features required by a single user, as well as features that differ from those required by the developer, avoiding redundant optimization of the same features and improving application optimization efficiency.
[0022] In one possible implementation, if the fourth function set includes the first function and the second function, and the second function set does not include the first function and the second function, the second PGO file is also used to optimize the first function and the second function; or, if the fourth function set includes the first function and the second function, and the second function set includes the first function, and the first function set does not include the second function, the second PGO file is also used to optimize the second function.
[0023] In this implementation, when the server determines that the developer of the first application needs to optimize the fourth set of functions in the first application, and the second user needs to use the second set of functions in the first application, if there are no functions in the fourth set that are identical to those in the second set, the server can determine that the second PGO file can be used not only to optimize the second set of functions in the first application, but also to optimize all functions in the fourth set. In other words, when the developer's optimization needs do not overlap with the user's needs, the server can expand the scope of application optimization from all functions required by the individual user to all functions required by both the individual user and the developer, covering as many application usage scenarios as possible and improving the application optimization effect.
[0024] If the fourth feature set contains both identical and different features from the second feature set, the server can determine that the second PGO file, in addition to optimizing the second feature set of the first application, can also be used to optimize features in the fourth feature set that are different from the second feature set. In other words, when a developer's optimization needs overlap with a single user's usage needs, the server can perform deduplication. The server can expand the application optimization scope from all features required by a single user to all features required by a single user plus features that differ from those required by the developer, avoiding redundant optimization of the same features and improving application optimization efficiency.
[0025] Secondly, embodiments of this application also provide an application optimization method. This method is applicable to a first terminal device or a component (e.g., a unit / module, circuit, or chip) in the first terminal device. Taking the application of this method to a first terminal device as an example, the method includes: detecting a first event; wherein the first event is used to trigger the download of a first application; sending first information to a server; wherein the first information is used to request the download of the first application; receiving a first PGO file from the server; wherein the first PGO file is used to optimize a first set of functions of the first application, and the first set of functions is a set of functions determined based on the user profile information of a first user corresponding to the first terminal device.
[0026] In one possible implementation, the user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used.
[0027] In one possible implementation, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the first set of functions does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the first set of functions includes the first function, and the first set of functions does not include the second function, the first PGO file is also used to optimize the second function.
[0028] Thirdly, embodiments of this application also provide an application optimization method applicable to an application optimization system. The application optimization system includes a first terminal device or components (e.g., units / modules, circuits, or chips) within the first terminal device, and a second terminal device or components (e.g., units / modules, circuits, or chips) within the second terminal device. Taking an application optimization system including both a first and a second terminal device as an example, the method includes: the first terminal device detecting a first event, sending first information to a server, and receiving a first PGO file from the server; wherein the first event triggers the download of a first application, the first information requests the download of the first application, and the first PGO file optimizes a first set of functions for the first application, the first set of functions being a set of functions determined based on user profile information of a first user corresponding to the first terminal device; the second terminal device detecting a second event, sending second information to the server, and receiving a second PGO file from the server; wherein the second event triggers the download of the first application, the second information requests the download of the first application, and the second PGO file optimizes a second set of functions for the first application, the second set of functions being a set of functions determined based on user profile information of a second user corresponding to the second terminal device.
[0029] In one possible implementation, the user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used, and the user profile information of the second user is used to indicate one or more of the applications that the second user has downloaded, the applications that have been used, or the functions of the applications that have been used.
[0030] In one possible implementation, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the first set of functions does not include the first function and the second function, the first PGO file is further used to optimize the first function and the second function. Alternatively, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the first set of functions includes the first function, and the first set of functions does not include the second function, the first PGO file is further used to optimize the second function. Similarly, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the second set of functions does not include the first function and the second function, the second PGO file is further used to optimize the first function and the second function.
[0031] Fourthly, embodiments of this application also provide an application optimization method, which is applicable to a third terminal device or a component (e.g., a unit / module, circuit, or chip) in the third terminal device. Taking the application of this method to a third terminal device as an example, the method includes: sending a third PGO file to a server, wherein the third PGO file is a PGO file configured by the developer of the first application, and the third PGO file is used to optimize the fourth function set of the first application.
[0032] Fifthly, embodiments of this application also provide a server, the server including a processor, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the server to perform the method described in the first aspect or any possible design of the first aspect.
[0033] In a sixth aspect, embodiments of this application also provide a first terminal device, the first terminal device including a processor, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the first terminal device to perform the method described in the second aspect or any possible design of the second aspect above.
[0034] In a seventh aspect, embodiments of this application also provide a third terminal device, the third terminal device including a processor, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the processor, cause the third terminal device to perform the method described in the fourth aspect or any possible design of the fourth aspect above.
[0035] Eighthly, embodiments of this application also provide an application optimization system, which includes the server described in the fifth aspect. Optionally, the application optimization system further includes the first terminal device described in the sixth aspect. Optionally, the application optimization system further includes the third terminal device described in the seventh aspect.
[0036] In a ninth aspect, embodiments of this application also provide a computer-readable storage medium for storing a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect or any possible design of the first aspect, or to perform the method described in the second aspect or any possible design of the second aspect, or to perform the method described in the third aspect or any possible design of the third aspect, or to perform the method described in the fourth aspect or any possible design of the fourth aspect.
[0037] In a tenth aspect, embodiments of this application also provide a computer program product, including a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect or any possible design of the first aspect, or to perform the method described in the second aspect or any possible design of the second aspect, or to perform the method described in the third aspect or any possible design of the third aspect, or to perform the method described in the fourth aspect or any possible design of the fourth aspect.
[0038] Eleventhly, embodiments of this application also provide a chip system including a processor and an interface, wherein the processor is configured to call and execute instructions from the interface to cause the chip system to perform the method described in the first aspect or any possible design of the first aspect, or to perform the method described in the second aspect or any possible design of the second aspect, or to perform the method described in the third aspect or any possible design of the third aspect, or to perform the method described in the fourth aspect or any possible design of the fourth aspect.
[0039] The beneficial effects of the second to eleventh aspects and their possible designs can be referred to the description of the beneficial effects of the methods described in the first aspect and any possible design. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of an application optimization system provided in an embodiment of this application;
[0041] Figure 2 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;
[0042] Figure 3 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application;
[0043] Figure 4 A flowchart illustrating an application scenario provided in this application embodiment;
[0044] Figure 5 A flowchart illustrating an application optimization method provided in this application embodiment;
[0045] Figure 6A A flowchart illustrating a user interface provided in an embodiment of this application;
[0046] Figure 6B A flowchart illustrating a user profile provided in an embodiment of this application;
[0047] Figure 6C A flowchart illustrating another application scenario provided by an embodiment of this application;
[0048] Figure 6D A flowchart for generating a PGO file is provided as an embodiment of this application;
[0049] Figure 6E A flowchart illustrating the core functionality of an application provided in this embodiment;
[0050] Figure 6F Another flowchart for generating a PGO file provided in this application embodiment;
[0051] Figure 7 A flowchart illustrating another application optimization method provided in this application embodiment;
[0052] Figure 8 A flowchart illustrating another application optimization method provided in this application embodiment;
[0053] Figure 9 A flowchart illustrating another application optimization method provided in this application embodiment;
[0054] Figure 10 A schematic diagram of the hardware structure of a server provided in an embodiment of this application;
[0055] Figure 11This is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0057] For example, Figure 1 This is a schematic diagram of the structure of an application optimization system provided in an embodiment of this application. Figure 1 As shown, the application optimization system may include a first terminal device 100, a second terminal device 200, a third terminal device 300, and a server 400. It is understood that the number of terminal devices included in the application optimization system in actual applications is not limited to this.
[0058] The terminal device can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, laptop, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. The embodiments of this application do not impose any special restrictions on the specific type of terminal device.
[0059] It is understood that the terminal devices mentioned in the embodiments of this application can support a variety of applications. For example, one or more of the following applications: travel applications, drawing applications, presentation applications, word processing applications, game applications, telephone applications, video player applications, music player applications, email applications, shopping applications, instant messaging applications, photo management applications, camera applications, browser applications, calendar applications, clock applications, payment applications, and health management applications, etc. Among these, instant messaging applications can be of various types, such as SMS applications, MMS applications, various email applications, WeChat, Tencent QQ, Line, Instagram, DingTalk, etc. Users can send text, voice, images, video files, and other files to other users through instant messaging applications. Payment applications can be of various types, such as e-wallet applications launched by various mobile phone manufacturers, mobile banking clients launched by banks and other financial institutions, and third-party payment applications launched by third-party payment service providers, such as WeChat Pay and Alipay.
[0060] A server can be a cloud server, also known as a cloud, cloud-based server, cloud controller, etc. A cloud server is a general term for devices or components with data processing capabilities, which may include physical devices such as hosts or processors, virtual devices such as virtual machines or containers, and chips or integrated circuits. This application does not impose any special restrictions on the specific type of server.
[0061] It is understood that the server mentioned in the embodiments of this application can refer to a single server or a server cluster composed of multiple servers. This server cluster may include one or more of the following: a cloud computing server, a content delivery network (CDN) server, a network time protocol (NTP) server, and a domain name system (DNS) server. The servers in this server cluster can coordinate with each other to jointly complete functions such as computing, data storage, and communication. For example, server 400 may include a download server and an interaction server. The download server stores the installation packages of applications available for download by terminal devices, while the interaction server completes direct interaction with the terminal devices, such as receiving requests from terminal devices to download applications and sending the download address of the application's installation package to the terminal devices so that the terminal devices can download the required application installation package from the download server. For ease of description, in the embodiments of this application, a single server and a server cluster are collectively referred to as a server.
[0062] Data can be transmitted between the terminal device and the server via wired communication or wireless communication. When the terminal device is a handheld mobile device (such as a mobile phone or tablet computer), the terminal device and the server establish a connection through a wireless link. When the terminal device is a computer or other device that requires a physical connection, the terminal device and the server are connected through a physical link. This application does not specifically limit this.
[0063] For example, Figure 2 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application. Figure 2As shown, the terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180I, a touch sensor 180J, an ambient light sensor 180K, a bone conduction sensor 180L, etc.
[0064] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0065] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0066] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0067] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0068] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0069] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180J, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180J through the I2C interface, enabling the processor 110 and the touch sensor 180J to communicate through the I2C bus interface, thereby realizing the touch function of the terminal device.
[0070] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0071] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0072] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0073] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the terminal device's shooting function. The processor 110 and the display screen 194 communicate via the DSI interface to enable the terminal device's display function.
[0074] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0075] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge terminal devices, and can also be used for data transfer between terminal devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other terminal devices, such as AR devices.
[0076] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the terminal device. In other embodiments of this application, the terminal device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0077] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device. While charging the battery 142, the charging management module 140 can also supply power to the terminal device via the power management module 141.
[0078] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0079] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0080] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0081] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on terminal devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0082] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0083] The wireless communication module 160 can provide solutions for wireless communication applications on terminal devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0084] In some embodiments, antenna 1 of the terminal device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the terminal device to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0085] The terminal device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0086] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, the terminal device may include one or N displays 194, where N is a positive integer greater than 1.
[0087] Terminal devices can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0088] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0089] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the terminal device may include one or N cameras 193, where N is a positive integer greater than 1.
[0090] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when a terminal device selects a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0091] Video codecs are used to compress or decompress digital video. Terminal devices can support one or more video codecs. This allows the terminal device to play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0092] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in terminal devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0093] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0094] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc.
[0095] Non-volatile memory can include disk storage devices and flash memory.
[0096] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.
[0097] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0098] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0099] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the terminal device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0100] The terminal device can implement audio functions such as music playback and recording through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.
[0101] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0102] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Terminal devices can listen to music or make hands-free calls through the speaker 170A.
[0103] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When a terminal device answers a phone call or voice message, the receiver 170B can be brought close to the user's ear to hear the voice.
[0104] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. A terminal device can have at least one microphone 170C. In some embodiments, the terminal device can have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, the terminal device can have three, four, or more microphones 170C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0105] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0106] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.
[0107] The gyroscope sensor 180B can be used to determine the motion posture of a terminal device.
[0108] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0109] The magnetic sensor 180D includes a Hall effect sensor. Terminal devices can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0110] The 180E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of a terminal device. When the terminal device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the attitude of the terminal device, and is applied to applications such as landscape / portrait switching and pedometers.
[0111] A distance sensor 180F is used to measure distance. The terminal device can measure distance via infrared or laser. In some embodiments, during a shooting scene, the terminal device can utilize the distance sensor 180F to measure distance for rapid focusing.
[0112] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode.
[0113] The 180K ambient light sensor is used to detect ambient light levels. The terminal device can adaptively adjust the display brightness (194) based on the detected ambient light level. The 180K ambient light sensor can also be used to automatically adjust white balance when taking photos. Furthermore, the 180K ambient light sensor can work in conjunction with the 180G proximity sensor to detect if the terminal device is in a pocket, preventing accidental touches.
[0114] The fingerprint sensor 180H is used to collect fingerprints. Terminal devices can use the collected fingerprint characteristics to achieve fingerprint unlocking, app access lock, fingerprint photography, fingerprint answering of incoming calls, etc.
[0115] The temperature sensor 180I is used to detect temperature.
[0116] Touch sensor 180J, also known as a "touch device," can be located on display screen 194. The touch sensor 180J and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180J detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194.
[0117] The 180L bone conduction sensor can acquire vibration signals.
[0118] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The terminal device can receive button input and generate key signal inputs related to user settings and function control of the terminal device.
[0119] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0120] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0121] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the terminal device. The terminal device can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The terminal device interacts with the network through the SIM card to achieve functions such as calls and data communication. In some embodiments, the terminal device uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device and cannot be separated from the terminal device.
[0122] For example, Figure 3 This is a schematic diagram of the software structure of a terminal device provided in an embodiment of this application. For example... Figure 3 As shown, the software architecture of a terminal device can be a layered architecture. For example, the software can be divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer (framework, FWK), the runtime and system libraries, and the kernel layer.
[0123] The application layer can include a series of application packages. For example... Figure 3 As shown, the application layer can include camera, settings, skin modules, user interface (UI), third-party applications, etc. Third-party applications can include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, etc.
[0124] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer can include some predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, and notification manager.
[0125] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots. The content provider stores and retrieves data, making this data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0126] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0127] A phone manager is used to provide communication functions for terminal devices. For example, it manages call status (including connection and disconnection).
[0128] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0129] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.
[0130] The runtime includes the core libraries and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0131] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core libraries of the operating system. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0132] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGLES), 2D graphics engines (e.g., SGL), etc.
[0133] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0134] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0135] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0136] A 2D graphics engine is a graphics engine for 2D drawing.
[0137] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0138] The hardware layer can include various types of sensors, such as accelerometers, gravity sensors, and touch sensors.
[0139] The application optimization system applicable to the embodiments of this application has been introduced above. The relevant technical solutions involved in the embodiments of this application are described below.
[0140] Statically typed languages perform type checking at compile time; the type of variables is determined at declaration and cannot be changed during program execution. Examples include C, C++, Java, Go, Rust, Swift, and Kotlin. Dynamically typed languages perform type checking at runtime; the type of variables changes at any time, and type information is bound to values, not variables themselves. Examples include Python, JavaScript, Ruby, PHP, Perl, and ArkTs. Both statically and dynamically typed languages can be optimized using ahead-of-time (AOT) compilation techniques. AOT differs from just-in-time (JIT) compilation. AOT means that the application's code is compiled into machine code before runtime, rather than at runtime. JIT means that the application's code is compiled into machine code at runtime. AOT can be optimized by analyzing profile-guided optimization (PGO) files. PGO files can use runtime information to guide the compiler to perform more effective optimizations, thereby generating more efficient machine code.
[0141] Currently, servers can train application PGO files. These PGO files can be used to optimize all or part of the application's functionality. Terminal devices can download the application's PGO file along with the application's installation package from the server, allowing for optimized compilation during application installation and improved performance. However, if the downloaded application PGO file is too large, it will lead to bloated machine code after compilation, increasing memory usage, disk usage, and compilation time. Conversely, if the downloaded application PGO file is too small, it will not fully cover all application usage scenarios, affecting the application optimization effect.
[0142] For example, Figure 4 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. For example... Figure 4 As shown, taking a shopping app that includes live product streaming, daily deals, and flash sales as an example. User 1 only uses the live product streaming and flash sales features, but not the daily deals feature. User 2 only uses the flash sales and daily deals features, but not the live product streaming feature. Therefore, User 1 only needs to optimize the live product streaming and flash sales features when using the shopping app, and User 2 only needs to optimize the flash sales and daily deals features when using the shopping app.
[0143] In view of this, embodiments of this application provide an application optimization method to improve the efficiency and effectiveness of application optimization.
[0144] In the embodiments of this application, "when," "if," and "if" all refer to the device taking corresponding actions under certain objective circumstances, and are not time-limited, nor do they require the device to perform a judgment action, nor do they imply any other limitations. Unless otherwise specified, "if" and "if" can be substituted, and "when" and "in the case of" can be substituted. "When" and "if" / "if" can be substituted.
[0145] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0146] In this application embodiment, the number of nouns, unless otherwise specified, refers to "singular nouns or plural nouns," that is, "one or more." "At least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " can indicate that the related objects before and after are in an "or" relationship. For example, A / B means: A or B. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0147] In this application, the ordinal numbers such as "first" and "second" are used to distinguish multiple objects, and are not used to limit the size, content, order, timing, priority, or importance of the multiple objects. For example, "first event" and "second event" refer to two different events, and do not indicate a difference in priority or importance between the two events. For a technical feature, the technical features within that technical feature are distinguished by "A," "B," "C," and "D," and there is no sequential or hierarchical order among the technical features described by "A," "B," "C," and "D." For example, in this document, "case A" and "case B" are only used to distinguish different contents, and do not limit the sequential or hierarchical order, priority, or importance between cases A and B.
[0148] The solutions provided by the embodiments of this application are described in detail below with reference to the accompanying drawings. In the following description, the application optimization method provided by the embodiments of this application is applied to... Figures 1-3 The application optimization system shown is an example.
[0149] For example, Figure 5 This is a flowchart illustrating an application optimization method provided in an embodiment of this application. Figure 5 As shown, the specific process of this application optimization method is described below.
[0150] S501, The first terminal device detects the first event and sends the first information to the server.
[0151] Accordingly, the server receives first information from the first terminal device. The first event is used to trigger the download of the first application, and the first information is used to request the download of the first application.
[0152] S502: The second terminal device detects the second event. It sends the second information to the server.
[0153] Correspondingly, the server receives second information from the second terminal device. The second event is used to trigger the download of the first application, and the second information is used to request the download of the first application.
[0154] In this embodiment, S501 can be executed before S502, after S502, or simultaneously with S502. This embodiment does not limit the execution of S501 in this way. Figure 5 Take the example of S501 being executed before S502.
[0155] The server can store the installation package of a first application that can be downloaded by a first terminal device and a second terminal device. It is understood that the third terminal device can be the terminal device of the developer of the first application. The third terminal device can send the installation package of the first application to the server, and correspondingly, the server can receive the installation package of the first application from the third terminal device. The first application can be any type of application, such as a travel application, drawing application, presentation application, word processing application, game application, telephone application, video player application, music player application, email application, shopping application, instant messaging application, photo management application, camera application, browser application, calendar application, clock application, payment application, and health management application, etc. This application embodiment does not limit this.
[0156] The first terminal device can be the terminal device of the first user, and the first event can be the first user's click or touch operation on the download button of the first application. This application embodiment does not limit this. After detecting the first event, the first terminal device can respond to the first event by sending first information to the server to request the download of the installation package of the first application from the server to the local machine for installation.
[0157] Optionally, the first information may include the identification information of the first application and the identification information of the first user.
[0158] Optionally, the first information may also include information A1 and / or information B1. Information A1 is used to request the download of the general PGO file 1 of the first application. The general PGO file 1 can be understood as a PGO file used to optimize the functionality of the first application for most users (or those who need to use it). Information B1 can be used to request the download of a customized PGO file 1 of the first application. The customized PGO file 1 can be understood as a PGO file used to optimize the functionality of the first application for the first user (or those who need to use it).
[0159] The second terminal device can be the terminal device of a second user, and the second event can be the second user's click or touch operation on the download button of the first application; this embodiment does not limit this. After detecting the second event, the second terminal device can, in response to the second event, send second information to the server to request the download of the installation package of the first application from the server to its local machine for installation.
[0160] Optionally, the second information may include the identification information of the first application and the identification information of the second user.
[0161] Optionally, the second information may also include information A2 and / or information B2. Information A2 is used to request the download of the general PGO file 2 of the first application. The general PGO file 2 can be understood as a PGO file used to optimize the functionality of the first application for most users (or those who require it). Information B2 can be used to request the download of a customized PGO file 2 of the first application. The customized PGO file 2 can be understood as a PGO file used to optimize the functionality of the first application for a second user (or those who require it).
[0162] For example, Figure 6A This is a schematic diagram of a user interface provided in an embodiment of this application. The terminal device 1 can display on the screen as shown below. Figure 6A The user interface shown may display applications available for download on terminal device 1, such as application 1 and application 2, as well as operation buttons to prompt the user to download the application, such as the "Download" operation button 601 for application 1 and the "Download" operation button 602 for application 2. The user can download application 1 by clicking or touching the "Download" operation button 601. When terminal device 1 detects the user's click or touch of the "Download" operation button 601, in response to this operation, terminal device 1 can determine that application 1 has been downloaded.
[0163] It is understood that "server" can refer to the server of an application market, which is a platform that displays and provides applications for users to download. Application markets can also be called app stores, app marketplaces, software stores, etc. This application embodiment does not limit the name of the application market. In this application embodiment, the third terminal device sends the installation package of the first application to the server, and the first and second terminal devices download the installation package of the first application from the server to their local machines for installation. This can be seen as the developer of the first application listing the first application on the application market, and the first and second users downloading the first application through the application market.
[0164] S503. The server determines a first PGO file based on third information and a second PGO file based on fourth information. The third information indicates a first set of functions for a first application determined based on the user profile information of the first user corresponding to the first terminal device; the fourth information indicates a second set of functions for the first application determined based on the user profile information of the second user corresponding to the second terminal device; the first PGO file is used to optimize the first set of functions; and the second PGO file is used to optimize the second set of functions.
[0165] In this embodiment of the application, after receiving first information from a first terminal device, the server can determine third information and determine a first PGO file based on the third information; and after receiving second information from a second terminal device, the server can determine fourth information and determine a second PGO file based on the fourth information.
[0166] To facilitate understanding of this application, the third information, the fourth information, the first PGO file, and the second PGO file are described below.
[0167] 1) The third information can be used to indicate the first set of functions of the first application determined based on the user profile information of the first user.
[0168] The first set of functions of the first application may include one or more functions of the first application.
[0169] The user profile information of the first user can be used to indicate one or more of the following: applications that the first user has downloaded, applications that have been used, or functions of applications that have been used. Optionally, the user profile information of the first user can also be used to indicate the first user's gender, age, etc., but this application embodiment does not limit this.
[0170] Determining the first set of functions of the first application based on the user profile information of the first user can be understood as determining that the probability that the first user needs to use or optimize the first set of functions of the first application is greater than a threshold A. The threshold A can be greater than or equal to zero. The threshold A can be pre-configured or defined by a standard. This application embodiment does not limit this. For ease of explanation, this application embodiment takes a threshold A equal to zero as an example.
[0171] In other words, the third information can be used to indicate that the first user may need to use or optimize the first set of functions of the first application, or the third information can be used to indicate that the probability that the first user needs to use or optimize the first set of functions of the first application is greater than zero.
[0172] 2) The fourth information can be used to indicate the second set of functions of the first application determined based on the user profile information of the second user.
[0173] The second set of functions of the first application may include one or more functions of the first application.
[0174] The user profile information of the second user can be used to indicate one or more of the following: applications that the second user has downloaded, applications that have been used, or functions of applications that have been used. Optionally, the user profile information of the second user can also be used to indicate the second user's gender, age, etc., but this application embodiment does not limit this.
[0175] Determining the second set of functions of the first application based on the user profile information of the second user can be understood as determining that the probability that the second user needs to use or optimize the second set of functions of the first application is greater than a threshold B. The threshold B can be greater than or equal to zero, and can be pre-configured or standard-defined. This application embodiment does not limit this; for ease of explanation, this application embodiment uses a threshold B equal to zero as an example.
[0176] In other words, the fourth information can be used to indicate that the second user may need to use or optimize the second set of functions of the first application, or the fourth information can be used to indicate that the probability that the second user needs to use or optimize the second set of functions of the first application is greater than zero.
[0177] For example, Figure 6B This is a schematic diagram of a user profile provided in an embodiment of this application.
[0178] like Figure 6B As shown in (1), User 1 is a 25-year-old female user. User 1 has downloaded shopping app 1 and shopping app 2, and has used the product browsing function, product details function and live shopping function of shopping app 1.
[0179] When User 1 downloads shopping app 3, if shopping app 3 includes product browsing, product details, and live shopping functions, then User 1 may need to use or optimize the product browsing, product details, and live shopping functions of shopping app 3. In other words, User 1's profile information indicates that User 1 has already used function 1 of app A. When User 1 downloads app B, which is of the same type as app A, if app B includes function 1, then User 1 may need to use or optimize function 1 of app B.
[0180] like Figure 6B As shown in (2), User 2 is a 30-year-old male user who has downloaded News App 1 and has used the news browsing function of News App 1.
[0181] When User 2 downloads short video app 1, if short video app 1 includes a news browsing function, then User 1 may need to use or optimize the news browsing function of short video app 1. In other words, User 2's profile information indicates that User 2 has already used function 2 of app C. When User 2 downloads app D, which is of a different type than app C, if app D includes function 2, then User 2 may need to use or optimize function 2 of app D.
[0182] In one possible implementation, the server may store user profile information.
[0183] For example, if the server stores the user profile information of the first user, the server can determine the user profile information of the first user from the stored user profile information based on the first user's identification information.
[0184] For example, if the server stores the user profile information of a second user, the server can determine the user profile information of the second user from the stored user profile information based on the second user's identification information.
[0185] Alternatively, the server may not store user profile information.
[0186] For example, assuming the server does not store the user profile information of the first user, the first terminal device can send the user profile information of the first user to the server, and correspondingly, the server can receive the user profile information of the first user from the first terminal device. The user profile information of the first user can be actively sent to the server by the first terminal device when requesting to download the first application, or it can be sent to the server by the first terminal device after receiving query information 1 from the server. Query information 1 is used to query the user profile information of the first user; this embodiment of the application does not limit this.
[0187] For example, assuming the server does not store the second user's user profile information, the second terminal device can send the second user's user profile information to the server, and correspondingly, the server can receive the second user's user profile information from the second terminal device. The second user's user profile information can be actively sent to the server by the second terminal device when requesting to download the first application, or it can be sent to the server by the second terminal device after receiving query information 2 from the server. Query information 2 is used to query the second user's user profile information; this embodiment does not limit the specifics.
[0188] 3) The first PGO file can be used to optimize the first set of functions of the first application. The first PGO file may include one or more PGO files.
[0189] 4) The second PGO file can be used to optimize the second set of functions of the first application. The second PGO file may include one or more PGO files.
[0190] In practice, a single PGO file can be used to optimize one or more functions of the first application. For ease of explanation, this embodiment uses the optimization of one function of the first application using a single PGO file as an example.
[0191] A function of the first application can be implemented by calling one or more corresponding functions. Different functions may correspond to the same function or different functions, and this application embodiment does not limit this. For ease of explanation, this application embodiment uses the example of one function corresponding to one function and different functions corresponding to different functions.
[0192] This can be understood as follows: a PGO file can be generated based on a function corresponding to a function of the first application. In other words, the generation of PGO files is based on functions as the basic unit.
[0193] For example, Figure 6C This is a schematic diagram illustrating another application scenario provided by an embodiment of this application.
[0194] like Figure 6C As shown in (1), User 1 may use Function 1, Function 2, and Function 3 of Application 1. When User 1 uses Function 1 of Application 1, Application 1 can call Function 1 to implement Function 1. When User 1 uses Function 2 of Application 1, Application 1 can call Function 2 to implement Function 2. When User 1 uses Function 3 of Application 1, Application 1 can call Function 3 to implement Function 3.
[0195] like Figure 6C As shown in (2), after User 1 enters the homepage of Shopping App 1, they may first use the "View Orders" function and then the "Click Orders" function. When User 1 uses the "View Orders" function first and then the "Click Orders" function, Shopping App 1 can call function 1 to implement the "View Orders" function and function 2 to implement the "Click Orders" function. In other words, in use case 1 of Shopping App 1, User 1 may use both the "View Orders" and "Click Orders" functions, and Shopping App 1 will call function 1 and function 2.
[0196] Alternatively, after entering the homepage of shopping app 1, user 1 might first use the product live streaming function and then the product details function. When user 1 uses the product live streaming function first and then the product details function, shopping app 1 can call function 3 to implement the product live streaming function and function 4 to implement the product details function. In other words, in use case 2 of shopping app 1, user 1 might use both the product live streaming function and the product details function, and shopping app 1 will call functions 3 and 4.
[0197] Alternatively, after entering the homepage of shopping app 1, user 1 might first use the flash sale feature, then the product details feature, and finally the add-to-cart feature. When user 1 uses the flash sale feature first, then the product details feature, and finally the add-to-cart feature, shopping app 1 can call function 5 to implement the flash sale feature, function 4 to implement the product details feature, and function 6 to implement the add-to-cart feature. In other words, in use case 3 of shopping app 1, user 1 might use the flash sale feature, the product details feature, and the add-to-cart feature, and shopping app 1 will call functions 4, 5, and 6.
[0198] For example, Figure 6D This is a schematic diagram illustrating the generation of a PGO file, as provided in an embodiment of this application. Figure 6D As shown, the server can be based on the above Figure 6C Different PGO files are generated for different use cases of shopping application 1 as shown in (2).
[0199] For example, the server can generate PGO file 1 based on the use case 1 of shopping application 1. PGO file 1 is used to optimize function 1 and function 2, that is, to optimize the order viewing function corresponding to function 1 and the order clicking function corresponding to function 2.
[0200] Alternatively, the server can generate PGO file 2 based on the usage scenario 2 of shopping application 1. PGO file 2 is used to optimize functions 3 and 4, that is, to optimize the live product function corresponding to function 3 and the product details function corresponding to function 4.
[0201] Alternatively, the server can generate a PGO file 3 based on the usage scenario 3 of the shopping application 1. The PGO file 3 is used to optimize functions 4, 5, and 6, that is, to optimize the product details function corresponding to function 4, the limited-time flash sale function corresponding to function 5, and the add-to-cart function corresponding to function 6.
[0202] It is understandable that when the server determines, based on user 1's profile information, that user 1 may use the order viewing function, order clicking function, product live streaming function, and product details function of shopping application 1, the server can merge PGO file 1 and PGO file 2 to generate PGO file 4. PGO file 4 is used to optimize functions 1, 2, 3, and 4, that is, to optimize the order viewing function (function 1), the order clicking function (function 2), the product live streaming function (function 3), and the product details function (function 4).
[0203] When the server determines, based on user 1's profile information, that user 1 may use the live product streaming function, product details function, flash sale function, and add-to-cart function of shopping application 1, the server can merge PGO file 2 and PGO file 3 to generate PGO file 5. PGO file 5 is used to optimize functions 3, 4, 5, and 6, specifically optimizing the live product streaming function (function 3), the product details function (function 4), the flash sale function (function 5), and the add-to-cart function (function 6).
[0204] In other words, if the optimized functions are partially the same across different PGO files, deduplication can be performed when merging the PGO files.
[0205] In one possible implementation, the server may determine the fifth information before determining the first PGO file based on the third information and the second PGO file based on the fourth information.
[0206] The fifth piece of information can be used to indicate the third set of functions of the first application. The number of users using the third set of functions of the first application can be greater than a first threshold. The third set of functions of the first application can include one or more functions of the first application. The first threshold can be greater than or equal to zero, and the first threshold can be pre-configured or standard-defined; this application embodiment does not limit this.
[0207] In other words, the fifth piece of information can be used to indicate that most users of the first application need to use or optimize the third set of functions of the first application, or the fifth piece of information can be used to indicate that the third set of functions of the first application is the core set of functions of the first application (or the universal set of functions). In other words, the fifth piece of information can be understood as the core function information (or universal function information) of the first application.
[0208] It is understood that the server may store the core functional information of an application. This core functional information may be pre-configured or standard-defined, and this embodiment of the application does not impose any limitations on it. For example, taking the storage of core functional information of a first application on the server, the server can determine the core functional information of the first application from the stored core functional information based on the identification information of the first application.
[0209] For example, Figure 6E This is a schematic diagram illustrating a core application function provided in an embodiment of this application. For example... Figure 6E As shown, the core functions of shopping application 1 include viewing orders, clicking on orders, live streaming of products, and product details. The core functions of short video application 1 include short video browsing, live streaming of products, and product details.
[0210] Furthermore, after determining the fifth information, the server can determine the first PGO file based on the fifth and third information, and determine the second PGO file based on the fifth and fourth information.
[0211] In specific implementation, when the third function set includes the first and second functions, but the first function set does not include the first and second functions, the server can determine that the first PGO file can also be used to optimize the first and second functions. Similarly, when the third function set includes the first and second functions, but the second function set does not include the first and second functions, the server can determine that the second PGO file can also be used to optimize the first and second functions.
[0212] It is understandable that if the third function set does not contain any functions identical to those in the first function set, the server can determine that the first PGO file, in addition to being used to optimize the first function set of the first application, can also be used to optimize all functions in the third function set. Similarly, if the third function set does not contain any functions identical to those in the second function set, the server can determine that the second PGO file, in addition to being used to optimize the second function set of the first application, can also be used to optimize all functions in the third function set.
[0213] For example, Figure 6F This is a schematic diagram illustrating another method for generating a PGO file, as provided in an embodiment of this application.
[0214] like Figure 6FAs shown in (1), if the server determines that user 1 may need to use or optimize the social functions of shopping application 1 based on user 1's profile information, and determines that most users of shopping application 1 need to use or optimize the order viewing function, order clicking function, product live streaming function, and product details function of shopping application 1 based on the identification information of shopping application 1, then the server can determine PGO file 1 for optimizing the social functions, order viewing function, order clicking function, product live streaming function, and product details function of shopping application 1, and send PGO file 1 to user 1, so that user 1 can optimize and compile through PGO file 1 when installing shopping application 1, thereby improving the performance of shopping application 1.
[0215] In other words, when the usage needs of most users do not overlap with those of a single user, the server can expand the scope of application optimization from all the functions required by a single user to all the functions required by both a single user and most users, thus covering as many application usage scenarios as possible and improving the application optimization effect.
[0216] Alternatively, if the third function set includes the first and second functions, the first function set includes the first function, and the first function set does not include the second function, the server can determine that the first PGO file can also be used to optimize the second function. Similarly, if the third function set includes the first and second functions, the second function set includes the first function, and the first function set does not include the second function, the server can determine that the second PGO file can also be used to optimize the second function.
[0217] It is understandable that, given that the third function set contains both functions identical to and different from the first function set, the server determines that the first PGO file, in addition to optimizing the first function set of the first application, can also be used to optimize functions in the third function set that are different from the first function set. Similarly, given that the third function set contains both functions identical to and different from the second function set, the server determines that the second PGO file, in addition to optimizing the second function set of the first application, can also be used to optimize functions in the third function set that are different from the second function set.
[0218] For example, such as Figure 6FAs shown in (2), if the server determines, based on the user 2's profile information, that user 2 may need to use or optimize the short video application 1's order viewing function, order clicking function, product live streaming function, and product details function, and based on the short video application 1's identification information, determines that most users of the short video application 1 need to use or optimize the short video browsing function, product live streaming function, and product details function of the short video application 1, then the server can determine PGO file 2 for optimizing the short video browsing function, order viewing function, order clicking function, product live streaming function, and product details function of the short video application 1, and send PGO file 2 to user 2, so that user 2 can optimize and compile the short video application 1 through PGO file 2 when installing the short video application 1, thereby improving the performance of the short video application 2.
[0219] In other words, when the usage needs (or optimization needs) of most users overlap with the usage needs (or optimization needs) of a single user, the server can perform deduplication. The server can expand the scope of application optimization from all the functions required by a single user to all the functions required by a single user as well as the different functions required by most users and a single user, thus avoiding the duplication of optimization of the same functions and improving the efficiency of application optimization.
[0220] In one possible implementation, before the server determines the first PGO file based on the third information and the second PGO file based on the fourth information, the third terminal device may send the third PGO file to the server, and correspondingly, the server may receive the third PGO file from the third terminal device.
[0221] The third PGO file can be a PGO file configured by the developer of the first application. The third PGO file can be used to optimize the fourth set of functions of the first application. The fourth set of functions of the first application can include one or more functions of the first application.
[0222] It is understood that the third PGO file may be encapsulated or carried in the installation package of the first application, or it may not be encapsulated or carried in the installation package of the first application. This application embodiment does not limit this.
[0223] Furthermore, after receiving the third PGO file from the third terminal device, the server can determine the first PGO file based on the third PGO file and the third information, and determine the second PGO file based on the third PGO file and the fourth information.
[0224] In specific implementation, when the fourth function set includes the first and second functions, but the first function set does not include the first and second functions, the server can determine that the first PGO file can also be used to optimize the first and second functions. Similarly, when the fourth function set includes the first and second functions, but the second function set does not include the first and second functions, the server can determine that the second PGO file can also be used to optimize the first and second functions.
[0225] It is understandable that if the fourth function set does not contain any functions identical to those in the first function set, the server can determine that the first PGO file, in addition to being used to optimize the first function set of the first application, can also be used to optimize all functions in the fourth function set. Similarly, if the fourth function set does not contain any functions identical to those in the second function set, the server can determine that the second PGO file, in addition to being used to optimize the second function set of the first application, can also be used to optimize all functions in the fourth function set.
[0226] In other words, when the optimization needs of developers do not overlap with the usage needs (or optimization needs) of individual users, the server can expand the scope of application optimization from all the functions that individual users need to use to all the functions that individual users need to use and that developers need to optimize, thus covering as many application usage scenarios as possible and improving the application optimization effect.
[0227] Alternatively, if the fourth function set includes the first and second functions, the first function set includes the first function, and the first function set does not include the second function, the server can determine that the first PGO file can also be used to optimize the second function. If the fourth function set includes the first and second functions, the second function set includes the first function, and the first function set does not include the second function, the server can determine that the second PGO file can also be used to optimize the second function.
[0228] It is understandable that, if the fourth function set contains both functions identical to and different from the first function set, the server can determine that the first PGO file, in addition to being used to optimize the first function set of the first application, can also be used to optimize functions in the fourth function set that are different from the first function set. Similarly, if the fourth function set contains both functions identical to and different from the second function set, the server can determine that the second PGO file, in addition to being used to optimize the second function set of the first application, can also be used to optimize functions in the fourth function set that are different from the second function set.
[0229] In other words, when the optimization needs of developers overlap with the usage needs (or optimization needs) of individual users, the server can perform deduplication. The server can expand the scope of application optimization from all the functions required by an individual user to all the functions required by an individual user as well as the different functions required by developers and individual users, thus avoiding the duplication of optimization of the same functions and improving the efficiency of application optimization.
[0230] S504. The server sends a first PGO file to the first terminal device and a second PGO file to the second terminal device.
[0231] Accordingly, the first terminal device receives the first PGO file from the server, and the second terminal device receives the second PGO file from the server.
[0232] In this embodiment, the first PGO file may be encapsulated or carried within the installation package of the first application, or it may not be encapsulated or carried within the installation package of the first application; this embodiment does not limit this. After receiving the first PGO file from the server, the first terminal device can optimize and compile the first application using the first PGO file during installation, thereby improving the performance of the first application.
[0233] The second PGO file may be packaged or carried within the installation package of the first application, or it may not be packaged or carried within the installation package of the first application; this embodiment of the application does not limit this. After receiving the second PGO file from the server, the second terminal device can optimize and compile the first application using the second PGO file during installation, thereby improving the performance of the first application.
[0234] For example, terminal device 1 can request the server to download payment application 1. If the server determines that user 1 may need to use or optimize the social functions of payment application 1 based on the user profile information of user 1 corresponding to terminal device 1, the server can determine that the PGO file 1 of payment application 1 is used to optimize the social functions of payment application 1.
[0235] Furthermore, if the server determines that most users may need to use or optimize the payment function of payment application 1, the server can determine that the PGO file 1 of payment application 1 is also used to optimize the payment function of payment application 1.
[0236] Furthermore, if the server determines that the developer of payment application 1 may need to optimize the live streaming function of payment application 1, the server can determine that the PGO file 1 of payment application 1 is also used to optimize the live streaming function of payment application 1.
[0237] The server can send the installation package of payment application 1 and PGO file 1 to terminal device 1. After receiving the installation package and PGO file 1 of payment application 1 from the server, terminal device 1 can optimize the social, payment and live streaming functions of payment application 1 through PGO file 1 during installation, thereby improving the performance of payment application 1.
[0238] For example, Figure 7 This is a flowchart illustrating another application optimization method provided in an embodiment of this application. For example... Figure 7 As shown, the specific process of this application optimization method is described below.
[0239] S701, The first terminal device detects a first event. This first event is used to trigger the download of the first application.
[0240] S702, The first terminal device sends the first information to the server.
[0241] Correspondingly, the server receives the first information from the first terminal device.
[0242] S703. The server determines a first PGO file based on the third information. The third information indicates a first set of functions for a first application determined based on the user profile information of the first user corresponding to the first terminal device. The first PGO file is used to optimize the first set of functions.
[0243] S704, The server sends the first PGO file to the first terminal device.
[0244] Correspondingly, the first terminal device receives the first PGO file from the server.
[0245] It is understood that the specific descriptions of S701-S704 can be referred to the above S501-S504, and will not be repeated here.
[0246] For example, Figure 8 This is a flowchart illustrating another application optimization method provided in an embodiment of this application. For example... Figure 8 As shown, the specific process of this application optimization method is described below.
[0247] S801, The second terminal device detected a second event. This second event is used to trigger the download of the first application.
[0248] S802, The second terminal device sends the second information to the server.
[0249] Correspondingly, the server receives second information from the second terminal device. This second information is used to request the download of the first application.
[0250] S803. The server determines the second PGO file based on the fourth information. The fourth information indicates the second set of functions of the first application determined based on the user profile information of the second user corresponding to the second terminal device. The second PGO file is used to optimize the second set of functions.
[0251] S804, The server sends the second PGO file to the second terminal device.
[0252] Correspondingly, the second terminal device receives the second PGO file from the server.
[0253] It is understood that the specific descriptions of S801-S804 can be referred to the above S501-S504, and will not be repeated here.
[0254] For example, Figure 9 This is a flowchart illustrating another application optimization method provided in an embodiment of this application. For example... Figure 9 As shown, the specific process of this application optimization method is described below.
[0255] S901, the server receives first information from a first terminal device and second information from a second terminal device; wherein the first information is used to request the download of a first application and the second information is used to request the download of the first application.
[0256] S902. The server determines a first PGO file based on third information and a second PGO file based on fourth information; wherein, the third information is used to indicate a first set of functions of a first application determined based on the user profile information of the first user corresponding to the first terminal device, and the fourth information is used to indicate a second set of functions of a first application determined based on the user profile information of the second user corresponding to the second terminal device. The first PGO file is used to optimize the first set of functions, and the second PGO file is used to optimize the second set of functions.
[0257] S903, the server sends a first PGO file to the first terminal device and a second PGO file to the second terminal device.
[0258] It is understood that the specific descriptions of S901-S902 can be referred to the above S501-S504, and will not be repeated here.
[0259] Based on the above embodiments and the same concept, this application also provides a server for implementing the methods executed by the server provided in this application.
[0260] like Figure 10As shown, server 1000 may include: memory 1001, one or more processors 1002, and one or more computer programs (not shown). These devices may be coupled via one or more communication buses 1003.
[0261] The memory 1001 stores one or more computer programs (code), and the one or more computer programs include computer instructions; one or more processors 1002 call the computer instructions stored in the memory 1001, causing the server 1000 to execute the application optimization provided in the embodiments of this application.
[0262] In a specific implementation, memory 1001 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1001 may store an operating system (hereinafter referred to as the system), such as embedded operating systems like Android, iOS, Windows, or Linux. Memory 1001 can be used to store implementation programs of the embodiments of this application. Memory 1001 may also store network communication programs, which can be used to communicate with one or more additional devices, one or more user devices, or one or more network devices. One or more processors 1002 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs in the scheme of this application.
[0263] It should be noted that, Figure 10 This is merely one implementation of the server 1000 provided in this application embodiment. In actual applications, the server 1000 may include more or fewer components, which is not limited here.
[0264] Based on the above embodiments and the same concept, this application also provides a terminal device for implementing the method executed by the terminal device provided in this application.
[0265] like Figure 11 As shown, the terminal device 1100 may include: a memory 1101, one or more processors 1102, and one or more computer programs (not shown in the figure). These devices can be coupled via one or more communication buses 1103. Optionally, when the terminal device 1100 is used to implement the method executed by the terminal device provided in the embodiments of this application, the terminal device 1100 may further include a display screen 1104.
[0266] The memory 1101 stores one or more computer programs (code), and the one or more computer programs include computer instructions; one or more processors 1102 call the computer instructions stored in the memory 1101, causing the terminal device 1100 to execute the application optimization provided in this embodiment. The display screen 1104 is used to display images, videos, application interfaces, and other related user interfaces.
[0267] In a specific implementation, memory 1101 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1101 may store an operating system (hereinafter referred to as the system), such as embedded operating systems like Android, iOS, Windows, or Linux. Memory 1101 can be used to store implementation programs of the embodiments of this application. Memory 1101 may also store network communication programs, which can be used to communicate with one or more additional devices, one or more user devices, or one or more network devices. One or more processors 1102 may be a general-purpose CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of programs in the scheme of this application.
[0268] It should be noted that, Figure 11 This is merely one implementation of the terminal device 1100 provided in this application embodiment. In actual applications, the terminal device 1100 may include more or fewer components, which is not limited here.
[0269] Based on the above embodiments and the same concept, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the application optimization method provided in the above embodiments.
[0270] Based on the above embodiments and the same concept, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the application optimization method provided in the above embodiments.
[0271] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0272] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0273] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0274] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0275] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. An application optimization method, characterized in that, Applied to a server, the method includes: The system receives first information from a first terminal device and second information from a second terminal device; wherein the first information is used to request the download of a first application, and the second information is used to request the download of the first application. The first analysis guide optimization PGO file is determined based on the third information, and the second PGO file is determined based on the fourth information; wherein, the third information is used to indicate the first function set of the first application determined based on the user profile information of the first user corresponding to the first terminal device, and the fourth information is used to indicate the second function set of the first application determined based on the user profile information of the second user corresponding to the second terminal device, the first PGO file is used to optimize the first function set, and the second PGO file is used to optimize the second function set. The first PGO file is sent to the first terminal device, and the second PGO file is sent to the second terminal device.
2. The method as described in claim 1, characterized in that, The user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used. The user profile information of the second user is used to indicate one or more of the applications that the second user has downloaded, the applications that have been used, or the functions of the applications that have been used.
3. The method as described in claim 1 or 2, characterized in that, Before determining the first PGO file based on the third information and the second PGO file based on the fourth information, the method further includes: Determine the fifth piece of information; wherein the fifth piece of information is used to indicate the third set of functions of the first application, and the number of users using the third set of functions is greater than a first threshold.
4. The method as described in claim 3, characterized in that, In the case where the third function set includes the first function and the second function, and the first function set does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or... In the case where the third function set includes the first function and the second function, the first function set includes the first function, and the first function set does not include the second function, the first PGO file is also used to optimize the second function.
5. The method as described in claim 3, characterized in that, In the case where the third function set includes the first and second functions, and the second function set does not include the first and second functions, the second PGO file is also used to optimize the first and second functions; or... In the case where the third function set includes the first function and the second function, the second function set includes the first function, and the first function set does not include the second function, the second PGO file is also used to optimize the second function.
6. The method according to any one of claims 1-5, characterized in that, Before determining the first PGO file based on the third information and the second PGO file based on the fourth information, the method further includes: Receive a third PGO file from a third terminal device, the third PGO file being a PGO file configured by the developer of the first application, the third PGO file being used to optimize the fourth set of functions of the first application.
7. An application optimization method, characterized in that, Applied to a first terminal device, the method includes: A first event was detected; wherein the first event is used to trigger the download of a first application; Send first information to the server; wherein, the first information is used to request the download of the first application; Receive a first PGO file from the server; wherein the first PGO file is used to optimize a first set of functions of the first application, and the first set of functions is a set of functions determined based on the user profile information of the first user corresponding to the first terminal device.
8. The method as described in claim 7, characterized in that, The user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used.
9. The method as described in claim 7 or 8, characterized in that, If the number of users using the third set of functions of the first application exceeds a first threshold, and the third set of functions includes the first function and the second function, or if the first set of functions does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or... If the number of users using the third set of functions of the first application is greater than a first threshold, wherein the third set of functions includes the first function and the second function, and the first set of functions includes the first function, and the first set of functions does not include the second function, the first PGO file is also used to optimize the second function.
10. An application optimization method, characterized in that, Applied to an application optimization system, the application optimization system including a first terminal device and a second terminal device, the method includes: The first terminal device detects a first event, sends first information to the server, and receives a first PGO file from the server; wherein, the first event is used to trigger the download of a first application, the first information is used to request the download of the first application, and the first PGO file is used to optimize a first set of functions of the first application, the first set of functions being a set of functions determined based on the user profile information of the first user corresponding to the first terminal device. The second terminal device detects the second event, sends the second information to the server, and receives the second PGO file from the server; wherein, the second event is used to trigger the download of the first application, the second information is used to request the download of the first application, and the second PGO file is used to optimize the second function set of the first application, the second function set being a function set determined based on the user profile information of the second user corresponding to the second terminal device.
11. The method as described in claim 10, characterized in that, The user profile information of the first user is used to indicate one or more of the applications that the first user has downloaded, the applications that have been used, or the functions of the applications that have been used. The user profile information of the second user is used to indicate one or more of the applications that the second user has downloaded, the applications that have been used, or the functions of the applications that have been used.
12. The method as described in claim 10 or 11, characterized in that, If the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, or if the first set of functions does not include the first function and the second function, the first PGO file is also used to optimize the first function and the second function; or if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, or if the first set of functions includes the first function and the first set of functions does not include the second function, the first PGO file is also used to optimize the second function. If the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the second set of functions does not include the first function and the second function, the second PGO file is also used to optimize the first function and the second function. Alternatively, if the number of users using the third set of functions of the first application is greater than a first threshold, and the third set of functions includes the first function and the second function, and the second set of functions includes the first function, and the first set of functions does not include the second function, the second PGO file is also used to optimize the second function.
13. A server, characterized in that, The server includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the server to perform the method as described in any one of claims 1-6.
14. A first terminal device, characterized in that, The first terminal device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the first terminal device to perform the method as described in any one of claims 7-9.
15. An application optimization system, characterized in that, The application optimization system includes: the server as described in claim 13, and the first terminal device as described in claim 14.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-12.
17. A computer program product, characterized in that, Includes a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-12.