CN116775084B - System upgrading method and electronic equipment - Google Patents

System upgrading method and electronic equipment Download PDF

Info

Publication number
CN116775084B
CN116775084B CN202311062410.4A CN202311062410A CN116775084B CN 116775084 B CN116775084 B CN 116775084B CN 202311062410 A CN202311062410 A CN 202311062410A CN 116775084 B CN116775084 B CN 116775084B
Authority
CN
China
Prior art keywords
installation
upgrade
target
service
service module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311062410.4A
Other languages
Chinese (zh)
Other versions
CN116775084A (en
Inventor
赵冰清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311062410.4A priority Critical patent/CN116775084B/en
Publication of CN116775084A publication Critical patent/CN116775084A/en
Application granted granted Critical
Publication of CN116775084B publication Critical patent/CN116775084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a system upgrading method and electronic equipment, and relates to the field of computers. The application provides a system upgrading method, when an OUC detects a system upgrading instruction, a first connection is allocated for the current time, a first service module receives the installation state of an upgrading engine service through the first connection, the first service module indicates the upgrading engine service to install a target system upgrading installation package according to the installation state and a target installation mark in the current life cycle, and the first connection is disconnected after the installation is finished and the life cycle of the installation is finished. By adopting the method, the electronic equipment can be normally installed when the system upgrade installation package of the parameter type and the system upgrade installation package of the patch type (or the hota type) are installed at the same time, so that the problem of disordered installation is avoided, and the electronic equipment can also be timely installed with the system upgrade installation package of the parameter type.

Description

System upgrading method and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for upgrading a system and an electronic device.
Background
The terminal device usually needs to install a system to be used by a user, for example, an android system, an iOS system and the like are installed in a mobile phone. The terminal device may send a packet search request to the server, and the server searches whether a system upgrade installation packet of a parameter, hota or patch type exists in response to the packet search request, and returns a packet search result to the terminal device. And the terminal equipment receives the packet searching result, and if the terminal equipment determines that the packet searching is successful according to the packet searching result, the terminal equipment can acquire the searched system upgrade installation packet from the server and install the new version of the system upgrade installation packet.
However, if the terminal device installs the system upgrade installation package of the parameter version and the system upgrade installation package of the hota version at the same time, or installs the system upgrade installation package of the parameter version and the system upgrade installation package of the patch version at the same time, a problem of installation conflict may occur, for example, in the process of installing the patch type system upgrade installation package by the terminal device, the terminal device receives a message that the installation of the parameter version system upgrade installation package is successful or failed, and a decompression interface corresponding to the parameter in the terminal device is called for multiple times.
Disclosure of Invention
In order to solve the technical problems, the application provides a system upgrading method and electronic equipment, which can prevent the problem of disordered installation when the electronic equipment installs a parameter type system upgrading installation package and a patch type (or hota type) system upgrading installation package at the same time, and simultaneously, the electronic equipment can install the parameter type system upgrading installation package in time, so that the performance of the electronic equipment is improved.
In a first aspect, the present application provides a method for system upgrade, comprising: the system updating application detects a system updating instruction, and distributes a first connection for a target system updating installation package to be installed at the time, wherein the first connection is used for the first business module of the system updating application to communicate with the updating engine service; the first business module receives the state of the upgrade engine service sent by the upgrade engine service in real time through the first connection; in the life cycle of the installation, the first business module allows the use of the state of the received upgrade engine service; if the state of the upgrade engine service is an available state, the first business module generates an installation instruction according to the state of the upgrade engine service and a target installation identifier, and sends the installation instruction to the upgrade engine service, wherein the target installation identifier is used for indicating whether the current business module calls a target installation interface in the upgrade engine service, and the target installation interface is an installation interface corresponding to the type of a target system upgrade installation package; the upgrade engine service responds to the installation instruction to install a target system upgrade installation package; and if the first service module determines that the installation is finished, marking that the life cycle of the installation is finished and disconnecting the first connection.
In this way, the system updating application allocates a corresponding connection (i.e., a first connection) for the target system upgrade installation package to be installed at this time, and after the first connection is established, the first service module receives the state sent by the upgrade engine service in real time, while in this example, the first service module allows to use the state of the upgrade engine service in the lifecycle of the installation at this time, so that the problem that installation errors and confusion occur due to the fact that the first service module uses the received state of the upgrade engine service in a period from the operation of executing the first connection disconnection by the first service module to the first connection disconnection can be avoided; because the target installation identifier can indicate whether the current service module invokes the target installation interface in the upgrade engine service, the information of whether the upgrade engine service is indicated to install the target system upgrade installation package this time can be enriched by the newly added target installation identifier, so that the first service module can accurately determine whether the installation process of the upgrade engine service is occupied or not, and install the target system upgrade installation package (such as a parameter type, a patch type or a hota type) in time, thereby avoiding the problem of installation conflict caused by the system upgrade installation package of the parameter type and other system upgrade installation packages (namely the system upgrade installation package of the patch type or the system upgrade installation package of the hota type) which are simultaneously installed by the upgrade engine service. Meanwhile, the upgrade engine service timely installs a target system upgrade installation package (such as a parameter type system upgrade installation package), so that the performance of the electronic equipment can be improved.
According to a first aspect, during a life cycle of the present installation, the first service module allows use of the received state of the upgrade engine service, including: the method comprises the steps that a first service module obtains first identification information, wherein the first identification information is used for indicating whether the life cycle of the installation is finished or not, and initial first identification information indicates that the life cycle of the installation is not finished; if the first service module detects that the first identification information indicates that the life cycle of the installation is not finished, the first service module allows the use of the state of the upgrade engine service; and if the first service module detects that the first identification information indicates that the life cycle of the installation is finished, the first service module discards the state of the upgrade engine service.
Therefore, the first service module can quickly determine the time when the life cycle of the installation is finished through the first identification information, so that the state of the upgrade engine service can be not used when the first service module is in the operation of disconnecting the first connection, and the problem that the state of the upgrade engine service is still used by the first service module due to long time consumed by disconnecting the first connection is avoided.
According to the first aspect, a system updating application detects a system updating instruction and distributes a first service module for a target system updating installation package to be installed at this time; the first business module sends a service request to the upgrade engine service, wherein the service request is used for requesting an upgrade engine service installation target system upgrade installation package; the upgrade engine service establishes a first connection with a first business module binding interface definition language, AIDL, interface in response to the service request. In this way, the first service module binds the AIDL interface to enable the first connection to correspond to the installation target system upgrade installation package, so that each connection is ensured to be used for transmitting data related to the target system upgrade installation package, and the installation accuracy is ensured.
According to a first aspect, marking the end of the lifecycle of the present installation comprises: the first service module updates the first identification information to indicate that the life cycle of the current installation has ended. Therefore, the first service module marks the end of the life cycle of the installation by modifying the first identification information, and the method is simple and quick and has short time consumption.
According to a first aspect, a first business module generates an installation indication according to a state of an upgrade engine service and a target installation identifier, including: if the first service module detects that the state of the upgrade engine service is an idle state and detects that the target installation identifier indicates that the first service module does not call the target installation interface, the first service module determines that the installation indicator indicates that the upgrade engine service installs the upgrade installation package of the target system, and updates the target installation identifier to indicate that the first service module has called the target installation interface; the initial target installation identifier indicates that the first service module does not call the target installation interface. In this way, the first service module can quickly determine whether the upgrade engine service is installed in the target system upgrade installation package by judging whether the first service module calls the target installation interface in an idle state.
According to a first aspect, the method further comprises: the upgrade engine service updates a status of the upgrade engine service to a busy status in response to the installation indication. In this way, the upgrade engine service updates its installation status (i.e., the status of the upgrade engine service) in time.
According to a first aspect, the method further comprises: if the first business module detects that the state of the service of the upgrade engine is a busy state, detecting whether the establishment time of the first connection is overtime preset time; if the condition that the preset time length is exceeded is detected, detecting whether the target installation identifier indicates that the first service module calls the target installation interface; if not, the first service module determines that the target system upgrade installation package is installed next time. In this way, the first service module detects that the first connection is established overtime and does not call the target installation interface, and characterizes that the upgrade engine service is installing other system upgrade installation packages, for example, the target system upgrade installation package is an installation package of a parameter type, and the other system upgrade installation packages can be patch packages and hota. Since the upgrade engine service is installing other system upgrade installation packages, the first service module determines to wait for the next installation, and installation conflicts can be avoided. And when the first service module detects that the first connection is established overtime and the target installation interface is called, determining that the installation of the target system upgrade installation package fails, disconnecting the first connection, and avoiding the failure of the upgrade engine service to install the target system upgrade installation package for a long time.
According to a first aspect, the method further comprises: if the first service module determines that the next installation of the target system upgrade installation package is finished, the first service module determines that the installation is finished; after marking the end of the lifecycle of the present installation and disconnecting the first connection, the method further comprises: after the first service module disconnects the first connection for a second preset period of time, the system updating application allocates a second connection again for the target system upgrade installation package to be installed at this time so as to re-execute the installation of the target system upgrade installation package. In this way, the first service module reestablishes the second connection to attempt to install the target system upgrade installation package, so that the target system upgrade installation package can be installed in time, and the performance of the electronic device is improved.
According to a first aspect, the method further comprises: if the first service module detects that the target installation identifier indicates that the first service module has invoked the target installation interface, the first service module determines that the installation of the current installation target system upgrade installation package fails, marks the end of the life cycle of the current installation and disconnects the first connection. In this way, when the first service module detects that the installation of the upgrade installation package of the current installation target system fails, the first connection is disconnected and the end of the life cycle of the current installation is marked, so that the first service module can not use the received state of the upgrade engine service any more, and the situation that the upgrade engine service occupies the installation process for a long time after the installation failure is avoided.
According to a first aspect, a first business module generates an installation indication according to a state of an upgrade engine service and a target installation identifier, including: if the first service module detects that the detected state is the ending state and the target installation identifier indicates that the first service module does not call the target installation interface, the first service module determines that the installation indication indicates that the upgrade engine service installs the target system upgrade installation package, and updates the target installation identifier to indicate that the first service module has called the target installation interface; the initial target installation identifier indicates that the first service module does not call the target installation interface. Thus, when the first service module detects the ending state and does not call the target installation interface, the current installation is characterized in that the current installation is not the target system upgrading installation package, namely, the first service module recognizes that the current installation ending state is not the installation result of the current installation target system upgrading installation package through the target installation identifier, and further avoids the interference caused by the installation results of other system upgrading installation packages on the current target system upgrading installation package.
According to a first aspect, the method further comprises: if the first service module detects that the detected state is the ending state and the target installation identifier indicates that the first service module has called the target installation interface, the first service module determines that the target system upgrade installation package is successfully installed at the time; and marking the end of the life cycle of the installation and disconnecting the first connection. Therefore, when the first service module determines that the installation is successful, the first connection is disconnected, and the disorder of installation caused by receiving the installation results of other system upgrade installation packages can be avoided.
According to a first aspect, the method further comprises: if the first business module detects that the state of the upgrade engine service belongs to an unavailable state, the first business module marks the end of the life cycle of the current installation and disconnects the first connection; after the first service module disconnects the first connection for a second preset period of time, the system updating application allocates a second connection again for the target system upgrade installation package to be installed at this time so as to re-execute the installation of the target system upgrade installation package. Therefore, when the service of the upgrade engine is unavailable, the first service module directly tries to install next time, so that judging steps can be reduced, and the time for installing the upgrade installation package of the target system can be shortened.
According to a first aspect, types of target system upgrade installation packages include: parameter packs, hota or patch packs.
According to a first aspect, before the system update application detects a system upgrade instruction and allocates a first connection to a target system upgrade installation package to be installed at this time, the method further includes: the system updating application receives a system updating instruction of an installation target system updating installation package input by a user; or the system updating application detects that the electronic equipment is in a screen-off state and generates a system upgrading instruction for installing the target system upgrading installation package. Thus, the electronic equipment provides two modes for triggering the installation target system to upgrade the installation package, and provides convenience for a user to use the installation mode.
In a second aspect, the present application provides an electronic device comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory, which when executed by the one or more processors, cause the electronic device to perform the first aspect and a method of system upgrade corresponding to any implementation of the first aspect.
Any implementation manner of the second aspect and the second aspect corresponds to any implementation manner of the first aspect and the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a third aspect, the present application provides a computer readable medium storing a computer program, which when executed on an electronic device, causes the electronic device to perform a method for upgrading a system according to any implementation manner of the first aspect and the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram illustrating a collision of installation system upgrade packages in a mobile phone;
fig. 2 is a schematic structural view of an exemplary electronic device;
FIG. 3 is a block diagram of a software architecture of an exemplary electronic device;
FIG. 4 is a flow chart illustrating a system upgrade;
FIG. 5 is an interaction diagram between an OUC and an upgrade engine service, which is shown schematically;
fig. 6 is a schematic diagram illustrating an installation manner of setting a system upgrade installation package.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
Before the technical scheme of the embodiment of the application is described, the system upgrading of the embodiment of the application is described with reference to the attached drawings.
OTA (Over-the-Air Technology) upgrade is a standard software upgrade mode provided by an Android system, and is a Technology for remotely managing SIM card data and applications through an Air interface of mobile communication (GSM or CDMA). An OTA upgrade client (OTA Update Client, "OUC") in the terminal device may send a search request to the server, which searches for whether there is a system upgrade installation package to a parameter, hota or patch version in response to the search request, and returns a search result to the terminal device. The OUC of the terminal device receives the packet searching result, and if the OUC determines that the packet searching is successful, the OUC can acquire the searched system upgrade installation packet from the server and download the new version of the system upgrade installation packet.
The OUC in the terminal device may download multiple types of system upgrade installation packages simultaneously, where the types of system upgrade installation packages include: patches, hota or parameters. OUC can also download different types of system upgrade installation packages at different times. The OUC may install the system upgrade installation package according to the priority of the type of the system upgrade installation package. Typically, the priority of a patch, hota type system upgrade installation package is higher than the priority of a parameter type system upgrade installation package. The patch and the hota type system upgrade installation package occupy large capacity, and the time consumed by installing the patch or the hota type system upgrade installation package is long, so that the parameter type system upgrade installation package cannot be updated in time, and the performance of the terminal equipment is affected. In order to avoid that the terminal equipment cannot update the parameter type system upgrade installation package in time, the terminal equipment increases the priority of the parameter type system upgrade installation package so that the priority of the parameter type system upgrade installation package is the same as the priority of the patch or the hota type system upgrade installation package, namely, the terminal equipment immediately triggers the terminal equipment to install the parameter type system upgrade installation package after downloading the parameter type system upgrade installation package, and the terminal equipment does not need to install the parameter type system upgrade installation package after installing the patch or the hota type system upgrade installation package, thereby improving the system performance of the terminal equipment.
However, since the priority of the parameter type system upgrade installation package is the same as that of the patch, hota type system upgrade installation package, the OUC may instruct an upgrade engine service (updateenginervice) of the terminal device to install the parameter type system upgrade installation package and the patch type system upgrade installation package at the same time, or install the parameter type system upgrade installation package and the hota type system upgrade installation package at the same time. Because the installation process of the upgrade engine service is only one, installation conflict occurs, and the installation conflict can lead to the problems of disordered installation result, multiple installation of the installation package and the like. Fig. 1 is a schematic diagram illustrating a collision occurring when a mobile phone installation system upgrade package is exemplarily shown. As shown in fig. 1, the terminal device takes a mobile phone as an example, and the mobile phone has downloaded a patch type system upgrade installation package and is installing the patch type system upgrade installation package. When the OUC of the mobile phone detects that the searching result indicates that the new version of the parameter type system upgrading installation package exists, the mobile phone can prompt a user to update the parameters on a display interface. A prompt window 102 is displayed in the display interface 101 shown in fig. 1, and the prompt window 102 may display first prompt information, where the first prompt information is used to instruct a user to update the device optimization parameters. The prompt window 102 may also display a second prompt 103, the second prompt 103 being for instructing the user to initiate an automatic update function. If the user starts the automatic updating function, the terminal device does not display the interface to display the prompt window 102 when detecting that the searching result indicates that the new version of the parameter type system upgrade installation package exists. The terminal equipment automatically downloads a new version of the parameter type system upgrade installation package, and installs the new version of the parameter type system upgrade installation package when detecting that the terminal equipment is in a screen-off state.
In this example, as shown in 1a of fig. 1, the user clicks on the download and update control in the prompt window 102, and the OUC in the terminal device downloads the system upgrade installation package of the parameter type from the server in response to the instruction input by the user (i.e., downloads the system upgrade installation package and installs the system upgrade installation package). The OUC, after downloading the system upgrade installation package for the parameter type, instructs the upgrade engine service to install the system upgrade installation package for the parameter type. If the system upgrade installation package of the upgrade engine service installation patch type fails at this time, the state information is returned to the OUC, and after the OUC acquires the state, the upgrade engine service is instructed to finish installing the system upgrade package of the parameter type. A notification 105 of the failure of the software update is displayed in the display interface 104 of the handset.
In this example, since the upgrade engine service installs the patch type system upgrade installation package and the parameter type system upgrade installation package at the same time, when the parameter type system upgrade installation package is installed, the OUC receives an installation result (such as installation success and installation failure) of the patch type system upgrade installation package, and the OUC does not install the parameter type system upgrade installation package any more, or invokes the parameter type decompression interface many times, that is, installs the parameter type system upgrade installation package many times. Similarly, when the upgrade engine service installs a system upgrade installation package of a patch type (or a hota type), the OUC may receive an installation result (such as installation success or installation failure) of the system upgrade installation package of the installation parameter type, so that the OUC may no longer install the system upgrade installation package of the patch type (or the hota type), or call the decompression interface of the patch type (or the hota type) multiple times.
The embodiment of the application provides a system upgrading method, which is operated by electronic equipment, wherein a system upgrading application in the electronic equipment detects a system upgrading instruction, and distributes a first connection for a target system upgrading installation package to be installed at this time, wherein the first connection is used for the service communication between a first business module of the system upgrading application and an upgrading engine; the first business module receives the state of the upgrade engine service sent by the upgrade engine service in real time through the first connection; in the life cycle of the installation, the first business module allows the use of the state of the received upgrade engine service; if the state of the upgrade engine service is an available state, the first business module generates an installation instruction according to the state of the upgrade engine service and a target installation identifier, and sends the installation instruction to the upgrade engine service, wherein the target installation identifier is used for indicating whether the current business module calls a target installation interface in the upgrade engine service, and the target installation interface is an installation interface corresponding to the type of a target system upgrade installation package; the upgrade engine service responds to the installation instruction to install a target system upgrade installation package; and if the first service module determines that the installation is finished, marking that the life cycle of the installation is finished and disconnecting the first connection.
In this example, the first service module of the system upgrade application only allows to use the state of the upgrade engine service in the life cycle of the current installation, so that the problem that the installation is disordered due to the fact that the first service module also uses the state of the upgrade engine service to instruct the upgrade engine service to install the target system upgrade installation package in the process of disconnecting the first connection can be avoided. In this example, the state of the upgrade service engine and the target installation identifier can accurately determine whether the target system upgrade installation package can be installed, so as to avoid installation conflict when the installation process of the upgrade service engine installs the target system upgrade installation package and other system upgrade installation packages at the same time. Meanwhile, the system upgrading mode enables the system upgrading installation package of the parameter type to be updated in time, and the performance of the electronic equipment is improved.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. It should be understood that the electronic device 100 shown in fig. 2 is only one example of an electronic device, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in fig. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
Fig. 3 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into three layers, an application layer, an application framework layer, and a kernel layer from top to bottom. It will be appreciated that the layers in the software structure of fig. 3 and the components contained in the layers do not constitute a particular limitation of the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer layers than shown and may include more or fewer components per layer, as the application is not limited.
As shown in fig. 3, the application layer may include a series of application packages. The application packages may include system update applications, cameras, gallery, calendars, short messages, talk, navigation, bluetooth, etc. applications. The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
The system update application (i.e. OUC) can send a search request to the server in real time and acquire the packet search result returned by the server. If the OUC detects that the search packet result indicates that a new version of the system upgrade installation packet exists, the OUC may download the new version of the system upgrade installation packet from the server. And if the OUC receives an upgrade instruction input by a user or detects that the upgrade condition is met, executing the system upgrade method.
As shown in FIG. 3, the application framework layer may include an upgrade engine service, a window manager, a resource manager, a content provider, a view system, a telephony manager, a notification manager, and the like.
The upgrade engine service is used for installing a system upgrade installation package to be upgraded.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
FIG. 4 is a flow chart illustrating an exemplary system upgrade, specifically illustrating the process of system upgrade:
the electronic device may be a mobile phone, tablet computer, vehicle-mounted device, smart bracelet, smart watch, notebook computer, etc. In this example, the electronic device is exemplified by a mobile phone. The application program of the mobile phone comprises a system update application (namely OUC), and the OUC can acquire a new version of system upgrade installation package and instruct an upgrade engine service to install the new version of system upgrade installation package. The OUC receives the packet searching result returned by the server, if the packet searching result indicates that a new parameter version (i.e. a system upgrade installation packet of a parameter type) exists, the OUC may display a prompt window 102 as shown in 1a in fig. 1, the user clicks a "download and update" button, and the OUC generates a system upgrade instruction in response to the clicking operation of the user.
In another example, as shown at 6a in fig. 6, the user may click a "more" button 601 in the software setup interface, and the handset displays a box shot 602 in response to the user clicking on the button 601. Two options may be included in the box 602, a first option for jumping to the update settings page for patch and hota and a second option for jumping to the update settings page for parameters. In this example, as shown in 6a in fig. 6, the user clicks the second option, the display page of the mobile phone jumps to the update setting page 603 of the parameter, the user may click the button 604 to start the automatic downloading and updating function, and after the function is started, when the OUC of the mobile phone detects that the electronic device is in the off-screen state, a system upgrade instruction for installing a new parameter version may be generated.
Similarly, as shown in fig. 6a, if the user clicks the first option, the display page of the mobile phone jumps to the update setting page 605 of the patch and the hota, and the user may click the button 606 to start the automatic downloading and updating function, and after the function is started, when the OUC of the mobile phone detects that the electronic device is in the off-screen state, an update instruction for installing a new patch or hota version may be generated. Optionally, the user may click on button 607, and the handset generates a system upgrade instruction when detecting that the handset is in a screen off state and in a preset installation period. If both the button 606 and the button 607 are turned on, the mobile phone can automatically download a new version of the system upgrade installation package under the WLAN or the mobile network, and generate an upgrade instruction when detecting that the system upgrade installation package is in a screen-off state and in a preset installation period (e.g. 02:00-04:00).
When the OUC of the mobile phone generates a system upgrade instruction, the OUC may allocate a first service module for the target system upgrade installation package to be installed at this time. In this example, the type of the target system upgrade installation package to be installed may be a parameter, patch, or hota.
If the system upgrade instruction indicates a system upgrade installation package of an installation parameter type, the system upgrade installation package of the parameter type is used as a target system upgrade installation package, and if the system upgrade instruction indicates a system upgrade installation package of a patch type, the system upgrade installation package of the patch type is used as a target system upgrade installation package.
It should be noted that the OUC may allocate different service modules for different system upgrade installation packages to establish different connections. That is, in this example, different business modules of the OUC may simultaneously establish respective corresponding connections to install respective corresponding target system upgrade installation packages. For example, a first business module may establish a first connection to install a parameter type system upgrade installation package, and a second business module may establish a third connection to install a patch type system upgrade installation package.
Step 401: the first business module binds the UpdateEngine service and establishes connection.
Illustratively, the first business module may send a service request to an upgrade engine (UpdateEngine) service to install the target system upgrade installation package. An upgrade engine (UpdateEngine) service establishes a first connection with a first business module binding interface definition language (Android Interface Definition Language, "AIDL") interface in response to the service request. The first connection is used to transmit data related to the present installation, for example, the first connection may transmit an installation status of the upgrade engine service, and may also transmit a target system upgrade installation package to be installed. It will be appreciated that the first connection created by the first business module matches the current installation.
Alternatively, the timer may be started when the first traffic module successfully establishes the first connection. If the first service module disconnects the first connection, the timer is destroyed. That is, each of the timers is connected to a corresponding one of them.
Step 402: the first business module receives the status of the upgrade engine service.
For example, after the first service module successfully establishes the first connection, the upgrade engine service may acquire the current installation state (i.e., the state of the upgrade engine service) in real time, and transmit the acquired installation state to the first service module through the first connection. The first business module receives the installation state sent by the upgrade engine service in real time. The installation state received by the first service module may include: idle state, busy state, end state, and unavailable state. Wherein the idle state, the busy state and the end state belong to the available state.
The idle state is used to characterize that the installation process in the upgrade engine service is unoccupied. The busy state is used to characterize that the installation process of the upgrade engine service is installing a system upgrade installation package. The end state is used to characterize the success or failure of the installation process of the upgrade engine service to install the system upgrade installation package. The unavailable state is an abnormal state.
It should be noted that, if the OUC establishes multiple connections at the same time, the upgrade engine service will transmit the state of the upgrade engine service to each service module in the OUC through each connection in real time.
Step 403: the first service module judges whether the life cycle of the current installation is ended or not indicated by the first identification information. If yes, the process is ended. If not, go to step 404.
The first service module obtains the stored first identification information after receiving the installation state sent by the upgrade engine service, and judges whether the first identification information indicates the end of the life cycle of the current installation. If the first service module detects that the first identification information indicates that the life cycle of the installation is not finished, the first service module allows the received installation state to be used. If the first service module detects that the first identification information indicates that the life cycle of the current installation is finished, the received installation state can be discarded, or the process is directly finished. In this example, when the first service module detects that the first identification information indicates that the lifecycle of the installation is finished, taking a direct ending process as an example.
When the first connection is successfully created, the first identification information is set to indicate that the life cycle of the current installation is not ended. The life cycle of the current installation is used for indicating the time period of allowing the received installation state to be used in the process of installing the upgrade installation package of the target system. In this example, the first service module may set an initial value of the first identification information when the first connection is successfully established, for example, the first service module sets, when the first connection is established, to be "closed=false", and when the value of "closed" is "false", indicates that the current first connection is established, that is, indicates that the lifecycle of the current installation is not ended. If the value of isClosed is "true", the current first connection is represented as disconnected, i.e. the life cycle of the current installation is indicated to be ended. It should be noted that, when the value of isClosed is "true", the first connection may also be in a connected state, for example, when the first service module performs an operation of disconnecting the first connection, the value of isClosed is set to "true", but the first connection is not yet disconnected.
When the first service module successfully establishes the first connection and sets (or marks) the first identification information to indicate that the life cycle of the current installation is not ended, the first identification information is used as the starting time of the life cycle of the current installation. The first service module sets (or marks) the first identification information to indicate that the lifetime of the current installation has ended as the end time of the lifetime of the current installation. The first service module allows use of the received installation status during the lifecycle of the current installation.
Since the upgrade engine service sends the installation status of the upgrade engine service to the first service module in real time, the first service module may execute step 403 when receiving the installation status of the upgrade engine service until the process is ended.
Step 404: the first business module allows use of the installed state of the current upgrade engine service.
In an exemplary embodiment, if the first service module detects that the first identification information indicates that the life cycle of the current installation is not finished, the first service module determines an installation state in which the first service module can use the current upgrade engine service.
Step 405: the first service module detects that the installation state is an idle state, and detects whether the target installation identifier indicates that the first service module has called the target installation interface. If not, go to step 406.
In one example, the first service module obtains an installation state that is allowed to be used, and if the installation state is an idle state, the first service module may detect whether the target installation identifier indicates that the first service module has invoked the target installation interface. Optionally, when the first service module successfully establishes the first connection, an initial value of the target installation identifier may be set to indicate that the first service module does not call the target installation interface. Optionally, when the first service module sends a service request for installing the target system upgrade installation to the upgrade engine service, the initial value of the target installation identifier may be set to indicate that the first service module does not call the target installation interface.
For example, the target system upgrade installation package is a 6.1.0 version parameter package, the first service module establishes a first connection for installing the 6.1.0 version parameter package, sets first identification information to indicate that the life cycle of the installation is not finished (i.e. isclosed=false), and sets a value of the target installation identification (i.e. "iscalledstartdatapara") to false. The upgrade engine service feeds back the installation state of the upgrade engine service to the first business module in real time through the first connection. When the first business module receives the installation state of the upgrade engine service (for example, the installation state is idle state), the value of the isolated is detected as false, and the installation state of the upgrade engine service which is allowed to be used is determined. The first service module detects that the installation state is an idle state, and detects whether the value of iscalledstartvpdatepara is true or not. In this example, when the first service module sets the initial value of iscalledstartvpdatepara to fasle when the first service module establishes the first connection, the first service module may determine that the current upgrade engine service is in an idle state and the parameter packet of version 6.1.0 is not installed, and the first service module instructs the upgrade engine service to install the parameter packet of version 6.1.0, and at this time, the first service module invokes an installation interface corresponding to the type of the parameter packet, and may set iscalledstartvpdatepara to true. Optionally, the first service module may also set isCalledStartUpdatePara to true (i.e. step 407), and instruct the upgrade engine service to install the parameter package of version 6.1.0, where the upgrade engine service installs the target system upgrade installation package according to the instruction of the first service module (i.e. step 406).
Optionally, the first service module may also update the target installation identifier to indicate that the first service module has invoked the target installation interface while indicating that the upgrade engine service installs the target system upgrade installation package.
Step 406: the upgrade engine service installs the target system upgrade installation package according to the indication of the first service module.
Illustratively, the first business module generates an installation indication for instructing the upgrade engine service to install the target system upgrade installation package. The upgrade engine service installs the target system upgrade installation package in response to the installation indication. Meanwhile, the upgrade engine service updates the installation state of the upgrade engine service (also referred to as a state of the upgrade engine service) from an idle state to a busy state.
Step 407: the first business module updates the target installation identifier to indicate that the first business module has invoked the target installation interface.
Step 408: the first service module detects that the installation state is a busy state, and detects whether a timer is overtime. If yes, go to step 409.
For example, if the first service module detects that the installation state of the current upgrade engine service is a busy state, it detects whether the duration recorded by the timer exceeds a first preset duration, where the first preset duration may be preset, for example, the first preset duration is 1 minute, 45 seconds, 30 seconds, and so on. If the first service module detects that the duration recorded by the timer exceeds the first preset duration, it determines that the timer is detected to be overtime, and then step 409 is executed.
If the first service module detects that the time length recorded by the timer does not exceed the first preset time length, the first service module does not further process, and the upgrade engine service continues to install the system upgrade installation package currently being installed. Alternatively, the system upgrade installation package that the upgrade engine service is installing may be the target system upgrade installation package, or may be another system upgrade installation package.
For example, referring to the example in step 406, the first business module instructs the upgrade engine service to install the 6.1.0 version of the parameter package, and the upgrade engine service updates the installation status from the idle status to the busy status when installing the target system upgrade installation package as instructed by the first business module. The upgrade engine service sends the current installation status (i.e., busy status) to the first traffic module, which detects that isclosed=false, allowing the installation status (i.e., busy status) to be used. The first service module detects that the installation state is busy, acquires the duration (such as 30 seconds) recorded by the timer, and if the first preset duration is 45 seconds, the first service module detects that the duration recorded by the timer is smaller than the first preset duration, and the first service module does not operate, and is served by the upgrade engine to continuously install the parameter packet of version 6.1.0. If the upgrade engine service installs the parameter package of the 6.1.0 version successfully, the installation state of the upgrade engine service can be updated to an end state.
For another example, the upgrade engine service is currently installing a patch package (i.e., a patch type system upgrade installation package), and the upgrade engine service sends a current installation status (i.e., busy status) to the first traffic module, which detects that isclosed=false, allowing the installation status (i.e., busy status) to be used. The first service module detects that the installation state is a busy state, acquires the duration (for example, 50 seconds) recorded by the timer, and presumes that the first preset duration is 45 seconds, the first service module detects that the duration recorded by the timer is greater than the first preset duration, and determines that the timer is overtime, and whether the detection target installation identifier indicates that the first service module has invoked the target installation interface, that is, step 409 is executed.
Step 409: the first business module detects whether the target installation identifier indicates that the first business module has invoked the target installation interface. If yes, go to step 410; if not, step 415 is performed.
If the first service module detects that the target installation identifier indicates that the first service module does not call the target installation interface, it determines to wait for installing the target system upgrade installation package next time, and the first service module disconnects the first connection and updates the first identifier information to indicate that the lifecycle of the installation is finished, that is, step 415 is executed. Since the target system upgrade installation package is not installed this time, the next time the target system upgrade installation package is installed can be waited, i.e., the first service module can wait (or referred to as delay) for a second preset duration, and establish a new connection with the upgrade engine service again, so as to retry installing the target system upgrade installation package.
If the first service module detects that the target installation identifier indicates that the first service module has invoked the target installation interface, it is determined that the installation of the target system upgrade installation package fails (i.e. step 410), and step 411 is executed.
Step 410: the first business module determines that the installation of the upgrade installation package of the target system fails.
Alternatively, the first service module may determine that the installation of the target system upgrade installation package fails, and perform step 411.
Step 411: the first service module is disconnected and updates the first identification information to indicate the end of the life cycle of the current installation.
Illustratively, the first service module disconnects the first connection (i.e., unbinds the AIDL interface) and updates the first identification information to indicate the end of the lifecycle of the current installation, e.g., the first service module sets the value of isClosed to true. When the first service module receives the installation state sent by the upgrade engine service, the first service module detects that the value of the isolated is true, and the process is ended.
After the first service module executes the operation of disconnecting the first connection, the first connection is not immediately disconnected, and the upgrade engine service still returns the installation state of the upgrade engine service to the first service module from the operation of disconnecting the first connection by the first service module to the time when the first connection is disconnected. In this example, the first service module further updates the first identification information (updates to indicate that the lifecycle of the present installation is finished) when the first service module disconnects the first connection, so that the first service module does not allow the received installation state to be used any more from the time when the first service module disconnects the first connection to the time when the first service module disconnects the first connection, thereby avoiding the problem of installation errors and confusion occurring in the time when the first service module disconnects the first connection.
Step 412: the first service module detects that the installation state is an end state, and detects whether the target installation identifier indicates that the first service module has called the target installation interface. If yes, go to step 413; if not, go to step 406.
The first service module detects that the installation state is an end state, and also detects whether the target installation identifier indicates that the first service module has invoked the target installation interface, if yes, it is determined that the installation of the target system upgrade installation package is ended, and the first connection may be disconnected. If not, the other system upgrade installation packages characterizing the current installation are over, and the target system upgrade installation package may be installed, i.e., step 406 is performed.
For example, the upgrade engine service fails or succeeds in installing the patch package, updating the installation state to the end state. Assume that the target system installation package is a version 6.1.0 parameter package. The upgrade engine service sends the current installation state (i.e., end state) to the first business module, which detects that isclosed=false, allowing the installation state (i.e., end state) to be used. The first service module detects that the installation state is an end state, and if the value of a target installation identifier (such as 'iscalledstartvpdatepara') is false, the upgrade engine service is instructed to start to install the parameter packet of the version 6.1.0, and the value of the target installation identifier is updated to true. When the upgrade engine service starts to install the 6.1.0 version of the parameter package, the installation state is updated from the end state to the busy state.
Step 413: the first service module determines that installation is complete.
The first service module determines that the installation is finished, and the installation result can be processed by the first service module, for example, the result of installing the current system upgrade installation package is displayed on a display interface.
Step 414: the first service module is disconnected and updates the first identification information to indicate the end of the life cycle of the current installation.
This step is similar to step 411, and the description of the relevant step may refer to the description in step 411, and will not be repeated here.
Step 415: and the first service module disconnects the connection when detecting that the installation state is the unavailable state, and updates the first identification information to indicate the end of the life cycle of the current installation.
Illustratively, when the first service module detects that the installation state is an unavailable state, an operation of disconnecting the first connection is performed, and the first identification information is updated to indicate that the lifecycle of the current installation is finished.
Step 416: and after the first service module delays the second preset time, rebinding the UpdateEngine service again, and establishing connection.
Illustratively, the first module may delay the second preset time period, rebind the UpdateEngine service, establish a new connection (e.g., a second connection) to attempt to install the target system upgrade installation package next time, i.e., re-execute 401. Alternatively, the second preset time period may be 3 seconds, 5 seconds, 10 seconds, 15 seconds, or the like. In this example, the second preset time period is exemplified by 5 seconds.
The installation state of the upgrade engine service changes according to the installation process, for example, the installation state of the upgrade engine service is in an idle state at time T1, and when the installation of the upgrade installation package of the target system is started, the installation state of the upgrade engine service is updated to a busy state. If the upgrade engine service installation target system upgrade installation package fails or succeeds, the installation state of the upgrade engine service is updated to be an end state.
The system updating application allocates corresponding connection (namely, first connection) for the target system upgrading installation package to be installed at this time, and allows the state of using the upgrade engine service in the life cycle of the installation, so that the problems of installation errors and confusion caused by the fact that the first service module uses the received state of the upgrade engine service in a period from the operation of executing the first connection disconnection of the first service module to the first connection disconnection can be avoided; because the target installation identifier can indicate whether the current service module invokes the target installation interface in the upgrade engine service, the information of whether the upgrade engine service is indicated to install the target system upgrade installation package this time can be enriched by the newly added target installation identifier, so that the first service module can accurately determine whether the installation process of the upgrade engine service is occupied or not, and install the target system upgrade installation package (such as a parameter type, a patch type or a hota type) in time, thereby avoiding the problem of installation conflict caused by the system upgrade installation package of the parameter type and other system upgrade installation packages (namely the system upgrade installation package of the patch type or the system upgrade installation package of the hota type) which are simultaneously installed by the upgrade engine service. Meanwhile, the upgrade engine service timely installs a target system upgrade installation package (such as a parameter type system upgrade installation package), so that the performance of the electronic equipment can be improved.
Fig. 5 is a diagram of interactions between an OUC and an upgrade engine service, which is illustratively shown. As shown in fig. 5, includes:
step 501: the first business module of OUC sends a service request for installing the target system upgrade installation package to the upgrade engine service.
Step 502: the first service module binds the AIDL interface and establishes a first connection.
The step 501 and the step 502 may refer to the related descriptions in the step 401, and will not be described herein.
Step 503: the upgrade engine service obtains the current installation status.
Step 504: the upgrade engine service sends the installation state of the current upgrade engine service to the first service module through the AIDL interface.
Step 505: the first service module judges whether the first identification information indicates the end of the life cycle of the current installation. If yes, the flow is ended, if not, step 506 is performed.
Step 506: the first business module allows use of the installed state of the current upgrade engine service.
Steps 503 to 506 may refer to the related descriptions in steps 402 to 404, and will not be described herein.
Step 507: and if the first service module detects that the installation state is the idle state, detecting whether the target installation identifier indicates that the first service module has called the target installation interface. If not, step 508 is performed.
Step 508: the first business module updates the target installation identifier to the target installation interface called by the first business module.
Step 509: the first business module indicates an upgrade engine service installation target system upgrade installation package.
Step 510: the upgrade engine service installs the target system upgrade installation package.
Step 511: the first service module detects that the installation state is a busy state, detects whether the duration recorded by the timer is overtime, and if yes, executes step 512; if no is detected, the first service module may not perform the operation.
Step 512: the first business module detects whether the target installation identifier indicates that the first business module has invoked the target installation interface. If yes, step 513 is performed. If no, step 514 is performed.
Step 513: the first service module determines that the installation fails, disconnects the first connection, and updates the first identification information to indicate the end of the life cycle of the current installation.
Step 514: the first service module determines the next installation, disconnects the first connection, and updates the first identification information to indicate the end of the life cycle of the current installation. After this step, step 518 is performed, in which the first service module delays for a second preset period of time, and reestablishes a new connection with the upgrade engine service, so as to attempt to install the target system upgrade installation package next time.
Step 515: the first service module detects that the installation state is an ending state, and detects whether the target installation identifier indicates that the first service module has called the target installation interface. If yes, step 516 is performed. If not, step 508 is performed.
Step 516: the first service module determines that the installation is finished, disconnects the first connection, and updates the first identification information to indicate that the life cycle of the installation is finished.
Step 517: and if the first service module detects that the installation state is the unavailable state, the first connection is disconnected, and the first identification information is updated to indicate the end of the life cycle of the current installation. This step is followed by step 518.
Step 518: the first business module delays for a second preset time period, and establishes a new connection with the upgrade engine service so as to try to install the upgrade installation package of the target system next time.
The steps 507 to 518 may refer to the related descriptions in steps 405 to 416, and will not be described herein.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the method of system upgrade in the above-described embodiments. The storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the method of system upgrade in the above-described embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
Any of the various embodiments of the application, as well as any of the same embodiments, may be freely combined. Any combination of the above is within the scope of the application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (15)

1. A method of system upgrade, comprising:
the system updating application detects a system updating instruction, and distributes a first connection for a target system updating installation package to be installed at the time, wherein the first connection is used for the first service module of the system updating application to communicate with an updating engine service;
the first business module receives the state of the upgrade engine service sent by the upgrade engine service in real time through the first connection;
in the life cycle of the installation, the first business module allows the use of the received state of the upgrade engine service;
if the state of the upgrade engine service is an available state, the first service module judges whether to instruct the upgrade engine service to install the target system upgrade package according to the state of the upgrade engine service and a target installation identifier, the available state comprises an idle state and an end state, the target installation identifier is used for indicating whether the current service module calls a target installation interface in the upgrade engine service, the target installation interface is an installation interface corresponding to the type of the target system upgrade package, and the type of the target system upgrade package comprises: parameter packages, hota or patch packages, wherein the priority of the parameter package installation is the same as that of the patch package or the hota installation;
If the target system upgrade package is determined to be installed by the upgrade engine service, an installation instruction is generated and sent to the upgrade engine service; the upgrade engine service installs the target system upgrade installation package in response to the installation indication;
and if the first service module determines that the installation is finished, marking that the life cycle of the installation is finished and disconnecting the first connection.
2. The method of claim 1, wherein the first business module allowing use of the received status of the upgrade engine service during the lifecycle of the present installation comprises:
the first service module acquires first identification information, wherein the first identification information is used for indicating whether the life cycle of the current installation is finished or not, and the initial first identification information indicates that the life cycle of the current installation is not finished;
if the first service module detects that the first identification information indicates that the life cycle of the current installation is not finished, the first service module allows the state of using the upgrade engine service;
and if the first service module detects that the first identification information indicates that the life cycle of the current installation is ended, the first service module discards the state of the upgrade engine service.
3. The method of claim 2, wherein the system update application detecting a system upgrade instruction, assigning a first connection to a target system upgrade installation package to be installed at the time, comprises:
the system updating application detects a system updating instruction and distributes the first service module for a target system updating installation package to be installed at the time;
the first business module sends a service request to the upgrade engine service, wherein the service request is used for requesting the upgrade engine service to install the target system upgrade installation package;
and the upgrade engine service responds to the service request and establishes the first connection with the first business module binding interface definition language AIDL interface.
4. The method of claim 2, wherein the marking the end of the lifecycle of the current installation comprises:
and the first service module updates the first identification information to indicate that the life cycle of the current installation is finished.
5. The method of any of claims 1-4, wherein the first business module determining whether to instruct the upgrade engine service to install the target system upgrade package according to the status of the upgrade engine service and a target installation identification comprises:
If the first service module detects that the state of the upgrade engine service is an idle state and the target installation identifier indicates that the first service module does not call the target installation interface, the first service module determines to instruct the upgrade engine service to install the target system upgrade installation package and updates the target installation identifier to indicate that the first service module has called the target installation interface; wherein the initial target installation identifier indicates that the first service module does not invoke the target installation interface.
6. The method of claim 5, wherein the method further comprises:
the upgrade engine service updates a status of the upgrade engine service to a busy status in response to the installation indication.
7. The method according to any one of claims 1-4, further comprising:
if the first service module detects that the state of the upgrade engine service is a busy state, detecting whether the establishment time of the first connection is overtime preset time;
if the target installation identifier is detected to exceed the preset duration, detecting whether the target installation identifier indicates that the first service module has called the target installation interface;
If not, the first service module determines to install the target system upgrade installation package next time.
8. The method of claim 7, wherein the method further comprises:
if the first service module determines that the target system upgrade installation package is installed next time, determining that the installation is finished;
after marking the end of the lifecycle of the present installation and disconnecting the first connection, the method further comprises:
after the first service module disconnects the first connection for a second preset period of time, the system updating application allocates a second connection again for the target system upgrade installation package to be installed at this time so as to re-execute the installation of the target system upgrade installation package.
9. The method of claim 7, wherein the method further comprises:
and if the first service module detects that the target installation identifier indicates that the first service module has invoked the target installation interface, the first service module determines that the installation of the target system upgrade installation package fails, marks the end of the life cycle of the installation and disconnects the first connection.
10. The method of any of claims 1-4, wherein the first business module determining whether to instruct the upgrade engine service to install the target system upgrade package according to the status of the upgrade engine service and a target installation identification comprises:
If the first service module detects that the detected state is an ending state and the target installation identifier indicates that the first service module does not call the target installation interface, the first service module determines to instruct the upgrade engine service to install the target system upgrade installation package and updates the target installation identifier to indicate that the first service module has called the target installation interface; wherein the initial target installation identifier indicates that the first service module does not invoke the target installation interface.
11. The method according to claim 10, wherein the method further comprises:
if the first service module detects that the detected state is an ending state and the target installation identifier indicates that the first service module has called the target installation interface, the first service module determines that the target system upgrade installation package is successfully installed this time;
and marking the end of the life cycle of the current installation and disconnecting the first connection.
12. The method according to claim 1, wherein the method further comprises:
if the first service module detects that the state of the upgrade engine service belongs to an unavailable state, marking that the life cycle of the installation is finished and disconnecting the first connection;
After the first service module disconnects the first connection for a second preset period of time, the system updating application allocates a second connection again for the target system upgrade installation package to be installed at this time so as to re-execute the installation of the target system upgrade installation package.
13. The method of claim 1, wherein before the system update application detects a system upgrade instruction to allocate a first connection to a target system upgrade installation package to be installed at the time, the method further comprises:
the system updating application receives a system updating instruction which is input by a user and used for installing the target system updating installation package;
or,
the system updating application detects that the electronic equipment is in a screen-off state and generates a system updating instruction for installing the target system updating installation package.
14. An electronic device, comprising:
a memory and a processor, the memory coupled with the processor;
the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the method of system upgrade of any one of claims 1 to 13.
15. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the method of system upgrade of any one of claims 1 to 13.
CN202311062410.4A 2023-08-23 2023-08-23 System upgrading method and electronic equipment Active CN116775084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311062410.4A CN116775084B (en) 2023-08-23 2023-08-23 System upgrading method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311062410.4A CN116775084B (en) 2023-08-23 2023-08-23 System upgrading method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116775084A CN116775084A (en) 2023-09-19
CN116775084B true CN116775084B (en) 2023-11-24

Family

ID=87989853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311062410.4A Active CN116775084B (en) 2023-08-23 2023-08-23 System upgrading method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116775084B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697133A (en) * 2009-10-26 2010-04-21 中兴通讯股份有限公司 Software upgrading method, software upgrading system and client
CN103517258A (en) * 2012-06-25 2014-01-15 中兴通讯股份有限公司 A method of updating software on a mobile terminal, a mobile terminal and a server
CN103955381A (en) * 2014-04-04 2014-07-30 京信通信系统(中国)有限公司 Method and system for management server to perform batch software update on terminal equipment
CN107368324A (en) * 2016-05-11 2017-11-21 中兴通讯股份有限公司 A kind of component upgrade methods, devices and systems
CN108399075A (en) * 2018-02-28 2018-08-14 郑州云海信息技术有限公司 A kind of method and system of update management engine
CN114610499A (en) * 2022-03-22 2022-06-10 深圳须弥云图空间科技有限公司 Task scheduling method and device, computer readable storage medium and electronic equipment
CN115269063A (en) * 2022-07-19 2022-11-01 京东科技信息技术有限公司 Process creation method, system, device and medium
CN115543368A (en) * 2022-01-10 2022-12-30 荣耀终端有限公司 Operating system upgrading method and electronic equipment
CN116400938A (en) * 2023-03-27 2023-07-07 荣耀终端有限公司 Operating system upgrading method, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11231921B2 (en) * 2019-02-08 2022-01-25 Atlassian Pty Ltd. Software application update management engine
US11989545B2 (en) * 2020-03-26 2024-05-21 EMC IP Holding Company LLC Flexible upgrade of multi-subsystem products

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697133A (en) * 2009-10-26 2010-04-21 中兴通讯股份有限公司 Software upgrading method, software upgrading system and client
CN103517258A (en) * 2012-06-25 2014-01-15 中兴通讯股份有限公司 A method of updating software on a mobile terminal, a mobile terminal and a server
CN103955381A (en) * 2014-04-04 2014-07-30 京信通信系统(中国)有限公司 Method and system for management server to perform batch software update on terminal equipment
CN107368324A (en) * 2016-05-11 2017-11-21 中兴通讯股份有限公司 A kind of component upgrade methods, devices and systems
CN108399075A (en) * 2018-02-28 2018-08-14 郑州云海信息技术有限公司 A kind of method and system of update management engine
CN115543368A (en) * 2022-01-10 2022-12-30 荣耀终端有限公司 Operating system upgrading method and electronic equipment
CN114610499A (en) * 2022-03-22 2022-06-10 深圳须弥云图空间科技有限公司 Task scheduling method and device, computer readable storage medium and electronic equipment
CN115269063A (en) * 2022-07-19 2022-11-01 京东科技信息技术有限公司 Process creation method, system, device and medium
CN116400938A (en) * 2023-03-27 2023-07-07 荣耀终端有限公司 Operating system upgrading method, device and storage medium

Also Published As

Publication number Publication date
CN116775084A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10705828B2 (en) Method and apparatus for updating application
CN104320774B (en) Upgrading method, device and equipment
WO2022089207A1 (en) Cross-device application interaction method, electronic device, and server
CN114461240B (en) Software upgrading method, software upgrading system and electronic equipment
CN113727333B (en) Downloading system for custom applications
KR20200140555A (en) Electronic device for switching between a dual standby mode and a single standby mode and method for the same
US11368360B2 (en) Electronic device, and software setting method based on subscriber identity module in electronic device
CN114461239B (en) Software upgrading system and software upgrading method
CN115328563A (en) System starting method and electronic equipment
KR101203741B1 (en) System and method for widget service based on smart card, and smart card applied to the same
CN111158735B (en) Hot patch file processing method and communication terminal
CN116775084B (en) System upgrading method and electronic equipment
CN115016713B (en) Travel event subscription method and electronic equipment
CN114443117B (en) Custom package processing method and electronic equipment
CN114640974A (en) Data migration method, device and storage medium
CN116302454B (en) Method for applying network resources and electronic equipment
CN107659919B (en) Communication connection method and electronic equipment
CN112181406A (en) Rendering engine sharing method and device
CN116048546B (en) System upgrading method, electronic equipment and computer readable storage medium
CN117130627B (en) Fitting upgrading method and electronic equipment
JP2009146206A (en) Multi-application execution device, multi-application execution support method and program
CN115150265B (en) Dual-system data processing method, device and apparatus
EP3550864B1 (en) Vehicle-mounted electronic device for performing double authentication
CN117931238A (en) Upgrade method, electronic device and storage medium
CN115543241A (en) Equipment scanning method and device for screen projection scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant