CN113535194B - Method and device for updating installation package, computer equipment and storage medium - Google Patents
Method and device for updating installation package, computer equipment and storage medium Download PDFInfo
- Publication number
- CN113535194B CN113535194B CN202110842877.5A CN202110842877A CN113535194B CN 113535194 B CN113535194 B CN 113535194B CN 202110842877 A CN202110842877 A CN 202110842877A CN 113535194 B CN113535194 B CN 113535194B
- Authority
- CN
- China
- Prior art keywords
- plug
- host
- program
- information
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000009434 installation Methods 0.000 title claims abstract description 111
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000012360 testing method Methods 0.000 claims abstract description 66
- 238000012545 processing Methods 0.000 claims abstract description 35
- 238000004806 packaging method and process Methods 0.000 claims abstract description 20
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012790 confirmation Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000000712 assembly Effects 0.000 description 2
- 238000000429 assembly Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 206010002449 angioimmunoblastic T-cell lymphoma Diseases 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
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 embodiment of the invention discloses an updating method and device of an installation package, computer equipment and a storage medium. The method comprises the following steps: obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application; respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information; carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program; and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package. According to the method and the device for processing the target plugin in the modularized mode, when the target plugin opens the host program page, an external communication interface of the host application is not needed, and therefore the compatibility problem of the plugin and the host application can be solved.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and apparatus for updating an installation package, a computer device, and a storage medium.
Background
With the continuous iteration of the Android system version, various applications are continuously updated, in order to improve the diversity of application functions, the existing applications generally use mixed development of plugin and assembly, that is, the developed applications are provided with assemblies and plugins can also be called, wherein when the applications have the capability of calling a plugin, the applications are called host applications of the plugin, and generally, pages between the plugins and the assemblies can be mutually called, for example, after calling a page of a plugin through a WeChat application, pages of the WeChat application can also be returned from the plugin pages (that is, calling host application pages).
When the plug-in calls the page of the host application, the plug-in needs to be accessed through an external communication interface, and the component can directly call the page of the host application without passing through the external communication interface.
Because the plug-in is an independent individual, the plug-in still stays in an old version when the host application is updated, and at the moment, certain compatibility problems possibly exist between the plug-in and the host, so that the plug-in cannot access the page of the host application through an external communication interface of the host, and in order to enable the plug-in to smoothly access the page of the host application after the updating, the compatibility problems between the plug-in and the host application still remain to be solved.
Disclosure of Invention
The embodiment of the invention provides an updating method, device, computer equipment and storage medium of an installation package, which can solve the problem of compatibility of a plug-in and host application.
In a first aspect, an embodiment of the present invention provides a method for updating an installation package, including:
obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
Respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information;
Carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program;
and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package.
In a second aspect, an embodiment of the present invention further provides an update apparatus for an installation package, including:
the first acquisition unit is used for acquiring host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
A second obtaining unit, configured to obtain a host program of the host and plug-in programs of the plug-ins according to the host information and the plug-in information, respectively;
the test unit is used for carrying out compatibility test on the host program and the plug-in programs and confirming target plug-ins incompatible with the host program in each plug-in program;
And the processing unit is used for packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain an updated host application installation package.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the above-described method.
The embodiment of the invention provides an updating method and device of an installation package, computer equipment and a storage medium. Wherein the method comprises the following steps: obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application; respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information; carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program; and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package. When the host application installation package is updated, the plug-in program corresponding to the target plug-in is added into the host program, so that the target plug-in forms a component in the host application, and when the target plug-in is used subsequently, the target plug-in can open and open the page of the host program in a component mode without an external communication interface of the host application, and therefore the compatibility problem of the plug-in and the host application can be solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario schematic diagram of an update method of an installation package according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for updating an installation package according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a sub-process of the method for updating an installation package according to an embodiment of the present invention;
FIG. 4 is another schematic flow chart of a method for updating an installation package according to an embodiment of the present invention;
FIG. 5 is another schematic flow chart of an update method of an installation package according to an embodiment of the present invention;
FIG. 6 is another schematic flow chart of an update method of an installation package according to an embodiment of the present invention;
FIG. 7 is another schematic flow chart of an update method of an installation package according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of an update apparatus for an installation package provided by an embodiment of the present invention;
fig. 9 is a schematic block diagram of an update apparatus of an installation package according to another embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the invention provides an updating method and device of an installation package, computer equipment and a storage medium.
The execution main body of the installation package updating method may be an installation package updating device provided by the embodiment of the present invention, or a computer device integrated with the installation package updating device, where the installation package updating device may be implemented in a hardware or software manner, and the computer device may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a palm computer, a notebook computer, or the like.
Referring to fig. 1, fig. 1 is an application scenario schematic diagram of an update method of an installation package according to an embodiment of the present invention. In some embodiments, when a user needs a certain host application of the terminal 20, the terminal 20 sends an update instruction of the host application to the computer device 10, and the computer device 10 obtains host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application according to the update instruction; then, respectively acquiring host programs of the hosts and plug-in programs of the plug-ins according to the host information and the plug-in information; compatibility test is carried out on the host program and the plug-in programs, and target plug-ins incompatible with the host program in each plug-in program are confirmed; and finally, packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package, and then, sending the updated host application installation package to the terminal 20 by the computer 10 through a server or directly, and updating the corresponding host application on the terminal 20.
The embodiment of the invention provides a method for updating an installation package, and an execution main body of the method for updating the installation package can be an updating device of the installation package provided by the embodiment of the invention or computer equipment integrated with the updating device of the installation package, wherein the updating device of the installation package can be realized in a hardware or software mode, the computer equipment can be a terminal or a server, and the terminal can be a smart phone, a tablet personal computer, a palm personal computer, a notebook personal computer or the like.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for updating an installation package according to an embodiment of the present invention, which includes the following steps S110-150.
S110, obtaining host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application.
Each host application may correspond to a plurality of plugins, where the host information in this embodiment includes a host application name and a host download address of the host application, and the plugin information includes a plugin name and a plugin download address.
In some embodiments, referring to fig. 3, specifically, step S110 includes:
s111, acquiring an update instruction of the host application.
The update instruction is used to instruct to update the installation package of one or more host applications, in some embodiments, the update instruction of the host application may be generated according to a preset update period in the computing device, for example, update detection is performed on the host application every 7 days, at this time, when the update period is reached, the update instruction of the host application is automatically generated, so that the computer device obtains the update instruction of the host application.
In other embodiments, the update instruction of the host application may be triggered by a background developer or sent by a target terminal, where the target terminal is a terminal that needs to update the host application, for example, when the end user wants to update a host application, the end user sends the update instruction to the computer device through the target terminal.
S112, obtaining host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table according to the updating instruction.
Specifically, in this embodiment, in response to an update instruction, host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application are obtained from a preset host plug-in information table, where the host plug-in information table is updated in real time, and there are host information of the host application maintained, and plug-in information supported by each maintained host application, or plug-in information of a host application corresponding to each terminal installed with the host application and plug-in used in the corresponding terminal by the corresponding host application, where for plug-in information, the former obtains plug-in information of all plug-ins supported by the host application, and the latter obtains plug-in used in the corresponding terminal, and corresponding to the scheme of the latter, the invention can update corresponding installation packages for different terminals respectively, so as to implement individual update of installation packages of different terminals.
It should be noted that, the update instruction includes an identifier of a host application that needs to be updated by the installation package, and then the computer device obtains, according to the identifier of the host application, host information of the corresponding host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table.
S120, respectively acquiring a host program of the host and plug-in programs of the plug-ins according to the host information and the plug-in information.
Wherein the host program may be an installation package of the host application.
In some embodiments, referring to fig. 4, specifically, step S120 includes:
S121, acquiring a host program according to the host download address in the host information.
In this embodiment, the computer device may obtain the corresponding host program from the server storing the host program by downloading according to the obtained host download address.
S122, obtaining the plug-in program according to the plug-in download address in the plug-in information.
In this embodiment, the computer device may obtain, by downloading, the corresponding plug-in program from the server storing the plug-in program according to the obtained plug-in download address.
S130, carrying out compatibility test on the host program and the plug-ins, and confirming the target plug-ins incompatible with the host program in each plug-in.
In this embodiment, compatibility tests are performed on the host program and the plug-in program, that is, it is checked whether the host application can call the page of the plug-in, and it is checked whether the plug-in can call the page of the host application, for example, the plug-in is opened from the WeChat, and after the plug-in is opened, the plug-in is returned to the WeChat page from the plug-in.
In some embodiments, referring to fig. 5, specifically, step S130 includes:
S131, performing page calling test on the plug-in program through the host program to obtain a first test result.
That is, at this time, the page of the plug-in is simulated in the computer device by the host application, and the simulated result is taken as a first detection result, wherein the first detection result includes a compatible result or an incompatible result, the compatible result reflects that the host application can call the page of the plug-in, and the incompatible result reflects that the host application cannot call the page of the plug-in.
S132, performing page calling test on the host program through the plug-in program to obtain a second test result.
That is, at this time, the page of the plug-in calling host application is simulated in the computer device, and the simulated result is used as a second detection result, and likewise, the second detection result includes a compatible result or an incompatible result, the compatible result reflects that the host application can call the page of the plug-in, and the incompatible result reflects that the host application cannot call the page of the plug-in.
S133, determining the target plug-in according to the first test result and the second test result.
Specifically, if the first test result and the second test result are both compatible results, it is indicated that the host application and the plug-in are compatible with each other at this time, and if the first test result and/or the second test result are incompatible results, it is indicated that there is an incompatibility between the host application and the plug-in at this time, and at this time, the incompatible plug-in is determined as the target plug-in.
In other embodiments, referring to fig. 6, specifically, step S130 includes:
And B131, acquiring a first calling result of the host program sent by the installation terminal for carrying out page calling on the plug-in program.
The installation terminal in this embodiment is a terminal installed with the host application, and there are generally a plurality of terminals installed with the host application, and when the calling of the plug-in by the host application in the terminal fails, the terminal sends a first calling result to the computer device, where the first calling result reflects that the calling of the plug-in by the host application fails.
And B132, acquiring a second calling result of the plug-in program sent by the installation terminal for carrying out page calling on the host program.
When the calling of the host application through the plug-in the installation terminal fails, the terminal sends a second calling result to the computer equipment, and the second calling result reflects the calling failure of the plug-in to call the host application.
And B133, determining the target plug-in according to the first calling result and the second calling result.
In this embodiment, a plug-in that is incompatible with the host application from among the first call result and the second call result is determined as the target plug-in.
In some embodiments, in order to avoid a situation that a part of terminals are not compatible, if the total number of times that the computer device receives the first call result and the second call result corresponding to the same plugin exceeds a preset result threshold (for example, more than 300 times), the plugin is determined to be the target plugin at this time.
S140, packaging plug-in programs corresponding to the target plug-ins into host programs so as to perform componentization processing on the target plug-ins, and obtaining updated host application installation packages.
In this embodiment, after determining the target plug-in, in order to solve the problem that the target plug-in is incompatible with the host application, at this time, when updating the host application installation package, the plug-in corresponding to the target plug-in is packaged into the host program, the target plug-in is modularized in the host application, specifically, the plug-in is configured in the host program according to the Android Library AAR library mode, dependencies are added in the host program, and the code of the plug-in is compiled and packaged into the host program, so as to obtain the updated host application installation package.
In some embodiments, referring to fig. 7, specifically, step S140 includes:
s141, acquiring historical use frequency of the target plug-in relative to the target terminal.
The target terminal is a terminal which needs to update the installation package of the host application, and obtains the historical use frequency of the target plug-in relative to the target terminal, namely, the historical use frequency of the target plug-in the target terminal is obtained, wherein the historical use frequency can be the average daily use frequency in the last month.
S142, when the historical use frequency is greater than a preset frequency threshold, packaging plug-in programs corresponding to the target plug-in into host programs so as to perform componentization processing on the target plug-in and obtain updated host application installation packages.
The preset frequency threshold may be 0.1, or may be other values, which are not limited herein.
In this embodiment, when the historical use frequency is greater than the preset frequency threshold, the plug-in program corresponding to the target plug-in is packaged into the host program at this time, that is, the frequency of using the plug-in by the user corresponding to the target terminal is higher, and then the plug-in can be solidified into a component in the host application, so that the use of the user is convenient.
In some embodiments, the plug-in program corresponding to the target plug-in is packaged into the host program, so as to perform componentization processing on the target plug-in, and after obtaining the updated host application installation package, the method further includes: sending the updated host application installation package to a server; and sending application update indication information to the target terminal, so that the target terminal downloads an updated host application installation package from the server to update the host application, and the incompatibility condition of the host application on the plug-in unit is solved.
In some application scenarios, when an end user needs to upgrade a host application, or when the end user uses a plug-in the host application, a sending plug-in and the host application are incompatible, at this time, the user sends an update instruction of the host application to a computer device through a target terminal, and the corresponding installation package can be updated quickly through the computer device without participation of a developer, so as to implement update automation of the installation package, and after the update of the installation package is completed, the installation package is sent to a server, and the target terminal is notified to download the updated installation package from the server, so as to implement update of the corresponding host application, or the updated installation package is directly sent to the target terminal, so that the target terminal updates the corresponding host application.
In other application scenarios, the computer device updates the host application according to a preset update period, and sends an updated host application installation package to the server, when the terminal needs to update the corresponding host application, the terminal sends an application update request to the server, and then the terminal sends the updated host application installation package to the terminal according to the application update request, so that the terminal updates the host application, and the updated host application can solve the problem of incompatibility between the plug-in and the host application.
It should be noted that, the plug-in module is integrated into the host program in a manner of compiling the Android installation package (AndroidPackage, APK), and the component module is integrated into the host program in an Android Library manner. In this embodiment, both the plugin and the page skip in the component use ARouter frames.
Since the plug-in runs in a different process from the host program, communication access is required to be performed through an Android interface definition language (Android Interface Definition Language, AIDL) interface when the plug-in opens the host program page. The plug-in unit can open the main program page without communicating through the AIDL interface, so when the plug-in unit is integrated into the host program as the component Library, the plug-in unit is subjected to modular processing, and when the plug-in unit is communicated with the host program, the host program page can be opened by directly using ARouter default jump mode without communicating through the AIDL interface and the AIDL interface of the host plug-in unit, thereby the incompatibility problem of the plug-in unit and the host program can be solved.
In this embodiment, when updating the host application installation package, 360Replugin, ARouter is used to construct componentization and plug-in hybrid development, for other plug-in applications, an AIDL interface configuration is added in the updated host application installation package, a Arouter method interface is defined, a global interface callback is registered in the host program through Replugin, the routing parameters of the interface are received and processed Arouter, and the parameters are set to ARouter to implement the route jump page.
For plug-ins compatible with host applications, the computer device in this solution adds an AIDL interface configuration in the plug-in program, defines Arouter method interface parameter transfer ARouter framework route jump parameter class Postcard, and when running in plug-in mode, invokes the AIDL interface method to transfer the Postcard object to the host program AIDL interface listening method.
By using the updating method of the installation package in the scheme, the target plug-in program can normally use ARouter default route jump mode to develop and open host program page code, and the AILD interface mode is not required to be used for developing and opening host program page code. The target plug-in is componentized, the code does not need to be changed, and the invasiveness of the development difference of the plug-in and the component mode on the code is reduced.
And moreover, after the plug-in process is converted into the component library process, the plug-in process can still operate and debug by an independent module, and the code quantity of the independent module is small, the compiling speed is high, and the development and the debugging are more convenient.
In this embodiment, host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application are obtained; respectively acquiring a host program of a host and plug-in programs of all plug-ins according to the host information and the plug-in information; compatibility test is carried out on the host program and the plug-in programs, and target plug-ins incompatible with the host program in each plug-in program are confirmed; and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in, so as to obtain an updated host application installation package. According to the method and the device for processing the target plugin in the modularized mode, when the target plugin opens the host program page, an external communication interface of the host application is not needed, and therefore the compatibility problem of the plugin and the host application can be solved.
Fig. 8 is a schematic block diagram of an update apparatus for an installation package according to an embodiment of the present invention. As shown in fig. 8, the present invention also provides an update apparatus for an installation package, corresponding to the above update method for an installation package. The update apparatus of the installation package includes a unit for performing the update method of the installation package, and the apparatus may be configured in a desktop computer, a tablet computer, a portable computer, etc. Specifically, referring to fig. 8, the update apparatus of the installation package includes a first acquisition unit 801, a second acquisition unit 802, a test unit 803, and a processing unit 804.
A first obtaining unit 801, configured to obtain host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
a second obtaining unit 802, configured to obtain a host program of the host and plug-ins of each plug-in unit according to the host information and the plug-in information;
A test unit 803, configured to perform compatibility test on the host program and the plug-ins, and confirm that a target plug-in that is incompatible with the host program in each plug-in;
and the processing unit 804 is configured to package a plug-in program corresponding to the target plug-in unit into the host program, so as to perform componentization processing on the target plug-in unit, and obtain an updated host application installation package.
In some embodiments, the second obtaining unit 802 is specifically configured to:
acquiring the host program according to the host download address in the host information;
and acquiring the plug-in program according to the plug-in downloading address in the plug-in information.
In some embodiments, the test unit 803 is specifically configured to:
performing page calling test on the plug-in program through the host program to obtain a first test result;
Performing page calling test on the host program through the plug-in program to obtain a second test result;
and determining the target plug-in according to the first test result and the second test result.
In some embodiments, the test unit 803 is further specifically configured to:
acquiring a first calling result of the host program for carrying out page calling on the plug-in program, wherein the first calling result is sent by the installation terminal;
acquiring a second calling result of the plug-in program for carrying out page calling on the host program, wherein the second calling result is sent by the installation terminal;
and determining the target plug-in according to the first calling result and the second calling result.
In some embodiments, the first obtaining unit 801 is specifically configured to:
acquiring an update instruction of a host application;
and acquiring host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table according to the updating instruction.
In some embodiments, the processing unit 804 is specifically configured to:
Acquiring historical use frequency of the target plug-in relative to a target terminal, wherein the target terminal is a terminal needing to update a host application;
And when the historical use frequency is greater than a preset frequency threshold, packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain the updated host application installation package.
Fig. 9 is a schematic block diagram of an update apparatus of an installation package according to another embodiment of the present invention. As shown in fig. 9, the update apparatus of the installation package of the present embodiment is an addition of the first transmitting unit 805 and the second transmitting unit 806 to the above-described embodiment.
A first sending unit 805, configured to send the updated host application installation package to a server;
A second sending unit 806, configured to send application update indication information to the target terminal, so that the target terminal downloads the updated host application installation package from the server according to the application update indication information, so as to update the host application.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the updating device and each unit of the installation package may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
The updating means of the installation package described above may be implemented in the form of a computer program which is executable on a computer device.
The computer device can be a terminal or a server, wherein the terminal can be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device and the like. The server may be an independent server or a server cluster formed by a plurality of servers.
The computer device includes a processor, a memory, and a network interface connected by a system bus, where the memory may include a non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions that, when executed, cause a processor to perform a method of updating an installation package.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform a method of updating an installation package.
The network interface is for network communication with other devices.
Wherein the processor is configured to run a computer program stored in the memory to implement the steps of:
obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
Respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information;
Carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program;
and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package.
In an embodiment, when implementing the step of obtaining the host program of the host and the plug-in program of each plug-in according to the host information and the plug-in information, the processor specifically implements the following steps:
acquiring the host program according to the host download address in the host information;
and acquiring the plug-in program according to the plug-in downloading address in the plug-in information.
In one embodiment, when implementing the compatibility test on the host program and the plug-in program and confirming a target plug-in step incompatible with the host program in each plug-in program, the processor specifically implements the following steps:
performing page calling test on the plug-in program through the host program to obtain a first test result;
Performing page calling test on the host program through the plug-in program to obtain a second test result;
and determining the target plug-in according to the first test result and the second test result.
In one embodiment, when implementing the compatibility test on the host program and the plug-in program and confirming a target plug-in step incompatible with the host program in each plug-in program, the processor specifically implements the following steps:
acquiring a first calling result of the host program for carrying out page calling on the plug-in program, wherein the first calling result is sent by the installation terminal;
acquiring a second calling result of the plug-in program for carrying out page calling on the host program, wherein the second calling result is sent by the installation terminal;
and determining the target plug-in according to the first calling result and the second calling result.
In an embodiment, when implementing the step of obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application, the processor specifically implements the following steps:
acquiring an update instruction of a host application;
and acquiring host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table according to the updating instruction.
In an embodiment, when the processor packages the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package, the processor specifically implements the following steps:
Acquiring historical use frequency of the target plug-in relative to a target terminal, wherein the target terminal is a terminal needing to update a host application;
And when the historical use frequency is greater than a preset frequency threshold, packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain the updated host application installation package.
In an embodiment, after the step of packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain the updated host application installation package, the processor further implements the following steps:
sending the updated host application installation package to a server;
and sending application update indication information to the target terminal, so that the target terminal downloads the updated host application installation package from the server according to the application update indication information to update the host application.
It should be appreciated that in embodiments of the present invention, the Processor may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by the processor, cause the processor to perform the steps of:
obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
Respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information;
Carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program;
and packaging the plug-in program corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package.
In an embodiment, when executing the program instruction to implement the step of obtaining the host program and each plug-in program of the host according to the host information and the plug-in information, the processor specifically implements the following steps:
acquiring the host program according to the host download address in the host information;
and acquiring the plug-in program according to the plug-in downloading address in the plug-in information.
In one embodiment, when executing the program instruction to implement the compatibility test on the host program and the plug-in program, the processor determines a target plug-in step incompatible with the host program in each plug-in program, specifically implements the following steps:
performing page calling test on the plug-in program through the host program to obtain a first test result;
Performing page calling test on the host program through the plug-in program to obtain a second test result;
and determining the target plug-in according to the first test result and the second test result.
In one embodiment, when executing the program instruction to implement the compatibility test on the host program and the plug-in program, the processor determines a target plug-in step incompatible with the host program in each plug-in program, specifically implements the following steps:
acquiring a first calling result of the host program for carrying out page calling on the plug-in program, wherein the first calling result is sent by the installation terminal;
acquiring a second calling result of the plug-in program for carrying out page calling on the host program, wherein the second calling result is sent by the installation terminal;
and determining the target plug-in according to the first calling result and the second calling result.
In an embodiment, when the processor executes the program instruction to implement the step of obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application, the method specifically includes the following steps:
acquiring an update instruction of a host application;
and acquiring host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table according to the updating instruction.
In an embodiment, when the processor executes the program instruction to package the plug-in program corresponding to the target plug-in unit into the host program, so as to perform componentization processing on the target plug-in unit, and obtain an updated host application installation package step, the specific implementation steps include:
Acquiring historical use frequency of the target plug-in relative to a target terminal, wherein the target terminal is a terminal needing to update a host application;
And when the historical use frequency is greater than a preset frequency threshold, packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain the updated host application installation package.
In an embodiment, after executing the program instruction to implement the step of packaging the plug-in program corresponding to the target plug-in unit into the host program to perform componentization processing on the target plug-in unit to obtain the updated host application installation package, the processor further implements the following steps:
sending the updated host application installation package to a server;
and sending application update indication information to the target terminal, so that the target terminal downloads the updated host application installation package from the server according to the application update indication information to update the host application.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (9)
1. A method of updating an installation package, comprising:
obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
Respectively acquiring a host program of the host and plug-in programs of all plug-ins according to the host information and the plug-in information;
Carrying out compatibility test on the host program and the plug-in program, and confirming a target plug-in which is incompatible with the host program in each plug-in program;
Packaging plug-in programs corresponding to the target plug-ins into the host program to perform componentization processing on the target plug-ins to obtain updated host application installation packages;
the compatibility test is performed on the host program and the plug-in program, and the confirmation of the target plug-in which is incompatible with the host program in each plug-in program comprises the following steps:
performing page calling test on the plug-in program through the host program to obtain a first test result;
Performing page calling test on the host program through the plug-in program to obtain a second test result;
Determining the target plug-in according to the first test result and the second test result;
The host information comprises a host application name and a host download address of the host application, and the plug-in information comprises a plug-in name and a plug-in download address.
2. The method according to claim 1, wherein the obtaining the host program of the host and the plug-in program of each plug-in according to the host information and the plug-in information, respectively, includes:
acquiring the host program according to the host download address in the host information;
and acquiring the plug-in program according to the plug-in downloading address in the plug-in information.
3. The method of claim 1, wherein said performing compatibility testing on said host program and said plug-ins to identify a target plug-in each plug-in that is incompatible with said host program comprises:
acquiring a first calling result of the host program for carrying out page calling on the plug-in program, wherein the first calling result is sent by the installation terminal;
acquiring a second calling result of the plug-in program for carrying out page calling on the host program, wherein the second calling result is sent by the installation terminal;
and determining the target plug-in according to the first calling result and the second calling result.
4. The method according to claim 1, wherein the obtaining host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application includes:
acquiring an update instruction of a host application;
and acquiring host information of the host application and plug-in information of a plurality of plug-ins corresponding to the host application from a preset host plug-in information table according to the updating instruction.
5. The method according to any one of claims 1 to 4, wherein the packaging the plug-in corresponding to the target plug-in into the host program to perform componentization processing on the target plug-in to obtain an updated host application installation package includes:
Acquiring historical use frequency of the target plug-in relative to a target terminal, wherein the target terminal is a terminal needing to update a host application;
And when the historical use frequency is greater than a preset frequency threshold, packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain the updated host application installation package.
6. The method of claim 5, wherein the packaging the plug-in program corresponding to the target plug-in into the host program, so as to perform componentization processing on the target plug-in, and after obtaining the updated host application installation package, the method further comprises:
sending the updated host application installation package to a server;
and sending application update indication information to the target terminal, so that the target terminal downloads the updated host application installation package from the server according to the application update indication information to update the host application.
7. An update apparatus for an installation package, comprising:
the first acquisition unit is used for acquiring host information of a host application and plug-in information of a plurality of plug-ins corresponding to the host application;
A second obtaining unit, configured to obtain a host program of the host and plug-in programs of the plug-ins according to the host information and the plug-in information, respectively;
the test unit is used for carrying out compatibility test on the host program and the plug-in programs and confirming target plug-ins incompatible with the host program in each plug-in program;
The processing unit is used for packaging the plug-in program corresponding to the target plug-in into the host program so as to perform componentization processing on the target plug-in and obtain an updated host application installation package;
The test unit is specifically used for:
performing page calling test on the plug-in program through the host program to obtain a first test result;
Performing page calling test on the host program through the plug-in program to obtain a second test result;
Determining the target plug-in according to the first test result and the second test result;
The host information comprises a host application name and a host download address of the host application, and the plug-in information comprises a plug-in name and a plug-in download address.
8. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-6.
9. A computer readable storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, can implement the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110842877.5A CN113535194B (en) | 2021-07-23 | 2021-07-23 | Method and device for updating installation package, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110842877.5A CN113535194B (en) | 2021-07-23 | 2021-07-23 | Method and device for updating installation package, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113535194A CN113535194A (en) | 2021-10-22 |
CN113535194B true CN113535194B (en) | 2024-07-09 |
Family
ID=78120823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110842877.5A Active CN113535194B (en) | 2021-07-23 | 2021-07-23 | Method and device for updating installation package, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113535194B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113703815B (en) * | 2021-10-29 | 2022-02-11 | 腾讯科技(深圳)有限公司 | Offline resource updating method, device, terminal and storage medium |
CN114172876A (en) * | 2021-11-29 | 2022-03-11 | 阿里巴巴(中国)有限公司 | Data transmission method, device and computer storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984410A (en) * | 2010-11-12 | 2011-03-09 | 中兴通讯股份有限公司 | Method and device for generating and unloading software installation package |
CN104008060A (en) * | 2014-06-18 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Method for detecting compatibility of plug-in and host, and detection server |
CN113138768A (en) * | 2021-04-29 | 2021-07-20 | 北京百度网讯科技有限公司 | Application package generation method and device, electronic equipment and readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070240134A1 (en) * | 2006-02-28 | 2007-10-11 | Joydeep Buragohain | Software packaging model supporting multiple entity types |
WO2013006226A1 (en) * | 2011-07-01 | 2013-01-10 | Exxonmobil Upstream Research Company | Plug-in installer framework |
CN111026455B (en) * | 2019-11-27 | 2023-02-24 | 掌阅科技股份有限公司 | Plug-in generation method, electronic device and storage medium |
-
2021
- 2021-07-23 CN CN202110842877.5A patent/CN113535194B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984410A (en) * | 2010-11-12 | 2011-03-09 | 中兴通讯股份有限公司 | Method and device for generating and unloading software installation package |
CN104008060A (en) * | 2014-06-18 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Method for detecting compatibility of plug-in and host, and detection server |
CN113138768A (en) * | 2021-04-29 | 2021-07-20 | 北京百度网讯科技有限公司 | Application package generation method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113535194A (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113535194B (en) | Method and device for updating installation package, computer equipment and storage medium | |
US20190324772A1 (en) | Method and device for processing smart contracts | |
CN107205055B (en) | Terminal upgrading method and device | |
CN111090536A (en) | Method, device, medium and electronic equipment for acquiring memory leakage information | |
CN111563032B (en) | APP debugging method and device, computer equipment and storage medium | |
US20050204351A1 (en) | Dynamic addressing (DA) using a centralized DA Manager | |
CN113467980B (en) | Log output method, device and system and embedded equipment | |
JP4724660B2 (en) | How to manage software components that are integrated into an embedded system | |
CN112882732A (en) | Method and device for updating function codes in Software Development Kit (SDK) | |
JP2005235087A (en) | System for investigating bad condition of mobile terminal, method thereof, mobile terminal, and program therefor | |
CN113821439B (en) | Method, device, storage medium and terminal for registering function to detection point | |
CN108595192A (en) | A kind of installation method and terminal device of application program | |
CN113127329A (en) | Script debugging method and device and computer storage medium | |
CN100472987C (en) | Communication system program fault detecting method | |
CN113434213B (en) | Program running method and device of terminal | |
CN113157329A (en) | Method, system, server and storage medium for starting application | |
JP2006318197A (en) | Controller support device and program | |
CN111782183B (en) | Method and device for judging component dependency, electronic device and medium | |
CN111258886B (en) | Abnormality positioning method and device for application program | |
CN111782282B (en) | Start program loading method and device, electronic equipment and storage medium | |
EP1164488A1 (en) | Remote debugging in an embedded system enviroment | |
CN110764818B (en) | Method, device, computer equipment and storage medium for automatically switching Swagger | |
CN113010218B (en) | Plug-in loading method, device, computing equipment and computer storage medium | |
CN115202709A (en) | Software project dependence analysis method and device, computer equipment and storage medium | |
CN115705289A (en) | Test method, mock frame, user equipment, service equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |