[go: up one dir, main page]

WO2024199039A1 - Application installation method and apparatus, electronic device, and machine readable storage medium - Google Patents

Application installation method and apparatus, electronic device, and machine readable storage medium Download PDF

Info

Publication number
WO2024199039A1
WO2024199039A1 PCT/CN2024/082741 CN2024082741W WO2024199039A1 WO 2024199039 A1 WO2024199039 A1 WO 2024199039A1 CN 2024082741 W CN2024082741 W CN 2024082741W WO 2024199039 A1 WO2024199039 A1 WO 2024199039A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
installation
components
met
condition
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.)
Pending
Application number
PCT/CN2024/082741
Other languages
French (fr)
Chinese (zh)
Other versions
WO2024199039A9 (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Publication of WO2024199039A1 publication Critical patent/WO2024199039A1/en
Publication of WO2024199039A9 publication Critical patent/WO2024199039A9/en
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of software technology, and in particular to an application installation method, device, electronic device, and machine-readable storage medium.
  • the installer created by the installer creation tool is usually for a single application. If there are multiple applications with different businesses, multiple corresponding installer codes are required, which is very difficult to maintain.
  • installation package function is usually installed and deployed for a single application.
  • This type of installation package design cannot handle application scenarios where a combination of different applications that need to cooperate with each other are installed.
  • the present application provides an application installation method, device, electronic device and machine-readable storage medium.
  • an application installation method comprising: when a running instruction for an installation package program for a first application is detected and the first application is not currently installed, determining whether a combined installation condition is met; wherein satisfying the combined installation condition includes having installed a second application, the second application being an application that shares components with the first application; when the combined installation condition is met, installing the first application under the installation path of the second application; wherein, during the installation of the first application, skipping the installation process of the shared components of the first application and the second application; and executing the first installation process of the first application when the combined installation condition is not met.
  • an application installation device comprising: a determination unit, for determining whether a combined installation condition is met when a running instruction for an installation package program for a first application is detected and the first application is not currently installed; wherein satisfying the combined installation condition includes having installed a second application, the second application being an application that shares components with the first application; an installation unit, for installing the first application under an installation path of the second application when the combined installation condition is met; wherein, during the installation of the first application, the installation process of the shared components of the first application and the second application is skipped; the installation unit is further used to execute the first installation process of the first application when the combined installation condition is not met.
  • an electronic device comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method provided in the first aspect.
  • a machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a processor, the method provided in the first aspect is implemented.
  • the application installation method of the embodiment of the present application when a running instruction for the installation package program for the first application is detected and it is determined that the first application is not currently installed, determines whether a combined installation condition is met, and when the combined installation condition is met, installs the first application under the installation path of the second application, and during the installation of the first application, the installation process of the common components of the first application and the second application can be skipped, thereby improving the application installation efficiency and reducing the storage space occupied by the application installation by reusing the components of the installed applications.
  • FIG1 is a flow chart of an application installation method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a component shared by different applications provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a single product line installation logic provided by an embodiment of the present application.
  • FIG4 is a schematic diagram of a cross-product line installation logic provided by an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of an application installation device provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
  • serial numbers of the steps in the embodiments of the present application do not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • FIG. 1 is a flowchart of an application installation method provided in an embodiment of the present application.
  • the application installation method may include steps S100 to S120:
  • Step S100 When a running instruction for the installation package program of the first application is detected and the first application is not currently installed, determine whether a combined installation condition is met; wherein the combined installation condition is met including the second application being installed, and the second application is an application that shares components with the first application. If yes, go to step S110; otherwise, go to step S120.
  • the first application does not specifically refer to a fixed application, but may refer to any application that supports installation using the application installation method provided in the embodiment of the present application.
  • the execution subject of the application installation method is an electronic device, including but not limited to: security products, cellular phones, smart phones, wearable devices, computers, personal digital assistants (PDAs), personal communication system (PCS) devices, personal information managers (PIMs), personal navigation devices (PNDs), multimedia devices, Internet of Things (IoT) devices, etc.
  • a registry may be queried based on identification information of the first application, such as GUID (Globally Unique Identifier), to determine whether identification information of the first application exists; if identification information of the first application exists, it is determined that the first application is currently installed; otherwise, it is determined that the first application is not currently installed, wherein the registry is stored, for example, in a memory of an electronic device used to execute the application installation method.
  • identification information of the first application such as GUID (Globally Unique Identifier)
  • satisfying the combined installation condition may include installing an application that has a common component with the first application (in this case, (referred to as the second application in this article).
  • Step S110 Install the first application in the installation path of the second application; wherein, during the installation of the first application, the installation of the common components of the first application and the second application is skipped.
  • the first application in order to improve the efficiency of application installation and reduce the storage space required for application installation, when the combined installation conditions are met, the first application can be installed under the installation path of the second application, and during the installation of the first application, for the common components of the first application and the second application, the installation of the common components can be skipped, and the corresponding components already installed in the second application (i.e., the common components shared with the first application) can be reused.
  • its installation package file may include a configuration file for recording identification information of other application programs that support installation in combination with the application program.
  • identification information of other applications supporting combined installation with the application can be determined based on the configuration file included in the installation package file, and further, whether the application meets the combined installation conditions can be determined.
  • the above-mentioned combination installation condition may also include that the remaining storage space of the storage space (such as a disk) where the second application is located is sufficient to install the first application.
  • the combination installation condition may also include some other conditions, such as the hardware conditions of the host where the application is installed, such as memory size, CPU (Center Process Unit) performance, etc.
  • Step S120 Execute the first installation process of the first application.
  • the user when the combined installation conditions are not met, the user can select the installation path and other necessary installation information (such as the database file storage path, etc.), and then perform the first installation process.
  • the installation path and other necessary installation information such as the database file storage path, etc.
  • the application installation method may further include: initializing the installation package program for the first application and recording the identification information of the second application into the memory; querying the registry based on the identification information of the second application recorded in the memory to determine whether the combined installation conditions are met.
  • the installation package program of the first application may include identification information of other applications that share components with the first application, such as a GUID.
  • the installation package program of the first application can be initialized, and the identification information of the second application included in the installation package program of the first application can be recorded in the memory (such as the installation package memory). Then, the registry can be queried based on the identification information of the second application recorded in the memory to determine whether the combined installation condition is met, that is, whether the second application is installed. If the identification information of the second application exists in the registry, it is determined that the combined installation condition is met.
  • the installation process of the shared components shared with the multiple second applications can be skipped, and only other non-shared components of the first application need to be installed, thereby improving application installation. Installation efficiency is improved, and the storage space occupied by application installation is reduced. At this time, the installation path of the first application can be under the installation path of the second application. Among them, multiple applications are installed in combination and are installed in the same path by default.
  • the application installation method may further include: determining whether common components of the first application and the second application need to be upgraded if the first application is currently installed and the version number in the installation package program of the first application is greater than the version number of the currently installed first application; upgrading all components of the first application if it is determined that the common components of the first application and the second application need to be upgraded; and upgrading all components of the first application except the common components if it is determined that the common components of the first application and the second application do not need to be upgraded.
  • the installation package program of the application may also include version information of the application, such as a version number.
  • the version number in the installation package program of the first application (which may be called the first version number) may also be compared with the version number of the currently installed first application (which may be called the second version number).
  • the first version number is greater than the second version number, it can be determined that the currently installed first application needs to be upgraded.
  • the currently installed first application may be installed in a combined installation manner, that is, the first application may share components with other applications (ie, the second application), and the shared components may have been upgraded when the second application is upgraded.
  • the first version number is greater than the second version number, it can also be determined whether the common components of the first application and the second application need to be upgraded.
  • the version of the common component in the installation package program of the first application and the version of the currently installed common component can be compared; if the former (the version of the common component in the installation package program of the first application) is higher than the latter (the version of the installed common component), and the lower version of the common component cannot meet the usage requirements, it is determined that the common component needs to be upgraded; if the former is not higher than the latter, it is determined that the common component does not need to be upgraded; or if the former is higher than the latter, but the lower version of the common component meets the usage requirements, it is determined that the common component does not need to be upgraded.
  • all components of the first application may be upgraded.
  • all components of the first application except the common components with the second application may be upgraded.
  • the application installation method may further include: in a case where there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application, outputting an installation mode selection message; in a case where it is determined based on the detected selection instruction that the installation mode is a modify installation and it is determined that the components to be modified include common components of the first application and the second application, uninstalling the remaining components of the components to be modified except for the common components, and installing the remaining components in the installation package of the first application except for the common components; in a case where it is determined based on the detected selection instruction that the installation mode is an uninstallation, uninstalling the remaining components of all components of the currently installed first application except for the common components of the currently installed first application and the second application.
  • an installation mode selection message may be output, and the user may select an installation mode.
  • Install, repair install, or uninstall may be output, and the user may select an installation mode.
  • the modified installation is to uninstall some components (which may be referred to as components to be modified) in the currently installed first application, and reinstall other components in the installation package of the first application except the common components.
  • the installation mode is determined to be the modified installation according to the detected selection instruction, it can be determined whether the components to be modified include the common components of the first application and the second application.
  • the components to be modified include common components of the first application and the second application
  • it is possible to refuse to uninstall the common component i.e., not uninstall the common component
  • uninstall the remaining components of the components to be modified in the currently installed first application except for the common component and install the remaining components in the installation package of the first application except for the common component.
  • the installation package of the first application to be installed includes components 1-2 and components 4-6.
  • all components included in the currently installed first application except for the common components of the currently installed first application and the second application may be uninstalled.
  • a prompt message can be output to prompt the user that a higher version of the application is currently installed and to exit the application installation program.
  • the application installation method may further include: determining whether a smooth upgrade condition is met; wherein the smooth upgrade condition includes that a third application has been installed, the third application belongs to a different product line from the first application, and the functions of the third application include some functions of the first application; when the smooth upgrade condition is not met, determining whether there is application mutual exclusion; wherein the existence of application mutual exclusion includes that a fourth application has been installed, the fourth application belongs to a different product line from the first application, and there is a functional conflict;
  • a smooth upgrade method can be used to install the application. That is, when the first application needs to be installed, if an application that belongs to a different product line from the first application and whose functions include some of the functions of the first application (referred to as the third application in this article) has been installed locally, it can be determined that the smooth upgrade conditions are met and the upgrade can be performed in a smooth upgrade method.
  • a running instruction for the installation package program of the first application when a running instruction for the installation package program of the first application is detected, it may include: when a smooth upgrade condition is met, incrementally overwriting the first application under the installation path of the third application and retaining user data of the third application.
  • the first application can be incrementally installed under the installation path of the third application. That is, for the functional components of the third application that have been installed, the components in the installation package of the first application are used to reinstall them under the installation path of the third application. For other components of the first application other than the functional components of the third application that have been installed, incremental installation can be used.
  • the above-mentioned incremental overwrite installation of the first application may include: determining whether the third application is a combined installation or a compatible installation; wherein the third application being a combined installation includes a fifth application currently installed, the fifth application and the third application belong to the same product line, and there are applications with shared components; the third application being a compatible installation includes a sixth application currently installed, the sixth application and the third application belong to different product lines, and there are applications with shared components; in the case where the third application is a combined installation, determining whether the shared components of the third application and the fifth application need to be upgraded; if upgrade is required, incrementally overwriting the first application; if upgrade is not required, reusing the shared components during the installation of the first application; in the case where the third application is a compatible installation, determining whether the shared components of the third application and the sixth application need to be upgraded; if upgrade is required, incrementally overwriting the first application; if upgrade is not required, reusing the shared components during the installation of the first application.
  • the third application may be installed using a combined installation or a compatible installation (cross-product line compatible installation), in this case, some components in the third application may be the same as the components required by the first application due to smooth upgrades of shared components in other applications.
  • the third application is a combined installation, that is, whether an application that belongs to the same product line as the third application and has common components (referred to as the fifth application in this article) has been installed locally, or whether it is a compatible installation, that is, whether an application that belongs to a different product line than the third application and has common components (referred to as the sixth application in this article) has been installed locally.
  • combined installation includes combined installation within a product line (referred to as combined installation) or combined installation across product lines (which may be referred to as compatible installation).
  • its installation package file may include a configuration file for recording identification information of other application programs that support installation compatibility with the application program.
  • identification information of other applications supporting compatible installation with the application can be determined based on the configuration file included in the installation package file, and then, whether the application is compatible for installation can be determined.
  • any application if other installed applications include an application that supports combined installation/compatible installation with the application, the application is determined to be combined installation/compatible installation.
  • the third application When the third application is installed as a combination, it can be determined whether the common components of the third application and the fifth application need to be upgraded. If so, the first application can be incrementally installed. If not, the common components of the third application and the fifth application can be reused during the installation of the first application.
  • the third application In the case where the third application is installed for compatibility, it can be determined whether the shared components of the third application and the sixth application need to be If upgrading is required, the first application is incrementally overwritten and installed; if upgrading is not required, during the installation of the first application, the common components of the third application and the sixth application can be reused.
  • a prompt message may be output to prompt the user that applications are mutually exclusive and cannot be installed.
  • the application installation method may further include: if the first application is not currently installed, determining whether a compatible installation condition is met; wherein meeting the compatible installation condition includes that a seventh application is installed, and the seventh application is an application that belongs to a different product line from the first application and has a common component;
  • the first application is installed under the installation path of the seventh application; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped.
  • satisfying the compatible installation condition may include having installed an application (referred to herein as the seventh application) that belongs to a different product line than the first application and has a common component.
  • the seventh application an application that belongs to a different product line than the first application and has a common component.
  • the first application can be installed under the installation path of the seventh application.
  • the installation process of the common components in the first application can be skipped.
  • the application installation method may further include: initializing the installation package program for the first application, and recording a configuration file included in the installation package program for the first application to a memory; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list, and an application compatibility list; the smooth upgrade list is used to record identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record identification information of applications that belong to a different product line from the first application and that have common components.
  • the configuration file includes a smooth upgrade list, an application mutual exclusion list, and an application compatibility list
  • the smooth upgrade list is used to record identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application
  • the application mutual exclusion list is used to record identification information of applications that
  • the configuration file of the application installation package program may include a smooth upgrade list, an application mutually exclusive list, and an application compatibility list.
  • the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions include some of the functions of the first application;
  • the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application;
  • the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components.
  • the installation package program of the first application may be initialized, and the configuration file included in the installation package program of the first application may be recorded in the memory. And based on the configuration files in the memory, it is determined whether the smooth upgrade conditions are met, whether there are mutually exclusive applications, and whether the compatible installation conditions are met.
  • this embodiment provides a set of installation package logic that can be reused for multiple product lines and multiple application types, which can greatly reduce the workload of repeated development and provide users with a variety of installation and deployment solutions.
  • the installation modes of a single application's installation package mainly include: first installation, repair installation, modified installation, upgrade installation, uninstallation, etc.
  • Basic functions provide simple log management, compression and decompression management, multi-language management, registry management, XML (Extensible Markup Language) management, permission module, GUI (Graphical User Interface), Dump (backup file system) management and service management.
  • First installation The first installation compiles and packages the specific product package into an installation package, prepares the uninstaller, resource file package, license agreement file, and uninstall file directory into the current framework, and the installation process of each component is divided into pre-installation check, decompression, post-installation processing, and finally completes the process of writing to the registry, creating shortcuts, adding programs to the control panel, etc.
  • the product is, for example, the product finally submitted to the customer during the development process, such as the executable program generated by the program, dynamic library, instruction document, runtime library, etc.
  • Repair installation If the application has been installed in the local environment, you can use the same installation package to run it again. The repair installation option will be provided. Repair installation will uninstall all services except the database service, back up some configuration files, and then re-decompress the results in the original installation path to overwrite the previous files, and then register the service and restore the configuration files. Repair installation will not reinstall the database service, nor will it modify or delete the database files.
  • the full package allows you to choose the installation content, including the client, platform services, and streaming media services.
  • Upgrade installation (also referred to as upgrade): Determine whether the application needs to be upgraded based on the application's GUID and version number information. If the GUID in the application's installation package is the same as the GUID of the currently installed application and the version in the application's installation package is lower than the version of the currently installed application, then perform the upgrade operation. Upgrading is to add the prepared resource file package, uninstall program, license agreement file, uninstall file directory text, etc. to the installation program framework of the installation package in the form of a resource package, and then release the resource package to the client to overwrite the original file and upgrade the database, and implement the registry update, control panel update and other operations.
  • Uninstall When running the program, it will first monitor whether the current client device has this application installed. If the GUID and version of this application are the same as the installation package of the current application to be installed, the uninstall operation can be performed. Uninstallation will clear the registry, shortcuts, logs, control panel information and corresponding artifacts.
  • client installation packages there are client installation packages, OpenAPI (Open Application Programming Interface) installation packages, SAC (Storage Access Component) installation packages and full installation packages (referred to as full packages, including platform services, streaming media services and client installation packages).
  • OpenAPI Open Application Programming Interface
  • SAC Storage Access Component
  • full packages including platform services, streaming media services and client installation packages.
  • the platform services and OpenAPI and SAC of the full package can be installed in combination and deployed on the same terminal environment to reduce the user's hardware costs.
  • Some components of these three installation packages can be shared.
  • the full package and OpenAPI share the database, watchdog, and Nginx components, while SAC shares the watchdog component with both the full package and OpenAPI.
  • the specific relationship is shown in Figure 2.
  • Combined installation Different applications in the same product line can be deployed on the same server with the same installation path and share some common components (i.e. the above-mentioned shared components), such as watchdog service, database service, Nginx service, etc.
  • shared components such as watchdog service, database service, Nginx service, etc.
  • Combined installation requires that the current installation package can recognize that other applications in this product line that can be installed in combination have been installed before installation, read the installation path of the combined installation product, determine whether the remaining disk space under the path is sufficient for its own installation, and some other necessary conditions. If all are met, it will enter the combined installation mode.
  • shared components can skip the installation process and reuse the components installed by the previous combined installation application.
  • the installation package may include an installation program and an uninstaller, wherein the installation program provides the ability to install, repair, modify, and upgrade the product, and the uninstaller provides the ability to uninstall.
  • the system environment must first be checked to determine whether the installation conditions are met and what installation mode should be entered.
  • the installation mode of a single product line mainly depends on whether the GUID of the product is in the registry. For example, after installing the application, you need to create a table with the GUID of the application in the registry path, which records the necessary installation information, including the installation path, uninstaller path, version number, publisher information, etc.
  • the application installation package determines whether the application is installed for the first time or for the second time (repair, uninstall, upgrade, etc.) based on whether the GUID of the application is in the registry.
  • the single product line installation logic may include: first read the registry in the memory to determine whether the application has been installed. If not, the application is installed for the first time, and it is necessary to further determine whether an application of the same product line that can be installed in combination has been installed, that is, whether the combination installation conditions are met. If the combination installation conditions are not met, the user is required to select the installation path and other necessary installation information (such as the database file storage path, etc.), and then proceed to the first installation process.
  • Cross-product line compatibility There may be common components between applications in different product lines, so cross-product line compatible installation can be supported.
  • the baseline OpenAPI's higher version is compatible with lower-version platform services of all product lines. Therefore, the baseline OpenAPI can theoretically be installed in combination with lower-version platform services of any product line. As a result, business scenarios arise where OpenAPI and platform services are compatible and installed across product lines.
  • Cross-product line upgrade also called smooth upgrade: The same type of applications in different product lines are upgraded, and business components are incrementally installed to achieve functional updates and expansions.
  • the security integrated management service baseline is an application that integrates all businesses.
  • applications in other professional application scenarios, such as access control applications in some cases, users have a good experience after purchasing the access control application and want to upgrade to the security integrated management service application to experience a more comprehensive integrated security application, but they also want to retain all user data that has been generated by the original access control application. Therefore, the security integrated management service application installation package needs to be able to support cross-product line upgrades of the access control application, including service upgrade installation, database backup upgrade, etc.
  • the implementation scheme of the installation package is to add three configuration nodes, namely, a smooth upgrade list, an application mutually exclusive list, and an application compatibility list, in the product configuration file (Product.xml) of the product artifact.
  • an application can be configured with one or more application information that can be smoothly upgraded.
  • the content of each smooth upgrade application information may include but is not limited to: application GUID allowed to be upgraded, minimum version number, maximum version number, application name, and brand name.
  • the installation package When the installation package starts running, it will query the application GUID in the registry one by one to determine whether the smooth upgrade conditions are met.
  • the smooth upgrade condition may set a minimum version number and a maximum version number, and support smooth upgrade within this version range.
  • an application may configure one or more application GUIDs that are mutually exclusive with the application.
  • an application can configure one or more application information that can be compatible with installation.
  • the content of each compatible application information can include but is not limited to: the GUID and the minimum and maximum version numbers of the compatible applications.
  • the above configuration file may be copied to the resource directory of the installation package during integration and packaging.
  • the cross-product line installation logic is based on the above single product line installation logic, with some pre-judgments added.
  • the specific implementation logic may include:
  • 3.4.1 Release the configuration file to a temporary path. For example, copy the configuration file of this application to a temporary path and read Get the contents of the configuration file into memory, including the smooth upgrade list, application mutual exclusion list, and application compatibility list, and determine whether the smooth upgrade conditions are met based on the smooth upgrade list in the configuration file; if the smooth upgrade conditions are met, enter the smooth upgrade mode and perform incremental overwrite installation in the path of the currently installed applications that allow smooth upgrades;
  • the application installation device may include: a determination unit 510, used to determine whether a combined installation condition is met when a running instruction for an installation package program for a first application is detected and the first application is not currently installed; wherein satisfying the combined installation condition includes that a second application has been installed, and the second application is an application that has a common component with the first application; an installation unit 520, used to install the first application under the installation path of the second application when the combined installation condition is met; wherein, during the installation process of the first application, the installation process of the common components of the first application and the second application is skipped; the installation unit 520 is also used to execute the first installation process of the first application when the combined installation condition is not met.
  • the installation unit 520 is further configured to, upon detecting a running instruction for the installation package program of the first application, initialize the installation package program of the first application and record the identification information of the second application into the memory;
  • the determining unit 510 is further configured to query a registration table according to the identification information of the second application recorded in the memory, and if the identification information of the second application exists in the registration table, determine that the combined installation condition is met.
  • the determination unit 510 is further used to determine whether the common components of the first application and the second application need to be upgraded when a running instruction for the installation package program for the first application is detected and when there is a currently installed first application and the version number in the installation package program of the first application is greater than the version number of the currently installed first application.
  • the installation unit 520 is further used to output an installation mode selection message when an execution instruction for the installation package program for the first application is detected and when there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application.
  • the installation unit 520 is also used to uninstall the remaining components except the common components in the components to be modified, and install the remaining components except the common components in the installation package of the first application, when it is determined that the installation mode is a modified installation based on the detected selection instruction and it is determined that the components to be modified include the common components of the first application and the second application.
  • the installation unit 520 is further configured to uninstall, when it is determined that the installation mode is uninstallation according to the detected selection instruction, all components included in the currently installed first application except for the common components of the currently installed first application and the second application.
  • the determining unit 510 is further configured to determine whether a smooth upgrade condition is met when a running instruction for the installation package program of the first application is detected; wherein the smooth upgrade condition includes A third application has been installed, the third application belongs to a different product line from the first application, and the functions of the third application include some functions of the first application;
  • the determining unit 510 is further configured to determine whether there is application mutual exclusion when the smooth upgrade condition is not met; wherein the existence of application mutual exclusion includes that a fourth application has been installed, and the fourth application is an application that belongs to a different product line from the first application and has a functional conflict;
  • the determining unit 510 is further configured to determine whether the first application is currently installed when the applications are not mutually exclusive.
  • the installation unit 520 is further used to perform an incremental overwrite installation of the first application under the installation path of the third application and retain user data of the third application when a smooth upgrade condition is met, wherein the incremental overwrite installation refers to reinstalling the functional components of the third application installed by using the components in the installation package of the first application under the installation path of the third application, and incremental installation is used for other components of the first application other than the functional components of the third application installed.
  • the installation unit 520 performs an incremental overwrite installation on the first application, including: determining whether the third application is a combined installation or a compatible installation; wherein, the third application being a combined installation includes currently installing a fifth application, the fifth application and the third application belong to the same product line and have common components; the third application being a compatible installation includes currently installing a sixth application, the sixth application and the third application belong to different product lines and have common components; in the case where the third application is a combined installation, determining whether the common components of the third application and the fifth application need to be upgraded; if upgrade is required, performing an incremental overwrite installation on the first application; if upgrade is not required, reusing the common components of the third application and the fifth application during the installation of the first application; in the case where the third application is a compatible installation, determining whether the common components of the third application and the sixth application need to be upgraded; if upgrade is required, performing an incremental overwrite installation on the first application; if upgrade is not required, reusing the common components of the third application and the fifth application
  • the determination unit 510 is also used to determine whether a compatible installation condition is met when the first application is not currently installed; wherein, satisfying the compatible installation condition includes having installed a seventh application, and the seventh application is an application that belongs to a different product line from the first application and has shared components.
  • the installation unit 520 is further used to install the first application under the installation path of the seventh application when the compatible installation condition is met; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped.
  • the installation unit 520 is further used to initialize the installation package program of the first application and record the configuration file included in the installation package program of the first application to the memory when a running instruction for the installation package program of the first application is detected; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list and an application compatibility list; the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components.
  • the configuration file includes a smooth upgrade list, an application mutual exclusion list and an application compatibility list
  • the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application
  • the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the above-described The application installation method described above.
  • FIG. 6 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
  • the electronic device may include a processor 601 and a memory 602 storing machine executable instructions.
  • the processor 601 and the memory 602 may communicate via a system bus 603.
  • the processor 601 may execute the application installation method described above.
  • the memory 602 mentioned in this article can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc.
  • the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
  • a storage medium is also provided, such as the memory 602 in FIG6 , which is a machine-readable storage medium, and the storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the application installation method described above is implemented.
  • the storage medium can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

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 present application provides an application installation method and apparatus, an electronic device, and a machine readable storage medium. The method comprises: when an operation instruction for an installation package program of a first application is detected and the first application is not installed at present, determining whether a combination installation condition is met; when the combination installation condition is met, installing the first application in the installation path of a second application; and when the combination installation condition is not met, executing a first installation process of the first application. The method can improve the application installation efficiency, and reduce the storage space occupied by application installation.

Description

应用安装方法、装置、电子设备及机器可读存储介质Application installation method, device, electronic device and machine-readable storage medium 技术领域Technical Field

本申请涉及软件技术领域,尤其涉及一种应用安装方法、装置、电子设备及机器可读存储介质。The present application relates to the field of software technology, and in particular to an application installation method, device, electronic device, and machine-readable storage medium.

背景技术Background Art

安装程序制作工具制作出来的安装程序通常针对单一应用,如果有业务不同的多个应用时,需要有对应的多份安装程序代码,维护起来十分困难。The installer created by the installer creation tool is usually for a single application. If there are multiple applications with different businesses, multiple corresponding installer codes are required, which is very difficult to maintain.

另外,安装包功能通常是针对单一应用进行安装部署,此类安装包设计无法处理需要相互配合的多个不同应用组合安装的应用场景。In addition, the installation package function is usually installed and deployed for a single application. This type of installation package design cannot handle application scenarios where a combination of different applications that need to cooperate with each other are installed.

发明内容Summary of the invention

有鉴于此,本申请提供一种应用安装方法、装置、电子设备及机器可读存储介质。In view of this, the present application provides an application installation method, device, electronic device and machine-readable storage medium.

根据本申请实施例的第一方面,提供一种应用安装方法,包括:在检测到针对第一应用的安装包程序的运行指令、且当前未安装所述第一应用的情况下,确定是否满足组合安装条件;其中,满足所述组合安装条件包括已安装第二应用,所述第二应用为与所述第一应用存在共用组件的应用;在满足所述组合安装条件的情况下,在所述第二应用的安装路径下,对所述第一应用进行安装;其中,在所述第一应用的安装过程中,跳过所述第一应用与所述第二应用的共用组件的安装过程;在不满足所述组合安装条件的情况下,执行所述第一应用的首次安装流程。According to a first aspect of an embodiment of the present application, an application installation method is provided, comprising: when a running instruction for an installation package program for a first application is detected and the first application is not currently installed, determining whether a combined installation condition is met; wherein satisfying the combined installation condition includes having installed a second application, the second application being an application that shares components with the first application; when the combined installation condition is met, installing the first application under the installation path of the second application; wherein, during the installation of the first application, skipping the installation process of the shared components of the first application and the second application; and executing the first installation process of the first application when the combined installation condition is not met.

根据本申请实施例的第二方面,提供一种应用安装装置,包括:确定单元,用于在检测到针对第一应用的安装包程序的运行指令、且当前未安装所述第一应用的情况下,确定是否满足组合安装条件;其中,满足所述组合安装条件包括已安装第二应用,所述第二应用为与所述第一应用存在共用组件的应用;安装单元,用于在满足所述组合安装条件的情况下,在所述第二应用的安装路径下,对所述第一应用进行安装;其中,在所述第一应用的安装过程中,跳过所述第一应用与所述第二应用的共用组件的安装过程;所述安装单元,还用于在不满足所述组合安装条件的情况下,执行所述第一应用的首次安装流程。According to a second aspect of an embodiment of the present application, an application installation device is provided, comprising: a determination unit, for determining whether a combined installation condition is met when a running instruction for an installation package program for a first application is detected and the first application is not currently installed; wherein satisfying the combined installation condition includes having installed a second application, the second application being an application that shares components with the first application; an installation unit, for installing the first application under an installation path of the second application when the combined installation condition is met; wherein, during the installation of the first application, the installation process of the shared components of the first application and the second application is skipped; the installation unit is further used to execute the first installation process of the first application when the combined installation condition is not met.

根据本申请实施例的第三方面,提供一种电子设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的机器可执行指令,所述处理器用于执行机器可执行指令,以实现第一方面提供的方法。According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method provided in the first aspect.

根据本申请实施例的第四方面,提供一种机器可读存储介质,所述机器可读存储介质内存储有机器可执行指令,所述机器可执行指令被处理器执行时实现第一方面提供的方法。According to a fourth aspect of an embodiment of the present application, a machine-readable storage medium is provided, wherein the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a processor, the method provided in the first aspect is implemented.

本申请实施例的应用安装方法,在检测到针对第一应用的安装包程序的运行指令、且确定当前未安装第一应用的情况下,确定是否满足组合安装条件,并在满足组合安装条件的情况下,在第二应用的安装路径下,对第一应用进行安装、且在第一应用的安装过程中,可以跳过第一应用与第二应用的共用组件的安装过程,通过对已安装的应用的组件复用,提高了应用安装效率,减少了应用安装占用的存储空间。The application installation method of the embodiment of the present application, when a running instruction for the installation package program for the first application is detected and it is determined that the first application is not currently installed, determines whether a combined installation condition is met, and when the combined installation condition is met, installs the first application under the installation path of the second application, and during the installation of the first application, the installation process of the common components of the first application and the second application can be skipped, thereby improving the application installation efficiency and reducing the storage space occupied by the application installation by reusing the components of the installed applications.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的一种应用安装方法的流程示意图; FIG1 is a flow chart of an application installation method provided in an embodiment of the present application;

图2是本申请实施例提供的一种不同应用共用组件的示意图;FIG2 is a schematic diagram of a component shared by different applications provided in an embodiment of the present application;

图3是本申请实施例提供的一种单一产品线安装逻辑示意图;FIG3 is a schematic diagram of a single product line installation logic provided by an embodiment of the present application;

图4是本申请实施例提供的一种跨产品线安装逻辑示意图;FIG4 is a schematic diagram of a cross-product line installation logic provided by an embodiment of the present application;

图5是本申请实施例提供的一种应用安装装置的结构示意图;FIG5 is a schematic diagram of the structure of an application installation device provided in an embodiment of the present application;

图6是本申请实施例提供的一种电子设备的硬件结构示意图。FIG6 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

为了使本领域技术人员更好地理解本申请实施例提供的技术方案,并使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本申请实施例中技术方案作进一步详细的说明。In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

需要说明的是,本申请实施例中各步骤的序号大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be noted that the serial numbers of the steps in the embodiments of the present application do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

请参见图1,为本申请实施例提供的一种应用安装方法的流程示意图,如图1所示,该应用安装方法可以包括步骤S100至步骤S120:Please refer to FIG. 1, which is a flowchart of an application installation method provided in an embodiment of the present application. As shown in FIG. 1, the application installation method may include steps S100 to S120:

步骤S100、在检测到针对第一应用的安装包程序的运行指令、且当前未安装第一应用的情况下,确定是否满足组合安装条件;其中,满足组合安装条件包括已安装第二应用,第二应用为与第一应用存在共用组件的应用。若是,则转至步骤S110;否则,转至步骤S120。Step S100: When a running instruction for the installation package program of the first application is detected and the first application is not currently installed, determine whether a combined installation condition is met; wherein the combined installation condition is met including the second application being installed, and the second application is an application that shares components with the first application. If yes, go to step S110; otherwise, go to step S120.

本申请实施例中,第一应用并不特指某一固定的应用,而是可以指代任一支持采用本申请实施例提供的应用安装方法进行安装的应用。在本申请实施例中,该应用安装方法的执行主体是电子设备,包括但不限于:安防产品、蜂窝电话、智能电话、可穿戴设备、计算机、个人数字助理(PDA)、个人通信系统(PCS)设备、个人信息管理器(PIM)、个人导航设备(PND)、多媒体设备、物联网(IoT)设备等。In the embodiment of the present application, the first application does not specifically refer to a fixed application, but may refer to any application that supports installation using the application installation method provided in the embodiment of the present application. In the embodiment of the present application, the execution subject of the application installation method is an electronic device, including but not limited to: security products, cellular phones, smart phones, wearable devices, computers, personal digital assistants (PDAs), personal communication system (PCS) devices, personal information managers (PIMs), personal navigation devices (PNDs), multimedia devices, Internet of Things (IoT) devices, etc.

本申请实施例中,在检测到针对第一应用的安装包程序的运行指令的情况下,可以确定当前是否已安装第一应用,即确定第一应用是否为首次安装。In the embodiment of the present application, when a running instruction for the installation package program of the first application is detected, it can be determined whether the first application is currently installed, that is, whether the first application is installed for the first time.

示例性的,可以依据第一应用的标识信息,如GUID(Globally Unique Identifier,全局唯一标识),查询注册表,确定是否存在第一应用的标识信息;在存在第一应用的标识信息的情况下,确定当前已安装第一应用;否则,确定当前未安装第一应用,其中,注册表例如存储在用于执行该应用安装方法的电子设备的内存中。Exemplarily, a registry may be queried based on identification information of the first application, such as GUID (Globally Unique Identifier), to determine whether identification information of the first application exists; if identification information of the first application exists, it is determined that the first application is currently installed; otherwise, it is determined that the first application is not currently installed, wherein the registry is stored, for example, in a memory of an electronic device used to execute the application installation method.

本申请实施例中,在确定当前未安装第一应用的情况下,可以进一步确定是否满足组合安装条件。In the embodiment of the present application, when it is determined that the first application is not currently installed, it can be further determined whether the combined installation condition is met.

示例性的,满足组合安装条件可以包括已安装与第一应用存在共用组件的应用(本 文中称为第二应用)。Exemplarily, satisfying the combined installation condition may include installing an application that has a common component with the first application (in this case, (referred to as the second application in this article).

步骤S110、在第二应用的安装路径下,对所述第一应用进行安装;其中,第一应用的安装过程中,跳过第一应用与第二应用的共用组件的安装过程。Step S110: Install the first application in the installation path of the second application; wherein, during the installation of the first application, the installation of the common components of the first application and the second application is skipped.

本申请实施例中,为了提高应用安装效率,减少应用安装所需占用的存储空间,在满足组合安装条件的情况下,可以在第二应用的安装路径下,对第一应用进行安装、且在第一应用的安装过程中,对于第一应用与第二应用的共用组件,可以跳过对该共用组件的安装,而是复用第二应用已安装的相应组件(即与第一应用共用的共用组件)。In an embodiment of the present application, in order to improve the efficiency of application installation and reduce the storage space required for application installation, when the combined installation conditions are met, the first application can be installed under the installation path of the second application, and during the installation of the first application, for the common components of the first application and the second application, the installation of the common components can be skipped, and the corresponding components already installed in the second application (i.e., the common components shared with the first application) can be reused.

示例性的,对于任一应用程序,其安装包文件中可以包括用于记录支持与该应用程序组合安装的其它应用程序的标识信息的配置文件。Exemplarily, for any application, its installation package file may include a configuration file for recording identification information of other application programs that support installation in combination with the application program.

相应地,在对应用程序进行安装的情况下,可以依据安装包文件中包括的上述配置文件,确定支持与该应用程序组合安装的其它应用程序的标识信息,进而,确定该应用程序是否满足组合安装条件。Accordingly, when installing an application, identification information of other applications supporting combined installation with the application can be determined based on the configuration file included in the installation package file, and further, whether the application meets the combined installation conditions can be determined.

需要说明的是,考虑到应用安装需要占用一定的存储空间,若存储空间不足,则会导致安装失败,因此,上述满足组合安装条件还可以包括第二应用所在存储空间(如磁盘)的剩余存储空间足够安装第一应用。此外,满足组合安装条件还可以包括一些其他条件,如安装应用的主机的硬件条件,如内存大小、CPU(Center Process Unit,中央处理单元)性能等。It should be noted that, considering that application installation requires a certain amount of storage space, insufficient storage space will result in installation failure. Therefore, the above-mentioned combination installation condition may also include that the remaining storage space of the storage space (such as a disk) where the second application is located is sufficient to install the first application. In addition, the combination installation condition may also include some other conditions, such as the hardware conditions of the host where the application is installed, such as memory size, CPU (Center Process Unit) performance, etc.

步骤S120、执行第一应用的首次安装流程。Step S120: Execute the first installation process of the first application.

本申请实施例中,在不满足组合安装条件的情况下,可以由用户选择安装路径以及其他必要安装信息(如数据库文件存放路径等),然后,进行首次安装流程。In an embodiment of the present application, when the combined installation conditions are not met, the user can select the installation path and other necessary installation information (such as the database file storage path, etc.), and then perform the first installation process.

可见,在图1所示方法流程中,在检测到针对第一应用的安装包程序的运行指令、且确定当前未安装第一应用的情况下,确定是否满足组合安装条件,并在满足组合安装条件的情况下,在第二应用的安装路径下,对第一应用进行安装、且在第一应用的安装过程中,可以跳过第一应用与第二应用的共用组件的安装过程,通过对已安装的应用的组件复用,提高了应用安装效率,减少了应用安装占用的存储空间。It can be seen that in the method flow shown in Figure 1, when a running instruction for the installation package program for the first application is detected and it is determined that the first application is not currently installed, it is determined whether the combined installation condition is met, and when the combined installation condition is met, the first application is installed under the installation path of the second application, and during the installation of the first application, the installation process of the common components of the first application and the second application can be skipped. By reusing components of installed applications, the application installation efficiency is improved and the storage space occupied by the application installation is reduced.

在一些实施例中,在检测到针对第一应用的安装包程序的运行指令的情况下,该应用安装方法还可以包括:对第一应用的安装包程序进行初始化,将第二应用的标识信息记录到内存中;依据内存中记录的第二应用的标识信息查询注册表,确定是否满足组合安装条件。In some embodiments, when an execution instruction for the installation package program for the first application is detected, the application installation method may further include: initializing the installation package program for the first application and recording the identification information of the second application into the memory; querying the registry based on the identification information of the second application recorded in the memory to determine whether the combined installation conditions are met.

示例性的,第一应用的安装包程序中可以包括与第一应用存在共用组件的其它应用的标识信息,如GUID。Exemplarily, the installation package program of the first application may include identification information of other applications that share components with the first application, such as a GUID.

相应地,在检测到针对第一应用的安装包程序的运行指令的情况下,可以对第一应用的安装包程序进行初始化,并将第一应用的安装包程序中包括的第二应用的标识信息记录到内存(如安装包内存)中,进而,可以依据内存中记录的第二应用的标识信息查询注册表,确定是否满足组合安装条件,即是否安装有第二应用,若所述注册表中存在所述第二应用的标识信息,则确定满足所述组合安装条件。Accordingly, when an operating instruction for the installation package program of the first application is detected, the installation package program of the first application can be initialized, and the identification information of the second application included in the installation package program of the first application can be recorded in the memory (such as the installation package memory). Then, the registry can be queried based on the identification information of the second application recorded in the memory to determine whether the combined installation condition is met, that is, whether the second application is installed. If the identification information of the second application exists in the registry, it is determined that the combined installation condition is met.

需要说明的是,在本申请实施例中,若与第一应用存在共用组件的第二应用包括多个,且该多个第二应用之间不存在共用组件,这种情况下,可以跳过与多个第二应用共用的共用组件的安装过程,只需安装第一应用中其他非共用组件,从而可以提高应用安 装效率,减少应用安装占用的存储空间,此时,第一应用的安装路径可以在第二应用的安装路径下,其中,多个应用组合安装,默认安装在同一个路径下。It should be noted that, in the embodiment of the present application, if there are multiple second applications that share components with the first application, and there are no shared components among the multiple second applications, in this case, the installation process of the shared components shared with the multiple second applications can be skipped, and only other non-shared components of the first application need to be installed, thereby improving application installation. Installation efficiency is improved, and the storage space occupied by application installation is reduced. At this time, the installation path of the first application can be under the installation path of the second application. Among them, multiple applications are installed in combination and are installed in the same path by default.

在一些实施例中,在检测到针对第一应用的安装包程序的运行指令,该应用安装方法还可以包括:在当前已安装第一应用、且第一应用的安装包程序中的版本号大于所述当前已安装第一应用的版本号的情况下,确定第一应用与第二应用的共用组件是否需要升级;在确定第一应用与第二应用的共用组件需要升级的情况下,对第一应用的全部组件进行升级;在确定第一应用与第二应用的共用组件不需要升级的情况下,对第一应用的全部组件中的除所述共用组件外的其余组件进行升级。In some embodiments, when an execution instruction of an installation package program for a first application is detected, the application installation method may further include: determining whether common components of the first application and the second application need to be upgraded if the first application is currently installed and the version number in the installation package program of the first application is greater than the version number of the currently installed first application; upgrading all components of the first application if it is determined that the common components of the first application and the second application need to be upgraded; and upgrading all components of the first application except the common components if it is determined that the common components of the first application and the second application do not need to be upgraded.

示例性的,应用的安装包程序中还可以包括应用的版本信息,如版本号。Exemplarily, the installation package program of the application may also include version information of the application, such as a version number.

相应地,在检测到针对第一应用的安装包程序的运行指令、且确定当前已安装第一应用的情况下,还可以比较第一应用的安装包程序中的版本号(可以称为第一版本号)与当前已安装第一应用的版本号(可以称为第二版本号)。Accordingly, when a running instruction for the installation package program of the first application is detected and it is determined that the first application is currently installed, the version number in the installation package program of the first application (which may be called the first version number) may also be compared with the version number of the currently installed first application (which may be called the second version number).

在第一版本号大于第二版本号的情况下,可以确定需要对当前已安装第一应用进行升级。When the first version number is greater than the second version number, it can be determined that the currently installed first application needs to be upgraded.

考虑到当前已安装第一应用可能是采用组合安装方式进行安装的,即第一应用可能与其它应用(即上述第二应用)存在共用组件,而共用组件可能在第二应用升级时已经进行了升级。Considering that the currently installed first application may be installed in a combined installation manner, that is, the first application may share components with other applications (ie, the second application), and the shared components may have been upgraded when the second application is upgraded.

因此,在第一版本号大于第二版本号的情况下,还可以确定第一应用与第二应用的共用组件是否需要升级。Therefore, when the first version number is greater than the second version number, it can also be determined whether the common components of the first application and the second application need to be upgraded.

示例性的,对于第一应用与第二应用的任一共用组件,可以比较第一应用的安装包程序中该共用组件的版本与当前已安装的共用组件的版本;若前者(第一应用的安装包程序中该共用组件的版本)高于后者(已安装的共用组件的版本),且低版本的该共用组件无法满足使用需求,则确定需要对该共用组件进行升级;若前者不高于后者,则确定不需要对该共用组件进行升级;或前者高于后者,但低版本的该共用组件满足使用需求,则确定不需要对该共用组件进行升级。Exemplarily, for any common component of the first application and the second application, the version of the common component in the installation package program of the first application and the version of the currently installed common component can be compared; if the former (the version of the common component in the installation package program of the first application) is higher than the latter (the version of the installed common component), and the lower version of the common component cannot meet the usage requirements, it is determined that the common component needs to be upgraded; if the former is not higher than the latter, it is determined that the common component does not need to be upgraded; or if the former is higher than the latter, but the lower version of the common component meets the usage requirements, it is determined that the common component does not need to be upgraded.

在确定第一应用与第二应用的共用组件需要升级的情况下,可以对第一应用的全部组件进行升级。When it is determined that the common components of the first application and the second application need to be upgraded, all components of the first application may be upgraded.

在确定第一应用与第二应用的共用组件不需要升级的情况下,可以对第一应用的全部组件中除与第二应用的共用组件之外的其余组件进行升级。When it is determined that the common components of the first application and the second application do not need to be upgraded, all components of the first application except the common components with the second application may be upgraded.

在一些实施例中,在检测到针对第一应用的安装包程序的运行指令,该应用安装方法还可以包括:在存在当前已安装第一应用、且第一应用的安装包程序中的版本号等于所述当前已安装第一应用的版本号的情况下,输出安装模式选择消息;在依据检测到的选择指令,确定安装模式为修改安装、且确定需修改的组件中包括第一应用与第二应用的共用组件的情况下,对需修改的组件中除该共用组件之外的其余组件进行卸载,并安装所述第一应用的安装包中除该共用组件之外的其余组件;在依据检测到的选择指令确定安装模式为卸载的情况下,对当前已安装第一应用包括的全部组件中,除当前已安装第一应用与第二应用的共用组件之外的其余组件,进行卸载。In some embodiments, when a running instruction for an installation package program for a first application is detected, the application installation method may further include: in a case where there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application, outputting an installation mode selection message; in a case where it is determined based on the detected selection instruction that the installation mode is a modify installation and it is determined that the components to be modified include common components of the first application and the second application, uninstalling the remaining components of the components to be modified except for the common components, and installing the remaining components in the installation package of the first application except for the common components; in a case where it is determined based on the detected selection instruction that the installation mode is an uninstallation, uninstalling the remaining components of all components of the currently installed first application except for the common components of the currently installed first application and the second application.

示例性的,在检测到针对第一应用的安装包程序的运行指令、且确定第一版本等于第二版本的情况下,可以输出安装模式选择消息,由用户选择安装模式。例如,修改安 装、修复安装或卸载。Exemplarily, when a running instruction for the installation package program of the first application is detected and it is determined that the first version is equal to the second version, an installation mode selection message may be output, and the user may select an installation mode. Install, repair install, or uninstall.

其中,修改安装为卸载当前已安装第一应用中的部分组件(可以称为需修改的组件),并重新安装第一应用的安装包中除共用组件之外的其它组件。The modified installation is to uninstall some components (which may be referred to as components to be modified) in the currently installed first application, and reinstall other components in the installation package of the first application except the common components.

示例性的,在依据检测到的选择指令确定安装模式为修改安装的情况下,可以确定需修改的组件中是否包括第一应用与第二应用的共用组件。Exemplarily, when the installation mode is determined to be the modified installation according to the detected selection instruction, it can be determined whether the components to be modified include the common components of the first application and the second application.

在需修改的组件包括第一应用与第二应用的共用组件的情况下,可以拒绝对该共用组件进行卸载(即不对该共用组件进行卸载),而是对所述当前已安装第一应用中的需修改的组件中除该共用组件之外的其余组件进行卸载,并安装所述第一应用的安装包中除该共用组件之外的其余组件。In the case that the components to be modified include common components of the first application and the second application, it is possible to refuse to uninstall the common component (i.e., not uninstall the common component), but instead uninstall the remaining components of the components to be modified in the currently installed first application except for the common component, and install the remaining components in the installation package of the first application except for the common component.

例如,假设用户选择对第一应用进行修改安装,其中当前已安装第一应用包括组件1-3,待安装的第一应用的安装包中有组件1-2和组件4-6,可以选择卸载组件1~3,而由于组件1~2为当前已安装第一应用与第二应用之间的共用组件,则可以不对组件1~2进行卸载,而是卸载当前已安装第一应用中的组件3,并安装第一应用的安装包中的组件4~6。For example, suppose the user chooses to modify and install the first application, where the currently installed first application includes components 1-3, and the installation package of the first application to be installed includes components 1-2 and components 4-6. You can choose to uninstall components 1 to 3. Since components 1 to 2 are shared components between the currently installed first application and the second application, you do not need to uninstall components 1 to 2, but instead uninstall component 3 in the currently installed first application and install components 4 to 6 in the installation package of the first application.

示例性的,在依据检测到的选择指令确定安装模式为卸载的情况下,可以对当前已安装第一应用包括的全部组件中,除所述当前已安装第一应用与第二应用的共用组件之外的其余组件进行卸载。Exemplarily, when the installation mode is determined to be uninstall according to the detected selection instruction, all components included in the currently installed first application except for the common components of the currently installed first application and the second application may be uninstalled.

需要说明的时,由于修复安装并不涉及组件的卸载,在依据检测到的选择指令确定安装模式为修复安装的情况下,可以不区分共用组件和非共用组件,对当前已安装第一应用包括的组件中需要修复的组件进行修复。It should be noted that since the repair installation does not involve uninstalling components, when the installation mode is determined to be a repair installation based on the detected selection instruction, it is possible to repair the components that need to be repaired among the components included in the currently installed first application without distinguishing between shared components and non-shared components.

此外,在本申请实施例中,在第一版本号小于第二版本号的情况下,可以输出提示消息,提示用户当前已安装该应用的更高版本,并退出应用安装程序。In addition, in an embodiment of the present application, when the first version number is smaller than the second version number, a prompt message can be output to prompt the user that a higher version of the application is currently installed and to exit the application installation program.

在一些实施例中,在检测到针对第一应用的安装包程序的运行指令的情况下,该应用安装方法还可以包括:确定是否满足平滑升级条件;其中,平滑升级条件包括已安装第三应用,第三应用为与第一应用属于不同产品线、且第三应用的功能包括第一应用的部分功能;在不满足平滑升级条件的情况下,确定是否存在应用互斥;其中,存在应用互斥包括已安装第四应用,第四应用为与第一应用属于不同产品线、且存在功能冲突的应用;In some embodiments, when a running instruction for the installation package program of the first application is detected, the application installation method may further include: determining whether a smooth upgrade condition is met; wherein the smooth upgrade condition includes that a third application has been installed, the third application belongs to a different product line from the first application, and the functions of the third application include some functions of the first application; when the smooth upgrade condition is not met, determining whether there is application mutual exclusion; wherein the existence of application mutual exclusion includes that a fourth application has been installed, the fourth application belongs to a different product line from the first application, and there is a functional conflict;

在不存在应用互斥的情况下,确定当前是否已安装第一应用。In the absence of application mutual exclusion, it is determined whether the first application is currently installed.

示例性的,考虑到用户在使用应用的过程中,可能会想要升级到其它产品线,体验更多的功能,而传统应用安装方案中,针对该情况,需要先卸载本地已安装的该应用,然后,再安装功能更多的,其它产品线的应用,其操作较为繁琐,且会导致本地已安装的应用的原有数据被删除,升级体验较差。For example, considering that users may want to upgrade to other product lines to experience more functions while using the application, in the traditional application installation solution, in this case, it is necessary to first uninstall the locally installed application, and then install applications from other product lines with more functions. The operation is cumbersome and will cause the original data of the locally installed application to be deleted, resulting in a poor upgrade experience.

相应地,在本申请实施例中,对于上述情况,可以采用平滑升级的方式进行应用安装,即在需要对第一应用进行安装的情况下,若本地已安装与第一应用属于不同产品线、且功能包括第一应用的部分功能的应用(本文中称为第三应用)的情况下,可以确定满足平滑升级条件,并采用平滑升级的方式进行升级。Accordingly, in an embodiment of the present application, for the above situation, a smooth upgrade method can be used to install the application. That is, when the first application needs to be installed, if an application that belongs to a different product line from the first application and whose functions include some of the functions of the first application (referred to as the third application in this article) has been installed locally, it can be determined that the smooth upgrade conditions are met and the upgrade can be performed in a smooth upgrade method.

需要说明的是,在本申请实施例中,在检测到针对第一应用的安装程序包的运行指令的情况下,若已安装了包含第一应用的功能的其它应用,则可以输出相应指示,而不 执行安装第一应用。It should be noted that, in the embodiment of the present application, when an execution instruction for the installation package of the first application is detected, if other applications including the functions of the first application have been installed, a corresponding instruction may be output instead of Execute the installation of the first application.

在一个示例中,在检测到针对第一应用的安装包程序的运行指令的情况下,可以包括:在满足平滑升级条件的情况下,在第三应用的安装路径下,对第一应用进行增量覆盖安装,并保留第三应用的用户数据。In one example, when a running instruction for the installation package program of the first application is detected, it may include: when a smooth upgrade condition is met, incrementally overwriting the first application under the installation path of the third application and retaining user data of the third application.

示例性的,在检测到针对第一应用的安装包程序的运行指令、且确定满足平滑升级条件,如已安装第三应用的情况下,可以在第三应用的安装路径下,对第一应用进行增量覆盖安装,即对于第三应用已安装的功能组件,利用所述第一应用的安装包中的组件在所述第三应用的安装路径下进行覆盖式重新安装,对于第一应用包括的第三应用已安装的功能组件之外的其它组件,可以采用增量式安装。Exemplarily, when a running instruction for the installation package program of the first application is detected and it is determined that the conditions for a smooth upgrade are met, such as when a third application has been installed, the first application can be incrementally installed under the installation path of the third application. That is, for the functional components of the third application that have been installed, the components in the installation package of the first application are used to reinstall them under the installation path of the third application. For other components of the first application other than the functional components of the third application that have been installed, incremental installation can be used.

其中,在对第一应用进行增量覆盖安装的情况下,保留第三应用的用户数据。In which, when the first application is incrementally overwritten and installed, the user data of the third application is retained.

作为一种示例,上述对第一应用进行增量覆盖安装,可以包括:确定第三应用为组合安装还是兼容安装;其中,第三应用为组合安装包括当前安装有第五应用,第五应用与第三应用属于同一产品线、且存在共用组件的应用;第三应用为兼容安装包括当前安装有第六应用,第六应用与第三应用属于不同产品线、且存在共用组件的应用;在第三应用为组合安装的情况下,确定第三应用与第五应用的共用组件是否需要升级;若需要升级,则对第一应用进行增量覆盖安装;若不需要升级,则在第一应用的安装过程中,对该共用组件进行复用;在第三应用为兼容安装的情况下,确定第三应用与第六应用的共用组件是否需要升级;若需要升级,则对第一应用进行增量覆盖安装;若不需要升级,则在第一应用的安装过程中,对该共用组件进行复用。As an example, the above-mentioned incremental overwrite installation of the first application may include: determining whether the third application is a combined installation or a compatible installation; wherein the third application being a combined installation includes a fifth application currently installed, the fifth application and the third application belong to the same product line, and there are applications with shared components; the third application being a compatible installation includes a sixth application currently installed, the sixth application and the third application belong to different product lines, and there are applications with shared components; in the case where the third application is a combined installation, determining whether the shared components of the third application and the fifth application need to be upgraded; if upgrade is required, incrementally overwriting the first application; if upgrade is not required, reusing the shared components during the installation of the first application; in the case where the third application is a compatible installation, determining whether the shared components of the third application and the sixth application need to be upgraded; if upgrade is required, incrementally overwriting the first application; if upgrade is not required, reusing the shared components during the installation of the first application.

示例性的,考虑到第三应用可能是采用组合安装或兼容安装(跨产品线兼容安装)的方式安装的,在该情况下,第三应用中的部分组件可能由于其它应用中的共用组件的平滑升级等原因已经与第一应用所需的组件相同。For example, considering that the third application may be installed using a combined installation or a compatible installation (cross-product line compatible installation), in this case, some components in the third application may be the same as the components required by the first application due to smooth upgrades of shared components in other applications.

因而,在确定满足平滑升级条件的情况下,还可以确定第三应用是否为组合安装,即本地是否已安装与第三应用属于相同产品线、且存在共用组件的应用(本文中称为第五应用),或,是否为兼容安装,即本地是否已安装与第三应用属于不同产品线、且存在共用组件的应用(本文中称为第六应用)。Therefore, when it is determined that the conditions for a smooth upgrade are met, it can also be determined whether the third application is a combined installation, that is, whether an application that belongs to the same product line as the third application and has common components (referred to as the fifth application in this article) has been installed locally, or whether it is a compatible installation, that is, whether an application that belongs to a different product line than the third application and has common components (referred to as the sixth application in this article) has been installed locally.

即组合安装包括产品线内组合安装(简称为组合安装)或跨产品线组合安装(可以称为兼容安装)。That is, combined installation includes combined installation within a product line (referred to as combined installation) or combined installation across product lines (which may be referred to as compatible installation).

示例性的,对于任一应用程序,其安装包文件中可以包括用于记录支持与该应用程序兼容安装的其它应用程序的标识信息的配置文件。Exemplarily, for any application, its installation package file may include a configuration file for recording identification information of other application programs that support installation compatibility with the application program.

相应地,在对该应用程序进行安装的情况下,可以依据安装包文件中包括的上述配置文件,确定支持与该应用程序兼容安装的其它应用程序的标识信息,进而,确定该应用程序是否为兼容安装。Accordingly, when installing the application, identification information of other applications supporting compatible installation with the application can be determined based on the configuration file included in the installation package file, and then, whether the application is compatible for installation can be determined.

示例性的,对于任一应用程序,若已安装的其它应用程序中包括支持与该应用程序组合安装/兼容安装的应用程序,则确定该应用程序为组合安装/兼容安装。Exemplarily, for any application, if other installed applications include an application that supports combined installation/compatible installation with the application, the application is determined to be combined installation/compatible installation.

在第三应用为组合安装的情况下,可以确定第三应用与第五应用的共用组件是否需要升级,若需要升级,则对第一应用进行增量覆盖安装;若不需要升级,则在第一应用的安装过程中,可以对第三应用与第五应用的共用组件进行复用。When the third application is installed as a combination, it can be determined whether the common components of the third application and the fifth application need to be upgraded. If so, the first application can be incrementally installed. If not, the common components of the third application and the fifth application can be reused during the installation of the first application.

在第三应用为兼容安装的情况下,可以确定第三应用与第六应用的共用组件是否需 要升级,若需要升级,则对第一应用进行增量覆盖安装;若不需要升级,则在第一应用的安装过程中,可以对第三应用与第六应用的共用组件进行复用。In the case where the third application is installed for compatibility, it can be determined whether the shared components of the third application and the sixth application need to be If upgrading is required, the first application is incrementally overwritten and installed; if upgrading is not required, during the installation of the first application, the common components of the third application and the sixth application can be reused.

示例性的,考虑到同时安装来自不同产品线的应用时,很有可能出现功能冲突,导致功能异常不能使用。For example, when applications from different product lines are installed simultaneously, there is a high probability that functional conflicts will occur, causing the functions to become abnormal and unusable.

相应地,在确定不满足平滑升级条件,例如,未安装第三应用的情况下,可以确定是否存在应用互斥,即确定是否已安装与第一应用属于不同产品线、且与第一应用存在功能冲突的应用(本文中称为第四应用)。Accordingly, when it is determined that the smooth upgrade conditions are not met, for example, when the third application is not installed, it can be determined whether there is application mutual exclusion, that is, whether an application (referred to as the fourth application in this article) has been installed that belongs to a different product line from the first application and has a functional conflict with the first application.

在确定不存在应用互斥的情况下,可以确定当前是否已安装有第一应用。When it is determined that there is no mutual exclusion of the applications, it may be determined whether the first application is currently installed.

在确定存在应用互斥的情况下,可以输出提示消息,提示用户存在应用互斥,无法安装。When it is determined that applications are mutually exclusive, a prompt message may be output to prompt the user that applications are mutually exclusive and cannot be installed.

在一些实施例中,在不存在应用互斥的情况下,确定当前是否已安装第一应用之后,该应用安装方法还可以包括:在当前未安装第一应用的情况下,确定是否满足兼容安装条件;其中,满足兼容安装条件包括已安装第七应用,第七应用为与第一应用属于不同产品线、且存在共用组件的应用;In some embodiments, in the absence of mutual exclusion of applications, after determining whether the first application is currently installed, the application installation method may further include: if the first application is not currently installed, determining whether a compatible installation condition is met; wherein meeting the compatible installation condition includes that a seventh application is installed, and the seventh application is an application that belongs to a different product line from the first application and has a common component;

在满足兼容安装条件的情况下,在第七应用的安装路径下,对第一应用进行安装;其中,第一应用的安装过程中,跳过第一应用与第七应用的共用组件的安装过程。When the compatible installation conditions are met, the first application is installed under the installation path of the seventh application; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped.

示例性的,对于支持跨产品线兼容安装的场景,在检测到针对第一应用的安装包程序的运行指令、且确定当前未安装第一应用的情况下,可以确定是否满足兼容安装条件。Exemplarily, for a scenario supporting cross-product line compatible installation, when a running instruction for an installation package program of a first application is detected and it is determined that the first application is not currently installed, it can be determined whether a compatible installation condition is met.

示例性的,满足兼容安装条件可以包括已安装与第一应用属于不同产品线、且存在共用组件的应用(本文中称为第七应用)。Exemplarily, satisfying the compatible installation condition may include having installed an application (referred to herein as the seventh application) that belongs to a different product line than the first application and has a common component.

在确定满足兼容安装条件的情况下,可以在第七应用的安装路径下,对第一应用进行安装。在第一应用的安装过程中,对于第一应用与第七应用的共用组件,可以跳过第一应用中该共用组件的安装过程。If it is determined that the compatible installation condition is met, the first application can be installed under the installation path of the seventh application. During the installation of the first application, for the common components of the first application and the seventh application, the installation process of the common components in the first application can be skipped.

在一些实施例中,在检测到针对第一应用的安装包程序的运行指令的情况下,该应用安装方法还可以包括:对第一应用的安装包程序进行初始化,将第一应用的安装包程序中包括的配置文件记录到内存;其中,配置文件包括平滑升级列表、应用互斥列表以及应用兼容列表;平滑升级列表用于记录与第一应用属于不同产品线、且功能为第一应用的部分功能的应用的标识信息;应用互斥列表用于记录与第一应用属于不同产品线、且功能与第一应用的功能存在冲突的应用的标识信息;应用兼容列表用于记录与第一应用属于不同产品线、且存在共用组件的应用的标识信息。In some embodiments, when an execution instruction for an installation package program for a first application is detected, the application installation method may further include: initializing the installation package program for the first application, and recording a configuration file included in the installation package program for the first application to a memory; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list, and an application compatibility list; the smooth upgrade list is used to record identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record identification information of applications that belong to a different product line from the first application and that have common components.

示例性的,为了更准确地确定应用是否满足平滑升级条件、是否存在互斥应用,以及,是否满足兼容安装条件,应用的安装包程序的配置文件中可以包括平滑升级列表、应用互斥列表以及应用兼容列表。Exemplarily, in order to more accurately determine whether the application meets the smooth upgrade conditions, whether there are mutually exclusive applications, and whether it meets the compatible installation conditions, the configuration file of the application installation package program may include a smooth upgrade list, an application mutually exclusive list, and an application compatibility list.

其中,平滑升级列表用于记录与第一应用属于不同产品线、且功能包括第一应用的部分功能的应用的标识信息;应用互斥列表用于记录与第一应用属于不同产品线、且功能与第一应用的功能存在冲突的应用的标识信息;应用兼容列表用于记录与第一应用属于不同产品线、且存在共用组件的应用的标识信息。Among them, the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions include some of the functions of the first application; the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components.

相应地,在检测到针对第一应用的安装包程序的运行指令的情况下,可以对第一应用的安装包程序进行初始化,将第一应用的安装包程序中包括的配置文件记录到内存, 并依据内存中的配置文件,确定是否满足平滑升级条件、是否存在互斥应用,以及,是否满足兼容安装条件。Accordingly, when a running instruction for the installation package program of the first application is detected, the installation package program of the first application may be initialized, and the configuration file included in the installation package program of the first application may be recorded in the memory. And based on the configuration files in the memory, it is determined whether the smooth upgrade conditions are met, whether there are mutually exclusive applications, and whether the compatible installation conditions are met.

为了使本领域技术人员更好地理解本申请实施例提供的技术方案,下面结合具体实例对本申请实施例提供的技术方案进行说明。In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below with reference to specific examples.

在该实施例中,考虑到安防行业有很多细分的应用场景,安防公司需要针对这些细分领域设计开发不同的应用软件来满足用户需求,并且安防应用软件产品迭代速度快,用户定制化需求多,软件安装部署方案多样化,所以会生产出非常多的产品线和定制产品(即应用)。In this embodiment, considering that the security industry has many segmented application scenarios, security companies need to design and develop different application software for these segments to meet user needs, and security application software products have a fast iteration speed, many user customization requirements, and diversified software installation and deployment solutions, so a large number of product lines and customized products (i.e., applications) will be produced.

基于此,该实施例提供一套可以多产品线多应用类型复用的安装包逻辑,可以极大的减轻重复开发的工作量,并能为用户提供多种安装部署方案。Based on this, this embodiment provides a set of installation package logic that can be reused for multiple product lines and multiple application types, which can greatly reduce the workload of repeated development and provide users with a variety of installation and deployment solutions.

一、单个应用安装方案介绍1. Introduction to single application installation solution

单个应用的安装包安装模式主要包括:首次安装、修复安装、修改安装、升级安装、卸载等。The installation modes of a single application's installation package mainly include: first installation, repair installation, modified installation, upgrade installation, uninstallation, etc.

基础功能提供简易日志管理、压缩解压管理、多语言管理、注册表管理、XML(Extensible Markup Language,可扩展标记语言)管理、权限模块、GUI(Graphical User Interface,图形用户接口)、Dump(备份文件系统)管理及服务管理。Basic functions provide simple log management, compression and decompression management, multi-language management, registry management, XML (Extensible Markup Language) management, permission module, GUI (Graphical User Interface), Dump (backup file system) management and service management.

1.1、首次安装:首次安装根据特定的成果物包进行编译打包为安装包,制作好卸载程序、资源文件包、许可协议文件、卸载文件目录到目前的框架中,安装各组件过程分为安装前检查、解压、安装后处理,最后完成注册表写入、快捷方式创建、控制面板添加程序等操作的过程。其中,成果物例如为开发过程中最终向客户提交的产品,如程序生成的可执行程序、动态库、使用说明文档、运行时库等。1.1. First installation: The first installation compiles and packages the specific product package into an installation package, prepares the uninstaller, resource file package, license agreement file, and uninstall file directory into the current framework, and the installation process of each component is divided into pre-installation check, decompression, post-installation processing, and finally completes the process of writing to the registry, creating shortcuts, adding programs to the control panel, etc. Among them, the product is, for example, the product finally submitted to the customer during the development process, such as the executable program generated by the program, dynamic library, instruction document, runtime library, etc.

1.2、修复安装:本地环境已经安装过此应用,使用相同安装包再次运行,可以提供修复安装选项。修复安装会将除数据库服务以外的其他服务进行卸载,对部分配置文件进行备份,然后在原安装路径上,重新解压成果物覆盖之前的文件,再进行服务注册和配置文件还原。修复安装不会重新安装数据库服务,也不会修改或删除数据库文件。1.2. Repair installation: If the application has been installed in the local environment, you can use the same installation package to run it again. The repair installation option will be provided. Repair installation will uninstall all services except the database service, back up some configuration files, and then re-decompress the results in the original installation path to overwrite the previous files, and then register the service and restore the configuration files. Repair installation will not reinstall the database service, nor will it modify or delete the database files.

1.3、修改安装:全量包可以选择安装内容,包括客户端、平台服务、流媒体服务。修改安装是可以重新勾选或取消勾选某些安装内容,安装包程序会根据勾选结果进行安装或者卸载。例如,先安装了平台服务和客户端,然后再运行安装包取消勾选平台服务和客户端,改为只勾选流媒体服务,那么安装包会先卸载平台服务和客户端,然后安装流媒体服务。1.3. Modify the installation: The full package allows you to choose the installation content, including the client, platform services, and streaming media services. To modify the installation, you can recheck or uncheck certain installation content, and the installation package program will install or uninstall according to the check result. For example, if you install the platform service and client first, and then run the installation package to uncheck the platform service and client and only check the streaming media service, the installation package will first uninstall the platform service and client, and then install the streaming media service.

1.4、升级安装(也可以简称为升级):根据应用的GUID及版本号信息判断应用是否需要升级,若应用的安装包中的GUID与当前已安装应用的GUID相同且应用的安装包中的版本低于当前已安装应用的版本,则执行升级操作。升级就是将制作好的资源文件包、卸载程序、许可协议文件、卸载文件目录文本等以资源包的形式添加到安装包的安装程序框架中,再将资源包等释放到客户端进行覆盖原有文件及升级数据库等操作,并实现注册表更新,控制面板更新等操作过程。1.4. Upgrade installation (also referred to as upgrade): Determine whether the application needs to be upgraded based on the application's GUID and version number information. If the GUID in the application's installation package is the same as the GUID of the currently installed application and the version in the application's installation package is lower than the version of the currently installed application, then perform the upgrade operation. Upgrading is to add the prepared resource file package, uninstall program, license agreement file, uninstall file directory text, etc. to the installation program framework of the installation package in the form of a resource package, and then release the resource package to the client to overwrite the original file and upgrade the database, and implement the registry update, control panel update and other operations.

1.5、卸载:运行程序首先会监测当前客户端设备是否安装此应用,若此应用的GUID及版本与当前待安装应用的安装包相同,可执行卸载操作,卸载会清除注册表、快捷方式、日志、控制面板信息及对应的成果物。 1.5. Uninstall: When running the program, it will first monitor whether the current client device has this application installed. If the GUID and version of this application are the same as the installation package of the current application to be installed, the uninstall operation can be performed. Uninstallation will clear the registry, shortcuts, logs, control panel information and corresponding artifacts.

二、单一产品线安装方案介绍2. Introduction to single product line installation solution

按照产品线来划分,从类型上分为客户端安装包、OpenAPI(Open Application Programming Interface,开放的应用程序接口)安装包、SAC(Storage Access Component,存储访问组件)安装包以及全量安装包(简称全量包,包含平台服务、流媒体服务及客户端安装包)。其中,全量包的平台服务和OpenAPI、SAC可以组合安装,部署在同一台终端环境上,以减少用户的硬件成本。这三种安装包有部分组件是可以共用的。According to the product line, there are client installation packages, OpenAPI (Open Application Programming Interface) installation packages, SAC (Storage Access Component) installation packages and full installation packages (referred to as full packages, including platform services, streaming media services and client installation packages). Among them, the platform services and OpenAPI and SAC of the full package can be installed in combination and deployed on the same terminal environment to reduce the user's hardware costs. Some components of these three installation packages can be shared.

例如,全量包和OpenAPI共用数据库、看门狗、Nginx三个组件,而SAC则与全量包、OpenAPI都共用看门狗组件,具体关系如图2所示。For example, the full package and OpenAPI share the database, watchdog, and Nginx components, while SAC shares the watchdog component with both the full package and OpenAPI. The specific relationship is shown in Figure 2.

2.1、组合安装:同一产品线中的不同应用,可以部署在同一台服务器上,安装路径相同,共用一些公共组件(即上述共用组件),比如看门狗服务、数据库服务、Nginx服务等。组合安装需要当前安装包能够在安装前识别到有本产品线的其他可以组合安装的应用已经安装,读取组合安装产品的安装路径,判断该路径下剩余磁盘空间是否足够自己安装,以及一些其他必要条件,全部符合则进入组合安装模式。在组合安装模式下,共用组件可以跳过安装过程,复用之前组合安装应用安装好的组件。2.1. Combined installation: Different applications in the same product line can be deployed on the same server with the same installation path and share some common components (i.e. the above-mentioned shared components), such as watchdog service, database service, Nginx service, etc. Combined installation requires that the current installation package can recognize that other applications in this product line that can be installed in combination have been installed before installation, read the installation path of the combined installation product, determine whether the remaining disk space under the path is sufficient for its own installation, and some other necessary conditions. If all are met, it will enter the combined installation mode. In combined installation mode, shared components can skip the installation process and reuse the components installed by the previous combined installation application.

示例性的,安装包可以包括安装程序和卸载程序,安装程序提供对产品的安装、修复、修改、升级能力,卸载程序提供卸载能力。运行安装包首先需要检查系统环境,判断是否符合安装条件,应该进入什么安装模式。Exemplarily, the installation package may include an installation program and an uninstaller, wherein the installation program provides the ability to install, repair, modify, and upgrade the product, and the uninstaller provides the ability to uninstall. When running the installation package, the system environment must first be checked to determine whether the installation conditions are met and what installation mode should be entered.

单一产品线的安装模式判断,主要依赖注册表中是否有本产品的GUID。例如,安装应用后,需要在在注册表路径用本应用的GUID创建一张表,里面记录必要的安装信息,包括安装路径、卸载程序路径、版本号、发布者信息等。应用安装包根据注册表中是否有本应用的GUID来判断是本应用是首次安装还是二次安装(修复、卸载、升级等)。The installation mode of a single product line mainly depends on whether the GUID of the product is in the registry. For example, after installing the application, you need to create a table with the GUID of the application in the registry path, which records the necessary installation information, including the installation path, uninstaller path, version number, publisher information, etc. The application installation package determines whether the application is installed for the first time or for the second time (repair, uninstall, upgrade, etc.) based on whether the GUID of the application is in the registry.

2.2、单一产品线安装逻辑:2.2. Single product line installation logic:

如图3所示,单一产品线安装逻辑可以包括:首先读取内存中的注册表,判断是否已经安装本应用,若未安装,则本应用为首次安装,需要进一步判断是否有同一产品线的可以组合安装的应用已经安装,即是否满足组合安装条件。若不符合组合安装条件,则需要用户选择安装路径以及其他必要安装信息(比如数据库文件存放路径等),然后进行首次安装流程。As shown in Figure 3, the single product line installation logic may include: first read the registry in the memory to determine whether the application has been installed. If not, the application is installed for the first time, and it is necessary to further determine whether an application of the same product line that can be installed in combination has been installed, that is, whether the combination installation conditions are met. If the combination installation conditions are not met, the user is required to select the installation path and other necessary installation information (such as the database file storage path, etc.), and then proceed to the first installation process.

若读取注册表发现已安装本应用,根据注册表中版本号和当前安装包中版本号进行判断:If the registry is read and the application is found to be installed, the following is determined based on the version number in the registry and the version number in the current installation package:

2.2.1、若当前安装包中版本号大于注册表中的版本号,则进行升级安装;2.2.1. If the version number in the current installation package is greater than the version number in the registry, an upgrade installation is performed;

2.2.2、若当前安装包中版本号与注册表中的版本号相同,则输出安装模式选择消息,由用户选择是修复安装、修改安装还是卸载;2.2.2. If the version number in the current installation package is the same as the version number in the registry, an installation mode selection message is output, and the user can choose whether to repair the installation, modify the installation, or uninstall;

2.2.3、若当前安装包中版本号小于注册表中的版本号,则提示已安装更高版本,并退出安装程序。2.2.3. If the version number in the current installation package is smaller than the version number in the registry, it will prompt that a higher version has been installed and exit the installation program.

示例性的,上述流程中的2.2.1和2.2.2,升级和修复安装,可能是在组合安装场景上,进行升级和修复,因而,需要在安装过程中判断是否需要对共用组件进行升级或修复。Exemplarily, 2.2.1 and 2.2.2 in the above process, upgrade and repair installation, may be performed in a combined installation scenario, and therefore, it is necessary to determine whether the common components need to be upgraded or repaired during the installation process.

三、多产品线安装方案介绍3. Introduction to Multi-Product Line Installation Solutions

在该实施例中,为了能够给用户提供最新最好的应用服务,于是出现了跨产品线兼 容和升级安装的需求。In this embodiment, in order to provide users with the latest and best application services, cross-product line integration occurs. content and upgrade installation requirements.

3.1、跨产品线兼容:不同产品线的应用之间也可能存在共用组件,因而,可以支持跨产品线兼容安装。3.1. Cross-product line compatibility: There may be common components between applications in different product lines, so cross-product line compatible installation can be supported.

例如,基线的OpenAPI作为一个增量开发的软件产品,高版本能够兼容所有产品线的低版本的平台服务,因此,基线的OpenAPI理论上可以和任何产品线低版本的平台服务组合安装,进而,出现了跨产品线的OpenAPI和平台服务兼容安装的业务场景。For example, as an incrementally developed software product, the baseline OpenAPI's higher version is compatible with lower-version platform services of all product lines. Therefore, the baseline OpenAPI can theoretically be installed in combination with lower-version platform services of any product line. As a result, business scenarios arise where OpenAPI and platform services are compatible and installed across product lines.

3.2、跨产品线升级(也可以称为平滑升级):不同产品线的相同类型应用进行升级,业务组件增量覆盖安装,实现功能更新和扩展。3.2. Cross-product line upgrade (also called smooth upgrade): The same type of applications in different product lines are upgraded, and business components are incrementally installed to achieve functional updates and expansions.

示例性的,对于基于相同架构,不同业务的应用,可以配置跨产品线升级。例如,安防综合管理服务基线是集成了所有业务的应用。其他专业应用场景的应用,比如门禁应用,在一些情况下,用户购买门禁应用后使用体验较好,想要升级为安防综合管理服务应用,体验更为全面的综合安防应用,但又想保留原有的门禁应用已经产生的所有用户数据。因此,安防综合管理服务应用安装包需要能够支持门禁应用跨产品线升级,包括服务升级安装、数据库备份升级等。For example, for applications based on the same architecture but with different businesses, cross-product line upgrades can be configured. For example, the security integrated management service baseline is an application that integrates all businesses. For applications in other professional application scenarios, such as access control applications, in some cases, users have a good experience after purchasing the access control application and want to upgrade to the security integrated management service application to experience a more comprehensive integrated security application, but they also want to retain all user data that has been generated by the original access control application. Therefore, the security integrated management service application installation package needs to be able to support cross-product line upgrades of the access control application, including service upgrade installation, database backup upgrade, etc.

3.3、多产品线互斥(也可以称为应用互斥):不同产品线的、功能存在冲突的应用安装在一起可能导致功能异常,即存在应用互斥。3.3. Mutual exclusion of multiple product lines (also known as application mutual exclusion): Installing applications from different product lines with conflicting functions together may cause functional abnormalities, that is, application mutual exclusion exists.

例如,假设用户已经安装了某应用A,此时又计划安装来自其他产品线的某应用B,已知应用A和应用B功能冲突,安装在一起可能导致功能异常,此时需要在运行应用B的安装包时,能够提示用户,当前应用B与应用A冲突,不能安装,但是由于应用A与应用B来自不同产品线,彼此之间没有任何关联,需要有方案能够灵活配置具有安装互斥关系的应用。For example, suppose the user has already installed application A, and now plans to install application B from another product line. It is known that application A and application B have conflicting functions, and installing them together may cause functional abnormalities. At this time, when running the installation package of application B, it is necessary to prompt the user that the current application B conflicts with application A and cannot be installed. However, since application A and application B are from different product lines and have no connection with each other, a solution is needed to flexibly configure applications with mutually exclusive installation relationships.

安装包的实现方案为,在产品成果物的产品配置文件(Product.xml)中分别增加平滑升级列表、应用互斥列表、应用兼容列表三个配置节点。The implementation scheme of the installation package is to add three configuration nodes, namely, a smooth upgrade list, an application mutually exclusive list, and an application compatibility list, in the product configuration file (Product.xml) of the product artifact.

其中,对于平滑升级列表,一个应用可以配置可以平滑升级的一个或多个应用信息。每个平滑升级的应用信息内容可以包括但不限于:允许升级的应用GUID、最小版本号、最大版本号、应用名称、品牌名称。For the smooth upgrade list, an application can be configured with one or more application information that can be smoothly upgraded. The content of each smooth upgrade application information may include but is not limited to: application GUID allowed to be upgraded, minimum version number, maximum version number, application name, and brand name.

安装包开始运行时会逐个查询注册表中的应用GUID,确定是否满足平滑升级条件。When the installation package starts running, it will query the application GUID in the registry one by one to determine whether the smooth upgrade conditions are met.

示例性的,平滑升级条件可以设置最低版本号和最高版本号,在此版本区间内支持平滑升级。Exemplarily, the smooth upgrade condition may set a minimum version number and a maximum version number, and support smooth upgrade within this version range.

对于应用互斥列表,一个应用可以配置与该应用存在应用互斥的一个或多个应用GUID。For the application mutual exclusion list, an application may configure one or more application GUIDs that are mutually exclusive with the application.

对于应用兼容列表,一个应用可以配置可以兼容安装的一个或多个应用信息。每个兼容安装的应用信息内容可以包括但不限于:兼容的应用的GUID和最低版本号及最高版本号。For the application compatibility list, an application can configure one or more application information that can be compatible with installation. The content of each compatible application information can include but is not limited to: the GUID and the minimum and maximum version numbers of the compatible applications.

示例性的,上述配置文件可以在集成打包时,拷贝到安装包资源目录下。Exemplarily, the above configuration file may be copied to the resource directory of the installation package during integration and packaging.

3.4、跨产品线安装逻辑3.4. Cross-product line installation logic

示例性的,如图4所示,跨产品线安装逻辑是在上述单一产品线安装逻辑之上,增加了一些前置判断,具体实现逻辑可以包括:For example, as shown in FIG4 , the cross-product line installation logic is based on the above single product line installation logic, with some pre-judgments added. The specific implementation logic may include:

3.4.1、释放配置文件到临时路径,例如,将本应用的配置文件复制到临时路径,读 取配置文件内容到内存,包括平滑升级列表、应用互斥列表、应用兼容列表,根据配置文件中平滑升级列表,确定是否满足平滑升级条件;若满足平滑升级条件,则进入平滑升级模式,在当前已安装的允许平滑升级的应用的路径下进行增量覆盖安装;3.4.1. Release the configuration file to a temporary path. For example, copy the configuration file of this application to a temporary path and read Get the contents of the configuration file into memory, including the smooth upgrade list, application mutual exclusion list, and application compatibility list, and determine whether the smooth upgrade conditions are met based on the smooth upgrade list in the configuration file; if the smooth upgrade conditions are met, enter the smooth upgrade mode and perform incremental overwrite installation in the path of the currently installed applications that allow smooth upgrades;

3.4.2、若不满足平滑升级条件,则根据配置文件中应用互斥列表,确定是否存在应用互斥;若不存在应用互斥,则按照单一产品线安装逻辑进行应用安装。3.4.2. If the smooth upgrade conditions are not met, determine whether there is application mutual exclusion based on the application mutual exclusion list in the configuration file; if there is no application mutual exclusion, install the application according to the single product line installation logic.

示例性的,区别于单一产品线安装逻辑,在进行组合安装判断时,还需要判断根据配置文件中的应用兼容列表,进行兼容安装判断。For example, different from the installation logic of a single product line, when making a combined installation judgment, it is also necessary to make a compatible installation judgment based on the application compatibility list in the configuration file.

3.4.3、若存在应用互斥,则输出提示消息,提示用户当前应用与已安装的指定应用互斥,无法安装,然后退出安装程序。3.4.3. If there is mutual exclusion between applications, a prompt message will be output to remind the user that the current application is mutually exclusive with the installed specified application and cannot be installed, and then the installation program will be exited.

以上对本申请提供的方法进行了描述。下面对本申请提供的装置进行描述。The method provided by the present application is described above. The device provided by the present application is described below.

请参见图5,为本申请实施例提供的一种应用安装装置的结构示意图,如图5所示,该应用安装装置可以包括:确定单元510,用于在检测到针对第一应用的安装包程序的运行指令、且当前未安装所述第一应用的情况下,确定是否满足组合安装条件;其中,满足所述组合安装条件包括已安装第二应用,所述第二应用为与所述第一应用存在共用组件的应用;安装单元520,用于在满足所述组合安装条件的情况下,在所述第二应用的安装路径下,对所述第一应用进行安装;其中,在所述第一应用的安装过程中,跳过所述第一应用与所述第二应用的共用组件的安装过程;所述安装单元520,还用于在不满足所述组合安装条件的情况下,执行所述第一应用的首次安装流程。Please refer to Figure 5, which is a structural diagram of an application installation device provided in an embodiment of the present application. As shown in Figure 5, the application installation device may include: a determination unit 510, used to determine whether a combined installation condition is met when a running instruction for an installation package program for a first application is detected and the first application is not currently installed; wherein satisfying the combined installation condition includes that a second application has been installed, and the second application is an application that has a common component with the first application; an installation unit 520, used to install the first application under the installation path of the second application when the combined installation condition is met; wherein, during the installation process of the first application, the installation process of the common components of the first application and the second application is skipped; the installation unit 520 is also used to execute the first installation process of the first application when the combined installation condition is not met.

在一些实施例中,所述安装单元520,还用于在检测到针对第一应用的安装包程序的运行指令的情况下,对所述第一应用的安装包程序进行初始化,将所述第二应用的标识信息记录到内存中;In some embodiments, the installation unit 520 is further configured to, upon detecting a running instruction for the installation package program of the first application, initialize the installation package program of the first application and record the identification information of the second application into the memory;

所述确定单元510,还用于依据所述内存中记录的所述第二应用的标识信息查询注册表,若所述注册表中存在所述第二应用的标识信息,则确定满足所述组合安装条件。The determining unit 510 is further configured to query a registration table according to the identification information of the second application recorded in the memory, and if the identification information of the second application exists in the registration table, determine that the combined installation condition is met.

在一些实施例中,所述确定单元510,还用于在检测到针对所述第一应用的安装包程序的运行指令、且在存在当前已安装第一应用,所述第一应用的安装包程序中的版本号大于所述当前已安装第一应用的版本号的情况下,确定所述第一应用与所述第二应用的共用组件是否需要升级。In some embodiments, the determination unit 510 is further used to determine whether the common components of the first application and the second application need to be upgraded when a running instruction for the installation package program for the first application is detected and when there is a currently installed first application and the version number in the installation package program of the first application is greater than the version number of the currently installed first application.

在一些实施例中,所述安装单元520,还用于在检测到针对第一应用的安装包程序的运行指令、且在存在当前已安装第一应用,所述第一应用的安装包程序中的版本号等于所述当前已安装第一应用的版本号的情况下,输出安装模式选择消息。In some embodiments, the installation unit 520 is further used to output an installation mode selection message when an execution instruction for the installation package program for the first application is detected and when there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application.

所述安装单元520,还用于在依据检测到的选择指令确定所述安装模式为修改安装、且确定需修改的组件中包括所述第一应用与所述第二应用的共用组件的情况下,对所述需修改的组件中除该共用组件之外的其余组件进行卸载,并安装所述第一应用的安装包中除该共用组件之外的其余组件。The installation unit 520 is also used to uninstall the remaining components except the common components in the components to be modified, and install the remaining components except the common components in the installation package of the first application, when it is determined that the installation mode is a modified installation based on the detected selection instruction and it is determined that the components to be modified include the common components of the first application and the second application.

所述安装单元520,还用于在依据检测到的所述选择指令确定所述安装模式为卸载的情况下,对所述当前已安装第一应用包括的全部组件中,除所述当前已安装第一应用与所述第二应用的共用组件之外的其余组件,进行卸载。The installation unit 520 is further configured to uninstall, when it is determined that the installation mode is uninstallation according to the detected selection instruction, all components included in the currently installed first application except for the common components of the currently installed first application and the second application.

在一些实施例中,所述确定单元510,还用于在检测到针对所述第一应用的安装包程序的运行指令的情况下,确定是否满足平滑升级条件;其中,所述平滑升级条件包括 已安装第三应用,所述第三应用为与所述第一应用属于不同产品线、且所述第三应用的功能包括所述第一应用的部分功能;In some embodiments, the determining unit 510 is further configured to determine whether a smooth upgrade condition is met when a running instruction for the installation package program of the first application is detected; wherein the smooth upgrade condition includes A third application has been installed, the third application belongs to a different product line from the first application, and the functions of the third application include some functions of the first application;

所述确定单元510,还用于在不满足平滑升级条件的情况下,确定是否存在应用互斥;其中,所述存在应用互斥包括已安装第四应用,所述第四应用为与所述第一应用属于不同产品线、且存在功能冲突的应用;The determining unit 510 is further configured to determine whether there is application mutual exclusion when the smooth upgrade condition is not met; wherein the existence of application mutual exclusion includes that a fourth application has been installed, and the fourth application is an application that belongs to a different product line from the first application and has a functional conflict;

所述确定单元510,还用于在不存在所述应用互斥的情况下,确定当前是否已安装所述第一应用。The determining unit 510 is further configured to determine whether the first application is currently installed when the applications are not mutually exclusive.

在一些实施例中,所述安装单元520,还用于在满足平滑升级条件的情况下,在所述第三应用的安装路径下,对所述第一应用进行增量覆盖安装,并保留所述第三应用的用户数据,其中,所述增量覆盖安装是指对于所述第三应用已安装的功能组件,利用所述第一应用的安装包中的组件在所述第三应用的安装路径下进行覆盖式重新安装,对于所述第一应用包括的所述第三应用已安装的功能组件之外的其它组件,采用增量式安装。In some embodiments, the installation unit 520 is further used to perform an incremental overwrite installation of the first application under the installation path of the third application and retain user data of the third application when a smooth upgrade condition is met, wherein the incremental overwrite installation refers to reinstalling the functional components of the third application installed by using the components in the installation package of the first application under the installation path of the third application, and incremental installation is used for other components of the first application other than the functional components of the third application installed.

在一些实施例中,所述安装单元520对所述第一应用进行增量覆盖安装,包括:确定所述第三应用为组合安装还是兼容安装;其中,所述第三应用为组合安装包括当前安装有第五应用,所述第五应用与所述第三应用属于同一产品线、且存在共用组件的应用;所述第三应用为兼容安装包括当前安装有第六应用,所述第六应用与所述第三应用属于不同产品线、且存在共用组件的应用;在所述第三应用为组合安装的情况下,确定所述第三应用与所述第五应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第五应用的共用组件进行复用;在所述第三应用为兼容安装的情况下,确定所述第三应用与所述第六应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第六应用的共用组件进行复用。In some embodiments, the installation unit 520 performs an incremental overwrite installation on the first application, including: determining whether the third application is a combined installation or a compatible installation; wherein, the third application being a combined installation includes currently installing a fifth application, the fifth application and the third application belong to the same product line and have common components; the third application being a compatible installation includes currently installing a sixth application, the sixth application and the third application belong to different product lines and have common components; in the case where the third application is a combined installation, determining whether the common components of the third application and the fifth application need to be upgraded; if upgrade is required, performing an incremental overwrite installation on the first application; if upgrade is not required, reusing the common components of the third application and the fifth application during the installation of the first application; in the case where the third application is a compatible installation, determining whether the common components of the third application and the sixth application need to be upgraded; if upgrade is required, performing an incremental overwrite installation on the first application; if upgrade is not required, reusing the common components of the third application and the sixth application during the installation of the first application.

在一些实施例中,所述确定单元510,还用于在当前未安装所述第一应用的情况下,确定是否满足兼容安装条件;其中,满足所述兼容安装条件包括已安装第七应用,所述第七应用为与所述第一应用属于不同产品线、且存在共用组件的应用。In some embodiments, the determination unit 510 is also used to determine whether a compatible installation condition is met when the first application is not currently installed; wherein, satisfying the compatible installation condition includes having installed a seventh application, and the seventh application is an application that belongs to a different product line from the first application and has shared components.

所述安装单元520,还用于在满足所述兼容安装条件的情况下,在所述第七应用的安装路径下,对所述第一应用进行安装;其中,所述第一应用的安装过程中,跳过所述第一应用与所述第七应用的共用组件的安装过程。The installation unit 520 is further used to install the first application under the installation path of the seventh application when the compatible installation condition is met; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped.

在一些实施例中,所述安装单元520,还用于在检测到针对所述第一应用的安装包程序的运行指令的情况下,对所述第一应用的安装包程序进行初始化,将所述第一应用的安装包程序中包括的配置文件记录到内存;其中,所述配置文件包括平滑升级列表、应用互斥列表以及应用兼容列表;所述平滑升级列表用于记录与所述第一应用属于不同产品线、且功能为所述第一应用的部分功能的应用的标识信息;所述应用互斥列表用于记录与所述第一应用属于不同产品线、且功能与所述第一应用的功能存在冲突的应用的标识信息;所述应用兼容列表用于记录与所述第一应用属于不同产品线、且存在共用组件的应用的标识信息。In some embodiments, the installation unit 520 is further used to initialize the installation package program of the first application and record the configuration file included in the installation package program of the first application to the memory when a running instruction for the installation package program of the first application is detected; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list and an application compatibility list; the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components.

本申请实施例提供一种电子设备,包括处理器和存储器,其中,存储器存储有能够被所述处理器执行的机器可执行指令,处理器用于执行机器可执行指令,以实现上文描 述的应用安装方法。The present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the above-described The application installation method described above.

请参见图6,为本申请实施例提供的一种电子设备的硬件结构示意图。该电子设备可包括处理器601、存储有机器可执行指令的存储器602。处理器601与存储器602可经由系统总线603通信。并且,通过读取并执行存储器602中与应用安装逻辑对应的机器可执行指令,处理器601可执行上文描述的应用安装方法。Please refer to Figure 6, which is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 601 and a memory 602 storing machine executable instructions. The processor 601 and the memory 602 may communicate via a system bus 603. In addition, by reading and executing the machine executable instructions corresponding to the application installation logic in the memory 602, the processor 601 may execute the application installation method described above.

本文中提到的存储器602可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。The memory 602 mentioned in this article can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

在一些实施例中,还提供了一种存储介质,如图6中的存储器602,该存储介质为机器可读存储介质,该存储介质内存储有机器可执行指令,所述机器可执行指令被处理器执行时实现上文描述的应用安装方法。例如,所述存储介质可以是ROM、RAM、CD-ROM、磁带、软盘和光数据存储设备等。In some embodiments, a storage medium is also provided, such as the memory 602 in FIG6 , which is a machine-readable storage medium, and the storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the application installation method described above is implemented. For example, the storage medium can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

以上所述仅为本申请的一些实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。 The above descriptions are only some embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims (20)

一种应用安装方法,包括:An application installation method, comprising: 在检测到针对第一应用的安装包程序的运行指令、且当前未安装所述第一应用的情况下,确定是否满足组合安装条件;其中,满足所述组合安装条件包括已安装第二应用,所述第二应用为与所述第一应用存在共用组件的应用;When a running instruction for an installation package program of a first application is detected and the first application is not currently installed, determining whether a combined installation condition is met; wherein satisfying the combined installation condition includes that a second application is already installed, and the second application is an application that has a common component with the first application; 在满足所述组合安装条件的情况下,在所述第二应用的安装路径下,对所述第一应用进行安装;其中,在所述第一应用的安装过程中,跳过所述第一应用与所述第二应用的共用组件的安装过程;When the combined installation condition is met, the first application is installed in the installation path of the second application; wherein, during the installation of the first application, the installation of the common components of the first application and the second application is skipped; 在不满足所述组合安装条件的情况下,执行所述第一应用的首次安装流程。If the combined installation condition is not met, the first installation process of the first application is executed. 根据权利要求1所述的方法,其中,在检测到针对所述第一应用的安装包程序的运行指令的情况下,所述方法还包括:The method according to claim 1, wherein, in the case where an execution instruction for the installation package program of the first application is detected, the method further comprises: 对所述第一应用的安装包程序进行初始化,将所述第二应用的标识信息记录到内存中;Initializing the installation package program of the first application, and recording the identification information of the second application into a memory; 依据所述内存中记录的所述第二应用的标识信息查询注册表,若所述注册表中存在所述第二应用的标识信息,则确定满足所述组合安装条件。A registration table is queried according to the identification information of the second application recorded in the memory, and if the identification information of the second application exists in the registration table, it is determined that the combined installation condition is met. 根据权利要求1所述的方法,其中,在检测到针对所述第一应用的安装包程序的运行指令的情况下,所述方法还包括:The method according to claim 1, wherein, in the case where an execution instruction for the installation package program of the first application is detected, the method further comprises: 在存在当前已安装第一应用、且所述第一应用的安装包程序中的版本号大于所述当前已安装第一应用的版本号的情况下,确定所述第一应用与所述第二应用的共用组件是否需要升级;If there is a currently installed first application and the version number in the installation package program of the first application is greater than the version number of the currently installed first application, determining whether a common component of the first application and the second application needs to be upgraded; 在确定所述第一应用与所述第二应用的共用组件需要升级的情况下,对所述第一应用的全部组件进行升级;When it is determined that the common components of the first application and the second application need to be upgraded, all components of the first application are upgraded; 在确定所述第一应用与第二应用的共用组件不需要升级的情况下,对所述第一应用的全部组件中的除所述共用组件外的其余组件进行升级。When it is determined that the common components of the first application and the second application do not need to be upgraded, the remaining components of all the components of the first application except the common components are upgraded. 根据权利要求1所述的方法,其中,在检测到针对所述第一应用的安装包程序的运行指令的情况下,所述方法还包括:The method according to claim 1, wherein, in the case where an execution instruction for the installation package program of the first application is detected, the method further comprises: 在存在当前已安装第一应用、且所述第一应用的安装包程序中的版本号等于所述当前已安装第一应用的版本号的情况下,输出安装模式选择消息;If there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application, output an installation mode selection message; 在依据检测到的选择指令确定所述安装模式为修改安装、且确定需修改的组件中包括所述第一应用与所述第二应用的共用组件的情况下,对所述需修改的组件中除该共用组件之外的其余组件进行卸载,并安装所述第一应用的安装包中除该共用组件之外的其余组件;When it is determined that the installation mode is modification installation according to the detected selection instruction, and it is determined that the components to be modified include the common components of the first application and the second application, uninstall the remaining components of the components to be modified except the common components, and install the remaining components of the installation package of the first application except the common components; 在依据检测到的所述选择指令确定所述安装模式为卸载的情况下,对所述当前已安装第一应用包括的全部组件中,除当前已安装第一应用与所述第二应用的共用组件之外的其余组件,进行卸载。When it is determined that the installation mode is uninstallation according to the detected selection instruction, all components included in the currently installed first application, except for the common components of the currently installed first application and the second application, are uninstalled. 根据权利要求1所述的方法,其中,在检测到针对所述第一应用的安装包程序的运行指令的情况下,所述方法还包括:The method according to claim 1, wherein, in the case where an execution instruction for the installation package program of the first application is detected, the method further comprises: 确定是否满足平滑升级条件;其中,所述平滑升级条件包括已安装第三应用,所述第三应用为与所述第一应用属于不同产品线、且所述第三应用的功能包括所述第一应用 的部分功能;Determine whether a smooth upgrade condition is met; wherein the smooth upgrade condition includes that a third application has been installed, the third application belongs to a different product line from the first application, and the function of the third application includes the function of the first application Some functions of 在不满足平滑升级条件的情况下,确定是否存在应用互斥;其中,所述存在应用互斥包括已安装第四应用,所述第四应用为与所述第一应用属于不同产品线、且存在功能冲突的应用;If the smooth upgrade condition is not met, determining whether there is application mutual exclusion; wherein the existence of application mutual exclusion includes that a fourth application has been installed, and the fourth application is an application that belongs to a different product line from the first application and has a functional conflict; 在不存在所述应用互斥的情况下,确定当前是否已安装所述第一应用。In the absence of mutual exclusion of the applications, it is determined whether the first application is currently installed. 根据权利要求5所述的方法,所述方法还包括:The method according to claim 5, further comprising: 在满足平滑升级条件的情况下,在所述第三应用的安装路径下,对所述第一应用进行增量覆盖安装,并保留所述第三应用的用户数据,其中,所述增量覆盖安装是指对于所述第三应用已安装的功能组件,利用所述第一应用的安装包中的组件在所述第三应用的安装路径下进行覆盖式重新安装,对于所述第一应用包括的所述第三应用已安装的功能组件之外的其它组件,采用增量式安装。When the conditions for a smooth upgrade are met, the first application is incrementally installed under the installation path of the third application, and the user data of the third application is retained, wherein the incremental installation means that the functional components of the third application that have been installed are reinstalled under the installation path of the third application using the components in the installation package of the first application, and incremental installation is used for other components of the first application other than the functional components of the third application that have been installed. 根据权利要求6所述的方法,其中,对所述第一应用进行增量覆盖安装,包括:The method according to claim 6, wherein performing incremental overlay installation on the first application comprises: 确定所述第三应用为组合安装还是兼容安装;Determining whether the third application is installed in combination or in a compatible manner; 其中,所述第三应用为组合安装包括当前安装有第五应用,所述第五应用与所述第三应用属于同一产品线、且存在共用组件的应用;所述第三应用为兼容安装包括当前安装有第六应用,所述第六应用与所述第三应用属于不同产品线、且存在共用组件的应用;The third application being installed in combination includes a fifth application currently installed, the fifth application and the third application belong to the same product line and have common components; the third application being installed in compatibility includes a sixth application currently installed, the sixth application and the third application belong to different product lines and have common components; 在所述第三应用为组合安装的情况下,确定所述第三应用与所述第五应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第五应用的共用组件进行复用;In the case where the third application is installed in combination, determining whether the common components of the third application and the fifth application need to be upgraded; if the upgrade is required, performing an incremental overwriting installation on the first application; if the upgrade is not required, reusing the common components of the third application and the fifth application during the installation of the first application; 在所述第三应用为兼容安装的情况下,确定所述第三应用与所述第六应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第六应用的共用组件进行复用。When the third application is installed for compatibility, determine whether the shared components of the third application and the sixth application need to be upgraded; if upgrade is required, perform an incremental overwrite installation on the first application; if upgrade is not required, reuse the shared components of the third application and the sixth application during the installation of the first application. 根据权利要求5所述的方法,所述方法还包括:The method according to claim 5, further comprising: 在当前未安装所述第一应用的情况下,确定是否满足兼容安装条件;其中,满足所述兼容安装条件包括已安装第七应用,所述第七应用为与所述第一应用属于不同产品线、且存在共用组件的应用;In the case that the first application is not currently installed, determining whether a compatible installation condition is met; wherein satisfying the compatible installation condition includes that a seventh application has been installed, and the seventh application is an application that belongs to a different product line from the first application and has a common component; 在满足所述兼容安装条件的情况下,在所述第七应用的安装路径下,对所述第一应用进行安装;其中,所述第一应用的安装过程中,跳过所述第一应用与所述第七应用的共用组件的安装过程。When the compatible installation condition is met, the first application is installed under the installation path of the seventh application; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped. 根据权利要求5-8任一项所述的方法,其中,在检测到针对所述第一应用的安装包程序的运行指令的情况下,所述方法还包括:The method according to any one of claims 5 to 8, wherein, in the case where a running instruction for the installation package program of the first application is detected, the method further comprises: 对所述第一应用的安装包程序进行初始化,将所述第一应用的安装包程序中包括的配置文件记录到内存;其中,所述配置文件包括平滑升级列表、应用互斥列表以及应用兼容列表;所述平滑升级列表用于记录与所述第一应用属于不同产品线、且功能为所述第一应用的部分功能的应用的标识信息;所述应用互斥列表用于记录与所述第一应用属于不同产品线、且功能与所述第一应用的功能存在冲突的应用的标识信息;所述应用兼容列表用于记录与所述第一应用属于不同产品线、且存在共用组件的应用的标识信息。Initialize the installation package program of the first application, and record the configuration file included in the installation package program of the first application into the memory; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list, and an application compatibility list; the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components. 一种应用安装装置,包括:An application installation device, comprising: 确定单元,用于在检测到针对第一应用的安装包程序的运行指令、且当前未安装所 述第一应用的情况下,确定是否满足组合安装条件;其中,满足所述组合安装条件包括已安装第二应用,所述第二应用为与所述第一应用存在共用组件的应用;The determining unit is configured to detect an execution instruction for the installation package program of the first application and the installation package program of the first application is not currently installed. In the case of the first application, determining whether a combined installation condition is satisfied; wherein satisfying the combined installation condition includes that a second application has been installed, and the second application is an application that has a common component with the first application; 安装单元,用于在满足所述组合安装条件的情况下,在所述第二应用的安装路径下,对所述第一应用进行安装;其中,在所述第一应用的安装过程中,跳过所述第一应用与所述第二应用的共用组件的安装过程;An installation unit, configured to install the first application in the installation path of the second application when the combined installation condition is met; wherein, during the installation of the first application, the installation of the common components of the first application and the second application is skipped; 所述安装单元,还用于在不满足所述组合安装条件的情况下,执行所述第一应用的首次安装流程。The installation unit is further configured to execute a first installation process of the first application when the combined installation condition is not met. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein 所述安装单元,还用于在检测到针对所述第一应用的安装包程序的运行指令的情况下,对所述第一应用的安装包程序进行初始化,将所述第二应用的标识信息记录到内存中;The installation unit is further configured to, when a running instruction for the installation package program of the first application is detected, initialize the installation package program of the first application and record the identification information of the second application into a memory; 所述确定单元,还用于依据所述内存中记录的所述第二应用的标识信息查询注册表,若所述注册表中存在所述第二应用的标识信息,则确定满足所述组合安装条件。The determining unit is further configured to query a registration table according to the identification information of the second application recorded in the memory, and if the identification information of the second application exists in the registration table, determine that the combined installation condition is met. 根据权利要求10所述的装置,其中,所述确定单元,还用于在检测到针对所述第一应用的安装包程序的运行指令、且在存在当前已安装第一应用,所述第一应用的安装包程序中的版本号大于当前已安装的所述第一应用的版本号的情况下,确定所述第一应用与所述第二应用的共用组件是否需要升级。According to the device according to claim 10, wherein the determination unit is further used to determine whether the common components of the first application and the second application need to be upgraded when a running instruction for the installation package program of the first application is detected and there is a currently installed first application and the version number in the installation package program of the first application is greater than the version number of the currently installed first application. 根据权利要求10所述的装置,其中,所述安装单元,还用于在检测到针对所述第一应用的安装包程序的运行指令、且在存在当前已安装第一应用,所述第一应用的安装包程序中的版本号等于当前已安装的所述第一应用的版本号的情况下,输出安装模式选择消息;The device according to claim 10, wherein the installation unit is further configured to output an installation mode selection message when a running instruction for the installation package program of the first application is detected and when there is a currently installed first application and the version number in the installation package program of the first application is equal to the version number of the currently installed first application; 所述安装单元,还用于在依据检测到的选择指令确定所述安装模式为修改安装、且确定需修改的组件中包括所述第一应用与所述第二应用的共用组件的情况下,对所述需修改的组件中除该共用组件之外的其余组件进行卸载,并安装所述第一应用的安装包中除该共用组件之外的其余组件;The installation unit is further configured to, when it is determined according to the detected selection instruction that the installation mode is modification installation and it is determined that the components to be modified include the common components of the first application and the second application, uninstall the remaining components of the components to be modified except the common components, and install the remaining components of the installation package of the first application except the common components; 所述安装单元,还用于在依据检测到的所述选择指令确定所述安装模式为卸载的情况下,对所述当前已安装第一应用包括的全部组件中,除所述当前已安装第一应用与所述第二应用的共用组件之外的其余组件,进行卸载。The installation unit is further configured to uninstall, when it is determined that the installation mode is uninstallation according to the detected selection instruction, all components included in the currently installed first application except for the common components of the currently installed first application and the second application. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein 所述确定单元,还用于在检测到针对所述第一应用的安装包程序的运行指令的情况下,确定是否满足平滑升级条件;其中,所述平滑升级条件包括已安装第三应用,所述第三应用为与所述第一应用属于不同产品线、且所述第三应用的功能包括所述第一应用的部分功能;The determining unit is further configured to determine whether a smooth upgrade condition is met when a running instruction for the installation package program of the first application is detected; wherein the smooth upgrade condition includes that a third application has been installed, the third application belongs to a different product line from the first application, and the function of the third application includes part of the function of the first application; 所述确定单元,还用于在不满足平滑升级条件的情况下,确定是否存在应用互斥;其中,所述存在应用互斥包括已安装第四应用,所述第四应用为与所述第一应用属于不同产品线、且存在功能冲突的应用;The determining unit is further configured to determine whether there is application mutual exclusion when the smooth upgrade condition is not met; wherein the existence of application mutual exclusion includes that a fourth application has been installed, and the fourth application is an application that belongs to a different product line from the first application and has a functional conflict; 所述确定单元,还用于在不存在所述应用互斥的情况下,确定当前是否已安装所述第一应用。The determining unit is further configured to determine whether the first application is currently installed when the applications are not mutually exclusive. 根据权利要求14所述的装置,其中,所述安装单元,还用于在满足平滑升级 条件的情况下,在所述第三应用的安装路径下,对所述第一应用进行增量覆盖安装,并保留所述第三应用的用户数据,其中,所述增量覆盖安装是指对于所述第三应用已安装的功能组件,利用所述第一应用的安装包中的组件在所述第三应用的安装路径下进行覆盖式重新安装,对于所述第一应用包括的所述第三应用已安装的功能组件之外的其它组件,采用增量式安装。The device according to claim 14, wherein the installation unit is further used to meet the smooth upgrade Under certain conditions, the first application is incrementally installed under the installation path of the third application, and the user data of the third application is retained, wherein the incremental installation means that for the functional components installed by the third application, the components in the installation package of the first application are reinstalled under the installation path of the third application in an overwritten manner, and for other components of the first application except the functional components installed by the third application, incremental installation is adopted. 根据权利要求15所述的装置,其中,所述安装单元对所述第一应用进行增量覆盖安装,包括:The apparatus according to claim 15, wherein the installation unit performs incremental overlay installation on the first application, comprising: 确定所述第三应用为组合安装还是兼容安装;其中,所述第三应用为组合安装包括当前安装有第五应用,所述第五应用与所述第三应用属于同一产品线、且存在共用组件的应用;所述第三应用为兼容安装包括当前安装有第六应用,所述第六应用与所述第三应用属于不同产品线、且存在共用组件的应用;Determine whether the third application is installed in combination or installed compatibly; wherein the third application being installed in combination includes that a fifth application is currently installed, and the fifth application and the third application belong to the same product line and have common components; the third application being installed compatibly includes that a sixth application is currently installed, and the sixth application and the third application belong to different product lines and have common components; 在所述第三应用为组合安装的情况下,确定所述第三应用与所述第五应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第五应用的共用组件进行复用;In the case where the third application is installed in combination, determining whether the common components of the third application and the fifth application need to be upgraded; if the upgrade is required, performing an incremental overwriting installation on the first application; if the upgrade is not required, reusing the common components of the third application and the fifth application during the installation of the first application; 在所述第三应用为兼容安装的情况下,确定所述第三应用与所述第六应用的共用组件是否需要升级;若需要升级,则对所述第一应用进行增量覆盖安装;若不需要升级,则在所述第一应用的安装过程中,对所述第三应用与所述第六应用的共用组件进行复用。When the third application is installed for compatibility, determine whether the shared components of the third application and the sixth application need to be upgraded; if upgrade is required, perform an incremental overwrite installation on the first application; if upgrade is not required, reuse the shared components of the third application and the sixth application during the installation of the first application. 根据权利要求14所述的装置,其中,所述确定单元,还用于在当前未安装所述第一应用的情况下,确定是否满足兼容安装条件;其中,满足所述兼容安装条件包括已安装第七应用,所述第七应用为与所述第一应用属于不同产品线、且存在共用组件的应用;The device according to claim 14, wherein the determining unit is further configured to determine whether a compatible installation condition is satisfied when the first application is not currently installed; wherein satisfying the compatible installation condition includes having installed a seventh application, the seventh application being an application that belongs to a different product line from the first application and has a common component; 所述安装单元,还用于在满足所述兼容安装条件的情况下,在所述第七应用的安装路径下,对所述第一应用进行安装;其中,所述第一应用的安装过程中,跳过所述第一应用与所述第七应用的共用组件的安装过程。The installation unit is further used to install the first application under the installation path of the seventh application when the compatible installation condition is met; wherein, during the installation of the first application, the installation of the common components of the first application and the seventh application is skipped. 根据权利要求14-17中任一项所述的装置,其中,所述安装单元,还用于在检测到针对所述第一应用的安装包程序的运行指令的情况下,对所述第一应用的安装包程序进行初始化,将所述第一应用的安装包程序中包括的配置文件记录到内存;其中,所述配置文件包括平滑升级列表、应用互斥列表以及应用兼容列表;所述平滑升级列表用于记录与所述第一应用属于不同产品线、且功能为所述第一应用的部分功能的应用的标识信息;所述应用互斥列表用于记录与所述第一应用属于不同产品线、且功能与所述第一应用的功能存在冲突的应用的标识信息;所述应用兼容列表用于记录与所述第一应用属于不同产品线、且存在共用组件的应用的标识信息。According to the device described in any one of claims 14-17, wherein the installation unit is further used to initialize the installation package program of the first application and record the configuration file included in the installation package program of the first application to the memory when a running instruction for the installation package program of the first application is detected; wherein the configuration file includes a smooth upgrade list, an application mutual exclusion list and an application compatibility list; the smooth upgrade list is used to record the identification information of applications that belong to a different product line from the first application and whose functions are part of the functions of the first application; the application mutual exclusion list is used to record the identification information of applications that belong to a different product line from the first application and whose functions conflict with those of the first application; the application compatibility list is used to record the identification information of applications that belong to a different product line from the first application and have common components. 一种电子设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的机器可执行指令,所述处理器用于执行机器可执行指令,以实现如权利要求1-9任一项所述的方法。An electronic device comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method according to any one of claims 1 to 9. 一种机器可读存储介质,所述机器可读存储介质内存储有机器可执行指令,所述机器可执行指令被处理器执行时实现如权利要求1-9任一项所述的方法。 A machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions, wherein the machine-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.
PCT/CN2024/082741 2023-03-28 2024-03-20 Application installation method and apparatus, electronic device, and machine readable storage medium Pending WO2024199039A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310345079.0 2023-03-28
CN202310345079.0A CN116301948A (en) 2023-03-28 2023-03-28 Application installation method, device, electronic device, and machine-readable storage medium

Publications (2)

Publication Number Publication Date
WO2024199039A1 true WO2024199039A1 (en) 2024-10-03
WO2024199039A9 WO2024199039A9 (en) 2025-01-30

Family

ID=86827075

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/082741 Pending WO2024199039A1 (en) 2023-03-28 2024-03-20 Application installation method and apparatus, electronic device, and machine readable storage medium

Country Status (2)

Country Link
CN (1) CN116301948A (en)
WO (1) WO2024199039A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118885185B (en) * 2024-07-12 2025-12-05 荣耀终端股份有限公司 Methods for installing common components, electronic devices, and storage media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100293541A1 (en) * 2009-05-13 2010-11-18 Oracle International Corporation Simplifying installation of software modules on heterogeneous remote systems
CN106095518A (en) * 2016-06-28 2016-11-09 东软集团股份有限公司 Application program installation method and device
CN106775845A (en) * 2016-11-30 2017-05-31 用友优普信息技术有限公司 A kind of method of software installation upgrading
CN109783092A (en) * 2019-01-04 2019-05-21 珠海天燕科技有限公司 A kind of application program installation method and device
CN114625384A (en) * 2022-03-10 2022-06-14 杭州海康威视数字技术股份有限公司 Installation package generation method, installation device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100293541A1 (en) * 2009-05-13 2010-11-18 Oracle International Corporation Simplifying installation of software modules on heterogeneous remote systems
CN106095518A (en) * 2016-06-28 2016-11-09 东软集团股份有限公司 Application program installation method and device
CN106775845A (en) * 2016-11-30 2017-05-31 用友优普信息技术有限公司 A kind of method of software installation upgrading
CN109783092A (en) * 2019-01-04 2019-05-21 珠海天燕科技有限公司 A kind of application program installation method and device
CN114625384A (en) * 2022-03-10 2022-06-14 杭州海康威视数字技术股份有限公司 Installation package generation method, installation device, equipment and storage medium

Also Published As

Publication number Publication date
WO2024199039A9 (en) 2025-01-30
CN116301948A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US20230244465A1 (en) Systems and methods for automated retrofitting of customized code objects
JP5007046B2 (en) Maintaining component-based software products
US20240045850A1 (en) Systems and methods for database orientation transformation
CN100426235C (en) System and method for representing user process to software package in software package management system
US6804663B1 (en) Methods for optimizing the installation of a software product onto a target computer system
US20060020937A1 (en) System and method for extraction and creation of application meta-information within a software application repository
US8181166B2 (en) System and method for determining when an EJB compiler needs to be executed
US8312446B2 (en) Dependency management when upgrading application components
US20100125839A1 (en) Specifying, Determining and Overriding Software Dependencies
JP2005078649A (en) Branding framework
US20050120344A1 (en) Optimal component installation
US20060271924A1 (en) Method and apparatus for automating updates to dependencies
US8224750B1 (en) Method and system for upgrading licenses to installed software
CN111679855A (en) Application software package conversion method, management method and device
CN114780173B (en) Method for loading plug-in application, computing device and storage medium
CN102054041A (en) Method and system for upgrading metadata
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
WO2024199039A1 (en) Application installation method and apparatus, electronic device, and machine readable storage medium
CN102216901B (en) Component extension method and device
US7389515B1 (en) Application deflation system and method
CN115756554A (en) Version upgrading method and device
CN101714089A (en) Method for installing external member and method for making external member mapping file
CN119201152B (en) A dynamic executable file management method and system for Linux system
CN116881218B (en) A meta-model and model processing method, device and computing device cluster
CN118733075A (en) Driver update method, device, computer equipment and storage medium

Legal Events

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

Ref document number: 24777828

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE