WO2019071609A1 - Method and terminal device for loading application and upgrading application - Google Patents

Method and terminal device for loading application and upgrading application Download PDF

Info

Publication number
WO2019071609A1
WO2019071609A1 PCT/CN2017/106170 CN2017106170W WO2019071609A1 WO 2019071609 A1 WO2019071609 A1 WO 2019071609A1 CN 2017106170 W CN2017106170 W CN 2017106170W WO 2019071609 A1 WO2019071609 A1 WO 2019071609A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
terminal device
resource
upgrade
upgrade patch
Prior art date
Application number
PCT/CN2017/106170
Other languages
French (fr)
Chinese (zh)
Inventor
涂小兵
陈浩
周平科
郭威
林英禄
陈家昌
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201780094776.6A priority Critical patent/CN111095199B/en
Publication of WO2019071609A1 publication Critical patent/WO2019071609A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a method for loading an application and upgrading an application, and a terminal device.
  • terminal equipment manufacturers and application (application) manufacturers can develop functional modules that can be used by a plurality of applications (including system applications and third-party applications) based on the operating system of the terminal device. These common functional modules are called common feature functions. .
  • the application vendor will package the public feature function into the application, so that if the application is started, the operating system of the terminal device loads the public feature function of the application into the memory when the application is loaded, so that the application can Implement the functionality provided by this common feature.
  • the common feature function may be repeatedly loaded by the operating system of the terminal device multiple times, so that the memory usage of the terminal device is relatively high, thereby affecting the terminal.
  • the operating system performance of the device may be repeatedly loaded by the operating system of the terminal device multiple times, so that the memory usage of the terminal device is relatively high, thereby affecting the terminal. The operating system performance of the device.
  • the application provides a method for loading and upgrading an application and a terminal device, which can reduce the memory usage of the terminal device, thereby improving the operating system performance of the terminal device.
  • a method for loading an application is provided, the terminal device is powered on; and the first application is scanned; and the terminal device determines that the first application is an application that implements a common feature function; and the terminal device adopts a system class loader to An application is loaded into the memory of the terminal device.
  • the first application loaded by the system class loader is an operating system level application, other applications in the operating system may share the first application that has been loaded into the memory, so that the first is shared.
  • the first application in the memory can be directly invoked, and the first application does not need to be loaded when starting other applications sharing the first application, so that other applications sharing the first application can be avoided.
  • the first application is repeatedly loaded multiple times, which can reduce the memory usage of the terminal device and improve the operating system performance of the terminal device.
  • the method for determining, by the terminal device, that the first application is an application that implements a common feature function includes: the terminal device according to the first application included in the predefined common feature function list Identifying, determining that the first application is an application that implements a common feature function. In this way, the terminal device can determine, by using a predefined list of common feature functions, that the first application is an application that implements a common feature function.
  • the method for determining, by the terminal device, that the first application is an application that implements a common feature function includes: the terminal device querying whether the predefined public feature function list includes the first An identifier of an application; and in a case where the identifier of the first application is included in the public feature function list, the terminal device determines that the first application is an application that implements a common feature function. In this way, the terminal device can determine whether the first application is an application that implements a common feature function through a predefined public feature function list.
  • the method for determining, by the terminal device, that the first application is an application that implements a common feature function comprises: the terminal device reading a first attribute of the first application (the first attribute is used by the terminal device) And indicating that the first application is an application that implements a common feature function; and in a case that the first attribute indicates that the first application is an application that implements a common feature function, the terminal device determines that the first application is configured to implement a common feature Applications. In this way, the terminal device can determine whether the application is an application that implements a common feature function by identifying an attribute of the application.
  • the method for loading the application may also be performed by the terminal device.
  • the parent class loader is a system class loader; and the terminal device uses the system class loader to load the second application into the memory of the terminal device.
  • the terminal device since the terminal device uses the system class loader to load the first application that implements the common feature function, and uses the system class loader to load the second application that invokes the first application, the terminal device can be enabled after the second application is started. Finding the first application based on the second application, that is, enabling the second application to provide the user with the common feature function implemented by the first application by calling the first application.
  • the method for loading an application may further send, by the terminal device, an upgrade patch request message for requesting an upgrade patch package from the server to the server (the upgrade patch)
  • the packet is used to directly upgrade the third application in the member granularity
  • the third application is the system application in the terminal device; and the terminal device receives the upgraded patch package sent by the server; and the terminal device adopts the upgraded patch package, and the member granularity is directly Upgrade the third app.
  • the upgraded application in the class granularity one class includes multiple members
  • the upgrade package in the embodiment of the present application is smaller. In this way, the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the third application can be quickly repaired.
  • the third application is directly upgraded in the embodiment of the present application. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application.
  • the operating system so that the third application can be fixed more quickly.
  • a second aspect provides a method for upgrading an application, where the terminal device sends an upgrade patch request message for requesting an upgrade patch to a server, where the upgrade patch package is used to directly upgrade an application at a member granularity, where the application is a terminal device. And the terminal device receives the upgrade patch package sent by the server; and the terminal device adopts the upgrade patch package to directly upgrade the application at the member granularity.
  • a terminal device in a third aspect, can include a startup module, a scanning module, a determining module, and a loading module.
  • the startup module is used for booting;
  • the scanning module is configured to scan the first application;
  • the determining module is configured to determine that the first application is an application that implements a common feature function;
  • the loading module is configured to load the first application into the terminal by using a system class loader The memory of the device.
  • the determining module is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, that the first application is to implement a public feature function use.
  • the determining module is specifically configured to query whether the identifier of the first application is included in the predefined public feature function list, and include the first in the public feature function list.
  • the first application is determined to be an application that implements a common feature function.
  • the determining module is specifically configured to: read a first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function. And determining, in the case that the first attribute is an application that implements a common feature function, the first application is an application that implements a common feature function.
  • the terminal device provided by the embodiment of the present application may further include a creating module and a setting module.
  • the startup module is further configured to start a second application in the terminal device; the creation module is configured to create a path class loader of the second application initiated by the startup module; and the setting module is configured to invoke the second application in the terminal device when the startup module is started.
  • the parent class loader of the path class loader created by the creation module is a system class loader; the load module is also used to use the system class loader set by the setting module to apply the second application. Loaded into the memory of the terminal device.
  • the terminal device provided by the embodiment of the present application may further include a sending module, a receiving module, and an upgrade module.
  • the sending module is configured to send, to the server, an upgrade patch request message for requesting the server to upgrade the patch package, where the upgrade patch package is used to directly upgrade the third application in the member granularity, and the third application is a system application in the terminal device;
  • the module is configured to: after the sending module sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server; the upgrade module is configured to use the upgrade patch package received by the receiving module to directly upgrade the third application at a member granularity.
  • a terminal device in a fourth aspect, includes a sending module, a receiving module, and an upgrade module.
  • the sending module is configured to send, to the server, an upgrade patch request message for requesting the server to upgrade the patch package (the upgrade patch package is used to directly upgrade the application at the member granularity, and the application is a system application in the terminal device);
  • the receiving module is used to After the sending module sends the upgrade patch request message to the server, the upgrade patch package is sent by the server.
  • the upgrade module is configured to directly upgrade the application at the member granularity by using the upgrade patch package received by the receiving module.
  • a terminal device can include a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory, the one or more computers
  • the program includes computer instructions for booting when the computer instructions are executed by the processor; and scanning the first application; and determining that the first application is an application that implements a common feature function; and using the system class loader to the first The application loads the memory to the terminal device.
  • the foregoing processor is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, the first application is an application that implements a common feature function. .
  • the foregoing processor is specifically configured to query whether the identifier of the first application is included in the predefined public feature function list, and include the first in the public feature function list.
  • the first application is determined to be an application that implements a common feature function.
  • the foregoing processor is specifically configured to: read a first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function. And determining, in the case that the first attribute indicates that the first application is an application that implements a common feature function, determining that the first application is The application of public feature features.
  • the foregoing processor is further configured to start a second application, and create a path class loader of the second application, and invoke the first device in the second application
  • the parent class loader of the path class loader is set as a system class loader; and the second application is loaded into the memory of the terminal device by using the system class loader.
  • the terminal device provided by the embodiment of the present application may further include a transmitter and a receiver.
  • the sender is configured to send an upgrade patch request message for requesting the server to upgrade the patch package to the server, where the upgrade patch package is used to directly upgrade the third application in the member granularity, and the third application is a system application in the terminal device; After the sender sends the upgrade patch request message to the server, the upgrade patch package sent by the server is received; the processor is further configured to directly upgrade the third application at the member granularity by using the upgrade patch package received by the receiver.
  • the upgrade patch package includes at least one resource and at least one identifier, and each identifier is used to uniquely identify one resource.
  • the at least one resource includes at least one of a first resource and a second resource, where the first resource is used to repair an original resource of the third application, and the second resource is a new resource of the third application.
  • a terminal device can include a transmitter, a receiver, a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory
  • the one or more computer programs include computer instructions for transmitting, when the computer instructions are executed by the processor, an upgrade patch request message for requesting an upgrade patch to the server (the upgrade patch package is used directly at the member granularity) Upgrading an application, the application is a system application in the terminal device; the receiver is configured to: after the sender sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server; the processor is configured to receive the upgrade patch received by the receiver Package, directly upgrade the app at member granularity.
  • the upgrade patch package includes at least one resource and at least one identifier, and each identifier is used to uniquely identify one resource.
  • the at least one resource includes at least one of a first resource and a second resource, where the first resource is used to repair an original resource of the application, and the second resource is a new resource of the application.
  • a computer readable storage medium comprising computer instructions that, when executed on a terminal device, cause the terminal device to perform the first aspect described above or any one of the optional A method of loading an application in an implementation manner; or a method for causing a terminal device to perform an upgrade application in the foregoing second aspect or any optional implementation manner thereof.
  • a computer program product comprising computer instructions, when the computer program product is run on a terminal device, causing the terminal device to perform the method of loading the application in the first aspect or any of the optional implementation manners described above Or causing the terminal device to perform the method of upgrading the application in the second aspect or any of the alternative implementations described above.
  • the second aspect and any optional implementation thereof, the third aspect, and any optional implementation thereof, the fourth aspect, and any optional implementation manner thereof, the fifth aspect, and any The optional implementation, the sixth aspect, and any optional implementation manners, the seventh aspect, and the technical effects of the eighth aspect may be specifically referred to the foregoing techniques for the first aspect and any optional implementation manner thereof. The description of the effect will not be described here.
  • FIG. 1 is a schematic diagram of hardware of a mobile phone according to an embodiment of the present application
  • FIG. 2 is a schematic diagram 1 of a method for loading an application according to an embodiment of the present application
  • FIG. 3 is a second schematic diagram of a method for loading an application according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of mapping relationships between generated resources and identifiers (hereinafter referred to as idmaps) according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a method for upgrading an application according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram 1 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 2 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram 3 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram 4 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of hardware of a terminal device according to an embodiment of the present disclosure.
  • first”, “second”, and “third” and the like in the specification and claims of the present application are used to distinguish different objects, and are not intended to describe a particular order of the objects.
  • first application, the second application, the third application, and the like are used to distinguish different applications, rather than to describe a specific order of applications.
  • the words “exemplary” or “such as” are used to mean an example, an illustration, or an illustration. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words “exemplary” or “such as” is intended to present the concepts in a particular manner.
  • Common feature function refers to a function module that can be used by a number of applications (including system applications and third-party applications) developed by terminal equipment manufacturers and application vendors based on the operating system of the terminal device.
  • System application refers to the application that comes with the operating system of the terminal device. System applications can't usually be uninstalled or deleted.
  • Third-party applications Applications developed by application vendors, organizations, or individuals. Third-party applications can usually be installed, uninstalled, or deleted.
  • Class loader A tool that loads an application's classes into a Java virtual machine before the Java virtual machine runs the application's class.
  • the class loader includes a root class loader (System Class Loader) and a path class loader (Path Class Loader).
  • the path class loader and the system class loader's parent class loader are root class loaders.
  • the developer can modify the parent class loader of the path class loader according to the actual use requirement.
  • the parent class loader of the path class loader can be set as the system class loader.
  • System upgrade patch refers to the compressed package after the application installation package set based on the specific version is packaged.
  • Upgrade patch package refers to the zip file generated by members of each / some classes (each class includes multiple members) after the application updates (including repairs and additions).
  • the upgraded patch takes up less space than the system upgrade patch, or the upgrade patch consumes less resources than the system upgrade patch.
  • the public feature function may be used by the terminal device during the process of starting these applications.
  • the operating system is repeatedly loaded multiple times, so that the memory usage of the terminal device is relatively high, thereby affecting the operating system performance of the terminal device.
  • the application installation package of the repair problem and the application package of the newly added function are packaged into a system upgrade package to upgrade the operating system of the terminal device, that is, the system upgrade package may be It contains multiple application installation packages, and each application installation package is applied in the class granularity upgrade. Therefore, the system upgrade patch package occupies a large amount of resources, and the system upgrade patch package has a long release period and needs to restart the terminal device.
  • the operating system can be upgraded, resulting in an application that cannot be fixed quickly.
  • the embodiment of the present application provides a method for loading an application, after the terminal device is powered on, if the terminal device determines that an application (for example, the first application in the embodiment of the present application) implements common characteristics.
  • the application of the function (the determination process may be performed before the terminal device scans the application after booting, or may be executed after the terminal device scans the application after booting), then the terminal device may load the application to the terminal by using a system class loader.
  • the memory of the device Since the application loaded by the system class loader is an operating system level application, other applications in the operating system can share the application that has been loaded into the memory, so that other applications sharing the application can directly call the memory after being started.
  • the application in the application does not need to be loaded when launching other applications sharing the application, so that the application can be repeatedly loaded multiple times when starting other applications sharing the application, which can reduce the memory usage of the terminal device.
  • Improve the operating system performance of the terminal device improve the operating system performance of the terminal device.
  • the embodiment of the present application provides a method for upgrading an application.
  • the terminal device determines that the application can be upgraded, the terminal device sends an upgrade patch request message to the server to request an upgrade patch package from the server, and the terminal device receives the upgrade package.
  • the terminal device After the upgrade patch is sent by the server, the terminal device adopts the upgrade patch package and directly upgrades the application at the member granularity.
  • the upgrade patch package requested by the terminal device to the server is used to upgrade the application at the member granularity, the present application is compared with the prior art in the class granularity (one class includes multiple members) upgrade application.
  • the upgrade patch package in the embodiment is smaller, so that the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the application can be quickly repaired.
  • the application of the terminal device is directly upgraded. Therefore, in the embodiment of the present application, the operating system of the terminal device is not required to be restarted after the application is upgraded. This allows the application to be fixed more quickly.
  • the method for loading an application and the method for upgrading an application provided by the embodiments of the present application may be applied to a terminal device, and may also be applied to a function module or a functional entity in a terminal device that can implement a load application and an upgrade application, which is not specifically limited in this embodiment.
  • the hardware structure of the terminal device provided by the embodiment of the present application is exemplarily described below.
  • the terminal device provided by the embodiment of the present application is a mobile phone as an example, and various components of the mobile phone are specifically introduced in conjunction with FIG. 1 .
  • the mobile phone may include: a processor 10, a radio frequency (RF) circuit 11, a power source 12, a memory 13, an input module 14, a display module 15, and an audio circuit. 16 and other components.
  • RF radio frequency
  • the structure of the mobile phone shown in FIG. 1 does not constitute a limitation to the mobile phone, and may include more or less components such as those shown in FIG. 1, or may be combined as shown in FIG. Some of the components may be different from the components shown in Figure 1.
  • the processor 10 is the control center of the handset, which connects various parts of the entire handset using various interfaces and lines.
  • the mobile phone is monitored overall by running or executing software programs and/or modules stored in the memory 13, and recalling data stored in the memory 13, performing various functions and processing data of the mobile phone.
  • the processor 10 may include one or more processing modules.
  • the processor 10 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like;
  • the modem processor mainly processes wireless communication and the like. It can be understood that the above-mentioned modem processor can also be a processor that exists separately from the processor 10.
  • the RF circuit 11 can be used to receive and transmit signals during transmission or reception of information or calls. For example, after the downlink information of the base station is received, it is processed by the processor 10; in addition, the uplink data is transmitted to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the mobile phone can also communicate wirelessly with other devices in the network through the RF circuit 11.
  • Wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple Access, CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), e-mail, and short messaging service (SMS).
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • CDMA code division multiple Access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • SMS short messaging service
  • the power source 12 can be used to power various components of the handset, and the power source 12 can be a battery.
  • the power supply can be logically coupled to the processor 10 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the memory 13 can be used to store software programs and/or modules, and the processor 10 executes various functional applications and data processing of the mobile phone by running software programs and/or modules stored in the memory 13.
  • the memory 13 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, image data, phone book, etc.).
  • the memory 13 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input module 14 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • input module 14 may include touch screen 141 and other input devices 142.
  • the touch screen 141 also referred to as a touch panel, can collect touch operations on or near the user (such as the operation of the user using any suitable object or accessory on the touch screen 141 or near the touch screen 141 using a finger, a stylus, etc.), and
  • the preset program drives the corresponding connection device.
  • the touch screen 141 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the touch screen 141 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • Other input devices 142 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power switch buttons, etc.), trackballs, mice, and joysticks.
  • the display module 15 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display module 15 can include a display panel 151.
  • the display panel 151 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen 141 may cover the display panel 151, and when the touch screen 141 detects a touch operation on or near it, transmits to the processor 10 to determine the type of the touch event, and then the processor 10 displays the panel according to the type of the touch event.
  • a corresponding visual output is provided on 151.
  • the touch screen 141 and the display panel 151 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch screen 141 can be integrated with the display panel 151 to implement the input of the mobile phone. And output function.
  • the audio circuit 16, the speaker 161 and the microphone 162 are used to provide an audio interface between the user and the handset.
  • the audio circuit 16 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to a sound signal output by the speaker 161.
  • the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 16 and converted into audio data, and then the audio data is output to the RF circuit 11 through the processor 10 for transmission to, for example, another mobile phone, or The audio data is output to the memory 13 by the processor 10 for further processing.
  • the mobile phone shown in FIG. 1 may further include various sensors.
  • a gyro sensor, a hygrometer sensor, an infrared sensor, a magnetometer sensor, and the like are not described herein.
  • the mobile phone shown in FIG. 1 may further include a Wi-Fi module, a Bluetooth module, and the like, and details are not described herein again.
  • the method of loading an application and upgrading an application provided by the embodiment of the present application is applied to the terminal device as an example, and the method for loading the application and upgrading the application provided by the embodiment of the present application is introduced.
  • the embodiment of the present application provides a method for loading an application, and the method may include the following S101-S107.
  • the terminal device is powered on.
  • the terminal device is powered on.
  • the terminal device scans the first application.
  • each application in the terminal device is scanned in sequence.
  • the various applications include system applications and third-party applications.
  • the terminal device scans various system applications first, and then scans each third-party application.
  • the first application in the embodiment of the present application may be one of the system applications in the terminal device, or may be one of the third-party applications in the terminal device. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
  • the terminal device determines that the first application is an application that implements a common feature function.
  • the embodiment of the present application may not limit the execution order of S102 and S103. That is, the embodiment of the present application may first execute S102, and then execute S103; or S103 may be performed first, then S102 may be performed; and S102 and S103 may be simultaneously executed.
  • the specific execution order will be described in detail in the description of S103 in the following embodiments. 2 is schematically illustrated after S103 is executed after S102.
  • the terminal device may design the public feature function to be implemented by using a system application or a third-party application, and preset the system application or the third-party application to the operating system of the terminal device. Recorded, in this way, after the terminal device is powered on, the terminal device can scan the common feature function by scanning each system application or a third-party application.
  • the public feature function may be a beauty function, an animation special effect function, a positioning function, a search function, a face recognition function, a fingerprint recognition function, a timing function, a translation function, a play function, a voice function, and the like.
  • the method that the terminal device determines that the first application is an application that implements a common feature function may be one of the following:
  • the terminal device determines, according to the identifier of the first application included in the predefined common feature function list, that the first application is an application that implements a common feature function.
  • the embodiment of the present application may first execute S103, and then execute S102. Specifically, when the S102 is executed, if the terminal device determines that the currently scanned application is the first application, that is, the terminal device currently scans the first application, the terminal device may continue to execute S104 described below.
  • the terminal device queries whether the identifier of the first application is included in the predefined public feature function list; if the public feature function list includes the identifier of the first application, the terminal device determines that the first application is a public feature If the identifier of the first application is not included in the public feature function list, the terminal device determines that the first application is not an application that implements the public feature function.
  • the embodiment of the present application may first execute S102, and then execute S103. Specifically, when performing S102, if the terminal device determines that the identifier of the currently scanned first application is in the predefined common feature function list, the terminal device may determine that the first application is an application that implements a common feature function, and the terminal device at this time The following S104 can be continued.
  • a public feature function list may be predefined, and an identifier of an application that implements each common feature function, such as an identifier of the first application, is added to the public feature function list.
  • the list of public feature functions can be preset to the directory of the operating system of the terminal device.
  • Table 1 may only include the identifier of the application, that is, the column of the common feature in Table 1 is an explanation of the common feature function implemented by the system application.
  • the terminal device can determine that the application is an application that implements a common feature function by reading an identifier of an application in the predefined common feature function list; or when the terminal device scans an application, if the terminal device is in a predefined
  • the identifier of the application is found in the public feature function list, and the terminal device can determine that the application is an application that implements a common feature function.
  • the terminal device can determine that APP3 is an application that implements common feature functions. Specifically, in the process of scanning the APP3, the terminal device can determine that the APP3 is specifically used to implement the positioning function by parsing each resource and each attribute of the APP3.
  • the determining method of the other common characteristic functions in the foregoing Table 1 may be similar to the determining method of the APP3 listed above, and will not be enumerated here.
  • the identifier of the foregoing first application is capable of uniquely identifying the first application.
  • the identifier of the first application may be the name of the first application, or the address installed by the first application, and may also be other numbers, Chinese characters, letters, characters, strings, serial numbers, etc. that can uniquely identify the first application.
  • One or more combinations can be set according to the actual use requirement, and the embodiment of the present application is not limited.
  • the terminal device reads the first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function; and the first attribute indicates that the first application is an application that implements a common feature function.
  • the terminal device determines that the first application is an application that implements a common feature function. In a case where the first attribute indicates that the first application is not an application that implements a common feature function, the terminal device determines that the first application is not an application that implements a common feature function.
  • the embodiment of the present application may first execute S102, and then execute S103.
  • each application has a plurality of attributes, wherein the first one of the multiple attributes may be used to indicate whether the application is an application that implements a common feature function.
  • the terminal device can read each by reading The first attribute used determines whether the read application is an application that implements a common feature function.
  • the first attribute may be a resource attribute of the first application, and the resource library attribute may be shared by each application.
  • the first application's resource library attribute can be set to indicate whether the first application is an application that implements a common feature function.
  • the resource library attribute includes a name field.
  • the embodiment of the present application may set the name field in the resource library attribute to the name of the application, so that the application can be shared by other applications, that is, the application is made.
  • the implemented functionality is a common feature. That is, the first application in the embodiment of the present application is used as an example, and the name field in the resource library attribute of the first application may be set as the name of the first application, so that the first application can be shared by other applications, even if The function implemented by the first application is a common feature function.
  • the name field in the resource library attribute of the application that implements the beauty function can be set as the name of the application, So that the application can be shared by other applications, that is, the beauty function implemented by the application is a common feature function.
  • the name of the application may also be the other identifiers listed above that can uniquely identify the application.
  • the identifier of the application refer to the description of the identifier of the application in (1) above, and details are not described herein again.
  • the terminal device may continue to execute S104 and S105 described below.
  • the path class loader is generally used to load the application by default. Therefore, if the terminal device determines that the first application is not an application that implements a common feature function, that is, the first application is common. The application does not need to be globally loaded, and the terminal device can load the first application into the memory of the terminal device by using the path class loader by default.
  • each application includes multiple classes, and the first application is used as an example.
  • the first application also includes multiple classes.
  • the terminal device uses the path class loader to load the first application into the application.
  • the memory of the terminal device means that the terminal device loads the class name of the multiple classes of the first application into the memory of the terminal device (this process is also called preloading), and when the first application is specifically used, the terminal device will be multiple. The contents of the class are loaded into memory.
  • the terminal device loads the first application into the memory of the terminal device by using a system class loader.
  • the content loaded by the system class loader is usually an operating system level, that is, the content loaded by the system class loader can be shared by all the applications under the operating system. Therefore, the embodiment of the present application uses the system class loader to load.
  • the common feature function can make the common feature function that has been loaded shared by all applications in the terminal device, thereby achieving the purpose that the common feature function is globally loaded.
  • the terminal device also loads the class name of the multiple classes of the first application into the memory of the terminal device (this process is also referred to as preloading), and when the first application is specifically used, the terminal device only Load the contents of multiple classes into memory.
  • the foregoing S102-S104 is described by taking an example of the terminal device scanning and determining an application that implements a common characteristic function (that is, the first application described above) as an example, and implementing other common characteristic functions in the terminal device.
  • the method for scanning and determining the terminal device is similar to the method for the terminal device to scan and determine the first application, which is not specifically limited in this embodiment.
  • the terminal device sequentially scans other applications.
  • Each application in S105 may include a system application and a third-party application.
  • the embodiment of the present application may first execute S101-S104, and then execute S105; and when executing S105, may scan other systems except the first application. Apply and then scan all third-party apps. If the first application in the S101-S104 is a third-party application, the embodiment of the present application may first perform S105 to scan all system applications, then execute S101-S104, and then perform S105 to scan other third parties except the first application.
  • application. 2 is an example of S105 being executed after S101-S104.
  • the method for loading an application provided by the embodiment of the present application after the terminal device is powered on, if the terminal device determines that an application (for example, the first application in the embodiment of the present application) is an application for implementing a common characteristic function (the determining process may be After the terminal device is booted, the application is executed before scanning the application, or after the terminal device is booted and the application is scanned, the terminal device may load the first application into the memory of the terminal device by using a system class loader. Since the first application loaded by the system class loader is an operating system level application, other applications in the operating system can share the first application that has been loaded into the memory, so that other applications sharing the first application are shared.
  • an application for example, the first application in the embodiment of the present application
  • the terminal device may load the first application into the memory of the terminal device by using a system class loader. Since the first application loaded by the system class loader is an operating system level application, other applications in the operating system can share the first application that has been loaded into the memory, so that other
  • the first application in the memory can be directly invoked, and the first application does not need to be loaded when starting other applications sharing the first application, so that the first application can be avoided when starting other applications sharing the first application.
  • the application is repeatedly loaded multiple times, which can reduce the memory usage of the terminal device and improve the operating system performance of the terminal device.
  • the method for loading an application provided by the embodiment of the present application may further include the following S106-S111.
  • the terminal device starts the second application.
  • the second application may be an application that invokes the first application in the terminal device, that is, the second application is an application that uses the common feature implemented by the first application in the terminal device, or may not be the first application in the terminal device.
  • the application ie, the second application is an application in the terminal device that does not use the common feature function implemented by the first application.
  • the terminal device creates a path class loader of the second application.
  • the terminal device Since the terminal device loads the application by default using the path class loader, when the terminal device starts the second application, the terminal device first creates a path class loader of the second application.
  • the terminal device determines whether the second application is an application that invokes the first application in the terminal device.
  • the terminal device may continue to perform the following S109; if the terminal device determines that the second application is the first in the terminal device, The application of the application, the terminal device can continue to execute S110 and S111 described below.
  • the terminal device loads the second application into the memory of the terminal device by using a path class loader.
  • the following embodiment exemplifies the first application and the second application by taking the application that invokes the first application in the terminal device as an example.
  • the identifier of the first application may be preset in the second application, such that the terminal The device may invoke the first application by using an identifier preset in the second application, thereby providing the user with a common feature function implemented by the first application.
  • the terminal device since the identifier of the first application is preset in the second application, and is not the implementation code of the first application, the terminal device does not need to load the first application when loading the second application.
  • the first application implements a common special
  • the sexual function is a beauty function
  • the second application can be any application that uses the beauty function, for example, the second application can be a camera application, a health application, or a sports application.
  • the common feature function implemented by the first application is an animation special effect function
  • the second application may be any application that uses the animation special effects function, for example, the second application may be a camera application, a map application, a weather application, a shopping application. , sports applications, media applications, browser applications or health applications.
  • the common feature function implemented by the first application is a positioning function
  • the second application may be any application that uses the positioning function, for example, the second application may be a map application, a weather application, a shopping application, or a sports application.
  • the common feature function implemented by the first application is a search function
  • the second application may be any application that uses the search function, for example, the second application may be a media application, a reading application, or a browser application.
  • the second application may be any application that uses the face recognition function, for example, the second application may be a camera application, a payment application, a health application, or a sports application. Application or banking applications, etc.
  • the second application may be any application that uses the fingerprint recognition function, for example, the second application may be a lock screen application, a payment application, or a security privacy tool application. .
  • the second application may be any application that uses the timing function, for example, the second application may be a clock application, a travel application, a health application, a sports application, or a mailbox. Class applications, etc.
  • the common feature function implemented by the first application is a translation function
  • the second application may be any application that uses the translation function, for example, the second application may be a reading application or a learning application.
  • the common feature implemented by the first application is a play function
  • the second application may be any application that uses the play function, for example, the second application may be a shopping application, a media application, or a browser application.
  • the second application may be any application that uses the voice function, for example, the second application may be a map application, a media application, a browser application, or a social application. .
  • the second applications listed in the foregoing examples may be system applications or third party applications.
  • the camera application may be a system camera application or a third party camera application;
  • the map application may be a system map application or a third party map application;
  • the weather application may be a system weather application or a third party weather.
  • the application of the application, etc. may be determined according to the actual situation, and the embodiment of the present application is not limited.
  • the terminal device sets the parent class loader of the path class loader of the second application as a system class loader.
  • the terminal device first uses the system class loader to find the class to be loaded when the class is loaded, and if the system class loader does not find the class to be loaded, then the application class The path class loader finds and loads.
  • the terminal device is loaded by the system class loader when the first application is preloaded. Therefore, after the second application is started, the terminal device can find the first application based on the second application, even if
  • the terminal device may use the path class after the second application is configured to provide the first application with the common application function.
  • the loader's parent class loader is set to system class loading So that the terminal device can directly load the second application into the memory of the terminal device by using the system class loader according to the parental delegation mechanism of the class loading. That is, as described in the following S111, the terminal device loads the second application into the memory of the terminal device by using the system class loader.
  • the terminal device loads the second application into the memory of the terminal device by using a system class loader.
  • the terminal device uses the system class loader to load the second application into the memory of the terminal device, so that after the second application is started, the terminal device can find the first application based on the second application.
  • the system class loader is loaded into the memory of the terminal device, that is, the second application can normally provide the user with the common feature function implemented by the first application by calling the first application.
  • the above-mentioned beauty function is still implemented by the first application
  • the second application is a camera application
  • the terminal device uses the system class loader to load the first application that implements the beauty function and the camera application that invokes the first application.
  • the terminal device can find the first application that implements the beauty function based on the camera-type application, thereby ensuring that the camera-type application can normally provide the user with the beauty function implemented by the first application by calling the first application.
  • FIG. 4 it is a schematic diagram of relationships between various class loaders in a terminal device provided by an embodiment of the present application.
  • the parent class loader of the path class loader (represented as parent in Figure 4) is the system class loader or the root class loader (by default, the parent class loader of the path class loader loads the root class)
  • the parent class loader of the system class loader is the root class loader.
  • the path class loader is used to load normal applications (for example, music.apk and Bluetooth.apk in Figure 4, music.apk for music installation package in Android OS, Bluetooth.apk for Bluetooth installation package in Android OS) and System services (such as services.jar in Figure 4, services.jar represents a service in the Android operating system) and so on.
  • the system class loader is used to load an application that implements the common feature function, such as the first application in the embodiment of the present application (for example, feature.apk in FIG. 4, feature.apk represents a common feature function in the Android operating system).
  • the root class loader is used to load the system framework of the Android operating system, such as the core library layer in the Android operating system (for example, libcore.jar in FIG. 4) and the framework layer (for example, the framework.jar in FIG. 4).
  • the method for loading an application provided by the embodiment of the present application may further include the following S112-S117.
  • the terminal device sends an upgrade patch request message to the server.
  • the server receives an upgrade patch request message sent by the terminal device.
  • a possible implementation manner is: when the terminal device determines that the application running in the terminal device is abnormal, for example, the third application in the embodiment of the present application is abnormal, the terminal device determines to upgrade the third application.
  • the terminal device can trigger execution of S112-S117.
  • the terminal device can periodically check whether there is an application on the server, such as the upgrade patch package of the third application in the embodiment of the present application, when the terminal device determines the server.
  • the terminal device determines to upgrade the third application, and the terminal device may trigger execution of S112-S117.
  • the predefined first time may be any predefined time, such as one day, one week, or one month, and the like, which may be defined according to actual usage requirements. Not limited.
  • the upgrade patch request message is used to request an upgrade patch package from the server.
  • the upgrade patch package is used to directly upgrade the third application at the member granularity, and the third application is a system application in the terminal device.
  • the third application in the embodiment of the present application mainly refers to a system application, because the third-party application can be downloaded from the application store.
  • each application includes multiple classes, and each class includes multiple members.
  • the above upgrade patch package may include at least one member, wherein when the number of members is plural, the plurality of members may be members of different classes.
  • the third application when the third application is upgraded by using the foregoing upgrade package, the third application may be upgraded in the member granularity, that is, only the members that need to be upgraded may be upgraded, and the entire class of the members is not required. Upgrade. For example, a member of the third application that needs to be repaired may be replaced with one member of the upgrade patch package, and/or a member of the upgrade patch package may be added to the third application.
  • the upgrade patch package in the embodiment of the present application is smaller than that in the prior art, and the resource occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, thereby making the third The app can be fixed quickly.
  • the operating system of the terminal device is not required to be restarted after upgrading the third application in the embodiment of the present application. So that the third application can be repaired more quickly.
  • the upgrade patch request message may include current version information of the third application.
  • the current version information of the third application can uniquely identify the current version of the third application.
  • the current version information of the third application may be a combination of one or more of numbers, Chinese characters, letters, character strings, serial numbers, and the like. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
  • the upgrade patch package may include at least one resource and at least one identifier.
  • Each identifier is used to uniquely identify a resource.
  • the at least one resource includes at least one of the first resource and the second resource, where the first resource is used to repair the original resource of the third application (the first resource may also be referred to as the repair resource of the third application), and the second resource is the first resource.
  • the newly added resources of the three applications that is, the second resource is a new resource based on the original resources of the third application).
  • the identifier used to identify a resource in the upgrade patch package may be considered as a member, that is, the upgrade patch package includes at least one member.
  • the foregoing resource may be a combination of one or more of a number, a text (including characters and letters, etc.), a picture, and a file (including files in various formats). Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
  • the identifier used for uniquely identifying the resource may be the name of the resource, or the storage address of the resource, or one or more of other numbers, Chinese characters, letters, characters, strings, and serial numbers that can uniquely identify the resource. Combination of one. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
  • the third application is taken as an example.
  • the schematic diagram of generating an idmap provided by the embodiment of the present application (as shown in FIG. 5 only shows the identifier for uniquely identifying the resource, due to the particularity of the resource, The resource is not shown).
  • part A represents a code for identifying an identifier of an original resource in the third application
  • part B represents an identifier of the new resource for identifying the repair resource of the third application and the third application in the upgrade patch package.
  • the code specifically, B1 represents the code of the identification of the repair resource of the third application
  • B2 represents the code of the identification of the newly added resource of the third application.
  • the third application is repaired by generating and extending the idmap and executing the code in the idmap.
  • the resource replaces the original resource of the third application, and adds the new resource of the third application to the other resource in the third application.
  • the idmap is generated and extended. In the idmap, by performing C1 and C3, it is possible to replace A1 with B1 in part A, and by adding C2 and C3, it is possible to add B2 in part A.
  • the upgrade patch package requested by the terminal device to the server is used to upgrade the third application in the granularity of members (for example, B1 and B2 as shown in FIG. 5), therefore, in the prior art, the class granularity (a class) Compared with the upgrade application, the upgrade package in the embodiment of the present application is smaller, so that the resources occupied by the upgrade package can be reduced, and the release period of the upgrade package can be shortened, so that the third application can be quickly repair.
  • the third application is directly upgraded in the embodiment of the present application. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application. The operating system, so that the third application can be fixed more quickly.
  • the server searches for the upgrade patch package corresponding to the current version information according to the current version information of the third application in the upgrade patch request message.
  • the mapping relationship between the version information of multiple applications and multiple upgrade patch packages may be stored on the server.
  • the mapping relationship between the version information of the plurality of applications and the plurality of upgraded patch packages may include a mapping relationship between the current version information of the third application and the upgrade patch package.
  • the current version information of the third application is a combination of the numbers and letters listed in the above S113, and the mapping relationship between the current version information of the third application and the upgraded patch package is described in conjunction with Table 2.
  • the server may look up the upgrade patch package corresponding to V2 in Table 2, for example, the server is in Table 2.
  • the upgrade patch package 2 corresponding to V2 is found, and then the server sends the upgrade patch package 2 to the terminal device, so that the terminal device upgrades the third application by using the upgrade patch package 2. In this way, it is possible to avoid an error that occurs when the third application is upgraded because the version does not correspond.
  • the server finds the upgrade patch package corresponding to the current version information, the server sends the upgrade patch package to the terminal device.
  • the server may discard the upgrade patch request message sent by the terminal device. And the server may further send an upgrade patch response message to the terminal device to notify the terminal device that the upgrade patch package corresponding to the current version information of the third application is not found; or the terminal device may not send any message to the terminal device, so that After the terminal device sends the upgrade patch request message, if the upgrade patch packet corresponding to the current version information of the third application sent by the server is not received, the server does not receive the server.
  • the upgrade patch response message is sent, and the terminal device can consider that there is no upgrade patch package corresponding to the current version information of the third application on the server.
  • the terminal device receives the upgrade patch package sent by the server.
  • the terminal device adopts the upgrade patch package, and directly upgrades the third application in the member granularity.
  • the terminal device may use the upgrade patch package to directly upgrade the third application at the member granularity to repair the original resource of the third application, and/or add a third for the third application. New resources for the app.
  • the third application and the second application may be the same application, or may be different applications.
  • the second application is a system application
  • the third application and the second application may be the same application.
  • S112-S117 is executed after S105.
  • S112-S117 may also be executed after S111, which is not specifically limited in this embodiment.
  • the terminal device in a case where the terminal device determines that the third application can be upgraded, the terminal device sends an upgrade patch request message to the server to request an upgrade patch package from the server, and the terminal device receives the server to send the upgrade patch package.
  • the terminal device adopts the upgrade patch package to directly upgrade the third application at the member granularity.
  • the upgrade patch package requested by the terminal device to the server is used to upgrade the third application at the member granularity, compared with the prior art in the class granularity (a class includes multiple members), the upgrade application is compared.
  • the upgrade patch package in the embodiment of the present application is smaller.
  • the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the third application can be quickly repaired.
  • the third application is directly upgraded. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application. The operating system, so that the third application can be repaired more quickly.
  • the method for loading an application provided by the embodiment of the present application may further include the following S118-S119.
  • the server searches for an expired upgrade patch package according to current version information of the third application.
  • the server may perform S118-S119 under the trigger of the upgrade patch request message sent by the terminal device (for example, triggered by S113 above); or may periodically use the predefined second time as a periodic period.
  • Execute S118-S119 may be determined according to the actual use requirement, and the embodiment of the present application is not limited.
  • the second predefined time may be a predefined time, for example, one day, one week, or one month, and the like may be defined according to actual usage requirements, which is not limited in the embodiment of the present application.
  • the expired upgrade patch package refers to an upgrade patch package that does not correspond to the current version information of the third application, and may be, for example, some/some version information before the current version information of the third application.
  • Corresponding upgrade patch package Exemplarily, it is assumed that the current version information of the third application is V2, and the version information before V2 is V1, and the upgrade patch package corresponding to V1 is the expired upgrade patch package.
  • the server can save the storage space of the server by deleting the expired upgrade patch on the server.
  • the embodiment of the present application further provides a method for upgrading an application, and the method may include the following S201-S206.
  • the terminal device sends an upgrade patch request message to the server.
  • the server receives an upgrade patch request message sent by the terminal device.
  • the server searches for an upgrade patch corresponding to the current version information according to the current version information of the third application in the upgrade patch request message.
  • the server finds the upgrade patch package corresponding to the current version information, the server sends the upgrade patch package to the terminal device.
  • the terminal device receives the upgrade patch package sent by the server.
  • the terminal device adopts the upgrade patch package, and directly upgrades the third application in the member granularity.
  • the method for upgrading an application provided by the embodiment of the present application may further include the following S207-S208.
  • the server searches for an expired upgrade patch package according to current version information of the third application.
  • the terminal device and the like provided by the embodiments of the present application include corresponding hardware structures and/or software modules for performing the respective functions.
  • the modules and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in a combination of hardware or hardware and computer software. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can implement the described functions using different methods for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
  • the embodiment of the present application can perform functional division of a terminal device or the like according to the above method.
  • each function module can be divided for each function, or two or more functions can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 7 is a schematic diagram showing a possible structure of a terminal device according to an embodiment of the present application.
  • the terminal device may include: a startup module 20, a scanning module 21, a determination module 22, and a loading module 23.
  • the initiating module 20 may be configured to support the terminal device to perform S101 and S106 performed by the terminal device in the foregoing method embodiment;
  • the scanning module 21 may be configured to support the terminal device to perform S102 and S105 performed by the terminal device in the foregoing method embodiment; 22 may be used to support the terminal device to perform S103 and S108 performed by the terminal device in the foregoing method embodiment;
  • the loading module 23 may be configured to support the terminal device to perform S104, S109, and S111 performed by the terminal device in the foregoing method embodiment.
  • the terminal device provided by the embodiment of the present application may further include a creating module 24 and a setting module 25.
  • the creating module 24 can be used to support the terminal device to perform S107 performed by the terminal device in the foregoing method embodiment.
  • the setting module 25 can be used to support the terminal device to perform S110 performed by the terminal device in the foregoing method embodiment.
  • the terminal device provided by the embodiment of the present application may further include a sending module, a receiving module, and an upgrade module.
  • the sending module may be configured to support the terminal device to perform S112 performed by the terminal device in the foregoing method embodiment; the receiving module may be configured to support the terminal device to perform S116 performed by the terminal device in the foregoing method embodiment; and the upgrading module may be used to support the terminal
  • the device performs S117 performed by the terminal device in the foregoing method embodiment. It can be understood that each of the above functional modules can also perform other processes of the technology described in the embodiments of the present application. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • the terminal device provided by the embodiment of the present application may include a sending module 30, a receiving module 31, and an upgrading module 32.
  • the sending module 30 can be used to support the terminal device to perform S201 performed by the terminal device in the foregoing method embodiment; the receiving module 31 can be used to support the terminal device to perform S205 performed by the terminal device in the foregoing method embodiment; the upgrading module 32 can be used to Supporting the terminal device to perform S206 performed by the terminal device in the foregoing method embodiment.
  • the various functional modules described above may also perform other processes of the techniques described herein.
  • FIG. 10 is a schematic diagram showing a possible structure of a terminal device provided by an embodiment of the present application.
  • the terminal device may include: a processing module 40 and a storage module 41.
  • the processing module 40 can be used to control and control the action of the terminal device.
  • the processing module 40 can be used to support the terminal device to perform S101, S102, S103, S104, S105, S106 performed by the terminal device in the foregoing method embodiment. S107, S108, S109, S110, S111, and S117, and/or other processes of the techniques described herein.
  • the storage module 41 is configured to store program codes and data of the terminal device.
  • the terminal device may further include a communication module 42.
  • the communication module 42 may be configured to support communication between the terminal device and other devices.
  • the communication module 42 may be configured to support the terminal device and other terminals. Device interaction.
  • the communication module 42 may be used to support the terminal device to perform S112 and S116 performed by the terminal device in the foregoing method embodiment, and/or other processes of the techniques described herein.
  • the processing module 40 may be configured to support the terminal device to perform S206 performed by the terminal device in the foregoing method embodiment, and/or other processes of the techniques described herein.
  • the communication module 42 can be used to support the terminal device to perform S201 and S205 performed by the terminal device in the above method embodiments, and/or other processes of the techniques described herein.
  • the processing module 40 may be a processor or a controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (application-specific). Integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the storage module 41 may be a memory, which may include a general memory and a memory for storing a software program and/or a module of the terminal device, and a memory for the processor to load and run the software program of the terminal device.
  • the communication module 42 can be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the processing module 40 can be the processor 10 shown in FIG. 1 above.
  • the storage module 41 may be the above-described memory 13 as shown in FIG.
  • the communication module 42 may be the RF circuit 11 and/or as shown in FIG. 1 described above. Or input module 14 and so on.
  • the processing module 40 is a processor
  • the storage module 41 is a memory
  • the communication module 42 is a transceiver
  • FIG. 11 it is a hardware schematic diagram of a terminal device provided by the embodiment of the present application.
  • the terminal device includes a processor 50, a memory 51, and a transceiver 52.
  • the processor 50, the memory 51 and the transceiver 52 can be connected to one another via a bus 53.
  • the bus 53 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like.
  • the bus 53 can be divided into an address bus, a data bus, a control bus, and the like.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer instructions When the computer instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (such as a solid state drives (SSD)).
  • a magnetic medium for example, a floppy disk, a magnetic disk, a magnetic tape
  • an optical medium for example, a digital video disc (DVD)
  • a semiconductor medium such as a solid state drives (SSD)
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, It can be stored on a computer readable storage medium.
  • the technical solution of the present application in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Abstract

