System application upgrading method and vehicle

By obtaining the upgrade package and determining the target upgrade method, and upgrading the system application separately without or restarting the operating system, the problem of low upgrade efficiency in the existing technology is solved and more efficient and low-cost system application upgrades are achieved.

CN120508300APending Publication Date: 2025-08-19BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703917.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, the upgrade efficiency of system applications is low, and the need to flash the entire machine leads to a long upgrade cycle and high cost.

Method used

Provide a method for upgrading system applications. By obtaining the upgrade package and determining the target upgrade method, the system application is upgraded separately by adopting the first upgrade method without restarting the operating system or the second upgrade method requiring restarting the operating system.

Benefits of technology

It effectively reduces the upgrade cycle of system applications, improves the upgrade efficiency, and reduces the upgrade cost. At the same time, users can use electronic devices normally during the upgrade process, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508300A_ABST
    Figure CN120508300A_ABST
Patent Text Reader

Abstract

The invention discloses a system application upgrading method and a vehicle, and relates to the technical field of application upgrading. According to the method, an upgrade package of a to-be-upgraded system application can be obtained, and a target upgrade mode of the system application is determined. And then, the method can upgrade the system application by adopting the target upgrade mode based on the upgrade package. Therefore, for a certain to-be-upgraded system application, the method can independently upgrade the system application by adopting the target upgrade mode according to the upgrade package of the system application, and the electronic equipment does not need to be flashed to upgrade the system application, so that the upgrade efficiency of the system application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application upgrade technology, and in particular to a system application upgrade method and vehicle. Background Art

[0002] The vehicle may be installed with system applications. During use, certain defects may occur in the system applications, in which case the system applications need to be upgraded (hereinafter referred to as "upgrade").

[0003] In related technologies, an over-the-air (OTA) server compiles and packages the vehicle's operating system and all system applications installed in the operating system into an OTA package, which is then distributed to the vehicle. The vehicle can then flash the system based on this OTA package to upgrade a specific system application. This means that a system application can be upgraded through OTA technology, a complete device upgrade.

[0004] This shows that the upgrade efficiency of system applications in related technologies is low. Summary of the Invention

[0005] This application provides a system application upgrade method and vehicle, which can solve the problem of low system application upgrade efficiency in related technologies. The technical solution is as follows:

[0006] In one aspect, a method for upgrading a system application is provided, the method comprising:

[0007] Obtain the upgrade package of the system application to be upgraded;

[0008] Determining a target upgrade method for the system application, the target upgrade method including: one of a first upgrade method and a second upgrade method; wherein the first upgrade method does not require restarting the operating system, and the second upgrade method requires restarting the operating system;

[0009] Based on the upgrade package, the system application is upgraded using the target upgrade method.

[0010] On the other hand, a vehicle-mounted device is provided, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the system application upgrade method as described in the above aspects when executing the computer program.

[0011] On the other hand, a vehicle is provided, comprising: the vehicle-mounted device as described in the above aspect.

[0012] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the system application upgrade method described in the above aspects is implemented.

[0013] The beneficial effects of the technical solution provided by this application include at least:

[0014] The present application provides a method for upgrading a system application. The method can obtain an upgrade package for the system application to be upgraded and determine a target upgrade method for the system application. Then, the method can upgrade the system application based on the upgrade package and the target upgrade method. As can be seen, for a certain system application to be upgraded, the method can upgrade the system application separately based on the upgrade package of the system application and the target upgrade method, without having to flash the electronic device to upgrade the system application. Therefore, on the one hand, the upgrade cycle of the system application is effectively reduced, thereby improving the upgrade efficiency of the system application; on the other hand, the upgrade cost of the system application can be effectively reduced.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flowchart of a system application upgrade method provided in an embodiment of the present application;

[0017] Figure 2 This is a flowchart of another system application upgrade method provided in an embodiment of the present application;

[0018] Figure 3 It is a structural diagram of a vehicle-mounted device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0020] An embodiment of the present application provides an electronic device having an operating system. The operating system has a system application installed therein. The system application is generally resident in system memory. Furthermore, the system application can be started after the operating system is started and can automatically restart if it is killed.

