Method, apparatus, and electronic device for software upgrade

By analyzing the upgrade package data and using dependencies to modify, add or delete and upgrade the software module, the problem of software upgrades in the existing technology needs to be restarted, and the unconscious upgrade is achieved, which improves user experience and market competitiveness.

CN114115935BActive Publication Date: 2025-07-25SUZHOU ZHITU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111244401.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-07-25
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

In the prior art, software upgrades require users to stop using the current software functions and restart, resulting in poor user experience and reducing the competitiveness of software products.

Method used

By analyzing the upgrade package data, the upgrade software information is obtained, and the upgrade software module is modified, added or deleted based on the dependency and upgrade address. The upgrade can be completed without closing the software process.

Benefits of technology

It realizes the unconscious upgrade during the software module upgrade process, improves the user experience and improves the market competitiveness of software products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115935B_ABST
    Figure CN114115935B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method, device, and electronic device for software upgrade. During the operation of the terminal device, the upgrade package data is parsed to obtain upgrade software information; if it is detected that the upgrade category is a modification category or a new category, the module upgrade file is installed into the installation path to obtain the upgrade address of the module upgrade file; the software module to be upgraded is upgraded based on the dependency relationship and the upgrade address; if it is detected that the upgrade category is a deletion category, the software module to be upgraded is deleted and upgraded based on the dependency relationship. The present application can realize the upgrade of the software module according to the dependency relationship and the upgrade address obtained after the installation of the module upgrade file. During the entire process of software module upgrade, the software process does not need to be restarted, and the software can be upgraded without the user's awareness, improving the user experience and the market competitiveness of the software product at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software management, and in particular, to a method, device and electronic device for software upgrade. Background Art

[0002] With the rapid development of computer technology and network technology, the Internet technology plays an increasingly important role in people's daily life, study and work. Various software on the Internet emerge in an endless stream, which indirectly promotes the demand for software management. Among them, management software is a tool that integrates software download and software management, and its functions are mainly divided into four parts: detecting, downloading, installing and uninstalling software.

[0003] In the prior art, when software needs to be upgraded, the user must first stop using the current software function and restart it before being able to use the latest software function. Since frequent upgrades require often stopping the use of the software and restarting, this will cause dissatisfaction among software users and reduce the competitiveness of software products. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, device and electronic device for software upgrade, which can complete the software upgrade during the operation of the software without the operation of closing the software process and restarting, enabling users to experience seamless upgrade and effectively improving the market competitiveness of software products.

[0005] In a first aspect, an embodiment of the present invention provides a method for software upgrade. The method is applied to a terminal device including multiple software modules. The method includes: during the operation of the terminal device, parsing the downloaded upgrade package data to obtain upgrade software information; where the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category; if it is detected that the upgrade category is a modification category or a new category, installing the module upgrade file into the installation path to obtain the upgrade address of the module upgrade file; upgrading the software module to be upgraded based on the dependency relationship and the upgrade address; if it is detected that the upgrade category is a deletion category, performing a deletion upgrade on the software module to be upgraded based on the dependency relationship.

[0006] After obtaining the upgrade address of the module upgrade file, the method further includes: loading the module upgrade file; if it is monitored that the loading is completed, performing the step of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address.

[0007] The above upgrade software information further includes module identification information corresponding to the software module to be upgraded; the steps of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address include: determining the software module to be upgraded from multiple software modules based on the module identification information; suspending the software module to be upgraded according to the dependency relationship; searching in the pre-stored address library for the target software module entry address that matches the specific module identification information corresponding to the software module to be upgraded; wherein, the pre-stored address library stores the correspondence between the specific module identification information corresponding to each software module and the software module entry address; replacing the target software module entry address in the pre-stored address library with the upgrade address; uninstalling the suspended software module to be upgraded, and deleting the library file of the suspended software to be upgraded.

[0008] The above terminal device further includes specific module identification information corresponding to each software module; the steps of determining the software module to be upgraded from multiple software modules based on the module identification information include: searching in multiple specific module identification information for the target specific module identification information that matches the module identification information; determining the software module corresponding to the target specific module identification information as the software module to be upgraded.

[0009] The above steps of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address include: adding the upgrade address to the preset address library according to the dependency relationship.

[0010] The above method further includes: obtaining the mounting information of the module upgrade file with the upgrade category of the new category from the upgrade software information; if the mounting information is the first thread mounting information, mounting the upgraded software module to be upgraded through the running thread of the terminal device; if the mounting information is the second thread mounting information, starting a new thread to mount the upgraded software module to be upgraded.

[0011] The above steps of deleting and upgrading the software module to be upgraded based on the dependency relationship include: monitoring whether the dependency relationship of the software module to be upgraded exists; if not, uninstalling the suspended software module to be upgraded, and deleting the library file of the suspended software to be upgraded.

[0012] In a second aspect, an embodiment of the present invention further provides a software upgrade device, which is applied to a terminal device including multiple software modules. The device includes: an acquisition module, configured to parse the downloaded upgrade package data during the operation of the terminal device to obtain upgrade software information, where the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category; an installation module, configured to install the module upgrade file to the installation path to obtain the upgrade address of the module upgrade file if the detected upgrade category is a modification category or a new category; a first upgrade module, configured to upgrade the software module to be upgraded based on the dependency relationship and the upgrade address; a second upgrade module, configured to perform a deletion upgrade on the software module to be upgraded based on the dependency relationship if the detected upgrade category is a deletion category.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above method.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by the processor, the computer-executable instructions cause the processor to implement the above method.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The embodiments of the present application provide a software upgrade method, device and electronic device. During the operation of the terminal device, the downloaded upgrade package data is parsed to obtain upgrade software information. The upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category. If the detected upgrade category is a modification category or a new category, the module upgrade file is installed to the installation path to obtain the upgrade address of the module upgrade file. The software module to be upgraded is upgraded based on the dependency relationship and the upgrade address. If the detected upgrade category is a deletion category, a deletion upgrade is performed on the software module to be upgraded based on the dependency relationship. The present application can upgrade the software module according to the dependency relationship and the upgrade address obtained after the module upgrade file is installed. During the entire process of software module upgrade, the software can be upgraded without the user's perception without the need to close the software process and restart the operation, improving the user experience and the market competitiveness of software products at the same time.

[0017] Other features and advantages of the present invention will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present invention. The objectives and other advantages of the present invention are realized and attained by the structure particularly pointed out in the specification and the drawings.

[0018] To make the above objectives, features and advantages of the present invention more comprehensible, the following specific preferred embodiments are given and described in detail in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings based on these drawings without creative efforts.

[0020] Figure 1 The flowchart of a software upgrade method provided by an embodiment of the present invention;

[0021] Figure 2 The flowchart of another software upgrade method provided by an embodiment of the present invention;

[0022] Figure 3 The flowchart of another software upgrade method provided by an embodiment of the present invention;

[0023] Figure 4 The structural schematic diagram of a software upgrade device provided by an embodiment of the present invention;

[0024] Figure 5 The structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0026] Considering that when upgrading existing software, users must first stop using the current software functions and restart the software before they can use the latest software functions. Since frequent upgrades require frequent stoppage and restart of the software, this will arouse the disgust of software users and reduce the competitiveness of software products. Based on this, an embodiment of the present invention provides a software upgrade method, device, and electronic device that can upgrade software modules according to the dependency relationship and the upgrade address obtained after installing the module upgrade file, and can complete the seamless upgrade of the software without the operation of closing the software process and restarting during the entire process of software module upgrade, improving the user experience and the market competitiveness of software products at the same time.