A method and a terminal device for loading an application and upgrading an application, relating to the technical field of terminals, can reduce memory usage of the terminal device, thereby improving operating system performance of the terminal device. The method for loading an application comprises: the terminal device powering on (S101); scanning a first application (S102); and determining that the first application is an application that implements a common feature function (S103); and loading the first application into the memory of the terminal device by using a system class loader (S104).

Description

一种加载应用和升级应用的方法及终端设备Method for loading application and upgrading application and terminal device
本申请要求于2017年10月09日提交中国专利局、申请号为201710931606.0、申请名称为“一种加载应用和升级应用的方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on October 09, 2017, the Chinese Patent Office, Application No. 201710931606.0, entitled "A Method for Loading Applications and Upgrade Applications and Terminal Devices", the entire contents of which are incorporated by reference. Combined in this application.
技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种加载应用和升级应用的方法及终端设备。The present application relates to the field of terminal technologies, and in particular, to a method for loading an application and upgrading an application, and a terminal device.
背景技术Background technique
随着终端技术的不断发展,具有操作系统的终端设备越来越多。通常,终端设备厂商和应用(application,APP)厂商可以基于终端设备的操作系统开发一些多个应用(包括系统应用和第三方应用)可以通用的功能模块,这些通用的功能模块称为公共特性功能。With the continuous development of terminal technologies, there are more and more terminal devices with operating systems. Generally, terminal equipment manufacturers and application (application) manufacturers can develop functional modules that can be used by a plurality of applications (including system applications and third-party applications) based on the operating system of the terminal device. These common functional modules are called common feature functions. .
目前,应用厂商会把公共特性功能打包到应用中,这样,如果启动应用,那么终端设备的操作系统在加载该应用时,会将该应用中的公共特性功能也加载到内存中,从而应用可以实现该公共特性功能提供的功能。At present, the application vendor will package the public feature function into the application, so that if the application is started, the operating system of the terminal device loads the public feature function of the application into the memory when the application is loaded, so that the application can Implement the functionality provided by this common feature.
然而,当终端设备中有多个应用使用同一个公共特性功能时,这个公共特性功能可能会被终端设备的操作系统重复加载多次,这样,使得终端设备的内存占用率比较高,从而影响终端设备的操作系统性能。However, when multiple applications in the terminal device use the same common feature function, the common feature function may be repeatedly loaded by the operating system of the terminal device multiple times, so that the memory usage of the terminal device is relatively high, thereby affecting the terminal. The operating system performance of the device.
发明内容Summary of the invention
本申请提供一种加载应用和升级应用的方法及终端设备,能够降低终端设备的内存占用率,从而提升终端设备的操作系统性能。The application provides a method for loading and upgrading an application and a terminal device, which can reduce the memory usage of the terminal device, thereby improving the operating system performance of the terminal device.
为达到上述目的,本申请采用如下技术方案:To achieve the above objectives, the present application adopts the following technical solutions:
第一方面,提供一种加载应用的方法,终端设备开机启动;并扫描第一应用;且终端设备确定该第一应用为实现公共特性功能的应用;以及终端设备采用系统类加载器将该第一应用加载到终端设备的内存。本申请中,由于系统类加载器加载的第一应用为操作系统级别的应用,因此该操作系统中的其他应用可以共享已被加载到内存中的该第一应用,从而以使得共享该第一应用的其他应用启动后可以直接调用内存中的该第一应用,而在启动共享该第一应用的其他应用时无需再加载该第一应用,如此可以避免在启动共享该第一应用的其他应用时该第一应用被重复加载多次,能够降低终端设备的内存占用率,提升终端设备的操作系统性能。In a first aspect, a method for loading an application is provided, the terminal device is powered on; and the first application is scanned; and the terminal device determines that the first application is an application that implements a common feature function; and the terminal device adopts a system class loader to An application is loaded into the memory of the terminal device. In this application, since the first application loaded by the system class loader is an operating system level application, other applications in the operating system may share the first application that has been loaded into the memory, so that the first is shared. After the other application of the application is started, the first application in the memory can be directly invoked, and the first application does not need to be loaded when starting other applications sharing the first application, so that other applications sharing the first application can be avoided. The first application is repeatedly loaded multiple times, which can reduce the memory usage of the terminal device and improve the operating system performance of the terminal device.
在第一方面的第一种可选的实现方式中,上述终端设备确定第一应用为实现公共特性功能的应用的方法包括:终端设备根据预定义的公共特性功能列表中包括的第一应用的标识,确定该第一应用为实现公共特性功能的应用。如此,终端设备可以通过预定义的公共特性功能列表确定第一应用为实现公共特性功能的应用。In a first optional implementation manner of the first aspect, the method for determining, by the terminal device, that the first application is an application that implements a common feature function, includes: the terminal device according to the first application included in the predefined common feature function list Identifying, determining that the first application is an application that implements a common feature function. In this way, the terminal device can determine, by using a predefined list of common feature functions, that the first application is an application that implements a common feature function.
在第一方面的第二种可选的实现方式中,上述终端设备确定第一应用为实现公共特性功能的应用的方法包括:终端设备查询预定义的公共特性功能列表中是否包括第 一应用的标识;并在该公共特性功能列表中包括该第一应用的标识的情况下,终端设备确定该第一应用为实现公共特性功能的应用。如此,终端设备可以通过预定义的公共特性功能列表确定第一应用是否为实现公共特性功能的应用。In a second optional implementation manner of the first aspect, the method for determining, by the terminal device, that the first application is an application that implements a common feature function includes: the terminal device querying whether the predefined public feature function list includes the first An identifier of an application; and in a case where the identifier of the first application is included in the public feature function list, the terminal device determines that the first application is an application that implements a common feature function. In this way, the terminal device can determine whether the first application is an application that implements a common feature function through a predefined public feature function list.
在第一方面的第三种可选的实现方式中,上述终端设备确定第一应用为实现公共特性功能的应用的方法包括:终端设备读取第一应用的第一属性(该第一属性用于指示该第一应用是否为实现公共特性功能的应用);并在该第一属性指示该第一应用为实现公共特性功能的应用的情况下,终端设备确定该第一应用为实现公共特性功能的应用。如此,终端设备可以通过识别应用的属性确定应用是否为实现公共特性功能的应用。In a third optional implementation manner of the first aspect, the method for determining, by the terminal device, that the first application is an application that implements a common feature function comprises: the terminal device reading a first attribute of the first application (the first attribute is used by the terminal device) And indicating that the first application is an application that implements a common feature function; and in a case that the first attribute indicates that the first application is an application that implements a common feature function, the terminal device determines that the first application is configured to implement a common feature Applications. In this way, the terminal device can determine whether the application is an application that implements a common feature function by identifying an attribute of the application.
在第一方面的第四种可选的实现方式中,上述终端设备采用系统类加载器将第一应用加载到终端设备的内存之后,本申请实施例提供的加载应用的方法还可以由终端设备启动终端设备中的第二应用;并创建该第二应用的路径类加载器;且在该第二应用为终端设备中调用第一应用的应用的情况下,终端设备设置该路径类加载器的父类加载器为系统类加载器;以及终端设备采用该系统类加载器将该第二应用加载到终端设备的内存。本申请中,由于终端设备采用系统类加载器加载实现公共特性功能的第一应用,并且采用系统类加载器加载调用第一应用的第二应用,因此能够使得第二应用启动后,终端设备可以基于第二应用查找到第一应用,即使得第二应用能够通过调用第一应用正常为用户提供第一应用实现的公共特性功能。In a fourth optional implementation manner of the first aspect, after the terminal device loads the first application into the memory of the terminal device by using the system class loader, the method for loading the application provided by the embodiment of the present application may also be performed by the terminal device. Starting a second application in the terminal device; and creating a path class loader of the second application; and in a case where the second application is an application that invokes the first application in the terminal device, the terminal device sets the path class loader The parent class loader is a system class loader; and the terminal device uses the system class loader to load the second application into the memory of the terminal device. In this application, since the terminal device uses the system class loader to load the first application that implements the common feature function, and uses the system class loader to load the second application that invokes the first application, the terminal device can be enabled after the second application is started. Finding the first application based on the second application, that is, enabling the second application to provide the user with the common feature function implemented by the first application by calling the first application.
在第一方面的第五种可选的实现方式中,本申请实施例提供的加载应用的方法还可以由终端设备向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级第三应用,该第三应用为终端设备中的系统应用);并且终端设备接收服务器发送的该升级补丁包;以及终端设备采用该升级补丁包,在成员粒度直接升级该第三应用。本申请中,一方面,由于终端设备向服务器请求的升级补丁包是用于在成员粒度升级第三应用的,因此,与现有技术中在类粒度(一个类包括多个成员)升级应用相比,本申请实施例中的升级补丁包更小,如此,可以降低升级补丁包占用的资源,并且可以缩短升级补丁包的发布周期,从而使得第三应用可以快速修复。另一方面,由于本申请实施例中是直接升级第三应用的,因此与现有技术中通过升级终端设备的操作系统升级应用相比,本申请实施例中升级第三应用后无需重启终端设备的操作系统,从而使得第三应用可以更快速地修复。In a fifth optional implementation manner of the first aspect, the method for loading an application provided by the embodiment of the present application may further send, by the terminal device, an upgrade patch request message for requesting an upgrade patch package from the server to the server (the upgrade patch) The packet is used to directly upgrade the third application in the member granularity, and the third application is the system application in the terminal device; and the terminal device receives the upgraded patch package sent by the server; and the terminal device adopts the upgraded patch package, and the member granularity is directly Upgrade the third app. In this application, on the one hand, since the upgrade patch package requested by the terminal device to the server is used to upgrade the third application in the member granularity, the upgraded application in the class granularity (one class includes multiple members) is related to the prior art. The upgrade package in the embodiment of the present application is smaller. In this way, the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the third application can be quickly repaired. On the other hand, the third application is directly upgraded in the embodiment of the present application. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application. The operating system, so that the third application can be fixed more quickly.
第二方面,提供一种升级应用的方法,终端设备向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级应用,该应用为终端设备中的系统应用);并且终端设备接收服务器发送的该升级补丁包;以及终端设备采用该升级补丁包,在成员粒度直接升级该应用。A second aspect provides a method for upgrading an application, where the terminal device sends an upgrade patch request message for requesting an upgrade patch to a server, where the upgrade patch package is used to directly upgrade an application at a member granularity, where the application is a terminal device. And the terminal device receives the upgrade patch package sent by the server; and the terminal device adopts the upgrade patch package to directly upgrade the application at the member granularity.
第三方面,提供一种终端设备,该终端设备可以包括启动模块、扫描模块、确定模块和加载模块。启动模块用于开机启动;扫描模块用于扫描第一应用;确定模块用于确定该第一应用为实现公共特性功能的应用;加载模块用于采用系统类加载器将该第一应用加载到终端设备的内存。In a third aspect, a terminal device is provided, and the terminal device can include a startup module, a scanning module, a determining module, and a loading module. The startup module is used for booting; the scanning module is configured to scan the first application; the determining module is configured to determine that the first application is an application that implements a common feature function; and the loading module is configured to load the first application into the terminal by using a system class loader The memory of the device.
在第三方面的第一种可选的实现方式中,上述确定模块具体用于根据预定义的公共特性功能列表中包括的第一应用的标识,确定该第一应用为实现公共特性功能的应 用。In a first optional implementation manner of the third aspect, the determining module is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, that the first application is to implement a public feature function use.
在第三方面的第二种可选的实现方式中,上述确定模块具体用于查询预定义的公共特性功能列表中是否包括第一应用的标识;并在该公共特性功能列表中包括该第一应用的标识的情况下,确定该第一应用为实现公共特性功能的应用。In a second optional implementation manner of the third aspect, the determining module is specifically configured to query whether the identifier of the first application is included in the predefined public feature function list, and include the first in the public feature function list. In the case of the identity of the application, the first application is determined to be an application that implements a common feature function.
在第三方面的第三种可选的实现方式中,上述确定模块具体用于读取第一应用的第一属性(该第一属性用于指示该第一应用是否为实现公共特性功能的应用);并在该第一属性指示该第一应用为实现公共特性功能的应用的情况下,确定该第一应用为实现公共特性功能的应用。In a third optional implementation manner of the third aspect, the determining module is specifically configured to: read a first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function. And determining, in the case that the first attribute is an application that implements a common feature function, the first application is an application that implements a common feature function.
在第三方面的第四种可选的实现方式中,本申请实施例提供的终端设备还可以包括创建模块和设置模块。启动模块还用于启动终端设备中的第二应用;创建模块用于创建启动模块启动的第二应用的路径类加载器;设置模块用于在启动模块启动的第二应用为终端设备中调用第一应用的应用的情况下,设置创建模块创建的该路径类加载器的父类加载器为系统类加载器;加载模块还用于采用设置模块设置后的该系统类加载器将该第二应用加载到终端设备的内存。In a fourth optional implementation manner of the third aspect, the terminal device provided by the embodiment of the present application may further include a creating module and a setting module. The startup module is further configured to start a second application in the terminal device; the creation module is configured to create a path class loader of the second application initiated by the startup module; and the setting module is configured to invoke the second application in the terminal device when the startup module is started. In the case of an application of the application, the parent class loader of the path class loader created by the creation module is a system class loader; the load module is also used to use the system class loader set by the setting module to apply the second application. Loaded into the memory of the terminal device.
在第三方面的第五种可选的实现方式中,本申请实施例提供的终端设备还可以包括发送模块、接收模块和升级模块。发送模块用于向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级第三应用,该第三应用为终端设备中的系统应用);接收模块用于在发送模块向服务器发送该升级补丁请求消息之后,接收服务器发送的该升级补丁包;升级模块用于采用接收模块接收的该升级补丁包,在成员粒度直接升级该第三应用。In a fifth optional implementation manner of the third aspect, the terminal device provided by the embodiment of the present application may further include a sending module, a receiving module, and an upgrade module. The sending module is configured to send, to the server, an upgrade patch request message for requesting the server to upgrade the patch package, where the upgrade patch package is used to directly upgrade the third application in the member granularity, and the third application is a system application in the terminal device; The module is configured to: after the sending module sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server; the upgrade module is configured to use the upgrade patch package received by the receiving module to directly upgrade the third application at a member granularity.
第四方面,提供一种终端设备,该终端设备包括发送模块、接收模块和升级模块。发送模块用于向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级应用,该应用为终端设备中的系统应用);接收模块用于在发送模块向服务器发送该升级补丁请求消息之后,接收服务器发送的该升级补丁包;升级模块用于采用接收模块接收的该升级补丁包,在成员粒度直接升级该应用。In a fourth aspect, a terminal device is provided, where the terminal device includes a sending module, a receiving module, and an upgrade module. The sending module is configured to send, to the server, an upgrade patch request message for requesting the server to upgrade the patch package (the upgrade patch package is used to directly upgrade the application at the member granularity, and the application is a system application in the terminal device); the receiving module is used to After the sending module sends the upgrade patch request message to the server, the upgrade patch package is sent by the server. The upgrade module is configured to directly upgrade the application at the member granularity by using the upgrade patch package received by the receiving module.
第五方面,提供一种终端设备,该终端设备可以包括处理器、与处理器耦合的存储器,以及一个或多个计算机程序,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括计算机指令,当计算机指令被处理器执行时,处理器用于开机启动;并扫描第一应用;且确定该第一应用为实现公共特性功能的应用;以及采用系统类加载器将该第一应用加载到终端设备的内存。In a fifth aspect, a terminal device is provided, the terminal device can include a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory, the one or more computers The program includes computer instructions for booting when the computer instructions are executed by the processor; and scanning the first application; and determining that the first application is an application that implements a common feature function; and using the system class loader to the first The application loads the memory to the terminal device.
在第五方面的第一种可选的实现方式中,上述处理器具体用于根据预定义的公共特性功能列表中包括的第一应用的标识,确定该第一应用为实现公共特性功能的应用。In a first optional implementation manner of the fifth aspect, the foregoing processor is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, the first application is an application that implements a common feature function. .
在第五方面的第二种可选的实现方式中,上述处理器具体用于查询预定义的公共特性功能列表中是否包括第一应用的标识;并在该公共特性功能列表中包括该第一应用的标识的情况下,确定该第一应用为实现公共特性功能的应用。In a second optional implementation manner of the fifth aspect, the foregoing processor is specifically configured to query whether the identifier of the first application is included in the predefined public feature function list, and include the first in the public feature function list. In the case of the identity of the application, the first application is determined to be an application that implements a common feature function.
在第五方面的第三种可选的实现方式中,上述处理器具体用于读取第一应用的第一属性(该第一属性用于指示该第一应用是否为实现公共特性功能的应用);并在该第一属性指示该第一应用为实现公共特性功能的应用的情况下,确定该第一应用为实 现公共特性功能的应用。In a third optional implementation manner of the fifth aspect, the foregoing processor is specifically configured to: read a first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function. And determining, in the case that the first attribute indicates that the first application is an application that implements a common feature function, determining that the first application is The application of public feature features.
在第五方面的第四种可选的实现方式中,上述处理器还用于启动第二应用;并创建该第二应用的路径类加载器;且在该第二应用为终端设备中调用第一应用的应用的情况下,设置该路径类加载器的父类加载器为系统类加载器;以及采用该系统类加载器将该第二应用加载到终端设备的内存。In a fourth optional implementation manner of the fifth aspect, the foregoing processor is further configured to start a second application, and create a path class loader of the second application, and invoke the first device in the second application In the case of an application of the application, the parent class loader of the path class loader is set as a system class loader; and the second application is loaded into the memory of the terminal device by using the system class loader.
在第五方面的第五种可选的实现方式中,本申请实施例提供的终端设备还可以包括发送器和接收器。发送器用于向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级第三应用,该第三应用为终端设备中的系统应用);接收器用于在发送器向服务器发送该升级补丁请求消息之后,接收服务器发送的该升级补丁包;处理器还用于采用接收器接收的该升级补丁包,在成员粒度直接升级该第三应用。In a fifth optional implementation manner of the fifth aspect, the terminal device provided by the embodiment of the present application may further include a transmitter and a receiver. The sender is configured to send an upgrade patch request message for requesting the server to upgrade the patch package to the server, where the upgrade patch package is used to directly upgrade the third application in the member granularity, and the third application is a system application in the terminal device; After the sender sends the upgrade patch request message to the server, the upgrade patch package sent by the server is received; the processor is further configured to directly upgrade the third application at the member granularity by using the upgrade patch package received by the receiver.
在上述第一方面、第三方面和第五方面中,上述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源。该至少一个资源包括第一资源和第二资源中的至少一个,该第一资源用于修复第三应用的原有资源,该第二资源为该第三应用的新增资源。In the above first aspect, the third aspect, and the fifth aspect, the upgrade patch package includes at least one resource and at least one identifier, and each identifier is used to uniquely identify one resource. The at least one resource includes at least one of a first resource and a second resource, where the first resource is used to repair an original resource of the third application, and the second resource is a new resource of the third application.
第六方面,提供一种终端设备,该终端设备可以包括发送器、接收器、处理器、与处理器耦合的存储器,以及一个或多个计算机程序,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括计算机指令,当计算机指令被处理器执行时,发送器用于向服务器发送用于向服务器请求升级补丁包的升级补丁请求消息(该升级补丁包用于在成员粒度直接升级应用,该应用为终端设备中的系统应用);接收器用于在发送器向服务器发送该升级补丁请求消息之后,接收服务器发送的该升级补丁包;处理器用于采用接收器接收的该升级补丁包,在成员粒度直接升级该应用。In a sixth aspect, a terminal device is provided, the terminal device can include a transmitter, a receiver, a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory The one or more computer programs include computer instructions for transmitting, when the computer instructions are executed by the processor, an upgrade patch request message for requesting an upgrade patch to the server (the upgrade patch package is used directly at the member granularity) Upgrading an application, the application is a system application in the terminal device; the receiver is configured to: after the sender sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server; the processor is configured to receive the upgrade patch received by the receiver Package, directly upgrade the app at member granularity.
在上述第二方面、第四方面和第六方面中,上述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源。该至少一个资源包括第一资源和第二资源中的至少一个,该第一资源用于修复应用的原有资源,该第二资源为该应用的新增资源。In the above second aspect, the fourth aspect, and the sixth aspect, the upgrade patch package includes at least one resource and at least one identifier, and each identifier is used to uniquely identify one resource. The at least one resource includes at least one of a first resource and a second resource, where the first resource is used to repair an original resource of the application, and the second resource is a new resource of the application.
第七方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令在终端设备上运行时,使得终端设备执行上述第一方面或其任意一种可选的实现方式中加载应用的方法;或者使得终端设备执行上述第二方面或其任意一种可选的实现方式中升级应用的方法。In a seventh aspect, a computer readable storage medium is provided, the computer readable storage medium comprising computer instructions that, when executed on a terminal device, cause the terminal device to perform the first aspect described above or any one of the optional A method of loading an application in an implementation manner; or a method for causing a terminal device to perform an upgrade application in the foregoing second aspect or any optional implementation manner thereof.
第八方面,提供一种包括计算机指令的计算机程序产品,当该计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面或其任意一种可选的实现方式中加载应用的方法;或者使得终端设备执行上述第二方面或其任意一种可选的实现方式中升级应用的方法。In an eighth aspect, a computer program product comprising computer instructions, when the computer program product is run on a terminal device, causing the terminal device to perform the method of loading the application in the first aspect or any of the optional implementation manners described above Or causing the terminal device to perform the method of upgrading the application in the second aspect or any of the alternative implementations described above.
第二方面及其任意一种可选的实现方式、第三方面及其任意一种可选的实现方式、第四方面及其任意一种可选的实现方式、第五方面及其任意一种可选的实现方式、第六方面及其任意一种可选的实现方式、第七方面以及第八方面的技术效果具体可以参见上述对第一方面及其任意一种可选的实现方式的技术效果的描述,此处不再赘述。The second aspect and any optional implementation thereof, the third aspect, and any optional implementation thereof, the fourth aspect, and any optional implementation manner thereof, the fifth aspect, and any The optional implementation, the sixth aspect, and any optional implementation manners, the seventh aspect, and the technical effects of the eighth aspect may be specifically referred to the foregoing techniques for the first aspect and any optional implementation manner thereof. The description of the effect will not be described here.
附图说明 DRAWINGS
图1为本申请实施例提供的手机的硬件示意图;FIG. 1 is a schematic diagram of hardware of a mobile phone according to an embodiment of the present application;
图2为本申请实施例提供的加载应用的方法示意图一;2 is a schematic diagram 1 of a method for loading an application according to an embodiment of the present application;
图3为本申请实施例提供的加载应用的方法示意图二;FIG. 3 is a second schematic diagram of a method for loading an application according to an embodiment of the present disclosure;
图4为本申请实施例提供的各种类加载器之间的关系示意图;4 is a schematic diagram of relationships between various class loaders according to an embodiment of the present application;
图5为本申请实施例提供的生成资源和标识的映射关系(以下均称为idmap)的示意图;FIG. 5 is a schematic diagram of mapping relationships between generated resources and identifiers (hereinafter referred to as idmaps) according to an embodiment of the present disclosure;
图6为本申请实施例提供的升级应用的方法示意图;FIG. 6 is a schematic diagram of a method for upgrading an application according to an embodiment of the present disclosure;
图7为本申请实施例提供的终端设备的结构示意图一;FIG. 7 is a schematic structural diagram 1 of a terminal device according to an embodiment of the present disclosure;
图8为本申请实施例提供的终端设备的结构示意图二;FIG. 8 is a schematic structural diagram 2 of a terminal device according to an embodiment of the present disclosure;
图9为本申请实施例提供的终端设备的结构示意图三;FIG. 9 is a schematic structural diagram 3 of a terminal device according to an embodiment of the present disclosure;
图10为本申请实施例提供的终端设备的结构示意图四;FIG. 10 is a schematic structural diagram 4 of a terminal device according to an embodiment of the present disclosure;
图11为本申请实施例提供的终端设备的硬件示意图。FIG. 11 is a schematic diagram of hardware of a terminal device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。The term "and/or" in this context is merely an association describing the associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, and both A and B exist, respectively. B these three situations. The symbol "/" in this document indicates that the associated object is an OR relationship, for example, A/B represents A or B.
本申请的说明书和权利要求书中的术语“第一”、“第二”和“第三”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一应用、第二应用和第三应用等是用于区别不同的应用,而不是用于描述应用的特定顺序。The terms "first", "second", and "third" and the like in the specification and claims of the present application are used to distinguish different objects, and are not intended to describe a particular order of the objects. For example, the first application, the second application, the third application, and the like are used to distinguish different applications, rather than to describe a specific order of applications.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或者说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或者更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, the words "exemplary" or "such as" are used to mean an example, an illustration, or an illustration. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "exemplary" or "such as" is intended to present the concepts in a particular manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上。例如,多个应用是指两个或者两个以上的应用;多个类是指两个或者两个以上的类。In the description of the embodiments of the present application, the meaning of "a plurality" means two or more unless otherwise stated. For example, multiple applications refer to two or more applications; multiple classes refer to two or more classes.
下面首先对本申请实施例中涉及到的一些名词或者术语进行解释。The following are some explanations of some terms or terms involved in the embodiments of the present application.
公共特性功能:是指终端设备厂商和应用厂商基于终端设备的操作系统开发的一些多个应用(包括系统应用和第三方应用)可以通用的功能模块。Common feature function: refers to a function module that can be used by a number of applications (including system applications and third-party applications) developed by terminal equipment manufacturers and application vendors based on the operating system of the terminal device.
系统应用:是指终端设备的操作系统自带的应用。系统应用通常不能卸载或者删除。System application: refers to the application that comes with the operating system of the terminal device. System applications can't usually be uninstalled or deleted.
第三方应用:是指由应用厂商、一些组织或者个人开发的应用。第三方应用通常可以安装、卸载或者删除。Third-party applications: Applications developed by application vendors, organizations, or individuals. Third-party applications can usually be installed, uninstalled, or deleted.
类加载器:是指Java虚拟机运行应用的类之前,将应用的类加载到Java虚拟机中的工具。类加载器包括根类加载器(Boot Class Loader)、系统类加载器(System Class Loader)和路径类加载器(Path Class Loader)。其中,默认情况下,路径类加载器和系统类加载器的父类加载器均为根类加载器。在软件开发过程中,开发人员可以根据实际使用需求修改路径类加载器的父类加载器,例如本申请实施例中,可以将路径类加载器的父类加载器设置为系统类加载器。 Class loader: A tool that loads an application's classes into a Java virtual machine before the Java virtual machine runs the application's class. The class loader includes a root class loader (System Class Loader) and a path class loader (Path Class Loader). Among them, by default, the path class loader and the system class loader's parent class loader are root class loaders. In the software development process, the developer can modify the parent class loader of the path class loader according to the actual use requirement. For example, in the embodiment of the present application, the parent class loader of the path class loader can be set as the system class loader.
系统升级补丁包:是指将基于特定版本开发的应用安装包集合打包后的压缩包。System upgrade patch: refers to the compressed package after the application installation package set based on the specific version is packaged.
升级补丁包:是指将应用中更新(包括修复和新增)后的某个/某些类中的成员(每个类包括多个成员)生成的压缩包。升级补丁包占用的空间比系统升级补丁包占用的空间小,或者升级补丁包占用的资源比系统升级补丁包占用的资源少。Upgrade patch package: refers to the zip file generated by members of each / some classes (each class includes multiple members) after the application updates (including repairs and additions). The upgraded patch takes up less space than the system upgrade patch, or the upgrade patch consumes less resources than the system upgrade patch.
目前,由于应用厂商通常会把公共特性功能打包到应用中,因此如果终端设备中有多个应用使用同一个公共特性功能,那么在启动这些应用的过程中,这个公共特性功能可能会被终端设备的操作系统重复加载多次,这样,使得终端设备的内存占用率比较高,从而影响终端设备的操作系统性能。At present, since application vendors usually package common feature functions into applications, if multiple applications in the terminal device use the same common feature function, the public feature function may be used by the terminal device during the process of starting these applications. The operating system is repeatedly loaded multiple times, so that the memory usage of the terminal device is relatively high, thereby affecting the operating system performance of the terminal device.
另外,目前在对应用升级时,由于是将修复问题的应用安装包和新增功能的应用安装包集合打包成一个系统升级补丁包对终端设备的操作系统升级,即该系统升级补丁包中可能包含多个应用安装包,并且每个应用安装包均是在类粒度升级应用的,因此使得系统升级补丁包占用的资源比较大,并且系统升级补丁包的发布周期较长,以及需要重启终端设备的操作系统才能升级,从而导致应用无法快速修复。In addition, when upgrading the application, the application installation package of the repair problem and the application package of the newly added function are packaged into a system upgrade package to upgrade the operating system of the terminal device, that is, the system upgrade package may be It contains multiple application installation packages, and each application installation package is applied in the class granularity upgrade. Therefore, the system upgrade patch package occupies a large amount of resources, and the system upgrade patch package has a long release period and needs to restart the terminal device. The operating system can be upgraded, resulting in an application that cannot be fixed quickly.
为了解决上述问题,一方面,本申请实施例提供一种加载应用的方法,在终端设备开机启动后,如果终端设备确定某个应用(例如本申请实施例中的第一应用)为实现公共特性功能的应用(该确定过程可以在终端设备开机启动后扫描该应用之前执行,也可以在终端设备开机启动后扫描该应用之后执行),那么终端设备可以采用系统类加载器将该应用加载到终端设备的内存。由于系统类加载器加载的应用为操作系统级别的应用,因此该操作系统中的其他应用可以共享已被加载到内存中的该应用,从而以使得共享该应用的其他应用启动后可以直接调用内存中的该应用,而在启动共享该应用的其他应用时无需再加载该应用,如此可以避免在启动共享该应用的其他应用时该应用被重复加载多次,能够降低终端设备的内存占用率,提升终端设备的操作系统性能。In order to solve the above problem, in one aspect, the embodiment of the present application provides a method for loading an application, after the terminal device is powered on, if the terminal device determines that an application (for example, the first application in the embodiment of the present application) implements common characteristics. The application of the function (the determination process may be performed before the terminal device scans the application after booting, or may be executed after the terminal device scans the application after booting), then the terminal device may load the application to the terminal by using a system class loader. The memory of the device. Since the application loaded by the system class loader is an operating system level application, other applications in the operating system can share the application that has been loaded into the memory, so that other applications sharing the application can directly call the memory after being started. The application in the application does not need to be loaded when launching other applications sharing the application, so that the application can be repeatedly loaded multiple times when starting other applications sharing the application, which can reduce the memory usage of the terminal device. Improve the operating system performance of the terminal device.
另一方面,本申请实施例提供一种升级应用的方法,在终端设备确定应用可以升级的情况下,终端设备通过向服务器发送升级补丁请求消息以向服务器请求升级补丁包,在终端设备接收到服务器发送的升级补丁包之后,终端设备采用该升级补丁包,在成员粒度直接升级该应用。一方面,由于终端设备向服务器请求的该升级补丁包是用于在成员粒度升级该应用的,因此,与现有技术中在类粒度(一个类包括多个成员)升级应用相比,本申请实施例中的升级补丁包更小,如此,可以降低升级补丁包占用的资源,并且可以缩短升级补丁包的发布周期,从而使得应用可以快速修复。另一方面,由于本申请实施例中是直接升级应用的,因此与现有技术中通过升级终端设备的操作系统升级应用相比,本申请实施例中升级应用后无需重启终端设备的操作系统,从而使得应用可以更快速地修复。On the other hand, the embodiment of the present application provides a method for upgrading an application. When the terminal device determines that the application can be upgraded, the terminal device sends an upgrade patch request message to the server to request an upgrade patch package from the server, and the terminal device receives the upgrade package. After the upgrade patch is sent by the server, the terminal device adopts the upgrade patch package and directly upgrades the application at the member granularity. On the one hand, since the upgrade patch package requested by the terminal device to the server is used to upgrade the application at the member granularity, the present application is compared with the prior art in the class granularity (one class includes multiple members) upgrade application. The upgrade patch package in the embodiment is smaller, so that the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the application can be quickly repaired. On the other hand, in the embodiment of the present application, the application of the terminal device is directly upgraded. Therefore, in the embodiment of the present application, the operating system of the terminal device is not required to be restarted after the application is upgraded. This allows the application to be fixed more quickly.
本申请实施例提供的加载应用的方法和升级应用的方法可以应用于终端设备,也可以应用于终端设备中能够实现加载应用和升级应用的功能模块或者功能实体,本申请实施例不作具体限定。The method for loading an application and the method for upgrading an application provided by the embodiments of the present application may be applied to a terminal device, and may also be applied to a function module or a functional entity in a terminal device that can implement a load application and an upgrade application, which is not specifically limited in this embodiment.
下面首先对本申请实施例提供的终端设备的硬件结构进行示例性的描述。The hardware structure of the terminal device provided by the embodiment of the present application is exemplarily described below.
具体的,以本申请实施例提供的终端设备是手机为例,结合图1对手机的各个构成部件做具体介绍。 Specifically, the terminal device provided by the embodiment of the present application is a mobile phone as an example, and various components of the mobile phone are specifically introduced in conjunction with FIG. 1 .
示例性的,如图1所示,本申请实施例提供的手机可以包括:处理器10、射频(radio frequency,RF)电路11、电源12、存储器13、输入模块14、显示模块15以及音频电路16等部件。本领域技术人员可以理解,图1中示出的手机的结构并不构成对手机的限定,其可以包括比如图1所示的部件更多或更少的部件,或者可以组合如图1所示的部件中的某些部件,或者可以与如图1所示的部件布置不同。For example, as shown in FIG. 1 , the mobile phone provided by the embodiment of the present application may include: a processor 10, a radio frequency (RF) circuit 11, a power source 12, a memory 13, an input module 14, a display module 15, and an audio circuit. 16 and other components. It will be understood by those skilled in the art that the structure of the mobile phone shown in FIG. 1 does not constitute a limitation to the mobile phone, and may include more or less components such as those shown in FIG. 1, or may be combined as shown in FIG. Some of the components may be different from the components shown in Figure 1.
处理器10是手机的控制中心,利用各种接口和线路连接整个手机的各个部分。通过运行或执行存储在存储器13内的软件程序和/或模块,以及调用存储在存储器13内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器10可包括一个或多个处理模块,例如,处理器10可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信等。可以理解的是,上述调制解调处理器也可以为与处理器10单独存在的处理器。The processor 10 is the control center of the handset, which connects various parts of the entire handset using various interfaces and lines. The mobile phone is monitored overall by running or executing software programs and/or modules stored in the memory 13, and recalling data stored in the memory 13, performing various functions and processing data of the mobile phone. Optionally, the processor 10 may include one or more processing modules. For example, the processor 10 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like; The modem processor mainly processes wireless communication and the like. It can be understood that the above-mentioned modem processor can also be a processor that exists separately from the processor 10.
RF电路11可用于在收发信息或通话过程中,接收和发送信号。例如,将基站的下行信息接收后,给处理器10处理;另外,将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)以及双工器等。此外,手机还可以通过RF电路11与网络中的其他设备实现无线通信。无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件以及短消息服务(short messaging service,SMS)等。The RF circuit 11 can be used to receive and transmit signals during transmission or reception of information or calls. For example, after the downlink information of the base station is received, it is processed by the processor 10; in addition, the uplink data is transmitted to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like. In addition, the mobile phone can also communicate wirelessly with other devices in the network through the RF circuit 11. Wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple Access, CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), e-mail, and short messaging service (SMS).
电源12可用于给手机的各个部件供电,电源12可以为电池。可选的,电源可以通过电源管理系统与处理器10逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power source 12 can be used to power various components of the handset, and the power source 12 can be a battery. Optionally, the power supply can be logically coupled to the processor 10 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
存储器13可用于存储软件程序和/或模块,处理器10通过运行存储在存储器13的软件程序和/或模块,从而执行手机的各种功能应用以及数据处理。存储器13可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器13可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件或其他易失性固态存储器件。The memory 13 can be used to store software programs and/or modules, and the processor 10 executes various functional applications and data processing of the mobile phone by running software programs and/or modules stored in the memory 13. The memory 13 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, image data, phone book, etc.). Further, the memory 13 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入模块14可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入模块14可包括触摸屏141以及其他输入设备142。触摸屏141,也称为触摸面板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏141上或在触摸屏141附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触摸屏141可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器10,并能接收处理器10发来的命 令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏141。其他输入设备142可以包括但不限于物理键盘、功能键(比如音量控制按键、电源开关按键等)、轨迹球、鼠标以及操作杆等中的一种或多种。The input module 14 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. In particular, input module 14 may include touch screen 141 and other input devices 142. The touch screen 141, also referred to as a touch panel, can collect touch operations on or near the user (such as the operation of the user using any suitable object or accessory on the touch screen 141 or near the touch screen 141 using a finger, a stylus, etc.), and The preset program drives the corresponding connection device. Alternatively, the touch screen 141 may include two parts of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. To the processor 10, and can receive the life sent by the processor 10 Order and implement it. In addition, the touch screen 141 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. Other input devices 142 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power switch buttons, etc.), trackballs, mice, and joysticks.
显示模块15可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示模块15可包括显示面板151。可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板151。进一步的,触摸屏141可覆盖显示面板151,当触摸屏141检测到在其上或附近的触摸操作后,传送给处理器10以确定触摸事件的类型,随后处理器10根据触摸事件的类型在显示面板151上提供相应的视觉输出。虽然在图1中,触摸屏141与显示面板151是作为两个独立的部件来实现手机的输入和输出功能,但是在某些实施例中,可以将触摸屏141与显示面板151集成而实现手机的输入和输出功能。The display module 15 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display module 15 can include a display panel 151. Optionally, the display panel 151 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch screen 141 may cover the display panel 151, and when the touch screen 141 detects a touch operation on or near it, transmits to the processor 10 to determine the type of the touch event, and then the processor 10 displays the panel according to the type of the touch event. A corresponding visual output is provided on 151. Although in FIG. 1, the touch screen 141 and the display panel 151 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch screen 141 can be integrated with the display panel 151 to implement the input of the mobile phone. And output function.
音频电路16、扬声器161和麦克风162,用于提供用户与手机之间的音频接口。一方面,音频电路16可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出。另一方面,麦克风162将收集的声音信号转换为电信号,由音频电路16接收后转换为音频数据,再将音频数据通过处理器10输出至RF电路11以发送给比如另一手机,或者将音频数据通过处理器10输出至存储器13以便进一步处理。The audio circuit 16, the speaker 161 and the microphone 162 are used to provide an audio interface between the user and the handset. In one aspect, the audio circuit 16 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to a sound signal output by the speaker 161. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 16 and converted into audio data, and then the audio data is output to the RF circuit 11 through the processor 10 for transmission to, for example, another mobile phone, or The audio data is output to the memory 13 by the processor 10 for further processing.
可选的,如图1所示的手机还可以包括各种传感器。例如陀螺仪传感器、湿度计传感器、红外线传感器、磁力计传感器等,在此不再赘述。Optionally, the mobile phone shown in FIG. 1 may further include various sensors. For example, a gyro sensor, a hygrometer sensor, an infrared sensor, a magnetometer sensor, and the like are not described herein.
可选的,如图1所示的手机还可以包括Wi-Fi模块、蓝牙模块等,在此不再赘述。Optionally, the mobile phone shown in FIG. 1 may further include a Wi-Fi module, a Bluetooth module, and the like, and details are not described herein again.
下面再以本申请实施例提供的加载应用和升级应用的方法应用于终端设备为例,介绍本申请实施例提供的加载应用和升级应用的方法。The method of loading an application and upgrading an application provided by the embodiment of the present application is applied to the terminal device as an example, and the method for loading the application and upgrading the application provided by the embodiment of the present application is introduced.
如图2所示,本申请实施例提供一种加载应用的方法,该方法可以包括下述的S101-S107。As shown in FIG. 2, the embodiment of the present application provides a method for loading an application, and the method may include the following S101-S107.
S101、终端设备开机启动。S101. The terminal device is powered on.
首先,终端设备开机启动。First, the terminal device is powered on.
S102、终端设备扫描第一应用。S102. The terminal device scans the first application.
终端设备开机启动后,依次扫描终端设备中的各个应用。该各个应用包括系统应用和第三方应用,通常,终端设备先扫描各个系统应用,然后再扫描各个第三方应用。After the terminal device is powered on, each application in the terminal device is scanned in sequence. The various applications include system applications and third-party applications. Generally, the terminal device scans various system applications first, and then scans each third-party application.
其中,本申请实施例中的第一应用可以为终端设备中的系统应用之一,也可以为终端设备中的第三方应用之一。具体的,可以根据实际使用需求确定,本申请实施例不作限定。The first application in the embodiment of the present application may be one of the system applications in the terminal device, or may be one of the third-party applications in the terminal device. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
S103、终端设备确定第一应用为实现公共特性功能的应用。S103. The terminal device determines that the first application is an application that implements a common feature function.
需要说明的是,本申请实施例可以不限定S102和S103的执行顺序。即本申请实施例可以先执行S102,后执行S103;也可以先执行S103,后执行S102;还可以同时执行S102和S103。具体的执行顺序将在下述实施例中对S103的描述中进行详细的地明。其中,图2是以S103在S102之后执行示意的。It should be noted that the embodiment of the present application may not limit the execution order of S102 and S103. That is, the embodiment of the present application may first execute S102, and then execute S103; or S103 may be performed first, then S102 may be performed; and S102 and S103 may be simultaneously executed. The specific execution order will be described in detail in the description of S103 in the following embodiments. 2 is schematically illustrated after S103 is executed after S102.
可选的,本申请实施例中,终端设备可以将公共特性功能设计为通过系统应用或者第三方应用实现,并将该系统应用或者第三方应用预置到终端设备的操作系统的目 录下,这样,在终端设备开机启动后,终端设备通过扫描各个系统应用或者第三方应用就可以扫描到该公共特性功能。Optionally, in the embodiment of the present application, the terminal device may design the public feature function to be implemented by using a system application or a third-party application, and preset the system application or the third-party application to the operating system of the terminal device. Recorded, in this way, after the terminal device is powered on, the terminal device can scan the common feature function by scanning each system application or a third-party application.
可选的,本申请实施例中,公共特性功能可以为美颜功能、动画特效功能、定位功能、搜索功能、人脸识别功能、指纹识别功能、计时功能、翻译功能、播放功能以及语音功能等被多个应用共享的功能。Optionally, in the embodiment of the present application, the public feature function may be a beauty function, an animation special effect function, a positioning function, a search function, a face recognition function, a fingerprint recognition function, a timing function, a translation function, a play function, a voice function, and the like. A feature that is shared by multiple applications.
可以理解,上述公共特性功能的列举是示例性的列举,具体可以根据实际使用情况确定,本申请实施例不作限定。It is to be understood that the enumeration of the above-mentioned common characteristic functions is exemplified, and may be determined according to the actual use, which is not limited in the embodiment of the present application.
可选的,本申请实施例中,上述S103中,终端设备确定第一应用为实现公共特性功能的应用的方法可以为下述的一种:Optionally, in the foregoing application, in the foregoing S103, the method that the terminal device determines that the first application is an application that implements a common feature function may be one of the following:
(1)终端设备根据预定义的公共特性功能列表中包括的第一应用的标识,确定第一应用为实现公共特性功能的应用。(1) The terminal device determines, according to the identifier of the first application included in the predefined common feature function list, that the first application is an application that implements a common feature function.
可以理解,在(1)中,本申请实施例可以先执行S103,后执行S102。具体的,在执行S102时,如果终端设备确定当前扫描的应用为第一应用,即终端设备当前扫描第一应用,那么终端设备可以继续执行下述的S104。It can be understood that, in (1), the embodiment of the present application may first execute S103, and then execute S102. Specifically, when the S102 is executed, if the terminal device determines that the currently scanned application is the first application, that is, the terminal device currently scans the first application, the terminal device may continue to execute S104 described below.
(2)终端设备查询预定义的公共特性功能列表中是否包括第一应用的标识;在该公共特性功能列表中包括第一应用的标识的情况下,终端设备确定第一应用为实现公共特性功能的应用;在该公共特性功能列表中不包括第一应用的标识的情况下,终端设备确定第一应用不是实现公共特性功能的应用。(2) The terminal device queries whether the identifier of the first application is included in the predefined public feature function list; if the public feature function list includes the identifier of the first application, the terminal device determines that the first application is a public feature If the identifier of the first application is not included in the public feature function list, the terminal device determines that the first application is not an application that implements the public feature function.
可以理解,在(2)中,本申请实施例可以先执行S102,后执行S103。具体的,在执行S102时,如果终端设备确定当前扫描的第一应用的标识在预定义的公共特性功能列表中,那么终端设备可以确定第一应用为实现公共特性功能的应用,此时终端设备可以继续执行下述的S104。It can be understood that, in (2), the embodiment of the present application may first execute S102, and then execute S103. Specifically, when performing S102, if the terminal device determines that the identifier of the currently scanned first application is in the predefined common feature function list, the terminal device may determine that the first application is an application that implements a common feature function, and the terminal device at this time The following S104 can be continued.
本申请实施例中,可以预定义一个公共特性功能列表,并将实现各个公共特性功能的应用的标识,例如第一应用的标识添加到该公共特性功能列表中。该公共特性功能列表可以预置到终端设备的操作系统的目录下。这样,在上述(1)中,终端设备可以通过读取公共特性功能列表中包括的各个应用(包括第一应用)的标识,确定第一应用为实现公共特性功能的应用;在上述(2)中,终端设备可以通过查询公共特性功能列表中是否包括当前扫描的应用(例如第一应用)的标识,确定第一应用是否为实现公共特性功能的应用。In this embodiment, a public feature function list may be predefined, and an identifier of an application that implements each common feature function, such as an identifier of the first application, is added to the public feature function list. The list of public feature functions can be preset to the directory of the operating system of the terminal device. Thus, in the above (1), the terminal device may determine that the first application is an application that implements a common feature function by reading an identifier of each application (including the first application) included in the common feature function list; The terminal device may determine whether the first application is an application that implements a common feature function by querying whether the public feature function list includes an identifier of the currently scanned application (eg, the first application).
可以理解,上述公共特性功能列表只是示例性的说明,实际实现时,还可以通过配置文件等方式实现。具体的,可以根据实际使用需求确定,本申请实施例不作限定。It can be understood that the foregoing public feature function list is only an exemplary description. In actual implementation, it can also be implemented by using a configuration file or the like. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
下面以上述列举的几种公共特性功能为例,结合表1对本申请实施例提供的公共特性功能进行描述。 The common characteristic functions provided by the embodiments of the present application are described below with reference to Table 1 as an example.
表1Table 1
应用的标识Application identifier 公共特性功能Public feature
APP1APP1 美颜功能Beauty function
APP2APP2 动画特效功能Animation effects
APP3APP3 定位功能GPS
APP4APP4 搜索功能searching feature
APP5APP5 人脸识别功能Face recognition function
APP6APP6 指纹识别功能Fingerprint recognition
APP7APP7 计时功能Timing function
APP8APP8 翻译功能Translation function
APP9APP9 播放功能Playback function
APP10APP10 语音功能Voice function
如表1所示的公共特性功能列表中,实际实现时,表1可以只包括应用的标识,即表1中的公共特性功能一栏是对系统应用实现的公共特性功能的解释。实际实现时,可以预先定义好各个应用具体用于实现哪一个公共特性功能。这样,终端设备可以通过读取预定义的公共特性功能列表中的某个应用的标识确定该应用为实现公共特性功能的应用;或者在终端设备扫描某个应用时,如果终端设备在预定义的公共特性功能列表中查找到该应用的标识,那么终端设备可以确定该应用为实现公共特性功能的应用。As shown in the common feature list shown in Table 1, in actual implementation, Table 1 may only include the identifier of the application, that is, the column of the common feature in Table 1 is an explanation of the common feature function implemented by the system application. In actual implementation, it is possible to pre-define which common feature functions are specifically implemented by each application. In this way, the terminal device can determine that the application is an application that implements a common feature function by reading an identifier of an application in the predefined common feature function list; or when the terminal device scans an application, if the terminal device is in a predefined The identifier of the application is found in the public feature function list, and the terminal device can determine that the application is an application that implements a common feature function.
示例性的,结合表1,以S103在S102之后执行为例,假设公共特性功能是APP3实现的定位功能,在终端设备扫描APP3时,如果终端设备在表1中查找到APP3的标识(例如为APP3),那么终端设备可以确定APP3为实现公共特性功能的应用。具体的,终端设备在扫描APP3的过程中,通过解析APP3的各个资源和各个属性,可以确定APP3具体为实现定位功能的应用。Exemplarily, in conjunction with Table 1, taking S103 to perform after S102 as an example, assuming that the common feature function is the positioning function implemented by APP3, when the terminal device scans APP3, if the terminal device finds the identifier of APP3 in Table 1, for example APP3), then the terminal device can determine that APP3 is an application that implements common feature functions. Specifically, in the process of scanning the APP3, the terminal device can determine that the APP3 is specifically used to implement the positioning function by parsing each resource and each attribute of the APP3.
可以理解,本申请实施例中,对于上述表1中的其他公共特性功能,其确定方法可以与上述列举的APP3的确定方法类似,此处不再一一列举。It can be understood that, in the embodiment of the present application, the determining method of the other common characteristic functions in the foregoing Table 1 may be similar to the determining method of the APP3 listed above, and will not be enumerated here.
可选的,本申请实施例中,上述第一应用的标识能够唯一标识第一应用。该第一应用的标识可以为第一应用的名称,也可以为第一应用安装的地址,还可以为其他能够唯一标识第一应用的数字、汉字、字母、字符、字符串以及序列号等中的一个或者多个的组合。具体的,可以根据实际使用需求设定,本申请实施例不作限定。Optionally, in the embodiment of the present application, the identifier of the foregoing first application is capable of uniquely identifying the first application. The identifier of the first application may be the name of the first application, or the address installed by the first application, and may also be other numbers, Chinese characters, letters, characters, strings, serial numbers, etc. that can uniquely identify the first application. One or more combinations. Specifically, it can be set according to the actual use requirement, and the embodiment of the present application is not limited.
(3)终端设备读取第一应用的第一属性,第一属性用于指示第一应用是否为实现公共特性功能的应用;在第一属性指示第一应用为实现公共特性功能的应用的情况下,终端设备确定第一应用为实现公共特性功能的应用;在第一属性指示第一应用不是实现公共特性功能的应用的情况下,终端设备确定第一应用不是实现公共特性功能的应用。(3) The terminal device reads the first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature function; and the first attribute indicates that the first application is an application that implements a common feature function. The terminal device determines that the first application is an application that implements a common feature function. In a case where the first attribute indicates that the first application is not an application that implements a common feature function, the terminal device determines that the first application is not an application that implements a common feature function.
可以理解,由于第一应用的属性是在扫描第一应用的过程中解析出来的,因此在(3)中,本申请实施例可以先执行S102,后执行S103。It can be understood that, because the attribute of the first application is parsed in the process of scanning the first application, in (3), the embodiment of the present application may first execute S102, and then execute S103.
本申请实施例中,每个应用都有很多属性,其中,多个属性中的第一属性可以用于指示该应用是否为实现公共特性功能的应用。这样,终端设备可以通过读取每个应 用的第一属性,确定所读取的应用是否为实现公共特性功能的应用。In this embodiment of the present application, each application has a plurality of attributes, wherein the first one of the multiple attributes may be used to indicate whether the application is an application that implements a common feature function. In this way, the terminal device can read each by reading The first attribute used determines whether the read application is an application that implements a common feature function.
可选的,以本申请实施例中的第一应用为例,上述第一属性可以为第一应用的资源库(library)属性,由于资源库属性通常可以被各个应用共享,因此本申请实施例可以通过设置第一应用的资源库属性来指示第一应用是否为实现公共特性功能的应用。Optionally, in the first application in the embodiment of the present application, the first attribute may be a resource attribute of the first application, and the resource library attribute may be shared by each application. The first application's resource library attribute can be set to indicate whether the first application is an application that implements a common feature function.
具体的,该资源库属性中包括名称(name)字段,本申请实施例可以通过将资源库属性中的名称字段设置为应用的名称,以使得该应用可以被其他各个应用共享,即使得该应用实现的功能为一个公共特性功能。即仍以本申请实施例中的第一应用为例,可以通过将第一应用的资源库属性中的名称字段设置为第一应用的名称,以使得第一应用可以被其他各个应用共享,即使得第一应用实现的功能为一个公共特性功能。Specifically, the resource library attribute includes a name field. The embodiment of the present application may set the name field in the resource library attribute to the name of the application, so that the application can be shared by other applications, that is, the application is made. The implemented functionality is a common feature. That is, the first application in the embodiment of the present application is used as an example, and the name field in the resource library attribute of the first application may be set as the name of the first application, so that the first application can be shared by other applications, even if The function implemented by the first application is a common feature function.
示例性的,以上述列举的公共特性功能中的美颜功能为例,本申请实施例中,可以通过将实现美颜功能的应用的资源库属性中的名称字段设置为该应用的名称,从而以使得该应用可以被其他各个应用共享,即使得该应用实现的美颜功能为一个公共特性功能。For example, in the embodiment of the present application, the name field in the resource library attribute of the application that implements the beauty function can be set as the name of the application, So that the application can be shared by other applications, that is, the beauty function implemented by the application is a common feature function.
需要说明的是,本申请实施例中,上述应用的名称也可以为上述列举的能够唯一标识该应用的其他标识。对于应用的标识的描述具体可以参见上述(1)中对应用的标识的相关描述,此处不再赘述。It should be noted that, in the embodiment of the present application, the name of the application may also be the other identifiers listed above that can uniquely identify the application. For the description of the identifier of the application, refer to the description of the identifier of the application in (1) above, and details are not described herein again.
本申请实施例中,如果终端设备确定第一应用为实现公共特性功能的应用,那么终端设备可以继续执行下述的S104和S105。In the embodiment of the present application, if the terminal device determines that the first application is an application that implements a common feature function, the terminal device may continue to execute S104 and S105 described below.
本申请实施例中,由于终端设备扫描某个应用后,通常默认采用路径类加载器加载该应用,因此如果终端设备确定第一应用不是实现公共特性功能的应用,也就是说第一应用是普通应用,其无需全局加载,那么终端设备可以默认采用路径类加载器将该第一应用加载到终端设备的内存。In the embodiment of the present application, after the terminal device scans an application, the path class loader is generally used to load the application by default. Therefore, if the terminal device determines that the first application is not an application that implements a common feature function, that is, the first application is common. The application does not need to be globally loaded, and the terminal device can load the first application into the memory of the terminal device by using the path class loader by default.
需要说明的是,本申请实施例中,每个应用都包括多个类,以第一应用为例,第一应用也包括多个类,上述终端设备采用路径类加载器将第一应用加载到终端设备的内存是指终端设备将第一应用的多个类的类名加载到终端设备的内存(这个过程也称为预加载),在具体使用第一应用的时候,终端设备才将多个类的内容加载到内存。It should be noted that, in this embodiment of the present application, each application includes multiple classes, and the first application is used as an example. The first application also includes multiple classes. The terminal device uses the path class loader to load the first application into the application. The memory of the terminal device means that the terminal device loads the class name of the multiple classes of the first application into the memory of the terminal device (this process is also called preloading), and when the first application is specifically used, the terminal device will be multiple. The contents of the class are loaded into memory.
S104、终端设备采用系统类加载器将第一应用加载到终端设备的内存。S104. The terminal device loads the first application into the memory of the terminal device by using a system class loader.
本申请实施例中,由于系统类加载器加载的内容通常为操作系统级别,即系统类加载器加载的内容可以被操作系统下的所有应用共享,因此,本申请实施例采用系统类加载器加载公共特性功能,可以使得已被加载的该公共特性功能被终端设备中的所有应用共享,从而实现该公共特性功能被全局加载的目的。In the embodiment of the present application, the content loaded by the system class loader is usually an operating system level, that is, the content loaded by the system class loader can be shared by all the applications under the operating system. Therefore, the embodiment of the present application uses the system class loader to load. The common feature function can make the common feature function that has been loaded shared by all applications in the terminal device, thereby achieving the purpose that the common feature function is globally loaded.
可以理解,在S104中,终端设备也是将第一应用的多个类的类名加载到终端设备的内存(这个过程也称为预加载),并在具体使用第一应用的时候,终端设备才将多个类的内容加载到内存。It can be understood that, in S104, the terminal device also loads the class name of the multiple classes of the first application into the memory of the terminal device (this process is also referred to as preloading), and when the first application is specifically used, the terminal device only Load the contents of multiple classes into memory.
可以理解,本申请实施例中,上述S102-S104是以终端设备扫描和确定实现一个公共特性功能的一个应用(即上述的第一应用)为例说明的,对于终端设备中实现其他公共特性功能的其他应用,终端设备扫描和确定的方法均与终端设备扫描和确定上述第一应用的方法类似,本申请实施例不作具体限定。It can be understood that, in the embodiment of the present application, the foregoing S102-S104 is described by taking an example of the terminal device scanning and determining an application that implements a common characteristic function (that is, the first application described above) as an example, and implementing other common characteristic functions in the terminal device. For other applications, the method for scanning and determining the terminal device is similar to the method for the terminal device to scan and determine the first application, which is not specifically limited in this embodiment.
S105、终端设备依次扫描其他各个应用。 S105. The terminal device sequentially scans other applications.
其中,S105中的各个应用可以包括系统应用和第三方应用。Each application in S105 may include a system application and a third-party application.
可以理解,如果S101-S104中的第一应用为系统应用,那么本申请实施例可以先执行S101-S104,后执行S105;并且在执行S105时,可以先扫描除第一应用之外的其他系统应用,然后再扫描所有的第三方应用。如果S101-S104中的第一应用为第三方应用,那么本申请实施例可以先执行S105扫描所有的系统应用,再执行S101-S104,然后再执行S105扫描除第一应用之外的其他第三方应用。其中,图2是以S105在S101-S104之后执行为例示意的。It can be understood that, if the first application in the S101-S104 is a system application, the embodiment of the present application may first execute S101-S104, and then execute S105; and when executing S105, may scan other systems except the first application. Apply and then scan all third-party apps. If the first application in the S101-S104 is a third-party application, the embodiment of the present application may first perform S105 to scan all system applications, then execute S101-S104, and then perform S105 to scan other third parties except the first application. application. 2 is an example of S105 being executed after S101-S104.
本申请实施例提供的加载应用的方法,在终端设备开机启动后,如果终端设备确定某个应用(例如本申请实施例中的第一应用)为实现公共特性功能的应用(该确定过程可以在终端设备开机启动后扫描该应用之前执行,也可以在终端设备开机启动后扫描该应用之后执行),那么终端设备可以采用系统类加载器将该第一应用加载到终端设备的内存。由于系统类加载器加载的第一应用为操作系统级别的应用,因此该操作系统中的其他应用可以共享已被加载到内存中的该第一应用,从而以使得共享该第一应用的其他应用启动后可以直接调用内存中的该第一应用,而在启动共享该第一应用的其他应用时无需再加载该第一应用,如此可以避免在启动共享该第一应用的其他应用时该第一应用被重复加载多次,能够降低终端设备的内存占用率,提升终端设备的操作系统性能。The method for loading an application provided by the embodiment of the present application, after the terminal device is powered on, if the terminal device determines that an application (for example, the first application in the embodiment of the present application) is an application for implementing a common characteristic function (the determining process may be After the terminal device is booted, the application is executed before scanning the application, or after the terminal device is booted and the application is scanned, the terminal device may load the first application into the memory of the terminal device by using a system class loader. Since the first application loaded by the system class loader is an operating system level application, other applications in the operating system can share the first application that has been loaded into the memory, so that other applications sharing the first application are shared. After the startup, the first application in the memory can be directly invoked, and the first application does not need to be loaded when starting other applications sharing the first application, so that the first application can be avoided when starting other applications sharing the first application. The application is repeatedly loaded multiple times, which can reduce the memory usage of the terminal device and improve the operating system performance of the terminal device.
可选的,结合图2,如图3所示,在上述S105之后,本申请实施例提供的加载应用的方法还可以包括下述的S106-S111。Optionally, in conjunction with FIG. 2, as shown in FIG. 3, after the foregoing S105, the method for loading an application provided by the embodiment of the present application may further include the following S106-S111.
S106、终端设备启动第二应用。S106. The terminal device starts the second application.
其中,第二应用可以为终端设备中调用第一应用的应用(即第二应用为终端设备中使用第一应用实现的公共特性功能的应用),也可以为终端设备中没有调用第一应用的应用(即第二应用为终端设备中没有使用第一应用实现的公共特性功能的应用)。The second application may be an application that invokes the first application in the terminal device, that is, the second application is an application that uses the common feature implemented by the first application in the terminal device, or may not be the first application in the terminal device. The application (ie, the second application is an application in the terminal device that does not use the common feature function implemented by the first application).
S107、终端设备创建第二应用的路径类加载器。S107. The terminal device creates a path class loader of the second application.
由于通常情况下,终端设备是默认采用路径类加载器加载应用的,因此在终端设备启动第二应用时,终端设备首先创建第二应用的路径类加载器。Since the terminal device loads the application by default using the path class loader, when the terminal device starts the second application, the terminal device first creates a path class loader of the second application.
S108、终端设备确定第二应用是否为终端设备中调用第一应用的应用。S108. The terminal device determines whether the second application is an application that invokes the first application in the terminal device.
本申请实施例中,如果终端设备确定第二应用为终端设备中没有调用第一应用的应用,那么终端设备可以继续执行下述的S109;如果终端设备确定第二应用为终端设备中调用第一应用的应用,那么终端设备可以继续执行下述的S110和S111。In the embodiment of the present application, if the terminal device determines that the second application is an application that does not invoke the first application in the terminal device, the terminal device may continue to perform the following S109; if the terminal device determines that the second application is the first in the terminal device, The application of the application, the terminal device can continue to execute S110 and S111 described below.
S109、终端设备采用路径类加载器将第二应用加载到终端设备的内存。S109. The terminal device loads the second application into the memory of the terminal device by using a path class loader.
下面实施例以第二应用为终端设备中调用第一应用的应用为例,对第一应用和第二应用进行示例性的说明。The following embodiment exemplifies the first application and the second application by taking the application that invokes the first application in the terminal device as an example.
可以理解,本申请实施例中,如果第二应用为终端设备中调用第一应用的应用,那么可以在第二应用中预置第一应用的标识(例如第一应用的名称),这样,终端设备可以通过预置在第二应用中的标识调用第一应用,从而为用户提供第一应用实现的公共特性功能。并且,由于第二应用中预置的是第一应用的标识,并不是第一应用的实现代码,因此终端设备在加载第二应用时无需再加载第一应用。It can be understood that, in the embodiment of the present application, if the second application is an application that invokes the first application in the terminal device, the identifier of the first application (for example, the name of the first application) may be preset in the second application, such that the terminal The device may invoke the first application by using an identifier preset in the second application, thereby providing the user with a common feature function implemented by the first application. Moreover, since the identifier of the first application is preset in the second application, and is not the implementation code of the first application, the terminal device does not need to load the first application when loading the second application.
示例性的,以上述S103中列举的公共特性功能为例,假设第一应用实现的公共特 性功能为美颜功能,那么第二应用可以为使用美颜功能的任意应用,例如第二应用可以为相机类应用、健康类应用或者运动类应用等。Exemplarily, taking the common characteristic function listed in the above S103 as an example, assuming that the first application implements a common special The sexual function is a beauty function, and the second application can be any application that uses the beauty function, for example, the second application can be a camera application, a health application, or a sports application.
又假设第一应用实现的公共特性功能为动画特效功能,那么第二应用可以为使用动画特效功能的任意应用,例如第二应用可以为相机类应用、地图类应用、天气类应用、购物类应用、运动类应用、媒体类应用、浏览器类应用或者健康类应用等。It is also assumed that the common feature function implemented by the first application is an animation special effect function, and then the second application may be any application that uses the animation special effects function, for example, the second application may be a camera application, a map application, a weather application, a shopping application. , sports applications, media applications, browser applications or health applications.
又假设第一应用实现的公共特性功能为定位功能,那么第二应用可以为使用定位功能的任意应用,例如第二应用可以为地图类应用、天气类应用、购物类应用或者运动类应用等。It is also assumed that the common feature function implemented by the first application is a positioning function, and the second application may be any application that uses the positioning function, for example, the second application may be a map application, a weather application, a shopping application, or a sports application.
又假设第一应用实现的公共特性功能为搜索功能,那么第二应用可以为使用搜索功能的任意应用,例如第二应用可以为媒体类应用、阅读类应用或者浏览器类应用等。It is also assumed that the common feature function implemented by the first application is a search function, and the second application may be any application that uses the search function, for example, the second application may be a media application, a reading application, or a browser application.
又假设第一应用实现的公共特性功能为人脸识别功能,那么第二应用可以为使用人脸识别功能的任意应用,例如第二应用可以为相机类应用、支付类应用、健康类应用、运动类应用或者银行类应用等。Assuming that the common feature function implemented by the first application is a face recognition function, the second application may be any application that uses the face recognition function, for example, the second application may be a camera application, a payment application, a health application, or a sports application. Application or banking applications, etc.
又假设第一应用实现的公共特性功能为指纹识别功能,那么第二应用可以为使用指纹识别功能的任意应用,例如第二应用可以为锁屏类应用、支付类应用或者安全隐私工具类应用等。Assuming that the public feature function implemented by the first application is a fingerprint recognition function, the second application may be any application that uses the fingerprint recognition function, for example, the second application may be a lock screen application, a payment application, or a security privacy tool application. .
又假设第一应用实现的公共特性功能为计时功能,那么第二应用可以为使用计时功能的任意应用,例如第二应用可以为时钟类应用、出行类应用、健康类应用、运动类应用或者邮箱类应用等。Assuming that the common feature function implemented by the first application is a timing function, the second application may be any application that uses the timing function, for example, the second application may be a clock application, a travel application, a health application, a sports application, or a mailbox. Class applications, etc.
又假设第一应用实现的公共特性功能为翻译功能,那么第二应用可以为使用翻译功能的任意应用,例如第二应用可以为阅读类应用或者学习类应用等。It is also assumed that the common feature function implemented by the first application is a translation function, and the second application may be any application that uses the translation function, for example, the second application may be a reading application or a learning application.
又假设第一应用实现的公共特性功能为播放功能,那么第二应用可以为使用播放功能的任意应用,例如第二应用可以为购物类应用、媒体类应用或者浏览器类应用等。It is also assumed that the common feature implemented by the first application is a play function, and the second application may be any application that uses the play function, for example, the second application may be a shopping application, a media application, or a browser application.
又假设第一应用实现的公共特性功能为语音功能,那么第二应用可以为使用语音功能的任意应用,例如第二应用可以为地图类应用、媒体类应用、浏览器类应用或者社交类应用等。Assuming that the public feature function implemented by the first application is a voice function, the second application may be any application that uses the voice function, for example, the second application may be a map application, a media application, a browser application, or a social application. .
可以理解,本申请实施例中,上述例子中列举的某些第二应用可以为系统应用,也可以为第三方应用。例如,上述相机类应用可以为系统相机类应用或者第三方相机类应用;上述地图类应用可以为系统地图类应用或者第三方地图类应用;上述天气类应用可以为系统天气类应用或者第三方天气类应用等,具体的可以根据实际情况确定,本申请实施例不作限定。It can be understood that, in the embodiment of the present application, some of the second applications listed in the foregoing examples may be system applications or third party applications. For example, the camera application may be a system camera application or a third party camera application; the map application may be a system map application or a third party map application; the weather application may be a system weather application or a third party weather. The application of the application, etc., may be determined according to the actual situation, and the embodiment of the present application is not limited.
S110、终端设备设置第二应用的路径类加载器的父类加载器为系统类加载器。S110. The terminal device sets the parent class loader of the path class loader of the second application as a system class loader.
本申请实施例中,根据类加载的双亲委派机制,终端设备在加载类时首先采用系统类加载器查找要加载的类,如果系统类加载器没有查找到要加载的类,那么才由应用的路径类加载器查找和加载。依据这个原理,由于上述S104中,终端设备在预加载第一应用时是采用系统类加载器加载的,因此为了使得第二应用启动后,终端设备可以基于第二应用查找到第一应用,即使得第二应用能够通过调用第一应用正常为用户提供第一应用实现的公共特性功能,那么本申请实施例中,终端设备在创建第二应用的路径类加载器之后,终端设备可以将路径类加载器的父类加载器设置为系统类加载 器,以使得终端设备可以根据类加载的双亲委派机制,直接采用系统类加载器将第二应用加载到终端设备的内存。即如下述S111所述,终端设备采用系统类加载器将第二应用加载到终端设备的内存。In the embodiment of the present application, according to the parental delegation mechanism of the class loading, the terminal device first uses the system class loader to find the class to be loaded when the class is loaded, and if the system class loader does not find the class to be loaded, then the application class The path class loader finds and loads. According to this principle, in the above S104, the terminal device is loaded by the system class loader when the first application is preloaded. Therefore, after the second application is started, the terminal device can find the first application based on the second application, even if In the embodiment of the present application, after the path device loader of the second application is created, the terminal device may use the path class after the second application is configured to provide the first application with the common application function. The loader's parent class loader is set to system class loading So that the terminal device can directly load the second application into the memory of the terminal device by using the system class loader according to the parental delegation mechanism of the class loading. That is, as described in the following S111, the terminal device loads the second application into the memory of the terminal device by using the system class loader.
S111、终端设备采用系统类加载器将第二应用加载到终端设备的内存。S111. The terminal device loads the second application into the memory of the terminal device by using a system class loader.
本申请实施例中,终端设备采用系统类加载器将第二应用加载到终端设备的内存,能够使得第二应用启动后,终端设备可以基于第二应用查找到第一应用(第一应用也是通过系统类加载器加载到终端设备的内存的),即使得第二应用能够通过调用第一应用正常为用户提供第一应用实现的公共特性功能。In the embodiment of the present application, the terminal device uses the system class loader to load the second application into the memory of the terminal device, so that after the second application is started, the terminal device can find the first application based on the second application. The system class loader is loaded into the memory of the terminal device, that is, the second application can normally provide the user with the common feature function implemented by the first application by calling the first application.
示例性的,仍以第一应用实现上述美颜功能,第二应用是相机类应用为例,终端设备采用系统类加载器加载实现美颜功能的第一应用和调用第一应用的相机类应用之后,终端设备可以基于相机类应用查找到实现美颜功能的第一应用,从而保证相机类应用能够通过调用第一应用正常为用户提供第一应用实现的美颜功能。Exemplarily, the above-mentioned beauty function is still implemented by the first application, and the second application is a camera application, and the terminal device uses the system class loader to load the first application that implements the beauty function and the camera application that invokes the first application. Afterwards, the terminal device can find the first application that implements the beauty function based on the camera-type application, thereby ensuring that the camera-type application can normally provide the user with the beauty function implemented by the first application by calling the first application.
下面以图4为例介绍一下本申请实施例中的各种类加载器。如图4所示,为本申请实施例提供的终端设备中的各种类加载器之间的关系示意图。在图4中,路径类加载器的父类加载器(图4中表示为父)为系统类加载器或者根类加载器(默认情况下,路径类加载器的父类加载器为根类加载器),系统类加载器的父类加载器为根类加载器。路径类加载器用于加载普通应用(例如如图4中的music.apk和Bluetooth.apk,music.apk表示安卓操作系统中的音乐安装包,Bluetooth.apk表示安卓操作系统中的蓝牙安装包)和系统服务(例如如图4中的services.jar,services.jar表示安卓操作系统中的一个服务)等。系统类加载器用于加载实现公共特性功能的应用,如本申请实施例中的第一应用(例如如图4中的feature.apk,feature.apk表示安卓操作系统中的公共特性功能)。根类加载器用于加载安卓操作系统的系统框架,如安卓操作系统中的核心库层(例如如图4中的libcore.jar)和框架层(例如如图4中的framework.jar)等。The various class loaders in the embodiments of the present application will be described below by taking FIG. 4 as an example. As shown in FIG. 4, it is a schematic diagram of relationships between various class loaders in a terminal device provided by an embodiment of the present application. In Figure 4, the parent class loader of the path class loader (represented as parent in Figure 4) is the system class loader or the root class loader (by default, the parent class loader of the path class loader loads the root class) The parent class loader of the system class loader is the root class loader. The path class loader is used to load normal applications (for example, music.apk and Bluetooth.apk in Figure 4, music.apk for music installation package in Android OS, Bluetooth.apk for Bluetooth installation package in Android OS) and System services (such as services.jar in Figure 4, services.jar represents a service in the Android operating system) and so on. The system class loader is used to load an application that implements the common feature function, such as the first application in the embodiment of the present application (for example, feature.apk in FIG. 4, feature.apk represents a common feature function in the Android operating system). The root class loader is used to load the system framework of the Android operating system, such as the core library layer in the Android operating system (for example, libcore.jar in FIG. 4) and the framework layer (for example, the framework.jar in FIG. 4).
可选的,结合图2,在上述S105之后,本申请实施例提供的加载应用的方法还可以包括下述的S112-S117。Optionally, in conjunction with FIG. 2, after the foregoing S105, the method for loading an application provided by the embodiment of the present application may further include the following S112-S117.
S112、终端设备向服务器发送升级补丁请求消息。S112. The terminal device sends an upgrade patch request message to the server.
S113、服务器接收终端设备发送的升级补丁请求消息。S113. The server receives an upgrade patch request message sent by the terminal device.
本申请实施例中,一种可能的实现方式是,当终端设备确定终端设备中运行的应用,例如本申请实施例中的第三应用出现异常时,终端设备确定升级该第三应用,此时终端设备可以触发执行S112-S117。In the embodiment of the present application, a possible implementation manner is: when the terminal device determines that the application running in the terminal device is abnormal, for example, the third application in the embodiment of the present application is abnormal, the terminal device determines to upgrade the third application. The terminal device can trigger execution of S112-S117.
另一种可能的实现方式是,终端设备可以以预定义的第一时间为周期,定时检查服务器上是否有应用,例如本申请实施例中的第三应用的升级补丁包,当终端设备确定服务器上有该第三应用的升级补丁包时,终端设备确定升级该第三应用,此时终端设备可以触发执行S112-S117。Another possible implementation manner is that the terminal device can periodically check whether there is an application on the server, such as the upgrade patch package of the third application in the embodiment of the present application, when the terminal device determines the server. When there is an upgrade patch package of the third application, the terminal device determines to upgrade the third application, and the terminal device may trigger execution of S112-S117.
可选的,上述另一种可能的实现方式中,预定义的第一时间可以为预定义的任意时间,例如一天、一周或者一个月等,具体的可以根据实际使用需求定义,本申请实施例不作限定。Optionally, in another possible implementation manner, the predefined first time may be any predefined time, such as one day, one week, or one month, and the like, which may be defined according to actual usage requirements. Not limited.
其中,该升级补丁请求消息用于向服务器请求升级补丁包。该升级补丁包用于在成员粒度直接升级第三应用,第三应用为终端设备中的系统应用。 The upgrade patch request message is used to request an upgrade patch package from the server. The upgrade patch package is used to directly upgrade the third application at the member granularity, and the third application is a system application in the terminal device.
由于第三方应用通常可以从应用商店(APP store)下载,因此本申请实施例中的第三应用主要是指系统应用。The third application in the embodiment of the present application mainly refers to a system application, because the third-party application can be downloaded from the application store.
本申请实施例中,每个应用包括多个类,每个类包括多个成员。上述升级补丁包中可以包括至少一个成员,其中,当成员数量为多个时,多个成员可以是不同类中的成员。本申请实施例中,在采用上述升级补丁包升级第三应用的时候,可以在成员粒度升级第三应用,即可以只对需要升级的成员进行升级即可,无需再对这些成员所在的整个类进行升级。例如,可以用升级补丁包中的一个成员替换第三应用中需要修复的成员,和/或在第三应用中新增升级补丁包中的一个成员。与现有技术中在类粒度升级应用相比,本申请实施例中的升级补丁包更小,如此,可以降低升级补丁包占用的资源,并且可以缩短升级补丁包的发布周期,进而使得第三应用可以快速修复。In the embodiment of the present application, each application includes multiple classes, and each class includes multiple members. The above upgrade patch package may include at least one member, wherein when the number of members is plural, the plurality of members may be members of different classes. In the embodiment of the present application, when the third application is upgraded by using the foregoing upgrade package, the third application may be upgraded in the member granularity, that is, only the members that need to be upgraded may be upgraded, and the entire class of the members is not required. Upgrade. For example, a member of the third application that needs to be repaired may be replaced with one member of the upgrade patch package, and/or a member of the upgrade patch package may be added to the third application. The upgrade patch package in the embodiment of the present application is smaller than that in the prior art, and the resource occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, thereby making the third The app can be fixed quickly.
另外,由于本申请实施例中是直接升级第三应用的,因此与现有技术通过升级终端设备的操作系统升级应用相比,本申请实施例中升级第三应用后无需重启终端设备的操作系统,从而使得第三应用可以更快速地修复。In addition, since the third application is directly upgraded in the embodiment of the present application, the operating system of the terminal device is not required to be restarted after upgrading the third application in the embodiment of the present application. So that the third application can be repaired more quickly.
可选的,本申请实施例中,该升级补丁请求消息中可以包括第三应用的当前版本信息。该第三应用的当前版本信息能够唯一标识该第三应用的当前版本。该第三应用的当前版本信息可以为数字、汉字、字母、字符串以及序列号等中的一个或者多个的组合。具体的,可以根据实际使用需求确定,本申请实施例不作限定。Optionally, in the embodiment of the present application, the upgrade patch request message may include current version information of the third application. The current version information of the third application can uniquely identify the current version of the third application. The current version information of the third application may be a combination of one or more of numbers, Chinese characters, letters, character strings, serial numbers, and the like. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
可选的,本申请实施例中,上述升级补丁包中可以包括至少一个资源和至少一个标识。其中,每个标识用于唯一标识一个资源。至少一个资源包括第一资源和第二资源中的至少一个,第一资源用于修复第三应用的原有资源(第一资源也可以称为第三应用的修复资源),第二资源为第三应用的新增资源(即第二资源为在第三应用的原有资源的基础上新增的资源)。Optionally, in the embodiment of the present application, the upgrade patch package may include at least one resource and at least one identifier. Each identifier is used to uniquely identify a resource. The at least one resource includes at least one of the first resource and the second resource, where the first resource is used to repair the original resource of the third application (the first resource may also be referred to as the repair resource of the third application), and the second resource is the first resource. The newly added resources of the three applications (that is, the second resource is a new resource based on the original resources of the third application).
需要说明的是,本申请实施例中,上述升级补丁包中用于标识一个资源的标识可以认为是一个成员,即该升级补丁包中包括至少一个成员。It should be noted that, in the embodiment of the present application, the identifier used to identify a resource in the upgrade patch package may be considered as a member, that is, the upgrade patch package includes at least one member.
可选的,本申请实施例中,上述资源可以为数字、文字(包括字符和字母等)、图片和文件(包括各种格式的文件)中的一个或者多个的组合。具体的,可以根据实际使用需求确定,本申请实施例不作限定。Optionally, in the embodiment of the present application, the foregoing resource may be a combination of one or more of a number, a text (including characters and letters, etc.), a picture, and a file (including files in various formats). Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
上述用于唯一标识资源的标识可以为资源的名称,也可以为资源的存放地址,还可以为其他能够唯一标识资源的数字、汉字、字母、字符、字符串以及序列号等中的一个或者多个的组合。具体的,可以根据实际使用需求确定,本申请实施例不作限定。The identifier used for uniquely identifying the resource may be the name of the resource, or the storage address of the resource, or one or more of other numbers, Chinese characters, letters, characters, strings, and serial numbers that can uniquely identify the resource. Combination of one. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
示例性的,仍以第三应用为例,如图5所示,为本申请实施例提供的生成idmap的示意图(由于资源的特殊性,图5仅示出了用于唯一标识资源的标识,而未示出资源)。在图5中,A部分表示第三应用中用于标识原有资源的标识的代码;B部分表示升级补丁包中用于标识第三应用的修复资源和第三应用的新增资源的标识的代码,具体的,B1表示第三应用的修复资源的标识的代码,B2表示第三应用的新增资源的标识的代码。采用本申请实施例提供的升级应用的方法,当采用升级补丁包,在成员粒度对第三应用升级时,通过生成并扩展idmap,并且执行该idmap中的代码,可以实现用第三应用的修复资源替换第三应用的原有资源,并且将第三应用的新增资源添加到第三应用中其他资源的后面,例如,如图5中的C部分所示,为生成并扩展的idmap 的示意图,在该idmap中,通过执行C1和C3可以实现在A部分中用B1替换A1,通过执行C2和C3可以实现在A部分中新增B2。一方面,由于终端设备向服务器请求的升级补丁包是用于在成员(例如如图5所示的B1和B2)粒度升级第三应用的,因此,与现有技术中在类粒度(一个类包括多个成员)升级应用相比,本申请实施例中的升级补丁包更小,如此,可以降低升级补丁包占用的资源,并且可以缩短升级补丁包的发布周期,从而使得第三应用可以快速修复。另一方面,由于本申请实施例中是直接升级第三应用的,因此与现有技术中通过升级终端设备的操作系统升级应用相比,本申请实施例中升级第三应用后无需重启终端设备的操作系统,从而使得第三应用可以更快速地修复。Exemplarily, the third application is taken as an example. As shown in FIG. 5, the schematic diagram of generating an idmap provided by the embodiment of the present application (as shown in FIG. 5 only shows the identifier for uniquely identifying the resource, due to the particularity of the resource, The resource is not shown). In FIG. 5, part A represents a code for identifying an identifier of an original resource in the third application; and part B represents an identifier of the new resource for identifying the repair resource of the third application and the third application in the upgrade patch package. The code, specifically, B1 represents the code of the identification of the repair resource of the third application, and B2 represents the code of the identification of the newly added resource of the third application. With the method for upgrading an application provided by the embodiment of the present application, when the upgrade patch package is adopted, when the member granularity is upgraded to the third application, the third application is repaired by generating and extending the idmap and executing the code in the idmap. The resource replaces the original resource of the third application, and adds the new resource of the third application to the other resource in the third application. For example, as shown in part C of FIG. 5, the idmap is generated and extended. In the idmap, by performing C1 and C3, it is possible to replace A1 with B1 in part A, and by adding C2 and C3, it is possible to add B2 in part A. On the one hand, since the upgrade patch package requested by the terminal device to the server is used to upgrade the third application in the granularity of members (for example, B1 and B2 as shown in FIG. 5), therefore, in the prior art, the class granularity (a class) Compared with the upgrade application, the upgrade package in the embodiment of the present application is smaller, so that the resources occupied by the upgrade package can be reduced, and the release period of the upgrade package can be shortened, so that the third application can be quickly repair. On the other hand, the third application is directly upgraded in the embodiment of the present application. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application. The operating system, so that the third application can be fixed more quickly.
可以理解,上述图5中,如果认为A是一个类,那么A1、B1和B2可以认为是三个成员。It can be understood that in the above FIG. 5, if A is considered to be a class, then A1, B1 and B2 can be considered as three members.
S114、服务器根据升级补丁请求消息中的第三应用的当前版本信息,查找与该当前版本信息对应的升级补丁包。S114. The server searches for the upgrade patch package corresponding to the current version information according to the current version information of the third application in the upgrade patch request message.
本申请实施例中,服务器上可以存储多个应用的版本信息和多个升级补丁包之间的映射关系。该多个应用的版本信息和多个升级补丁包之间的映射关系可以包括上述第三应用的当前版本信息和上述升级补丁包之间的映射关系。这样,当服务器接收到终端设备发送的升级补丁请求消息之后,服务器可以根据该升级补丁请求消息中的第三应用的当前版本信息,在服务器上查找与该当前版本信息对应的升级补丁包。In this embodiment, the mapping relationship between the version information of multiple applications and multiple upgrade patch packages may be stored on the server. The mapping relationship between the version information of the plurality of applications and the plurality of upgraded patch packages may include a mapping relationship between the current version information of the third application and the upgrade patch package. In this way, after the server receives the upgrade patch request message sent by the terminal device, the server may search for the upgrade patch package corresponding to the current version information on the server according to the current version information of the third application in the upgrade patch request message.
示例性的,以第三应用的当前版本信息是上述S113中列举的数字和字母的组合为例,结合表2,对第三应用的当前版本信息和升级补丁包之间的映射关系进行说明。Exemplarily, the current version information of the third application is a combination of the numbers and letters listed in the above S113, and the mapping relationship between the current version information of the third application and the upgraded patch package is described in conjunction with Table 2.
表2Table 2
第三应用的当前版本信息Current version information of the third application 升级补丁包Upgrade patch
V1V1 升级补丁包1Upgrade patch 1
V2V2 升级补丁包2Upgrade patch 2
V3V3 升级补丁包3Upgrade patch 3
V4V4 升级补丁包4Upgrade patch 4
如表2所示,假设服务器接收到的升级补丁请求消息中携带的第三应用的当前版本信息为V2,那么服务器可以在表2中查找与V2对应的升级补丁包,例如服务器在表2中查找到与V2对应的升级补丁包2,然后服务器再将升级补丁包2发送给终端设备,以使得终端设备采用升级补丁包2升级第三应用。如此,可以避免对第三应用升级时由于版本不对应而出现错误的现象。As shown in Table 2, if the current version information of the third application carried in the upgrade patch request message received by the server is V2, the server may look up the upgrade patch package corresponding to V2 in Table 2, for example, the server is in Table 2. The upgrade patch package 2 corresponding to V2 is found, and then the server sends the upgrade patch package 2 to the terminal device, so that the terminal device upgrades the third application by using the upgrade patch package 2. In this way, it is possible to avoid an error that occurs when the third application is upgraded because the version does not correspond.
S115、在服务器查找到与该当前版本信息对应的该升级补丁包的情况下,服务器向终端设备发送该升级补丁包。S115. If the server finds the upgrade patch package corresponding to the current version information, the server sends the upgrade patch package to the terminal device.
可以理解,本申请实施例中,在服务器没有查找到与第三应用的当前版本信息对应的升级补丁包的情况下,服务器可以丢弃终端设备发送的升级补丁请求消息。并且,服务器还可以向终端设备发送升级补丁响应消息,以通知终端设备没有查找到与第三应用的当前版本信息对应的升级补丁包;或者终端设备也可以不向终端设备发送任何消息,这样,当终端设备发送升级补丁请求消息之后,如果超过一定时间既没有接收到服务器发送的与第三应用的当前版本信息对应的升级补丁包,也没有接收到服务器 发送的升级补丁响应消息,那么终端设备可以认为服务器上没有与第三应用的当前版本信息对应的升级补丁包。It can be understood that, in the embodiment of the present application, in a case that the server does not find the upgrade patch package corresponding to the current version information of the third application, the server may discard the upgrade patch request message sent by the terminal device. And the server may further send an upgrade patch response message to the terminal device to notify the terminal device that the upgrade patch package corresponding to the current version information of the third application is not found; or the terminal device may not send any message to the terminal device, so that After the terminal device sends the upgrade patch request message, if the upgrade patch packet corresponding to the current version information of the third application sent by the server is not received, the server does not receive the server. The upgrade patch response message is sent, and the terminal device can consider that there is no upgrade patch package corresponding to the current version information of the third application on the server.
S116、终端设备接收服务器发送的该升级补丁包。S116. The terminal device receives the upgrade patch package sent by the server.
S117、终端设备采用该升级补丁包,在成员粒度直接升级第三应用。S117. The terminal device adopts the upgrade patch package, and directly upgrades the third application in the member granularity.
终端设备接收到服务器发送的升级补丁包之后,终端设备可以采用该升级补丁包,在成员粒度直接升级第三应用,以修复第三应用的原有资源,和/或为第三应用增加第三应用的新增资源。After the terminal device receives the upgrade patch package sent by the server, the terminal device may use the upgrade patch package to directly upgrade the third application at the member granularity to repair the original resource of the third application, and/or add a third for the third application. New resources for the app.
可以理解,本申请实施例中,第三应用和第二应用可以为相同的应用,也可以为不同的应用。具体的,当第二应用为系统应用时,第三应用和第二应用可以为相同的应用。It can be understood that, in the embodiment of the present application, the third application and the second application may be the same application, or may be different applications. Specifically, when the second application is a system application, the third application and the second application may be the same application.
需要说明的是,本申请实施例是以S112-S117在S105之后执行为例说明的,实际实现中,S112-S117也可以在S111之后执行,本申请实施例不作具体限定。It should be noted that the embodiment of the present application is described as an example after S112-S117 is executed after S105. In actual implementation, S112-S117 may also be executed after S111, which is not specifically limited in this embodiment.
本申请实施例提供的升级应用的方法,在终端设备确定第三应用可以升级的情况下,终端设备通过向服务器发送升级补丁请求消息以向服务器请求升级补丁包,在终端设备接收到服务器发送的升级补丁包之后,终端设备采用该升级补丁包,在成员粒度直接升级该第三应用。一方面,由于终端设备向服务器请求的该升级补丁包是用于在成员粒度升级该第三应用的,因此,与现有技术中在类粒度(一个类包括多个成员)升级应用相比,本申请实施例中的升级补丁包更小,如此,可以降低该升级补丁包占用的资源,并且可以缩短升级补丁包的发布周期,从而使得第三应用可以快速修复。另一方面,由于本申请实施例中是直接升级第三应用的,因此与现有技术通过升级终端设备的操作系统升级应用相比,本申请实施例中升级第三应用后无需重启终端设备的操作系统,从而使得第三应用可以更快速地修复。In the method for upgrading an application provided by the embodiment of the present application, in a case where the terminal device determines that the third application can be upgraded, the terminal device sends an upgrade patch request message to the server to request an upgrade patch package from the server, and the terminal device receives the server to send the upgrade patch package. After the upgrade package is upgraded, the terminal device adopts the upgrade patch package to directly upgrade the third application at the member granularity. On the one hand, since the upgrade patch package requested by the terminal device to the server is used to upgrade the third application at the member granularity, compared with the prior art in the class granularity (a class includes multiple members), the upgrade application is compared. The upgrade patch package in the embodiment of the present application is smaller. In this way, the resources occupied by the upgrade patch package can be reduced, and the release period of the upgrade patch package can be shortened, so that the third application can be quickly repaired. On the other hand, in the embodiment of the present application, the third application is directly upgraded. Therefore, the upgrade of the third application is not required to restart the terminal after the third application is upgraded in the embodiment of the present application. The operating system, so that the third application can be repaired more quickly.
可选的,本申请实施例提供的加载应用的方法还可以包括下述的S118-S119。Optionally, the method for loading an application provided by the embodiment of the present application may further include the following S118-S119.
S118、服务器根据第三应用的当前版本信息,查找已过期的升级补丁包。S118. The server searches for an expired upgrade patch package according to current version information of the third application.
S119、在服务器查找到已过期的升级补丁包的情况下,服务器删除已过期的升级补丁包。S119. In the case that the server finds an expired upgrade patch package, the server deletes the expired upgrade patch package.
可选的,本申请实施例中,服务器可以在终端设备发送的升级补丁请求消息的触发下(例如上述S113的触发下)执行S118-S119;也可以以预定义的第二时间为周期,定期执行S118-S119。具体的,可以根据实际使用需求确定,本申请实施例不作限定。Optionally, in the embodiment of the present application, the server may perform S118-S119 under the trigger of the upgrade patch request message sent by the terminal device (for example, triggered by S113 above); or may periodically use the predefined second time as a periodic period. Execute S118-S119. Specifically, it can be determined according to the actual use requirement, and the embodiment of the present application is not limited.
上述预定义的第二时间可以为预定义的任意时间,例如一天、一周或者一个月等,具体的可以根据实际使用需求定义,本申请实施例不作限定。The second predefined time may be a predefined time, for example, one day, one week, or one month, and the like may be defined according to actual usage requirements, which is not limited in the embodiment of the present application.
本申请实施例中,上述已过期的升级补丁包是指与第三应用的当前版本信息不对应的升级补丁包,例如可以是与第三应用的当前版本信息之前的某个/某些版本信息对应的升级补丁包。示例性的,假设第三应用的当前版本信息为V2,V2之前的版本信息为V1,与V1对应的升级补丁包即为已过期的升级补丁包。In the embodiment of the present application, the expired upgrade patch package refers to an upgrade patch package that does not correspond to the current version information of the third application, and may be, for example, some/some version information before the current version information of the third application. Corresponding upgrade patch package. Exemplarily, it is assumed that the current version information of the third application is V2, and the version information before V2 is V1, and the upgrade patch package corresponding to V1 is the expired upgrade patch package.
本申请实施例中,服务器通过删除服务器上已过期的升级补丁包,可以节省服务器的存储空间。In the embodiment of the present application, the server can save the storage space of the server by deleting the expired upgrade patch on the server.
如图6所示,本申请实施例还提供一种升级应用的方法,该方法可以包括下述的S201-S206。 As shown in FIG. 6, the embodiment of the present application further provides a method for upgrading an application, and the method may include the following S201-S206.
S201、终端设备向服务器发送升级补丁请求消息。S201. The terminal device sends an upgrade patch request message to the server.
S202、服务器接收终端设备发送的升级补丁请求消息。S202. The server receives an upgrade patch request message sent by the terminal device.
S203、服务器根据升级补丁请求消息中的第三应用的当前版本信息,查找与该当前版本信息对应的升级补丁包。S203. The server searches for an upgrade patch corresponding to the current version information according to the current version information of the third application in the upgrade patch request message.
S204、在服务器查找到与该当前版本信息对应的该升级补丁包的情况下,服务器向终端设备发送该升级补丁包。S204. If the server finds the upgrade patch package corresponding to the current version information, the server sends the upgrade patch package to the terminal device.
S205、终端设备接收服务器发送的该升级补丁包。S205. The terminal device receives the upgrade patch package sent by the server.
S206、终端设备采用该升级补丁包,在成员粒度直接升级第三应用。S206: The terminal device adopts the upgrade patch package, and directly upgrades the third application in the member granularity.
对于S201-S206的描述具体可以参见上述实施例中对S112-S117的相关描述,此处不再赘述。For the description of S201-S206, refer to the related description of S112-S117 in the foregoing embodiment, and details are not described herein again.
可选的,本申请实施例提供的升级应用的方法还可以包括下述的S207-S208。Optionally, the method for upgrading an application provided by the embodiment of the present application may further include the following S207-S208.
S207、服务器根据第三应用的当前版本信息,查找已过期的升级补丁包。S207. The server searches for an expired upgrade patch package according to current version information of the third application.
S208、在服务器查找到已过期的升级补丁包的情况下,服务器删除已过期的升级补丁包。S208. In the case that the server finds an expired upgrade patch package, the server deletes the expired upgrade patch package.
对于S207-S208的描述具体可以参见上述实施例中对S118-S119的相关描述,此处不再赘述。For the description of S207-S208, refer to the related description of S118-S119 in the foregoing embodiment, and details are not described herein again.
上述实施例主要从终端设备的角度对本申请实施例提供的方案进行了介绍。可以理解的是,本申请实施例提供的终端设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员可以很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing embodiment mainly introduces the solution provided by the embodiment of the present application from the perspective of the terminal device. It can be understood that, in order to implement the above functions, the terminal device and the like provided by the embodiments of the present application include corresponding hardware structures and/or software modules for performing the respective functions. Those skilled in the art can readily appreciate that the modules and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in a combination of hardware or hardware and computer software. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can implement the described functions using different methods for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
本申请实施例可以根据上述方法示例性的对终端设备等进行功能模块的划分。例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can perform functional division of a terminal device or the like according to the above method. For example, each function module can be divided for each function, or two or more functions can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
在采用对应各个功能划分各个功能模块的情况下,图7示出了本申请实施例提供的终端设备的一种可能的结构示意图。如图7所示,该终端设备可以包括:启动模块20、扫描模块21、确定模块22和加载模块23。启动模块20可以用于支持该终端设备执行上述方法实施例中终端设备执行的S101和S106;扫描模块21可以用于支持该终端设备执行上述方法实施例中终端设备执行的S102和S105;确定模块22可以用于支持该终端设备执行上述方法实施例中终端设备执行的S103和S108;加载模块23可以用于支持该终端设备执行上述方法实施例中终端设备执行的S104、S109和S111。可选的,结合图7,如图8所示,本申请实施例提供的终端设备还可以包括创建模块24和设置模块25。创建模块24可以用于支持该终端设备执行上述方法实施例中终端设备执行的S107;设置模块25可以用于支持该终端设备执行上述方法实施例中终端设备执行的S110。 FIG. 7 is a schematic diagram showing a possible structure of a terminal device according to an embodiment of the present application. As shown in FIG. 7, the terminal device may include: a startup module 20, a scanning module 21, a determination module 22, and a loading module 23. The initiating module 20 may be configured to support the terminal device to perform S101 and S106 performed by the terminal device in the foregoing method embodiment; the scanning module 21 may be configured to support the terminal device to perform S102 and S105 performed by the terminal device in the foregoing method embodiment; 22 may be used to support the terminal device to perform S103 and S108 performed by the terminal device in the foregoing method embodiment; the loading module 23 may be configured to support the terminal device to perform S104, S109, and S111 performed by the terminal device in the foregoing method embodiment. Optionally, in conjunction with FIG. 7, as shown in FIG. 8, the terminal device provided by the embodiment of the present application may further include a creating module 24 and a setting module 25. The creating module 24 can be used to support the terminal device to perform S107 performed by the terminal device in the foregoing method embodiment. The setting module 25 can be used to support the terminal device to perform S110 performed by the terminal device in the foregoing method embodiment.
可选的,结合图7,本申请实施例提供的终端设备还可以包括发送模块、接收模块和升级模块。发送模块可以用于支持该终端设备执行上述方法实施例中终端设备执行的S112;接收模块可以用于支持该终端设备执行上述方法实施例中终端设备执行的S116;升级模块可以用于支持该终端设备执行上述方法实施例中终端设备执行的S117。可以理解,上述各个功能模块还可以执行本申请实施例描述的技术的其他过程。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Optionally, in conjunction with FIG. 7, the terminal device provided by the embodiment of the present application may further include a sending module, a receiving module, and an upgrade module. The sending module may be configured to support the terminal device to perform S112 performed by the terminal device in the foregoing method embodiment; the receiving module may be configured to support the terminal device to perform S116 performed by the terminal device in the foregoing method embodiment; and the upgrading module may be used to support the terminal The device performs S117 performed by the terminal device in the foregoing method embodiment. It can be understood that each of the above functional modules can also perform other processes of the technology described in the embodiments of the present application. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
可选的,如图9所示,本申请实施例提供的终端设备可以包括发送模块30、接收模块31和升级模块32。发送模块30可以用于支持该终端设备执行上述方法实施例中终端设备执行的S201;接收模块31可以用于支持该终端设备执行上述方法实施例中终端设备执行的S205;升级模块32可以用于支持该终端设备执行上述方法实施例中终端设备执行的S206。可以理解,上述各个功能模块还可以执行本文描述的技术的其它过程。Optionally, as shown in FIG. 9, the terminal device provided by the embodiment of the present application may include a sending module 30, a receiving module 31, and an upgrading module 32. The sending module 30 can be used to support the terminal device to perform S201 performed by the terminal device in the foregoing method embodiment; the receiving module 31 can be used to support the terminal device to perform S205 performed by the terminal device in the foregoing method embodiment; the upgrading module 32 can be used to Supporting the terminal device to perform S206 performed by the terminal device in the foregoing method embodiment. It will be appreciated that the various functional modules described above may also perform other processes of the techniques described herein.
在采用集成的功能模块的情况下,图10示出了本申请实施例提供的终端设备的一种可能的结构示意图。如图10所示,该终端设备可以包括:处理模块40和存储模块41。处理模块40可以用于对该终端设备的动作进行控制管理,例如,处理模块40可以用于支持该终端设备执行上述方法实施例中终端设备执行的S101、S102、S103、S104、S105、S106、S107、S108、S109、S110、S111和S117,和/或本文所描述的技术的其它过程。存储模块41用于存储该终端设备的程序代码和数据。可选的,如图10所示,该终端设备还可以包括通信模块42,通信模块42可以用于支持该终端设备与其他设备的通信,例如通信模块42可以用于支持该终端设备与其他终端设备的交互。本申请实施例中,该通信模块42可以用于支持该终端设备执行上述方法实施例中终端设备执行的S112和S116,和/或本文所描述的技术的其它过程。FIG. 10 is a schematic diagram showing a possible structure of a terminal device provided by an embodiment of the present application. As shown in FIG. 10, the terminal device may include: a processing module 40 and a storage module 41. The processing module 40 can be used to control and control the action of the terminal device. For example, the processing module 40 can be used to support the terminal device to perform S101, S102, S103, S104, S105, S106 performed by the terminal device in the foregoing method embodiment. S107, S108, S109, S110, S111, and S117, and/or other processes of the techniques described herein. The storage module 41 is configured to store program codes and data of the terminal device. Optionally, as shown in FIG. 10, the terminal device may further include a communication module 42. The communication module 42 may be configured to support communication between the terminal device and other devices. For example, the communication module 42 may be configured to support the terminal device and other terminals. Device interaction. In the embodiment of the present application, the communication module 42 may be used to support the terminal device to perform S112 and S116 performed by the terminal device in the foregoing method embodiment, and/or other processes of the techniques described herein.
可选的,如图10所示,处理模块40可以用于支持该终端设备执行上述方法实施例中终端设备执行的S206,和/或本文所描述的技术的其它过程。通信模块42可以用于支持该终端设备执行上述方法实施例中终端设备执行的S201和S205,和/或本文所描述的技术的其它过程。Optionally, as shown in FIG. 10, the processing module 40 may be configured to support the terminal device to perform S206 performed by the terminal device in the foregoing method embodiment, and/or other processes of the techniques described herein. The communication module 42 can be used to support the terminal device to perform S201 and S205 performed by the terminal device in the above method embodiments, and/or other processes of the techniques described herein.
其中,处理模块40可以是处理器或控制器,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。该处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。存储模块41可以是存储器,该存储器可以包括普通存储器和内存,普通存储器用于存储终端设备的软件程序和/或模块,内存用于处理器加载和运行终端设备的软件程序。通信模块42可以是收发器、收发电路或通信接口等。The processing module 40 may be a processor or a controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (application-specific). Integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like. The storage module 41 may be a memory, which may include a general memory and a memory for storing a software program and/or a module of the terminal device, and a memory for the processor to load and run the software program of the terminal device. The communication module 42 can be a transceiver, a transceiver circuit, a communication interface, or the like.
示例性的,该处理模块40可以是上述如图1所示的处理器10。存储模块41可以是上述如图1所示的存储器13。通信模块42可以是上述如图1所示的RF电路11和/ 或输入模块14等。Exemplarily, the processing module 40 can be the processor 10 shown in FIG. 1 above. The storage module 41 may be the above-described memory 13 as shown in FIG. The communication module 42 may be the RF circuit 11 and/or as shown in FIG. 1 described above. Or input module 14 and so on.
当处理模块40是处理器、存储模块41是存储器,通信模块42是收发器时,如图11所示,为本申请实施例提供的一种终端设备的硬件示意图。如图11所示,该终端设备包括处理器50、存储器51和收发器52。处理器50、存储器51和收发器52可以通过总线53相互连接。总线53可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended Industry standard architecture,EISA)总线等。总线53可以分为地址总线、数据总线、控制总线等。When the processing module 40 is a processor, the storage module 41 is a memory, and the communication module 42 is a transceiver, as shown in FIG. 11 , it is a hardware schematic diagram of a terminal device provided by the embodiment of the present application. As shown in FIG. 11, the terminal device includes a processor 50, a memory 51, and a transceiver 52. The processor 50, the memory 51 and the transceiver 52 can be connected to one another via a bus 53. The bus 53 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like. The bus 53 can be divided into an address bus, a data bus, a control bus, and the like.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))方式或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、磁盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state drives,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website, computer, server or data center. The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (such as a solid state drives (SSD)). .
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is illustrated. In practical applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the system, the device and the unit described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时, 可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, It can be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. . Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (26)

  1. 一种加载应用的方法,其特征在于,包括:A method for loading an application, comprising:
    终端设备开机启动;The terminal device is powered on;
    所述终端设备扫描第一应用;The terminal device scans the first application;
    所述终端设备确定所述第一应用为实现公共特性功能的应用;Determining, by the terminal device, that the first application is an application that implements a common feature function;
    所述终端设备采用系统类加载器将所述第一应用加载到所述终端设备的内存。The terminal device loads the first application into a memory of the terminal device by using a system class loader.
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备确定所述第一应用为实现公共特性功能的应用,包括:The method of claim 1, wherein the determining, by the terminal device, that the first application is an application that implements a common feature function comprises:
    所述终端设备根据预定义的公共特性功能列表中包括的所述第一应用的标识,确定所述第一应用为实现公共特性功能的应用。The terminal device determines, according to the identifier of the first application included in the predefined common feature function list, that the first application is an application that implements a common feature function.
  3. 根据权利要求1所述的方法,其特征在于,所述终端设备确定所述第一应用为实现公共特性功能的应用,包括:The method of claim 1, wherein the determining, by the terminal device, that the first application is an application that implements a common feature function comprises:
    所述终端设备查询预定义的公共特性功能列表中是否包括所述第一应用的标识,在所述公共特性功能列表中包括所述第一应用的标识的情况下,所述终端设备确定所述第一应用为实现公共特性功能的应用;或者,The terminal device queries whether the identifier of the first application is included in the predefined common feature function list, and if the public feature function list includes the identifier of the first application, the terminal device determines the The first application is an application that implements a common feature function; or,
    所述终端设备读取所述第一应用的第一属性,所述第一属性用于指示所述第一应用是否为实现公共特性功能的应用,在所述第一属性指示所述第一应用为实现公共特性功能的应用的情况下,所述终端设备确定所述第一应用为实现公共特性功能的应用。The terminal device reads the first attribute of the first application, where the first attribute is used to indicate whether the first application is an application that implements a common feature, and the first attribute indicates the first application In order to implement an application of a common feature function, the terminal device determines that the first application is an application that implements a common feature function.
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,所述终端设备采用系统类加载器将所述第一应用加载到所述终端设备的内存之后,所述方法还包括:The method according to any one of claims 1 to 3, wherein after the terminal device loads the first application into the memory of the terminal device by using a system class loader, the method further includes:
    所述终端设备启动第二应用;The terminal device starts a second application;
    所述终端设备创建所述第二应用的路径类加载器;The terminal device creates a path class loader of the second application;
    在所述第二应用为所述终端设备中调用所述第一应用的应用的情况下,所述终端设备设置所述路径类加载器的父类加载器为所述系统类加载器;In a case that the second application is an application that invokes the first application in the terminal device, the terminal device sets a parent class loader of the path class loader as the system class loader;
    所述终端设备采用所述系统类加载器将所述第二应用加载到所述内存。The terminal device loads the second application into the memory by using the system class loader.
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, further comprising:
    所述终端设备向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级第三应用,所述第三应用为所述终端设备中的系统应用;The terminal device sends an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade the third application at the member granularity, and the third application is Applying to a system in the terminal device;
    所述终端设备接收所述服务器发送的所述升级补丁包;Receiving, by the terminal device, the upgrade patch package sent by the server;
    所述终端设备采用所述升级补丁包,在成员粒度直接升级所述第三应用。The terminal device uses the upgrade patch package to directly upgrade the third application at a member granularity.
  6. 根据权利要求5所述的方法,其特征在于,The method of claim 5 wherein:
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述第三应用的原有资源,所述第二资源为所述第三应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the third application is repaired, and the second resource is a new resource of the third application.
  7. 一种升级应用的方法,其特征在于,包括:A method for upgrading an application, comprising:
    终端设备向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级应用,所述应用为所述终端设备中的系统应用; The terminal device sends an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade an application at a member granularity, where the application is in the terminal device. System application
    所述终端设备接收所述服务器发送的所述升级补丁包;Receiving, by the terminal device, the upgrade patch package sent by the server;
    所述终端设备采用所述升级补丁包,在成员粒度直接升级所述应用。The terminal device uses the upgrade patch package to directly upgrade the application at a member granularity.
  8. 根据权利要求7所述的方法,其特征在于,The method of claim 7 wherein:
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述应用的原有资源,所述第二资源为所述应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the application is repaired, and the second resource is a new resource of the application.
  9. 一种终端设备,其特征在于,包括启动模块、扫描模块、确定模块和加载模块;A terminal device, comprising: a startup module, a scanning module, a determining module, and a loading module;
    所述启动模块,用于开机启动;The startup module is configured to be powered on;
    所述扫描模块,用于扫描第一应用;The scanning module is configured to scan a first application;
    所述确定模块,用于确定所述第一应用为实现公共特性功能的应用;The determining module is configured to determine that the first application is an application that implements a common feature function;
    所述加载模块,用于采用系统类加载器将所述第一应用加载到所述终端设备的内存。The loading module is configured to load the first application into a memory of the terminal device by using a system class loader.
  10. 根据权利要求9所述的终端设备,其特征在于,The terminal device according to claim 9, wherein
    所述确定模块,具体用于根据预定义的公共特性功能列表中包括的所述第一应用的标识,确定所述第一应用为实现公共特性功能的应用。The determining module is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, that the first application is an application that implements a common feature function.
  11. 根据权利要求9所述的终端设备,其特征在于,The terminal device according to claim 9, wherein
    所述确定模块,具体用于查询预定义的公共特性功能列表中是否包括所述第一应用的标识,并在所述公共特性功能列表中包括所述第一应用的标识的情况下,确定所述第一应用为实现公共特性功能的应用;或者,读取所述第一应用的第一属性,所述第一属性用于指示所述第一应用是否为实现公共特性功能的应用,并在所述第一属性指示所述第一应用为实现公共特性功能的应用的情况下,确定所述第一应用为实现公共特性功能的应用。The determining module is configured to query whether the identifier of the first application is included in the predefined public feature function list, and if the identifier of the first application is included in the public feature function list, determine the location The first application is an application that implements a common feature function; or, the first attribute of the first application is read, and the first attribute is used to indicate whether the first application is an application that implements a common feature function, and When the first attribute indicates that the first application is an application that implements a common feature function, determining that the first application is an application that implements a common feature function.
  12. 根据权利要求9至11任意一项所述的终端设备,其特征在于,所述终端设备还包括创建模块和设置模块;The terminal device according to any one of claims 9 to 11, wherein the terminal device further comprises a creation module and a setting module;
    所述启动模块,还用于启动第二应用;The startup module is further configured to start a second application;
    所述创建模块,用于创建所述启动模块启动的所述第二应用的路径类加载器;The creating module is configured to create a path class loader of the second application that is started by the startup module;
    所述设置模块,用于在所述启动模块启动的所述第二应用为所述终端设备中调用所述第一应用的应用的情况下,设置所述创建模块创建的所述路径类加载器的父类加载器为所述系统类加载器;The setting module is configured to set the path class loader created by the creating module, when the second application launched by the startup module is an application that invokes the first application in the terminal device The parent class loader is the system class loader;
    所述加载模块,还用于采用所述设置模块设置后的所述系统类加载器将所述第二应用加载到所述内存。The loading module is further configured to load the second application into the memory by using the system class loader after the setting module is set.
  13. 根据权利要求9至12任意一项所述的终端设备,其特征在于,所述终端设备还包括发送模块、接收模块和升级模块;The terminal device according to any one of claims 9 to 12, wherein the terminal device further comprises a sending module, a receiving module and an upgrading module;
    所述发送模块,用于向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级第三应用,所述第三应用为所述终端设备中的系统应用;The sending module is configured to send an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade a third application at a member granularity, The third application is a system application in the terminal device;
    所述接收模块,用于在所述发送模块向所述服务器发送所述升级补丁请求消息之后,接收所述服务器发送的所述升级补丁包;The receiving module is configured to: after the sending module sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server;
    所述升级模块,用于采用所述接收模块接收的所述升级补丁包,在成员粒度直接 升级所述第三应用。The upgrade module is configured to adopt the upgrade patch package received by the receiving module, directly at a member granularity Upgrade the third application.
  14. 根据权利要求13所述的终端设备,其特征在于,The terminal device according to claim 13, wherein
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述第三应用的原有资源,所述第二资源为所述第三应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the third application is repaired, and the second resource is a new resource of the third application.
  15. 一种终端设备,其特征在于,包括发送模块、接收模块和升级模块;A terminal device, comprising: a sending module, a receiving module, and an upgrading module;
    所述发送模块,用于向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级应用,所述应用为所述终端设备中的系统应用;The sending module is configured to send an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade an application at a member granularity, where the application is System application in the terminal device;
    所述接收模块,用于在所述发送模块向所述服务器发送所述升级补丁请求消息之后,接收所述服务器发送的所述升级补丁包;The receiving module is configured to: after the sending module sends the upgrade patch request message to the server, receive the upgrade patch package sent by the server;
    所述升级模块,用于采用所述接收模块接收的所述升级补丁包,在成员粒度直接升级所述应用。The upgrade module is configured to directly upgrade the application at a member granularity by using the upgrade patch package received by the receiving module.
  16. 根据权利要求15所述的终端设备,其特征在于,The terminal device according to claim 15, wherein
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述应用的原有资源,所述第二资源为所述应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the application is repaired, and the second resource is a new resource of the application.
  17. 一种终端设备,其特征在于,包括处理器、与所述处理器耦合的存储器,以及一个或多个计算机程序,所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括计算机指令,当所述计算机指令被所述处理器执行时,A terminal device, comprising: a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory, the one or A plurality of computer programs include computer instructions, when said computer instructions are executed by said processor
    所述处理器,用于开机启动;并扫描第一应用;且确定所述第一应用为实现公共特性功能的应用;以及采用系统类加载器将所述第一应用加载到所述终端设备的内存。The processor is configured to start up; and scan the first application; and determine that the first application is an application that implements a common feature function; and load the first application into the terminal device by using a system class loader RAM.
  18. 根据权利要求17所述的终端设备,其特征在于,The terminal device according to claim 17, wherein
    所述处理器,具体用于根据预定义的公共特性功能列表中包括的所述第一应用的标识,确定所述第一应用为实现公共特性功能的应用。The processor is specifically configured to determine, according to the identifier of the first application included in the predefined common feature function list, that the first application is an application that implements a common feature function.
  19. 根据权利要求17所述的终端设备,其特征在于,The terminal device according to claim 17, wherein
    所述处理器,具体用于查询预定义的公共特性功能列表中是否包括所述第一应用的标识,并在所述公共特性功能列表中包括所述第一应用的标识的情况下,确定所述第一应用为实现公共特性功能的应用;或者,读取所述第一应用的第一属性,所述第一属性用于指示所述第一应用是否为实现公共特性功能的应用,并在所述第一属性指示所述第一应用为实现公共特性功能的应用的情况下,确定所述第一应用为实现公共特性功能的应用。The processor is specifically configured to query whether the identifier of the first application is included in the predefined public feature function list, and if the identifier of the first application is included in the public feature function list, determine the location The first application is an application that implements a common feature function; or, the first attribute of the first application is read, and the first attribute is used to indicate whether the first application is an application that implements a common feature function, and When the first attribute indicates that the first application is an application that implements a common feature function, determining that the first application is an application that implements a common feature function.
  20. 根据权利要求17至19任意一项所述的终端设备,其特征在于,A terminal device according to any one of claims 17 to 19, characterized in that
    所述处理器,还用于启动第二应用;并创建所述第二应用的路径类加载器;且在所述第二应用为所述终端设备中调用所述第一应用的应用的情况下,设置所述路径类加载器的父类加载器为所述系统类加载器;以及采用所述系统类加载器将所述第二应用加载到所述内存。The processor is further configured to start a second application; and create a path class loader of the second application; and in a case where the second application invokes an application of the first application in the terminal device Setting a parent class loader of the path class loader to the system class loader; and loading the second application into the memory by using the system class loader.
  21. 根据权利要求17至20任意一项所述的终端设备,其特征在于,所述终端设备还包括发送器和接收器; The terminal device according to any one of claims 17 to 20, wherein the terminal device further comprises a transmitter and a receiver;
    所述发送器,用于向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级第三应用,所述第三应用为所述终端设备中的系统应用;The sender is configured to send an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade a third application at a member granularity, The third application is a system application in the terminal device;
    所述接收器,用于在所述发送器向所述服务器发送所述升级补丁请求消息之后,接收所述服务器发送的所述升级补丁包;The receiver is configured to receive, after the sender sends the upgrade patch request message to the server, the upgrade patch package sent by the server;
    所述处理器,还用于采用所述接收器接收的所述升级补丁包,在成员粒度直接升级所述第三应用。The processor is further configured to directly upgrade the third application at a member granularity by using the upgrade patch package received by the receiver.
  22. 根据权利要求21所述的终端设备,其特征在于,The terminal device according to claim 21, characterized in that
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述第三应用的原有资源,所述第二资源为所述第三应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the third application is repaired, and the second resource is a new resource of the third application.
  23. 一种终端设备,其特征在于,包括发送器、接收器、处理器、与所述处理器耦合的存储器,以及一个或多个计算机程序,所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括计算机指令,当所述计算机指令被所述处理器执行时,A terminal device, comprising: a transmitter, a receiver, a processor, a memory coupled to the processor, and one or more computer programs, the one or more computer programs being stored in the memory The one or more computer programs include computer instructions, when the computer instructions are executed by the processor,
    所述发送器,用于向服务器发送升级补丁请求消息,所述升级补丁请求消息用于向所述服务器请求升级补丁包,所述升级补丁包用于在成员粒度直接升级应用,所述应用为所述终端设备中的系统应用;The sender is configured to send an upgrade patch request message to the server, where the upgrade patch request message is used to request an upgrade patch package from the server, where the upgrade patch package is used to directly upgrade an application at a member granularity, where the application is System application in the terminal device;
    所述接收器,用于在所述发送器向所述服务器发送所述升级补丁请求消息之后,接收所述服务器发送的所述升级补丁包;The receiver is configured to receive, after the sender sends the upgrade patch request message to the server, the upgrade patch package sent by the server;
    所述处理器,用于采用所述接收器接收的所述升级补丁包,在成员粒度直接升级所述应用。The processor is configured to directly upgrade the application at a member granularity by using the upgrade patch package received by the receiver.
  24. 根据权利要求23所述的终端设备,其特征在于,The terminal device according to claim 23, characterized in that
    所述升级补丁包中包括至少一个资源和至少一个标识,每个标识用于唯一标识一个资源,所述至少一个资源包括第一资源和第二资源中的至少一个,所述第一资源用于修复所述应用的原有资源,所述第二资源为所述应用的新增资源。The upgrade patch package includes at least one resource and at least one identifier, each identifier is used to uniquely identify one resource, and the at least one resource includes at least one of a first resource and a second resource, where the first resource is used for The original resource of the application is repaired, and the second resource is a new resource of the application.
  25. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端设备上运行时,使得所述终端设备执行如权利要求1至8任意一项所述的方法。A computer readable storage medium, comprising computer instructions that, when executed on a terminal device, cause the terminal device to perform the method of any one of claims 1 to 8.
  26. 一种包括计算机指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端设备上运行时,使得所述终端设备执行如权利要求1至8任意一项所述的方法。 A computer program product comprising computer instructions, characterized in that, when said computer program product is run on a terminal device, said terminal device is caused to perform the method of any one of claims 1 to 8.