[0021] Optionally, the operating system may be an Android operating system, referred to as the Android system. System applications installed in the Android system all have a persistent attribute, and the attribute value of the persistent attribute of the system applications installed in the Android system is a target value, which is true. System applications installed in the Android system may also be referred to as persistent applications. In addition, third-party applications other than system applications may also be installed in the Android system.

[0022] The electronic device may be a mobile terminal (such as a mobile phone, a laptop computer or a tablet computer), a fixed terminal or a vehicle computer device, etc.

[0023] The embodiment of the present application provides a method for upgrading a system application, which is applied to an electronic device. Figure 1 , the method comprising:

[0024] Step 101: Obtain an upgrade package for the system application to be upgraded.

[0025] The electronic device may obtain the download address of the upgrade package and download the upgrade package based on the download address.

[0026] Step 102: Determine the target upgrade method for the system application.

[0027] The target upgrade method includes one of a first upgrade method and a second upgrade method. The first upgrade method does not require restarting the operating system. The second upgrade method requires restarting the operating system. Specifically, the first upgrade method does not restart the operating system and kills system applications to perform the upgrade.

[0028] In an embodiment of the present application, after a system application installed in the operating system is killed, the operating system can automatically restart the system application and restore the process of the system application and at least one running component to the state before the system application was killed, so as to restore the operation of the system application. The at least one component includes at least a service component. If the operating system restarts the new version system application because the old version system application is killed, and the state of the new version system application can be restored to the state before the system application is upgraded, the electronic device can determine that the target upgrade method is the first upgrade method, that is, there is no need to restart the operating system, and kill the old version system application to upgrade the system application. Among them, the old version system application is the system application before the upgrade, and the new version system application is the system application after the upgrade.

[0029] If the operating system cannot restore the state of the new version system application to the state before the system application upgrade after restarting the new version system application, the electronic device can determine that the target upgrade method is the second upgrade method, that is, it is necessary to restart the operating system to upgrade the system application.

[0030] Step 103: Based on the upgrade package of the system application to be upgraded, the system application is upgraded in a target upgrade manner.

[0031] After the electronic device determines the target upgrade method for the system application, it can upgrade the system application in the target upgrade method based on the upgrade package.

[0032] In summary, an embodiment of the present application provides a method for upgrading a system application, which can obtain an upgrade package of a system application to be upgraded and determine a target upgrade method for the system application. Then, the method can upgrade the system application based on the upgrade package using the target upgrade method. It can be seen that for a certain system application to be upgraded, the method can upgrade the system application separately using the target upgrade method based on the upgrade package of the system application, without having to flash the electronic device to upgrade the system application. Therefore, on the one hand, the upgrade cycle of the system application is effectively reduced, thereby improving the upgrade efficiency of the system application; on the other hand, the upgrade cost of the system application can be effectively reduced.

[0033] The embodiment of the present application takes the operating system as the Android system and the electronic device as the vehicle-mounted device as an example to illustrate the upgrade method of the system application provided by the embodiment of the present application. Figure 2 , the method may include:

[0034] Step 201: Obtain the in-vehicle application to be upgraded.

[0035] The in-vehicle application may be one of the following applications: a system application and a third-party application.

[0036] The vehicle may have a software management application installed. After the vehicle is started, the software management application running in the vehicle can pull application upgrade information from the management server. This application upgrade information may include: the identifier of the in-vehicle application to be upgraded, the download address of the in-vehicle application upgrade package, and the version number of the upgrade package.

[0037] The number of the in-vehicle applications to be upgraded may be one or more. The identifier of each in-vehicle application may be used to uniquely identify the in-vehicle application, for example, the identifier is the package name of the in-vehicle application.

[0038] It is understandable that the management server can be a background server of a software management application. Optionally, the management server can be a single server, or a server cluster consisting of several servers, or a cloud computing service center.

[0039] Step 202: Obtain an upgrade package for the in-vehicle application to be upgraded.

[0040] For each in-vehicle application to be upgraded, after the vehicle obtains the download address of the upgrade package of the in-vehicle application, the upgrade package of the in-vehicle application can be downloaded based on the download address. The upgrade package can be an Android application package (APK) file.

[0041] For example, an application upgrade service may be running in the vehicle, and the application upgrade service may download an upgrade package of the in-vehicle application based on the download address of the in-vehicle application to be upgraded.

[0042] Step 203: Detect whether the in-vehicle application is a system application.