[0027] This embodiment provides a software upgrade method. Among them, this method is applied to a terminal device including multiple software modules. The above software modules are developed based on the architecture of functional modules. Each software module is responsible for a dedicated and relatively independent business. The software modules are decoupled from each other, and each software module is compiled into an independent dynamic library. Among them, the finer the granularity of software module division, the smaller the granularity that the upgrade can support. In this embodiment, the upgrade of a certain function function can be realized.

[0028] See Figure 1 The flowchart of a software upgrade method shown in the figure. The method specifically includes the following steps:

[0029] Step S102, during the operation of the terminal device, parse the downloaded upgrade package data to obtain upgrade software information;

[0030] Among them, the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category. The above module upgrade file includes all the upgrade data required for software module upgrade. It can be understood that the software module to be upgraded is upgraded according to the module upgrade file. The dependency relationship is used to indicate the dependency relationship between software modules. The main ways for software modules to have dependencies are data reference and function call. The upgrade category is used to indicate whether the upgrade category is to modify a software module, add a software module, or delete a software module.

[0031] When the terminal device detects a change in the software version during operation, the terminal device first downloads the upgrade package data, and then can perform integrity verification on the downloaded upgrade package data through the md5 hash algorithm. If the verification is qualified, the downloaded upgrade package data is parsed to obtain the upgrade software information included in the upgrade package data. The process of verifying integrity is the same as the existing verification process and will not be elaborated here.

[0032] Step S104, if it is detected that the upgrade category is the modification category or the new addition category, install the module upgrade file to the installation path to obtain the upgrade address of the module upgrade file.

[0033] The above-mentioned modification category is used to indicate that the software module is modified and upgraded, and the new addition category is used to indicate that a new software module is added to the terminal device.

[0034] In specific implementation, according to the installation path in the upgrade software information, the module upgrade file is installed in the terminal device. After the installation of the module upgrade file is completed, the terminal device can obtain the upgrade address after the installation of the module upgrade file.

[0035] Step S106, upgrade the software module to be upgraded based on the dependency relationship and the upgrade address.

[0036] Step S108, if it is detected that the upgrade category is the deletion category, perform a deletion upgrade on the software module to be upgraded based on the dependency relationship.

[0037] The above-mentioned deletion category is used to indicate that the software module in the terminal device is deleted. In this embodiment, different upgrade methods can be determined according to different upgrade categories to upgrade the software module to be upgraded. Specifically, for the upgrade categories of new addition category or modification category, the software module can be upgraded according to the dependency relationship and the upgrade address, while for the upgrade category of deletion category, the deletion upgrade can be implemented according to the dependency relationship. During the entire process of software module upgrade, the software can be upgraded without the operation of closing the software process and restarting, which improves the user experience and the market competitiveness of the software product at the same time.

[0038] The embodiment of the present application provides a method for software upgrade. During the operation of the terminal device, the downloaded upgrade package data is parsed to obtain the upgrade software information. The upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category. If it is detected that the upgrade category is the modification category or the new addition category, install the module upgrade file to the installation path to obtain the upgrade address of the module upgrade file. Upgrade the software module to be upgraded based on the dependency relationship and the upgrade address. If it is detected that the upgrade category is the deletion category, perform a deletion upgrade on the software module to be upgraded based on the dependency relationship. The present application can upgrade the software module according to the dependency relationship and the upgrade address obtained after the installation of the module upgrade file. During the entire process of software module upgrade, the software can be upgraded without the operation of closing the software process and restarting, which improves the user experience and the market competitiveness of the software product at the same time.

[0039] This embodiment provides another method for software upgrade, which is implemented on the basis of the above embodiment; when the upgrade category is the modification category, this embodiment focuses on describing the specific implementation manner of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address. As Figure 2 shown in the flowchart of another software upgrade method, the software upgrade method in this embodiment includes the following steps:

[0040] Step S202, during the operation of the terminal device, parse the downloaded upgrade package data to obtain the upgrade software information;

[0041] Among them, the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category.

[0042] Step S204, if it is detected that the upgrade category is the modification category, install the module upgrade file into the installation path to obtain the upgrade address of the module upgrade file;

[0043] Step S206, load the module upgrade file;

[0044] After the installation is completed, the module upgrade file can be loaded immediately. After loading, the function of the module upgrade file will not be used immediately. It is just a loaded state. At this time, the software module to be updated and upgraded is still running normally.

[0045] Step S208, if it is monitored that the loading is completed, determine the software module to be upgraded from multiple software modules based on the module identification information;

[0046] The above module identification information is the information pre-stored in the upgrade software information for uniquely identifying the software module to be upgraded; it can be represented by numbers, characters or letters, which is not limited here.

[0047] Generally, the terminal device also includes specific module identification information corresponding to each software module. This specific module identification information can be understood as the same information as the above module identification information. In this embodiment, step S208 can be implemented through steps A1 to A2;

[0048] Step A1, search for the target specific module identification information that matches the module identification information from multiple specific module identification information;

[0049] For example, a terminal device includes three software modules, namely software module A, software module B, and software module C. Among them, the specific module identification information corresponding to software module A is 1, the specific module identification information corresponding to software module B is 2, and the specific module identification information corresponding to software module C is 3. If the module identification information carried in the upgraded software information is 2, which matches the above specific module identification information 2, it can be determined that the software module to be upgraded in this upgrade is software module B.

[0050] Step A2, determine the software module corresponding to the target specific module identification information as the software module to be upgraded.

[0051] Step S210, suspend the software module to be upgraded according to the dependency relationship;

[0052] Generally, this upgrade may be performed on multiple software modules. Multiple software modules to be upgraded can be suspended successively or simultaneously according to the dependency relationship, that is, the data of the software module to be upgraded that is currently in the running state is saved in the library file. For example, the software modules to be upgraded in this upgrade are software module A and software module B. If the dependency relationship between software module A and software module B is that software module B depends on software module A, therefore, software module A needs to be suspended and upgraded first, and then software module B is suspended. If there is no dependency relationship between software module A and software module B, then software module A and software module B can be suspended simultaneously.

[0053] Step S212, search in the pre-stored address library for the target software module entry address that matches the specific module identification information corresponding to the software module to be upgraded;

[0054] Among them, the pre-stored address library stores the corresponding relationship between the specific module identification information of each software module and the software module entry address; this pre-stored address library is also pre-stored on the terminal device.

[0055] Continuing with the previous example, the pre-stored address library stores that the software module entry address corresponding to the specific module identification information 1 is 11, the software module entry address corresponding to the specific module identification information 2 is 21, and the software module entry address corresponding to the specific module identification information 3 is 31. If it is determined that the software module to be upgraded is software module B, then 21 is determined as the target software module entry address according to the specific module identification information 2 corresponding to software module B.

[0056] Step S214, replace the target software module entry address in the pre-stored address library with the upgrade address;

[0057] In this embodiment, the target software module entry address of the software module to be upgraded in the pre-stored address library is replaced with the upgrade address of the module upgrade file. The replacement process is actually a process of reassigning the address pointer. Since the process is completed at the nanosecond level, it does not affect the normal operation of the software, and the software module can be upgraded completely without perception.

[0058] Step S216, uninstalling the pending software module to be upgraded, and deleting the library file of the pending software to be upgraded;

[0059] When the module upgrade file is added to the program running, the suspended software module to be upgraded can be uninstalled, and the library file of the suspended software to be upgraded can be deleted to complete the entire non-perception upgrade process.

[0060] Step S218: If it is detected that the upgrade category is a deletion category, the software module to be upgraded is deleted and upgraded based on the dependency relationship.

[0061] Generally, before deleting the software module to be upgraded, it is necessary to ensure that the deletion has no impact on the operation of other functions, that is, there is no dependency between the software module to be upgraded and other software modules. The above deletion and upgrade process can be implemented by steps B1 to B2:

[0062] Step B1, monitoring whether the dependency relationship of the software module to be upgraded exists;

[0063] Whether the dependency relationship exists can be determined by checking whether the dependency relationship in the upgraded software information indicates the dependency relationship between the software module to be upgraded and other software modules. If there is no dependency relationship, step B2 can be directly executed to uninstall and delete. If there is a dependency relationship, step B2 can be executed after the software module with the dependency relationship is upgraded and the dependency relationship with the software module to be upgraded is released.

[0064] Step B2, uninstall the pending software module to be upgraded, and delete the library file of the pending software to be upgraded.

[0065] The software module to be upgraded is deleted only when it has no dependency on other software modules, which does not affect the normal operation of the original software. Therefore, it is possible to achieve an imperceptible upgrade in the scenario of deleting the software module while the software is running.

[0066] This embodiment provides another method for software upgrade, which is implemented on the basis of the above embodiment; when the upgrade category is a newly added category, this embodiment focuses on describing a specific implementation method for upgrading the software module to be upgraded based on the dependency relationship and the upgrade address. Figure 3 The flowchart of another software upgrade method shown in FIG. 1 is a flowchart of another software upgrade method shown in FIG. 1 . The software upgrade method in this embodiment includes the following steps:

[0067] Step S302, during the operation of the terminal device, parse the downloaded upgrade package data to obtain upgrade software information;

[0068] Among them, the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category.

[0069] Step S304, if it is detected that the upgrade category is a new category, install the module upgrade file into the installation path to obtain the upgrade address of the module upgrade file;

[0070] Step S306, load the module upgrade file;

[0071] Step S308, if it is monitored that the loading is completed, add the upgrade address to the preset address library according to the dependency relationship;

[0072] When specifically implemented, add the upgrade address to the preset address library according to the dependency relationship order between the newly added software module and other software modules. In this embodiment, the upgrade addresses of the module upgrade files without dependency relationships can be added to the preset address library first. The purpose of adding the upgrade address to the preset address library is to dock the module upgrade file into the original program for operation.

[0073] Step S310, obtain the mounting information of the module upgrade file with the upgrade category of new category from the upgrade software information;

[0074] When starting the module upgrade file for operation, different threads can be selected for mounting and running according to the light weight of the module upgrade file. Usually, the mounting information of the module upgrade file is stored in the upgrade software information, and this mounting information can indicate whether the module upgrade file needs to be mounted by a new thread or can be mounted by the original running thread of the terminal device.

[0075] Step S312, if the mounting information is the first thread mounting information, mount and process the upgraded software module to be upgraded through the running thread of the terminal device;

[0076] If the mounting information is the first thread mounting information, it means that the module upgrade file uses fewer services, and the existing running thread of the terminal device can be used to complete the mounting of the upgraded software module to be upgraded. The upgraded software module to be upgraded is the newly added module after the module upgrade file is installed and loaded.

[0077] Step S314, if the mounting information is the second thread mounting information, start a new thread to mount and process the upgraded software module to be upgraded;

[0078] If the mounting information is the mounting information of the second thread, it indicates that the service used by the module upgrade file is relatively large, and a new thread needs to be started to complete the mounting of the software module to be upgraded after the upgrade.

[0079] Step S316, if it is detected that the upgrade category is the deletion category, perform a deletion upgrade on the software module to be upgraded based on the dependency relationship.

[0080] For the software upgrade method provided in this embodiment, since the newly added software module does not affect the normal operation of the original software, it is possible to achieve a seamless upgrade in the scenario of adding a new module during software operation.

[0081] An embodiment of the present invention further provides a software upgrade device, where the device is applied to a terminal device including multiple software modules; Figure 4 The structure diagram of a software upgrade device is shown. The device includes:

[0082] An acquisition module 402, configured to parse the downloaded upgrade package data during the operation of the terminal device to obtain upgrade software information; where the upgrade software information includes the module upgrade file of the software module to be upgraded, the installation path corresponding to the module upgrade file, the dependency relationship of the software module to be upgraded, and the upgrade category;

[0083] An installation module 404, configured to install the module upgrade file to the installation path to obtain the upgrade address of the module upgrade file if it is detected that the upgrade category is the modification category or the addition category;

[0084] A first upgrade module 406, configured to upgrade the software module to be upgraded based on the dependency relationship and the upgrade address;

[0085] A second upgrade module 408, configured to perform a deletion upgrade on the software module to be upgraded based on the dependency relationship if it is detected that the upgrade category is the deletion category.

[0086] An embodiment of the present application provides a software upgrade device. During the operation of a terminal device, the device parses the downloaded upgrade package data to obtain upgrade software information. The upgrade software information includes a module upgrade file of a software module to be upgraded, an installation path corresponding to the module upgrade file, a dependency relationship of the software module to be upgraded, and an upgrade category. If it is detected that the upgrade category is a modification category or a new category, the module upgrade file is installed into the installation path to obtain an upgrade address of the module upgrade file. The software module to be upgraded is upgraded based on the dependency relationship and the upgrade address. If it is detected that the upgrade category is a deletion category, a deletion upgrade is performed on the software module to be upgraded based on the dependency relationship. The present application can implement the upgrade of a software module according to the dependency relationship and the upgrade address obtained after the installation of the module upgrade file. During the entire process of software module upgrade, the software can be upgraded without the user's awareness without the need to close the software process and restart the operation, improving the user experience and the market competitiveness of software products at the same time.

[0087] The software upgrade device provided by the embodiment of the present invention has the same technical features as the software upgrade method provided by the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0088] An embodiment of the present application also provides an electronic device, as Figure 5 shown, which is a schematic structural diagram of the electronic device. The electronic device includes a processor 121 and a memory 120. The memory 120 stores computer-executable instructions that can be executed by the processor 121. The processor 121 executes the computer-executable instructions to implement the above software upgrade method.

[0089] In Figure 5 the shown embodiment, the electronic device further includes a bus 122 and a communication interface 123. Among them, the processor 121, the communication interface 123, and the memory 120 are connected through the bus 122.

[0090] Among them, the memory 120 may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk memory. The communication connection between this system network element and at least one other network element is realized through at least one communication interface 123 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 122 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus 122 can be divided into an address bus, a data bus, a control bus, etc. For the sake of easy representation, Figure 5 only a two-way arrow is used in Figure 5 to represent it, but it does not mean that there is only one bus or one type of bus.

[0091] The processor 121 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method can be completed by the integrated logic circuit in the hardware of the processor 121 or instructions in the form of software. The above-mentioned processor 121 can be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it can also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly implemented by the hardware decoding processor, or completed by the combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor 121 reads the information in the memory and combines its hardware to complete the steps of the software upgrade method of the foregoing embodiments.

[0092] The embodiments of the present application further provide a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above software upgrade method. For the specific implementation, reference can be made to the foregoing method embodiments and will not be elaborated herein.

[0093] The computer program product of the software upgrade method, device and electronic device provided by the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For the specific implementation, reference can be made to the method embodiments and will not be elaborated herein.

[0094] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0095] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program code.

[0096] In the description of the present application, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present application. In addition, the terms "first", "second", "third" are only used for descriptive purposes and should not be construed as indicating or implying relative importance.

[0097] Finally, it should be noted that the above-described embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting it. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the technical field of the present application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for software upgrade, characterized in that, The method is applied to a terminal device including multiple software modules; the method includes: During the operation of the terminal device, parsing the downloaded upgrade package data to obtain upgrade software information; wherein, the upgrade software information includes a module upgrade file of the software module to be upgraded, an installation path corresponding to the module upgrade file, a dependency relationship of the software module to be upgraded, and an upgrade category; If it is detected that the upgrade category is a modification category or a new addition category, installing the module upgrade file into the installation path to obtain an upgrade address of the module upgrade file; Upgrading the software module to be upgraded based on the dependency relationship and the upgrade address; If it is detected that the upgrade category is a deletion category, performing a deletion upgrade on the software module to be upgraded based on the dependency relationship; The upgrade software information further includes module identification information corresponding to the software module to be upgraded; The step of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address includes: Determining the software module to be upgraded from multiple software modules based on the module identification information; Suspending the software module to be upgraded according to the dependency relationship; Searching in a pre-stored address library for a target software module entry address that matches the specific module identification information corresponding to the software module to be upgraded; wherein, the pre-stored address library stores the corresponding relationship between the specific module identification information and the software module entry address of each software module; Replacing the target software module entry address in the pre-stored address library with the upgrade address; Uninstalling the suspended software module to be upgraded and deleting the library file of the suspended software module to be upgraded.

2. The method according to claim 1, wherein After obtaining the upgrade address of the module upgrade file, the method further includes: Loading the module upgrade file; If it is monitored that the loading is completed, performing the step of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address.

3. The method according to claim 1, wherein The terminal device further includes specific module identification information corresponding to each software module; The step of determining the software module to be upgraded from multiple software modules based on the module identification information includes: Searching in multiple specific module identification information for target specific module identification information that matches the module identification information; Determining the software module corresponding to the target specific module identification information as the software module to be upgraded.

4. The method according to claim 1, wherein The step of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address includes: Adding the upgrade address to a preset address library according to the dependency relationship.

5. The method according to claim 4, wherein The method further includes: Obtaining the mounting information of the module upgrade file with an upgrade category of new addition category from the upgrade software information; If the mounting information is first thread mounting information, mounting the upgraded software module to be upgraded through the running thread of the terminal device; If the mounting information is second thread mounting information, starting a new thread to mount the upgraded software module to be upgraded.

6. The method according to claim 1, characterized in that, The step of performing a deletion upgrade on the software module to be upgraded based on the dependency relationship includes: Monitoring whether the dependency relationship of the software module to be upgraded exists; If not, suspend the software to be upgraded; Uninstall the suspended software module to be upgraded and delete the library file for suspending the software to be upgraded.

7. A device for software upgrade, characterized in that, The device is applied to a terminal device including multiple software modules; the device includes: An acquisition module, configured to parse the downloaded upgrade package data during the operation of the terminal device to obtain upgrade software information; wherein, the upgrade software information includes a module upgrade file of the software module to be upgraded, an installation path corresponding to the module upgrade file, a dependency relationship of the software module to be upgraded, and an upgrade category; An installation module, configured to install the module upgrade file to the installation path if it is detected that the upgrade category is a modification category or a new category, to obtain an upgrade address of the module upgrade file; A first upgrade module, configured to upgrade the software module to be upgraded based on the dependency relationship and the upgrade address; A second upgrade module, configured to perform a deletion upgrade on the software module to be upgraded based on the dependency relationship if it is detected that the upgrade category is a deletion category; The upgrade software information further includes module identification information corresponding to the software module to be upgraded; the step of upgrading the software module to be upgraded based on the dependency relationship and the upgrade address includes: determining the software module to be upgraded from multiple software modules based on the module identification information; suspending the software module to be upgraded according to the dependency relationship; searching in a pre-stored address library for a target software module entry address that matches the specific module identification information corresponding to the software module to be upgraded; wherein, the pre-stored address library stores a correspondence between the specific module identification information corresponding to each software module and the software module entry address; replacing the target software module entry address in the pre-stored address library with the upgrade address; uninstalling the suspended software module to be upgraded and deleting the library file for suspending the software to be upgraded.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Software package management method and device of operating system, equipment and storage medium

    CN112748949A

  • Server system and online software update method

    CN1838602A