PCT/CN2017/106170 2017-10-09 2017-10-13 Method and terminal device for loading application and upgrading application WO2019071609A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780094776.6A CN111095199B (en) 2017-10-09 2017-10-13 Application loading method and terminal equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710931606 2017-10-09
CN201710931606.0 2017-10-09

Publications (1)

Publication Number Publication Date
WO2019071609A1 true WO2019071609A1 (en) 2019-04-18

Family

ID=66101225

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106170 WO2019071609A1 (en) 2017-10-09 2017-10-13 Method and terminal device for loading application and upgrading application

Country Status (2)

Country Link
CN (2) CN114020291A (en)
WO (1) WO2019071609A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110308922A (en) * 2019-06-27 2019-10-08 百度在线网络技术(北京)有限公司 Data transmission method, device, equipment and storage medium
CN111880825A (en) * 2020-07-24 2020-11-03 北京浪潮数据技术有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN112988424A (en) * 2021-03-22 2021-06-18 广州虎牙科技有限公司 Independent process access implementation method and device, electronic equipment and readable storage medium
CN113778492A (en) * 2021-09-17 2021-12-10 中国移动通信集团陕西有限公司 Method, device and equipment for issuing capability API and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463109A (en) * 2021-01-18 2021-03-09 周子涵 Method, device and system for realizing voice time telling of intelligent terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070022417A1 (en) * 2005-07-25 2007-01-25 Macrovision Corporation Function binding method and system
CN103428344A (en) * 2012-05-17 2013-12-04 上海闻泰电子科技有限公司 Method for achieving standby running in feature phone dynamic loading program
CN104077266A (en) * 2013-03-27 2014-10-01 华为技术有限公司 Multi-core operating system realization method, realization device and realization system
CN105138364A (en) * 2015-08-21 2015-12-09 广东欧珀移动通信有限公司 Terminal system upgrading method and device
CN106681749A (en) * 2015-11-11 2017-05-17 腾讯科技(深圳)有限公司 Local code patch updating method and device based on Android platform

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101658670B1 (en) * 2010-02-04 2016-09-21 삼성전자주식회사 Method and apparatus for generating application user adapted in portable terminal
WO2012142854A1 (en) * 2011-04-18 2012-10-26 北京新媒传信科技有限公司 Application service platform system and implementation method thereof
CN106066805B (en) * 2016-05-31 2020-03-17 宇龙计算机通信科技(深圳)有限公司 Method and device for starting terminal application program and terminal
CN106126269A (en) * 2016-06-07 2016-11-16 中国建设银行股份有限公司 application update method, device, system and application design method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070022417A1 (en) * 2005-07-25 2007-01-25 Macrovision Corporation Function binding method and system
CN103428344A (en) * 2012-05-17 2013-12-04 上海闻泰电子科技有限公司 Method for achieving standby running in feature phone dynamic loading program
CN104077266A (en) * 2013-03-27 2014-10-01 华为技术有限公司 Multi-core operating system realization method, realization device and realization system
CN105138364A (en) * 2015-08-21 2015-12-09 广东欧珀移动通信有限公司 Terminal system upgrading method and device
CN106681749A (en) * 2015-11-11 2017-05-17 腾讯科技(深圳)有限公司 Local code patch updating method and device based on Android platform

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110308922A (en) * 2019-06-27 2019-10-08 百度在线网络技术(北京)有限公司 Data transmission method, device, equipment and storage medium
CN110308922B (en) * 2019-06-27 2023-04-18 百度在线网络技术(北京)有限公司 Data transmission method, device, equipment and storage medium
CN111880825A (en) * 2020-07-24 2020-11-03 北京浪潮数据技术有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN111880825B (en) * 2020-07-24 2022-06-10 北京浪潮数据技术有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN112988424A (en) * 2021-03-22 2021-06-18 广州虎牙科技有限公司 Independent process access implementation method and device, electronic equipment and readable storage medium
CN112988424B (en) * 2021-03-22 2024-02-27 广州虎牙科技有限公司 Independent process access realization method and device, electronic equipment and readable storage medium
CN113778492A (en) * 2021-09-17 2021-12-10 中国移动通信集团陕西有限公司 Method, device and equipment for issuing capability API and storage medium
CN113778492B (en) * 2021-09-17 2023-11-10 中国移动通信集团陕西有限公司 Method, device, equipment and storage medium for issuing capability API

Also Published As

Publication number Publication date
CN111095199B (en) 2021-10-01
CN111095199A (en) 2020-05-01
CN114020291A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2019071609A1 (en) Method and terminal device for loading application and upgrading application
WO2019061362A1 (en) Method and device for accessing device identifiers
CN112055424B (en) Electronic device and method for switching electronic device
WO2019178869A1 (en) Method for opening esim card account, and terminal
US11579899B2 (en) Method and device for dynamically managing kernel node
WO2017211205A1 (en) Method and device for updating whitelist
CN106502703B (en) Function calling method and device
US11811832B2 (en) Queryless device configuration determination-based techniques for mobile device management
CN108549698B (en) File processing method and device, mobile terminal and computer readable storage medium
WO2018049894A1 (en) Data transmission method and device
CN108090361B (en) Security policy updating method and device
WO2015081905A1 (en) Data update method, user terminal, and data update system
WO2019184617A1 (en) Information sharing method and device, computer-readable storage medium and terminal
JP5997848B2 (en) Mobile terminal resource processing method, apparatus, client-side computer, server, mobile terminal, program, and recording medium
CN103713943A (en) Native terminal operating system based application function realization method and device
WO2018210063A1 (en) Terminal system startup method and terminal
CN106933636B (en) Method and device for starting plug-in service and terminal equipment
WO2020107177A1 (en) Audio resource invoking method and apparatus, and electronic device
CN106933626B (en) Application association method and device
CN110114756A (en) One type discharging method and electronic equipment
CN116089924A (en) Method, device, computer equipment and storage medium for accessing permission data
CN110753909B (en) Service scheduling method and device, computer equipment and computer readable storage medium
WO2019128545A1 (en) Process handling method, and electronic device and computer-readable storage medium
CN117076089B (en) Application management method, terminal device and storage medium
US20230274036A1 (en) Data reading method, storage medium, and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17928116

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928116

Country of ref document: EP

Kind code of ref document: A1