[0043] For each in-vehicle application to be upgraded, if the vehicle (eg, the application upgrade service) determines that the in-vehicle application is not a system application, step 204 may be executed. If the vehicle determines that the in-vehicle application is a system application, step 205 may be executed.

[0044] In an embodiment of the present application, the attribute value of the persistent attribute of the system application installed in the Android system is generally "true". Based on this, for each in-vehicle application to be upgraded, the vehicle can detect the attribute value of the persistent attribute of the in-vehicle application to detect whether the in-vehicle application is a system application. If the vehicle determines that the attribute value of the persistent attribute of the in-vehicle application is "true", it can be determined that the in-vehicle application is a system application. If the vehicle determines that the attribute value of the persistent attribute of the in-vehicle application is not "true", it can be determined that the in-vehicle application is not a system application.

[0045] Optionally, all system applications installed in the Android system will be launched and in the running state after the Android system boots. Based on this, if there are multiple in-vehicle applications to be upgraded, the vehicle can first filter out the running in-vehicle applications from the multiple in-vehicle applications. Then, for each running in-vehicle application, the vehicle checks the value of the persistent attribute of the in-vehicle application to determine whether the in-vehicle application is a system application.

[0046] Because the vehicle can obtain the operating status of in-vehicle applications faster than the value of their persistent attributes, first filtering out in-vehicle applications that are in an operating state and then determining system applications from these in-vehicle applications can improve the efficiency of determining system applications. The operating status of an in-vehicle application can be either operating or non-operating.

[0047] Step 204: directly install the upgrade package of the vehicle-mounted application.

[0048] If the vehicle determines that the in-vehicle application to be upgraded is not a system application, the upgrade package of the in-vehicle application can be directly installed to upgrade the in-vehicle application.

[0049] Step 205: Determine the target upgrade method for the system application.

[0050] If the vehicle determines that the in-vehicle application to be upgraded is a system application, it can determine a target upgrade method for the system application. The target upgrade method includes one of a first upgrade method and a second upgrade method. The first upgrade method does not require an operating system restart. The second upgrade method requires an operating system restart. Specifically, the first upgrade method is a method that kills the system application to perform the upgrade without restarting the operating system, also known as a kill-recovery method.

[0051] In an embodiment of the present application, after a system application installed in the Android system is killed, the Android system can automatically restart the system application and restore the system application process and at least one running component to the state before the system application was killed, thereby resuming the operation of the system application. The at least one component includes at least a Service component.

[0052] If the vehicle's Android system restarts a new version of the system application after the old version of the system application is killed, and is able to restore the state of the new version of the system application to the state before the system application upgrade, the vehicle can determine that the target upgrade method is the first upgrade method. If the vehicle's Android system cannot restore the state of the new version of the system application to the state before the system application upgrade after restarting the new version of the system application, the vehicle can determine that the target upgrade method is the second upgrade method.

[0053] It should be understood that restoring the state of the new version system application to the state before the system application upgrade means: restoring the components of the new version system application to the state before the upgrade, and restoring the process of the new version application to the state before the upgrade.

[0054] In the embodiment of the present application, once at least one component of the system application is restored, the system application process can be restored. There are generally two ways to start each component: searching and starting the application component by its component name; and searching and starting the component by its startup conditions. The startup conditions for each component can be determined based on the attribute values of the action, category, and data attributes in the component's intent filter.

[0055] Based on this, the vehicle can detect whether the upgrade package of the system application includes the component information of the target component. If it is determined that the upgrade package includes the component information of the target component, the vehicle can detect whether the component information of the target component in the upgrade package matches the component information of the target component in the running system application (i.e., the old version of the system application). The component information of the target component includes: the component name of the target component and the startup conditions of the target component.

[0056] If the vehicle determines that the component information of the target component included in the upgrade package matches the component information of the target component of the system application (in this case, the system application before the upgrade), it can be determined that after the new version of the system application is restarted due to the old version of the system application being killed, the process and target component of the new version of the system application can be restored to the state before the upgrade, and then the target upgrade method of the system application can be determined to be the first upgrade method. If the vehicle determines that the upgrade package does not include the component information of the target component, or the component information of the target component included in the upgrade package does not match the component information of the target component of the system application, it can be determined that after the new version of the system application is restarted due to the old version of the system application being killed, the process and target component of the new version of the system application cannot be restored to the state before the upgrade, and then the target upgrade method of the system application can be determined to be the second upgrade method.

[0057] Among them, the component information of the target component included in the upgrade package matches (or does not match) the component information of the target component of the system application, which means that the component information of the target component included in the upgrade package is the same as (or different from) the component information of the target component of the system application.

[0058] The target components include the components that are running in the system application. For example, the target components may include: Service components. Or, the target components may include: Service components and Activity components. In the case where the target components include Service components and Activity components, if the vehicle determines that the component information of the Service component in the upgrade package is the same as the component information of the Service component in the system application, and the component information of the Activity component in the upgrade package is the same as the component information of the Activity component in the system application, then the component information of the target component included in the upgrade package can be matched with the component information of the target component of the system application. If the vehicle determines that the component information of the Service component in the upgrade package is different from the component information of the Service component in the system application, and / or the component information of the Activity component in the upgrade package is different from the component information of the Activity component in the system application, then it can be determined that the component information of the target component included in the upgrade package does not match the component information of the target component of the system application.

[0059] In an embodiment of the present application, under the first upgrade method, if the vehicle needs to prohibit the restoration of the Activity component of the new version of the system application after restarting the new version of the system application due to the old version of the system application being killed, so as to avoid displaying the application interface of the system application after the new version of the system application is restarted, then after determining that the target upgrade method is the first upgrade method, before installing the upgrade package of the system application, the running Activity component of the system application can be cleared. After the Activity component is cleared, the running components of the system application will only include the Service component. Clearing the Activity component means clearing the instance of the Activity component.

[0060] If the vehicle needs to restart a new version of the system application after the old version of the system application is killed, and needs to run the activity component of the new version of the system application, it can be determined that there is no need to clear the activity components running in the system application. In this case, the running components in the system application may include: Service components and Activity components.

[0061] It is understandable that after the old version of the system application is killed and the new version of the system application is restarted, the method of prohibiting the restoration of the Activity component of the system application can upgrade the system application without the user's perception.

[0062] In an embodiment of the present application, for each system application to be upgraded, the vehicle can clear the Activity component running in the system application to upgrade the system application without being noticed. Alternatively, for the system application to be upgraded, the vehicle can detect whether the system application is the target application. If the vehicle determines that the system application is not the target application, the Activity component running in the system application can be cleared. If the vehicle determines that the system application is the target application, it can be determined that there is no need to clear the Activity component running in the system application.

[0063] The target application is an application that needs to display an application interface after the vehicle is started and before receiving a user operation. For example, the target application can be a desktop application.

[0064] In an embodiment of the present application, the Android system includes a package installer service for installing upgrade packages. After the vehicle determines the target upgrade method for the system application, it can update the installation mode of the package installer service, and the updated installation mode is used to indicate the target upgrade method for the system application.

[0065] For example, for the second upgrade mode, the installation mode after the update may be a staged (STAGED) mode. For the second upgrade mode, the installation mode after the update may be an INSTALL_STAGED mode.

[0066] Step 206: Based on the upgrade package, the system application is upgraded using a target upgrade method.

[0067] For a system application to be upgraded, after the vehicle determines the target upgrade method for the system application, the system application can be upgraded using the target upgrade method.

[0068] If the target upgrade method is the second upgrade method, the vehicle can restart the operating system and install the upgrade package of the system application during the restart of the operating system to upgrade the system application. Then, the vehicle can start the new version of the system application.

[0069] In an embodiment of the present application, the Android system also includes: a package manager service (PMS) and an activity manager service (AMS). After the vehicle determines that the target upgrade method is the second upgrade method, the package installation service can create an installation session, write the session parameters of the installation session into the vehicle's local configuration file, and copy the upgrade package of the system application to a temporary folder. Afterwards, the application upgrade service in the vehicle can verify the upgrade package and, after determining that the upgrade package passes the verification, notify the operating system to restart. After the operating system restarts and completes the necessary initialization work, it can trigger a system ready (systemReady) callback. After receiving the systemReady callback, the PMS can first read the session parameters of the installation session recorded in the configuration file, and based on the session parameters, submit the upgrade package to be installed to the installation queue, so that the package installation service can read it from the installation queue and execute the installation process. After the upgrade package is installed, the AMS starts to start all system applications to start the new version of the system application. Afterwards, the Android system executes the native system (i.e., operating system) startup process, and the system application upgrade is successful.

[0070] The session parameters for the installation session include: a session identifier (ID), the name of the upgrade package, the user ID, the creation time of the installation session, the update time, the path of a temporary folder for receiving the upgrade package, a flag indicating whether the upgrade package has passed verification, and a flag indicating whether the upgrade package has been installed. The configuration file may be install_sessions.xml. The package installation service can copy the upgrade package to the temporary folder based on the path of the temporary folder in the session parameters.

[0071] In an embodiment of the present application, the upgrade package may include a package name, a version number, and signature information. If the application upgrade service determines that the package name of the upgrade package is the same as the package name of the system application to be upgraded, the version number of the upgrade package is higher than the version number of the system application, and based on the signature information, it is determined that the upgrade package has not been tampered with, then it can be determined that the upgrade package has passed the verification. If the application upgrade service determines that the package name of the upgrade package is different from the package name of the system application to be upgraded, and / or, the version number of the upgrade package is lower than or equal to the version number of the system application, and / or, based on the signature information, it is determined that the upgrade package has been tampered with, then it can be determined that the upgrade package has not passed the verification.

[0072] It is understandable that during the process of upgrading the system application, the vehicle can update the update time in the installation session, the flag indicating whether the upgrade package has been verified, and the flag indicating whether the upgrade package has been installed.

[0073] In an embodiment of the present application, if the vehicle determines that the system application needs to be updated immediately, a soft reboot of the operating system can be performed to quickly reboot the operating system. If the vehicle determines that the system application does not need to be updated immediately, the operating system can be started the next time the vehicle's onboard equipment is started.

[0074] It is understood that the upgrade package of the system application may further include a flag bit for indicating whether the system application needs to be upgraded immediately. The vehicle may determine whether the system application needs to be upgraded immediately based on the flag value of the flag bit.

[0075] If the target upgrade method is the first upgrade method, the vehicle can install the upgrade package. During the installation of the upgrade package, it is prohibited to terminate the old version of the system application. After the upgrade package is installed, the vehicle can terminate the old version of the system application, then restart the new version of the system application, and run the new version of the system application based on the running data of the old version of the system application to restore the state of the new version of the system application to the state before the upgrade.

[0076] The operation data includes: state data of the system application's processes and state data of the system application's components. Accordingly, the vehicle running the new version of the system application based on the operation data of the old version of the system application to restore the state of the new version of the system application to the state before the upgrade can include: running the new version of the system application and restoring the state data of the new version of the system application's processes to the state data of the old version of the system application's processes, and restoring the state data of the new version of the system application's components to the state data of the old version of the system application's components, so as to restore both the new version of the system application's processes and components to the state before the upgrade.

[0077] In this embodiment of the present application, before the upgrade package is installed, the user can use a certain system application. In this case, the application information of the system application's application process is the application information of the old version of the system application. After the upgrade package is installed, before the Android system kills the old version of the system application, the user may need to continue using this system application, such as creating a new page. In this case, the Android system needs to continue running the application process based on the application information of the new version of the system application to avoid information errors in the system application.

[0078] Because the Android system cannot obtain the application information of the new version system application before the new version system application is restarted, and can only continue to read the application information from the storage location of the application information of the old version system application, the vehicle can also actively modify the application information of the application process of the old version system application before killing the old version system application.

[0079] The modified application information is the same as the application information recorded in the upgrade package. This application information is the configuration information recorded in the system application's AndroidManifest.xml file. This application information includes at least: the system application's component information, permission information, and theme information. For example, this application information may include: the system application's component information, permission information, theme information, version information, and package name.

[0080] The permission information may include: the name of the permission required for the system application to run, that is, the permission information is used to indicate the permission required for the system application to run. The theme of the system application (also known as the skin) determines the interface style of the system application. Accordingly, the theme information may include: the name of the theme, and the display information of the theme elements of the theme. The theme elements may be: background, font or control, etc. The display information of the background may include: the color of the background, and the display information of the font may include: the type, color and size of the font, etc. The display information of the control may include: the position and color of the control in the interface, etc. The version information may include: version number, version name and release date, etc.

[0081] Optionally, the vehicle can obtain the AndroidManifest.xml file in the upgrade package based on the storage path of the upgrade package, and can directly replace the AndroidManifest.xml file of the old version system application with the AndroidManifest.xml file obtained from the upgrade package to achieve the effect of modifying the application information of the application process of the old version system application.

[0082] It is understood that the order of the steps of the system application upgrade method provided in the embodiment of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly. For example, step 202 and step 203 can be executed simultaneously. Any person skilled in the art can easily think of a method of variation within the technical scope disclosed in this application, and all such variations should be included in the scope of protection of this application, so they will not be described in detail.

[0083] In summary, the embodiment of the present application provides a method for upgrading a system application, which can obtain an upgrade package of the system application to be upgraded and determine a target upgrade method for the system application. Then, the method can upgrade the system application based on the upgrade package using the target upgrade method. It can be seen that for a certain system application to be upgraded, the method can upgrade the system application separately using the target upgrade method based on the upgrade package of the system application, without the need to flash the electronic device to upgrade the system application. Therefore, on the one hand, the upgrade cycle of the system application is effectively reduced, thereby improving the upgrade efficiency of the system application; on the other hand, the upgrade cost of the system application can be effectively reduced; on the other hand, the OTA whole-machine upgrade method prohibits user operations during the upgrade process, while the method provided by the embodiment of the present application allows users to use the electronic device normally during the upgrade process, thereby improving the user experience.

[0084] The present application embodiment provides a vehicle-mounted device, see Figure 3 The vehicle machine device 100 includes a processor 110 and a memory 120 . The processor 110 and the memory 120 are connected, for example, via a bus 130 .

[0085] The processor 110 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 110 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0086] The bus 130 may include a path for transmitting information between the above components. The bus 130 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 130 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0087] The memory 120 is used to store a computer program corresponding to the system application upgrade method of the above embodiment of the present application, and the computer program is controlled and executed by the processor 110. The processor 110 is used to execute the computer program stored in the memory 120 to implement the content shown in the above method embodiment. That is, the processor 110 is used to:

[0088] Obtain the upgrade package of the system application to be upgraded;

[0089] Determining a target upgrade method for the system application, the target upgrade method including: one of a first upgrade method and a second upgrade method, wherein the first upgrade method does not require restarting the operating system, and the second upgrade method requires restarting the operating system;

[0090] Based on the upgrade package, the system application is upgraded using the target upgrade method.

[0091] Optionally, the target upgrade mode is the first upgrade mode. The processor 110 may be configured to:

[0092] Install the upgrade package. During the installation of the upgrade package, it is prohibited to kill the old version system application. The old version system application is the system application before the upgrade;

[0093] After completing the installation of the upgrade package, kill the old version of the system application;

[0094] Based on the running data of the old version system application, the new version system application is run to restore the state of the new version system application to the state before the system application is upgraded, wherein the new version system application is the upgraded system application.

[0095] Optionally, the running data includes: status data of the process of the system application and status data of the components of the system application. The processor 110 can be used to:

[0096] Run the new version system application, and restore the state data of the new version system application process to the state data of the old version system application process, and restore the state data of the new version system application component to the state data of the old version system application component.

[0097] Optionally, the processor 110 may also be configured to:

[0098] Modify the application information of the old version of the system application. The modified application information is the same as the application information in the upgrade package. The application information at least includes: the version number of the system application.

[0099] Optionally, the processor 110 may also be configured to:

[0100] Before killing the old version system application, modify the application information of the application process of the old version system application, and the modified application information is the same as the application information in the upgrade package.

[0101] Optionally, the processor 110 may be configured to:

[0102] If the system application is not the target application, the active component of the system application is cleared.

[0103] Optionally, the target upgrade mode is the second upgrade mode. The processor 110 may be configured to:

[0104] Restart the operating system;

[0105] During the operating system restart process, install the upgrade package;

[0106] Launch the upgraded system application.

[0107] Optionally, the processor 110 may be configured to:

[0108] If system applications require immediate upgrade, perform a soft reboot of the operating system;

[0109] If the system application does not need to be upgraded immediately, the operating system will be started after the electronic device on which the operating system is installed is started next time.

[0110] Optionally, the processor 110 may be configured to:

[0111] If the component information of the target component included in the upgrade package matches the component information of the target component of the system application, determining that the target upgrade mode of the system application is the first upgrade mode;

[0112] If the upgrade package does not include the component information of the target component, or the component information of the target component included in the upgrade package does not match the component information of the target component of the system application, determining that the target upgrade mode of the system application is the second upgrade mode;

[0113] The component information of the target component includes: the class name of the target component and the starting condition of the target component.

[0114] Optionally, the target component includes a running component in a system application.

[0115] In summary, the embodiments of the present application provide a vehicle-mounted device that can obtain an upgrade package for a system application to be upgraded and determine a target upgrade method for the system application. The vehicle-mounted device can then upgrade the system application based on the upgrade package using the target upgrade method. Thus, for a system application to be upgraded, the vehicle-mounted device can independently upgrade the system application using the target upgrade method based on the upgrade package for the system application, without having to flash the vehicle-mounted device to upgrade the system application. This effectively reduces the upgrade cycle of the system application, thereby improving the upgrade efficiency of the system application; and can also effectively reduce the upgrade cost of the system application.

[0116] The embodiment of the present application also provides a vehicle, which may include: Figure 3 The vehicle equipment is an intelligent vehicle with an operating system. Optionally, the vehicle can be a car, bus, or truck.

[0117] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the system application upgrade method provided in the above method embodiment is implemented. Figure 1 or Figure 2 The method shown.

[0118] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0119] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0120] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0121] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0122] In this application, unless otherwise specified or limited, the terms "installed," "connected," "connect," "fixed," etc. should be understood in a broad sense. For example, they can refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will understand the specific meanings of the above terms in this application based on specific circumstances.

[0123] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for upgrading a system application, characterized in that: The method comprises: Obtain the upgrade package of the system application to be upgraded; Determining a target upgrade method for the system application, the target upgrade method comprising: one of a first upgrade method and a second upgrade method, wherein the first upgrade method does not require restarting the operating system, and the second upgrade method requires restarting the operating system; Based on the upgrade package, the system application is upgraded using the target upgrade method.

2. The method according to claim 1, characterized in that The target upgrade method is the first upgrade method; Based on the upgrade package, upgrading the system application using the target upgrade method includes: Install the upgrade package, and during the installation of the upgrade package, prohibit killing the old version system application, the old version system application being the system application before the upgrade; After completing the installation of the upgrade package, kill the old version system application; Based on the running data of the old version system application, a new version system application is run to restore the state of the new version system application to the state before the system application is upgraded, wherein the new version system application is the upgraded system application.

3. The method according to claim 2, characterized in that The running data includes: state data of the process of the system application and state data of the components of the system application; running the new version system application based on the running data of the old version system application to restore the state of the new version system application to the state before the system application was upgraded, including: Run the new version system application, and restore the state data of the process of the new version system application to the state data of the process of the old version system application, and restore the state data of the components of the new version system application to the state data of the components of the old version system application.

4. The method according to claim 2 or 3, characterized in that Before killing the old version system application, the method further includes: The application information of the application process of the old version system application is modified, and the modified application information is the same as the application information in the upgrade package.

5. The method according to claim 1, wherein The target upgrade method is the second upgrade method; Based on the upgrade package, upgrading the system application using the target upgrade method includes: restarting the operating system; During the restart of the operating system, installing the upgrade package; The upgraded system application is started.

6. The method according to claim 5, characterized in that Restarting the operating system includes: If the system application needs to be updated immediately, a soft reboot is performed on the operating system; If the system application does not need to be upgraded immediately, the operating system will be started after the electronic device on which the operating system is installed is started next time.

7. The method according to any one of claims 1 to 6, characterized in that: Determine the target upgrade method for the system application, including: If the component information of the target component included in the upgrade package matches the component information of the target component of the system application, determining that the target upgrade mode of the system application is the first upgrade mode; If the upgrade package does not include the component information of the target component, or the component information of the target component included in the upgrade package does not match the component information of the target component of the system application, determining that the target upgrade mode of the system application is the second upgrade mode; The component information of the target component includes: the component name of the target component and the startup condition of the target component.

8. The method according to claim 7, characterized in that The target component includes a running component in the system application.

9. A vehicle-mounted device, characterized in that: The vehicle-mounted device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

10. A vehicle, characterized in that: The vehicle includes: the vehicle machine device as claimed in claim 9.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.