CN112130888B - Method, device, equipment and computer storage medium for updating application program - Google Patents
Method, device, equipment and computer storage medium for updating application program Download PDFInfo
- Publication number
- CN112130888B CN112130888B CN202010806694.3A CN202010806694A CN112130888B CN 112130888 B CN112130888 B CN 112130888B CN 202010806694 A CN202010806694 A CN 202010806694A CN 112130888 B CN112130888 B CN 112130888B
- Authority
- CN
- China
- Prior art keywords
- component
- update
- information
- updated
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- 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
- G06F8/658—Incremental updates; Differential updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method, a device, equipment and a computer storage medium for updating an application program, and relates to the technical field of information flow. The specific implementation scheme is as follows: acquiring an update message pushed by a server through long connection between an application program and the server; acquiring a file containing updated component information from the updated message; binding the updated component information to a proxy activity component of an application hosting module for execution by the proxy activity component of the updated component lifecycle. The application can quickly and conveniently update the application program.
Description
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for updating an application program in an information flow technology.
Background
With the continuous development of computer technology, users can browse pages, communicate, play videos, music, and the like by installing various application programs on terminal devices such as mobile phones, tablet computers, wearable devices, and the like. With the continuous enrichment and improvement of application programs, the application program function update is often faced, and how to quickly and conveniently implement the application program update is a problem that all service providers aim to solve.
Disclosure of Invention
In view of the foregoing, the present application provides a method, apparatus, device, and computer storage medium for quickly and easily implementing application program update.
In a first aspect, the present application provides a method for updating an application program, including:
acquiring an update message pushed by a server through long connection between an application program and the server;
acquiring a file containing updated component information from the updated message;
Binding the updated component information to a proxy activity component of an application hosting module for execution by the proxy activity component of the updated component lifecycle.
In a second aspect, the present application provides an apparatus for updating an application program, including:
The long connection management module is used for acquiring the update message pushed by the server through long connection between the application program and the server;
the message analysis module is used for acquiring a file containing updated component information from the updated message;
and the component binding module is used for binding the updated component information to a proxy activity component of the application program hosting module so as to enable the proxy activity component to execute the life cycle of the updated component.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, the present application provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above-described method.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the preceding claims.
According to the technical scheme, the application program acquires the updated component information pushed by the server side in a long-connection mode, and binds the updated component information to the proxy movable component of the host module, so that the proxy movable component executes the life cycle of the updated component, and the updating of the application program is realized.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
FIG. 1 illustrates an exemplary system architecture in which embodiments of the present invention may be applied;
FIG. 2 is a flow chart of a method according to a second embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a binding relationship between ProxyActivity and an update component according to a second embodiment of the present application;
FIG. 4 is a flow chart of a method according to a third embodiment of the present application;
FIG. 5 is a schematic diagram of a frame according to a fourth embodiment of the present application;
fig. 6 is a block diagram of a device according to a fifth embodiment of the present application;
Fig. 7 is a block diagram of an electronic device used to implement an embodiment of the application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The traditional application program updating mode is to iterate new function module codes based on the existing application program codes and then issue new versions of the application program codes. The user needs to obtain an installation package of new version of application code from the application marketplace or other platform that provides application download, for installation and full coverage of the code. This approach is slow to update and cumbersome for the user. The application does not adopt a mode of releasing new version application program codes, but pushes new functions as components (called as 'updating components' in the follow-up embodiments) to the application program through long connection between the server side and the application program, and the application program realizes function updating of the application program by using the information of the updating components.
Example 1
FIG. 1 illustrates an exemplary system architecture of a method for application update or an apparatus for application update to which embodiments of the present invention may be applied.
As shown in fig. 1, the system architecture may include terminal devices 101 and 102, a network 103, and a server 104. The network 103 is the medium used to provide communication links between the terminal devices 101, 102 and the server 104. The network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with server 104 through network 103 using terminal devices 101 and 102. Various applications, such as a voice interactive application, a web browser application, a communication type application, a multimedia play type application, etc., may be installed on the terminal devices 101 and 102.
Terminal devices 101 and 102 may include, but are not limited to, smartphones, tablets, smart televisions, wearable devices, and the like. The apparatus for updating an application provided by the present invention may be set and run in the above-described terminal device 101 or 102. It may be implemented as a plurality of software modules or as a single software module, which is not particularly limited herein.
In the present application, applications installed and running in the terminal devices 101 and 102 (i.e., clients of the applications, abbreviated as applications in the present application) establish and maintain a long connection with the server 104, and after the applications are updated, the server 104 pushes (pushes) updated contents to the applications of the terminal devices 101 and 102 by a push update message. The application program is updated by using the content in the update message, and the specific process executed by the application program end will be described in detail in the following second embodiment.
The server 104 may be a single server or a server group composed of a plurality of servers. It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Example two
Fig. 2 is a flowchart of a method according to a second embodiment of the present application, where the method is performed by an application program at a terminal device. As shown in fig. 2, the method may include the steps of:
in 201, an update message pushed by a server is obtained through a long connection between an application and the server.
Function updating refers to superimposing a new function module on the existing application code or modifying an original function module. In the application, the update on the function can exist in the form of a component, the server side can contain the updated component information in an update message, and the updated component information is pushed to the application program through a long connection between the application program and the server side.
The update message may further include information indicating an update type, abbreviated as update type information. Of course, if the function is updated only by pushing the update message, the update type information may not be carried, and the function is updated by default. Carrying update type information in the update message can extend various types of application updates, and other types of updates will be described in detail in embodiment three.
In 202, a file containing updated component information is obtained from an update message.
It has been mentioned above that for the incremental update to be functionally present as a new component, the updated component information may include methods corresponding to the lifecycle of the updated component and related resource information of the updated component in a file containing the updated component information.
The lifecycle of a component refers to states that the component needs to undergo throughout the interface presentation process and methods that are executed correspondingly. The lifecycle of the various components may vary, depending on the particular function.
The related resources may include resources used by the updated functions such as text, pictures, video, audio, etc. when the interface is presented, and may also include UI layout information corresponding to the updated functions when the interface is presented.
At 203, the updated component information is bound to ProxyActivity (proxy activity) components of the application hosting module for ProxyActivity components to execute the lifecycle of the updated component.
To facilitate an understanding of this step, the concept of "host module" is first explained. The host module is the most basic module in the application programs, and has the interaction function of the most basic application programs and the mobile phone operating system. The components run on the host module to the upper part, and each life cycle is bound to the host module and is managed by the host module.
In the application, an Activity component is taken as an example, and the Activity component is one of four components in an Android system and is a component responsible for interaction with a user and providing a visual interface for the user. Other active components having the same or similar functionality as the Activity component may also be employed for other operating systems.
In the present application, a ProxyActivity is created in the application hosting module that is responsible for interacting with the operating system of the terminal device, executing the lifecycle of the various update components of the application. Thus, prior to this step, if the application host module does not already have ProxyActivity components, then ProxyActivity components are created. If already present, the binding in this step is performed directly.
Specifically, the binding process involved in this step may include the steps of:
s1, loading a byte code file object of an updating component.
For Android (Android) systems, in order to obtain a byte code file object corresponding to an updated component, a DexClassLoader method of a DexClassLoader class may be used to load the byte code file object of the component, and one important parameter used in the method is a storage address of updated component information in terminal equipment. After the application program receives the pushed update message in step 201, the update component information is stored in a designated storage address in the terminal device, and the designated storage address is used for storing the update component information. The application loads the byte code file object of the update component from the storage address.
S2, acquiring relevant resource information of the updating component from the updating component information;
for the Android system, related resource information of the updated component can be obtained through a hook AssetManager-class ADDASSETPATH method.
S3, acquiring methods corresponding to the life cycle of the updating component from the updating component information, and transmitting related resource information and the methods to the ProxyActivity component.
After the methods corresponding to the lifecycle of the update component are transferred to the ProxyActivity component, proxyActivity can execute the methods corresponding to the lifecycle of the update component, thereby implementing the lifecycle mapping of the update component to the ProxyActivity component.
When the ProxyActivity component executes the life cycle of the updating component, the following steps are continuously executed:
S4, the ProxyActivity component invokes a method corresponding to the life cycle to load the byte code file object of the updating component.
S5, instantiating the byte code file object by utilizing the related resource information.
S6, calling a method corresponding to the life cycle of the updating component.
Taking the creation state in the life cycle as an example, the corresponding method is onCreate methods. The ProxyActivity component may call onCreate the method to load the Activity bytecode object of the update component and instantiate the bytecode file object, and then call onCreate the method of the update component. Similar processing is performed for onResume methods, onStop methods, and the like corresponding to other states in the lifecycle.
If the modification of the existing function is performed, the life cycle of the updated component is actually replaced by the life cycle of the existing function after the binding of the updated component is performed 203. When it is desired to implement the presentation of the functionality at the interface, the lifecycle of the update component is performed by ProxyActivity. That is, deleting the Activity of the update component identifies the corresponding existing function binds the lifecycle of the update component to ProxyActivity.
The Activity component with the existing function may be registered in an operating system of the terminal device, for example, a manifest (Android development file name) in an Android system, in a manner in the prior art. It is also possible that the life cycle of the existing functionality Activity component is tied to ProxyActivity in accordance with the manner of the present application. In either case, when the existing update component is used to modify the existing function, the existing function's Activity component is deleted, which of course also includes the registered content of the Activity component in the manifest or the binding relationship with ProxyActivity.
Whether the function update is specifically a newly added function or a modification of an existing function can also be embodied in the update message by defining different update type information.
An example diagram of the above process may be seen in fig. 3.
Example III
Fig. 4 is a flowchart of a method according to a third embodiment of the present application, where the method is performed by an application program at a terminal device. As shown in fig. 4, the method may include the steps of:
step 401 is the same as step 201 in the second embodiment.
In 402, the update type information is parsed from the update message, and if the update type information indicates that the function is updated, step 403 is executed; if the update type information indicates a hot fix, then 405 is performed; if the update type information indicates an interface resource update, then 407 is performed.
In this embodiment, the long connection based update message pushing manner may be used to perform other types of application program updates in addition to the function updates. Such as hot fixes, interface resource updates, etc. The update message may carry update type information indicating an update type, for example, an update type of 0 indicates hot repair, an update type of 1 indicates a function update, and an update type of 2 indicates an interface resource update.
Wherein, the hot repair refers to repairing bug (bug) occurring in application program. Interface resource update refers to updating interface resources of irrelevant functionality, wherein the interface resources involved may include interface skin or specified elements (e.g. documents, icons, etc.) on the interface, and the two may be further distinguished by updating type information in the update message, but because the update mechanisms of the two are similar, the specific distinction may not be made.
Steps 403 to 404 are the same as steps 202 to 203 in the second embodiment.
In 405, a class file and a storage path parameter for the class file are obtained from the update message.
For updating the hot repair class, the server side will push the class file of the hot patch and the storage path parameters of the class file to the application program in the update message. Therefore, when the application program analyzes the update type information to indicate hot repair, the class file and the storage path parameters of the class file are acquired from the update message.
At 406, the class file is replaced with a class file stored by the application at the address indicated by the storage path parameter.
The storage path parameter of the class file indicates the storage path of the class file to be replaced, and the class file acquired from the update message is replaced with the existing class file, namely the bug class file, under the storage path according to the storage path, so that the thermal repair is realized.
In 407, the interface resource file and the storage path parameters of the interface resource file are obtained from the update message.
For updating the interface resource, the server will include the new interface resource and the storage path parameter of the interface resource in the update message and push the new interface resource and the storage path parameter of the interface resource to the application program. Therefore, when the application program analyzes the update type information to indicate the update of the interface resource, the interface resource and the storage path parameter of the interface resource are obtained from the update message.
At 408, the interface resource file is replaced with the interface resource file that the application program stored at the address indicated by the storage path parameter.
The storage path parameter of the interface resource indicates the storage path of the interface resource to be replaced, and the interface resource acquired from the update message is replaced with the existing interface resource under the storage path according to the storage path. For example, the skin resource file is replaced, so that the skin change of the application program is realized. For another example, the icon file is replaced to realize the icon update of the application program.
Example IV
To complete the above method flow, an application real-time update framework needs to be constructed, as shown in fig. 5, which includes three parts: a long connection management module, a component management layer and a unified resource management layer.
The long connection management module is responsible for establishing and maintaining the long connection between the application program and the server side, which is related in the method embodiment, and receiving the update message pushed by the server side through the long connection. And analyzing the update message and transmitting information contained in the update message to the component management layer in the form of an update event message.
The component management layer is responsible for binding updated component information to ProxyActivity (proxy activity) components of the application hosting module, and for replacement of class files in hot fixes, and replacement of interface resource files. The component management layer is a core module for implementing the above method embodiment, and the executed processing is detailed in the above method embodiment.
The unified resource management layer is responsible for interaction of the whole framework and the underlying operating system and management of the lifecycle of each component, namely, the layer where the host module involved in the embodiment of the method is located. The ProxyActivity component of the host module is responsible for executing the lifecycle of the update component.
Example five
Fig. 6 is a block diagram of an apparatus according to a fifth embodiment of the present application, where the apparatus may be a functional unit such as a plug-in unit or a software development kit (Software Development Kit, SDK) in an application. As shown in fig. 6, the apparatus 00 may include: the long connection management module 01, the message parsing module 02 and the component binding module 03 may further include: a thermal remediation processing module 04 and an interface resource updating module 05.
And the long connection management module 01 is used for acquiring the update message pushed by the server through the long connection between the application program and the server.
The message parsing module 02 is configured to obtain a file containing updated component information from the update message.
A component binding module 03, configured to bind the updated component information to the ProxyActivity component of the application hosting module, so that the ProxyActivity component executes the lifecycle of the updated component.
Furthermore, the message parsing module 02 may parse the update message to obtain update type information, and if the update type information indicates that the function is updated, continue to execute the process of obtaining the file containing the update component information from the update event message.
The component binding module 03 is further configured to create ProxyActivity a component if the application hosting module does not already exist ProxyActivity a component before binding the updated component information to the ProxyActivity a component of the application hosting module.
Specifically, the component binding module 03 may load a byte code file object that updates the component; acquiring relevant resource information of the updating component from the updating component information; acquiring method information corresponding to the life cycle of the updating component from the updating component information; and transmitting the related resource information of the updating component and the information of each method corresponding to the life cycle to the ProxyActivity component.
The ProxyActivity component is used for the ProxyActivity component to call a method corresponding to the life cycle to load the byte code file object of the updating component; instantiating a bytecode file object using the related resource information; and calling a method corresponding to the life cycle of the updating component.
Wherein the function update can be specifically classified into a new function or a modification of an existing function. Whether an added function or a modification of an existing function, the lifecycle of the updated component is bound to the ProxyActivity component of the host module by using the updated component information contained in the update message. However, if the function is updated to be a modification of the existing function, the component binding unit 03 further deletes the Activity component of the existing function corresponding to the updated component. That is, the lifecycle of the updated component replaces the lifecycle of the existing functionality.
Further, the message parsing module 02 may be further configured to obtain the class file and the storage path parameter of the class file from the update message if the update type information indicates hot repair.
And the thermal restoration processing module 04 is used for replacing the class file stored by the application program at the address indicated by the storage path parameter.
Further, the message parsing module 02 may be further configured to obtain the interface resource file and the storage path parameter of the interface resource file from the update message if the update type information indicates that the interface resource is updated, where the interface resource includes an interface skin or a specified element on the interface.
And the interface resource updating module 05 is used for replacing the interface resource file stored by the application program at the address indicated by the storage path parameter.
The message parsing module 02, the component binding module 03, the thermal repair processing module 04 and the interface resource updating module 05 involved in the apparatus 00 are provided in the component management layer in the fourth embodiment. ProxyActivity components are provided in the uniform resource management layer in embodiment four.
According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
As shown in fig. 7, is a block diagram of an electronic device of a method of application update according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 7, the electronic device includes: one or more processors 701, memory 702, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 701 is illustrated in fig. 7.
Memory 702 is a non-transitory computer readable storage medium provided by the present application. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of application updating provided by the present application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of application program update provided by the present application.
The memory 702 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for updating an application program in an embodiment of the present application. The processor 701 executes various functional applications of the server and data processing, i.e., a method of implementing application update in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 702.
Memory 702 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 702 may optionally include memory located remotely from processor 701, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or otherwise, in fig. 7 by way of example.
The input device 703 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, and like input devices. The output device 704 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
From the above description of embodiments, it can be seen that the method, apparatus, device and computer storage medium provided by the present application have the following advantages:
1) According to the method, the device and the system, the application program acquires the updated component information pushed by the server end in a long-connection mode, and binds the updated component information to the proxy Activity component of the host module, so that the proxy Activity component executes the life cycle of the updated component, and therefore the update of the application program is achieved.
2) The method is not only suitable for the function update of the application program, but also provides a solution for the hot repair and the interface resource update, thereby realizing the update of various application programs rapidly and conveniently.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed embodiments are achieved, and are not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.
Claims (17)
1. A method of application update, comprising:
acquiring an update message pushed by a server through long connection between an application program and the server;
acquiring a file containing updated component information from the updated message;
Binding the updated component information to a proxy activity component of an application hosting module for the proxy activity component to execute a lifecycle of the updated component; wherein,
The proxy activity component binding the updated component information to the application hosting module comprises:
loading a byte code file object of the updating component;
acquiring relevant resource information of the updating component from the updating component information;
Acquiring method information corresponding to the life cycle of the updating component from the updating component information;
and transmitting the related resource information of the updating component and the corresponding method information of the life cycle to the proxy activity component.
2. The method of claim 1, further comprising, prior to obtaining a file containing updated component information from the update event message:
And analyzing the update information to obtain update type information, and if the update type information indicates that the function is updated, continuing to execute the file containing the update component information obtained from the update event information.
3. The method of claim 1, prior to binding the updated component information to the proxy active component of the application hosting module, further comprising:
if the application hosting module does not already have a proxy activity component, a proxy activity component is created.
4. A method according to any one of claims 1 to 3, wherein the proxy activity component executing the lifecycle of the update component comprises:
the proxy activity component invokes a method corresponding to the life cycle to load the byte code file object of the update component;
Instantiating the bytecode file object using the related resource information;
And calling a method corresponding to the life cycle of the updating component.
5. The method of claim 2, further comprising, if the function is updated to a modification of an existing function:
And deleting the active component with the existing function corresponding to the updated component.
6. The method of claim 2, further comprising:
If the update type information indicates hot repair, acquiring a class file and a storage path parameter of the class file from the update message;
And replacing the class file stored by the application program at the address indicated by the storage path parameter.
7. The method of claim 2, further comprising:
If the update type information indicates that the interface resource is updated, acquiring an interface resource file and a storage path parameter of the interface resource file from the update message, wherein the interface resource comprises an interface skin or a designated element on the interface;
And replacing the interface resource file stored by the application program at the address indicated by the storage path parameter.
8. An apparatus for application update, comprising:
The long connection management module is used for acquiring the update message pushed by the server through long connection between the application program and the server;
the message analysis module is used for acquiring a file containing updated component information from the updated message;
the component binding module is used for binding the updated component information to a proxy activity component of the application program host module so as to enable the proxy activity component to execute the life cycle of the updated component; wherein,
The component binding module is specifically configured to: loading a byte code file object of the updating component; acquiring relevant resource information of the updating component from the updating component information; acquiring method information corresponding to the life cycle of the updating component from the updating component information; and transmitting the related resource information of the updating component and the corresponding method information of the life cycle to the proxy activity component.
9. The apparatus of claim 8, wherein the message parsing module is further configured to parse the update type information from the update message, and if the update type information indicates a function update, continue to perform acquiring a file containing update component information from the update event message.
10. The apparatus of claim 8, wherein the component binding module is further configured to create a proxy activity component if the proxy activity component does not already exist in the application hosting module prior to binding the updated component information to the proxy activity component of the application hosting module.
11. The apparatus of any of claims 8 to 10, wherein the proxy activity component is to invoke a lifecycle corresponding method to load a bytecode file object of the update component; instantiating the bytecode file object using the related resource information; and calling a method corresponding to the life cycle of the updating component.
12. The apparatus of claim 9, wherein the component binding module is further configured to delete an active component of an existing function corresponding to the updated component if the function is updated to be a modification of the existing function.
13. The apparatus of claim 9, further comprising: a thermal remediation processing module;
The message analysis module is further configured to obtain a class file and a storage path parameter of the class file from the update message if the update type information indicates hot repair;
and the thermal repair processing module is used for replacing the class file stored by the application program at the address indicated by the storage path parameter with the class file.
14. The apparatus of claim 9, further comprising: an interface resource updating module;
The message analysis module is further configured to obtain an interface resource file and a storage path parameter of the interface resource file from the update message if the update type information indicates that the interface resource is updated, where the interface resource includes an interface skin or a specified element on an interface;
and the interface resource updating module is used for replacing the interface resource file stored by the application program at the address indicated by the storage path parameter with the interface resource file.
15. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010806694.3A CN112130888B (en) | 2020-08-12 | 2020-08-12 | Method, device, equipment and computer storage medium for updating application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010806694.3A CN112130888B (en) | 2020-08-12 | 2020-08-12 | Method, device, equipment and computer storage medium for updating application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112130888A CN112130888A (en) | 2020-12-25 |
CN112130888B true CN112130888B (en) | 2024-07-19 |
Family
ID=73850775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010806694.3A Active CN112130888B (en) | 2020-08-12 | 2020-08-12 | Method, device, equipment and computer storage medium for updating application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112130888B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115328507A (en) * | 2021-04-25 | 2022-11-11 | 花瓣云科技有限公司 | Icon updating method of application program and related device |
CN117348896A (en) * | 2022-06-27 | 2024-01-05 | 华为云计算技术有限公司 | Application updating method, device and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933355A (en) * | 2017-12-18 | 2019-06-25 | 优酷网络技术(北京)有限公司 | Application program updating method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6393386B1 (en) * | 1998-03-26 | 2002-05-21 | Visual Networks Technologies, Inc. | Dynamic modeling of complex networks and prediction of impacts of faults therein |
US7987449B1 (en) * | 2003-05-22 | 2011-07-26 | Hewlett-Packard Development Company, L.P. | Network for lifecycle management of firmware and software in electronic devices |
CN106254105A (en) * | 2016-07-28 | 2016-12-21 | 杭州昆海信息技术有限公司 | A kind of assembly update method and device |
-
2020
- 2020-08-12 CN CN202010806694.3A patent/CN112130888B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933355A (en) * | 2017-12-18 | 2019-06-25 | 优酷网络技术(北京)有限公司 | Application program updating method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112130888A (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10839141B2 (en) | System and method for provisioning a mobile software application to a mobile device | |
CN104636139B (en) | One kind visualizes cross-platform mobile application exploitation and generation system | |
EP2201455B1 (en) | Method and system for changing execution environments during application execution | |
CN111158818A (en) | Page rendering method and device | |
CN111625738B (en) | APP target page calling method, device, equipment and storage medium | |
US11381449B1 (en) | Dynamic application configuration techniques | |
CN104572114A (en) | Binding device, application updating device and method and application | |
CN111610972B (en) | Page generation method, device, equipment and storage medium | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
CN110716720A (en) | A method and apparatus for implementing application hot deployment | |
CN101944032A (en) | Microware updating method, client, server and system | |
US11294651B2 (en) | Code execution method, device, and rendering apparatus | |
CN111767090A (en) | Method and device for starting small program, electronic equipment and storage medium | |
CN101415272A (en) | Server for communicating with multi-mode devices using multi-mode applications | |
CN112130888B (en) | Method, device, equipment and computer storage medium for updating application program | |
CN112015468A (en) | Interface document processing method and device, electronic equipment and storage medium | |
CN111338626B (en) | Interface rendering method and device, electronic equipment and medium | |
CN111290818A (en) | Operation method for creating application program and operation method for application program | |
CN111966877B (en) | Front-end service method, device, equipment and storage medium | |
CN112764746B (en) | Data processing method, device, electronic equipment and storage medium | |
JP2021068414A (en) | Wrapping method, registration method, device, rendering device, and program | |
JP7147123B2 (en) | Source channel determination method, device, equipment, program and computer storage medium | |
CN112148596B (en) | Method and device for generating error reporting content of deep learning framework | |
CN115729604A (en) | Micro application integration method, system, electronic device and storage medium | |
CN113326459B (en) | Picture updating method and device |
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 |