CN112130888A - Method, device and equipment for updating application program and computer storage medium - Google Patents

Method, device and equipment for updating application program and computer storage medium Download PDF

Info

Publication number
CN112130888A
CN112130888A CN202010806694.3A CN202010806694A CN112130888A CN 112130888 A CN112130888 A CN 112130888A CN 202010806694 A CN202010806694 A CN 202010806694A CN 112130888 A CN112130888 A CN 112130888A
Authority
CN
China
Prior art keywords
component
update
information
updating
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010806694.3A
Other languages
Chinese (zh)
Inventor
沈约得
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu com Times Technology Beijing Co Ltd
Original Assignee
Baidu com Times Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu com Times Technology Beijing Co Ltd filed Critical Baidu com Times Technology Beijing Co Ltd
Priority to CN202010806694.3A priority Critical patent/CN112130888A/en
Publication of CN112130888A publication Critical patent/CN112130888A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

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 update message; and binding the update component information to an agent activity component of an application host module so that the agent activity component can execute the life cycle of the update component. The application program updating method and device can quickly and conveniently achieve updating of the application program.

Description

Method, device and equipment for updating application program and computer storage medium
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 development of computer technology, users can perform page browsing, communication, playing video, music, and the like by installing various applications on terminal devices such as mobile phones, tablet computers, wearable devices, and the like. With the continuous enrichment and improvement of the application programs, the function updating of the application programs is often faced, and how to quickly and conveniently realize the updating of the application programs is a problem which is addressed by all service providers.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, a device, and a computer storage medium for quickly and conveniently implementing application program update.
In a first aspect, the present application provides a method for updating an application, 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 update message;
and binding the update component information to an agent activity component of an application host module so that the agent activity component can execute the life cycle of the update component.
In a second aspect, the present application provides an apparatus for updating an application, including:
the long connection management module is used for acquiring the update message pushed by the server side through long connection between the application program and the server side;
the message analysis module is used for acquiring a file containing the information of the updating component from the updating message;
and the component binding module is used for binding the information of the updating component to the agent activity component of the application program host module so that the agent activity component can execute the life cycle of the updating 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 content of the first and second substances,
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 having stored thereon computer instructions for causing the computer to perform the method described above.
According to the technical scheme, the application program acquires the update component information pushed by the server side in a long-connection mode and binds the update component information to the agent activity component of the host module, so that the agent activity component executes the life cycle of the update component, and the update of the application program is realized.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 illustrates an exemplary system architecture to which embodiments of the invention may be applied;
FIG. 2 is a flowchart of a method provided in a second embodiment of the present application;
fig. 3 is a schematic diagram of a binding relationship between a proxylactivity and an update component according to a second embodiment of the present application;
FIG. 4 is a flowchart of a method provided in a third embodiment of the present application;
FIG. 5 is a schematic diagram of a framework provided in the fourth embodiment of the present application;
fig. 6 is a structural diagram of an apparatus according to a fifth embodiment of the present application;
FIG. 7 is a block diagram of an electronic device used to implement embodiments of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. 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 present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The traditional way of updating an application is to iterate over new function module code based on existing application code and then release a new version of the application code. The user needs to obtain an installation package of a new version of the application code from the application marketplace or other platform providing application download, install and fully cover the code. This method is slow and cumbersome for the user. According to the method, a mode of releasing a new version of application program codes is not adopted, a new function is pushed to the application program as a component (called an 'updating component' in the subsequent embodiment) through long connection between the server side and the application program, and the application program realizes function updating of the application program by using information of the updating component.
Example one
Fig. 1 shows an exemplary system architecture of a method for application updating or an apparatus for application updating to which an embodiment 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 serves as a medium for providing communication links between the terminal devices 101, 102 and the server 104. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may interact with server 104 through network 103 using terminal devices 101 and 102. Various applications, such as a voice interaction application, a web browser application, a communication application, a multimedia playing application, etc., may be installed on the terminal devices 101 and 102.
Terminal devices 101 and 102 may include, but are not limited to, smart phones, tablets, smart televisions, wearable devices, and the like. The device for updating the application provided by the present invention can be configured and operated in the terminal device 101 or 102. It may be implemented as a plurality of software modules, or may be implemented as a single software module, and is not specifically limited herein.
In this application, the applications installed and running in the terminal devices 101 and 102 (i.e., clients of the applications, which are simply referred to as applications in this application) establish and maintain long connections with the server 104, and after the applications are updated, the server 104 pushes (pushes) the updated content to the applications of the terminal devices 101 and 102 by a push update message. The application program updates by using the content in the update message, and the specific processing performed by the application program end will be described in detail in the following embodiment two.
The server 104 may be a single server or a server group including 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 provided in the second embodiment of the present application, where the method is executed by an application program at a terminal device. As shown in fig. 2, the method may include the steps of:
in 201, update messages pushed by the server side are obtained through a long connection between the application program and the server side.
The function updating refers to the process of adding a new function module or modifying an original function module on the basis of the existing application program codes. In the application, the functional update can exist in a component form, and the server side can include the update component information in the update message and push the update component information 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, which is abbreviated as update type information. Of course, if the function is updated only by pushing the update message, the function may be updated by default without carrying the update type information. The update type information carried in the update message may extend various types of application updates, and other types of updates will be described in detail in embodiment three.
At 202, a file containing updated component information is obtained from the update message.
As mentioned above, for the incremental update on the function existing in the form of a new added component, in the file containing the updated component information, the updated component information may include methods corresponding to the lifecycle of the updated component and related resource information of the updated component.
The lifecycle of a component refers to the states that the component needs to experience and the corresponding methods that are performed during the presentation of the entire interface. The life cycle of different components may vary, depending on the particular function.
The related resources may include resources used by the updated functions when the interface is displayed, such as text, pictures, video, audio, and the like, and may also include UI layout information corresponding to the updated functions when the interface is displayed.
At 203, the update component information is bound to a ProxyActivity component of the application host module for the ProxyActivity component to execute the lifecycle of the update component.
For the convenience of understanding the present step, the concept of "host module" is explained first. The host module is the most basic module in the application program and has the interaction function of the most basic application program and the mobile phone operating system. The components run on the host module, and each life cycle is bound to the host module and managed by the host module.
In the application, an Activity component is taken as an example, and the Activity component is one of four major components in an Android system, is a component responsible for interacting with a user, and is responsible for providing a visual interface for the user. Other Activity components having the same or similar functionality as the Activity component may also be employed with other operating systems.
In the application, a ProxyActivity is created in an application host module to interact with an operating system of the terminal device and execute a life cycle of each update component of the application. Thus, prior to this step, if the application host module does not already have a ProxyActivity component, then a ProxyActivity component is created. If the binding exists, the binding in the step is directly carried out.
Specifically, the binding process involved in this step may include the following steps:
and S1, loading the byte code file object of the updating component.
For an Android system, in order to obtain a bytecode file object corresponding to an updated component, a DexClassLoader method of a DexClassLoader class may be used to load the component bytecode file object, and an important parameter used by the method is a storage address of updated component information in a terminal device. After receiving the pushed update message in step 201, the application stores the update component information 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 bytecode file object of the update component from the storage address.
S2, acquiring the related resource information of the update component from the update component information;
for the Android system, the relevant resource information of the updated component can be obtained through an addasspath method of the hook AssetManager class.
And S3, acquiring each method corresponding to the life cycle of the updating component from the updating component information, and transmitting the related resource information and each method to the ProxyActivity component.
After each method corresponding to the life cycle of the updating component is transmitted to the ProxyActivity component, the ProxyActivity can execute each method corresponding to the life cycle of the updating component, and therefore the mapping of the life cycle of the updating component to the ProxyActivity component is achieved.
When the life cycle of the updating component is executed by the ProxyActivity component subsequently, the following steps are continuously executed:
and S4, calling a method corresponding to the life cycle by the ProxyActivity component to load the bytecode file object of the update component.
S5, instantiating the bytecode file object with the relevant resource information.
And 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 the onCreate method. The proxylactivity component may call the onCreate method to load the Activity bytecode object of the update component and instantiate the bytecode file object, and then call the onCreate method of the update component. Similar processing is performed for the onResume method, the onsop method, etc., corresponding to other states in the lifecycle.
If the existing function is modified, then after the binding of the updated component is performed at 203, the lifecycle of the updated component actually replaces the lifecycle of the existing function. And when the function needs to be realized in the display of the interface, executing the life cycle of the updating component by the ProxyActivity. That is, the Activity of the existing function corresponding to the update component identifier is deleted, and the lifecycle of the update component is bound to the ProxyActivity.
Among them, for an Activity component that already has a function, it may be registered in an operating system of the terminal device in a manner in the prior art, for example, a manifest (Android development file name) registration in an Android system. It is also possible that in the manner of this application, the Activity component lifecycle of an existing function is bound to ProxyActivity. In either way, when the presence update component is used to modify an existing functionality, the Activity component that has already been functional is deleted, which of course also includes the registered content of the Activity component in the manifest or the binding relationship with the proxylactivity.
The modification of the function update specifically to be a new function or an existing function can also be embodied in the update message by defining different update type information.
An example diagram of the above process can be seen in fig. 3.
EXAMPLE III
Fig. 4 is a flowchart of a method provided in the third embodiment of the present application, where the method is executed by an application program on a terminal device side. As shown in fig. 4, the method may include the steps of:
step 401 is the same as step 201 in example two.
At 402, analyzing the update type information from the update message, and if the update type information indicates that the function is updated, executing step 403; if the update type information indicates a hot fix, execute 405; if the update type information indicates an interface resource update, then 407 is performed.
In this embodiment, the update message pushing method based on the long connection may be used to perform other types of application updates besides function updates. Such as hot fixes, interface resource updates, etc. The update message may carry update type information indicating an update type, for example, a 0 indication is used for hot repair, a 1 indication is used for functional update, and a 2 indication is used for interface resource update.
Wherein, the hot repair refers to repairing bug (bug) appearing in the application program. The interface resource update refers to an interface resource for updating irrelevant functionality, wherein the interface resource involved may include an interface skin or a designated element (such as a file, an icon, and the like) on the interface, and the two types of interface resources may be further distinguished by updating type information in an update message, but may not be specifically distinguished because the updating mechanisms of the two types of interface resources are similar.
Steps 403 to 404 are the same as steps 202 to 203 in the second embodiment.
In 405, the class file and the storage path parameter of the class file are obtained from the update message.
For updating the hot repair class, the server side will include the class file of the hot patch and the storage path parameter of the class file in an update message and push the update message to the application program. Therefore, when the update type information obtained by analyzing the application program indicates the hot repair, the class file and the storage path parameter of the class file are obtained from the update message.
At 406, the class file is substituted for the class file stored by the application at the address indicated by the storage path parameter.
And 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 by the existing class file under the storage path, namely the bug class file, according to the storage path, so that the hot repair is realized.
In 407, the interface resource file and the storage path parameter of the interface resource file are obtained from the update message.
For interface resource update, the server will include the new interface resource and the storage path parameter of the interface resource in an update message and push the update message to the application program. Therefore, when the application program obtains the update type information through analysis and indicates that the interface resource is updated, 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 substituted for the interface resource file stored by the application at the address indicated by the storage path parameter.
And the storage path parameter of the interface resource indicates the storage path of the interface resource needing to be replaced, and the interface resource acquired from the updating message is replaced by the existing interface resource under the storage path according to the storage path. For example, the skin resource file is replaced to realize the skin changing of the application program. For another example, the icon file is replaced to update the icon of the application program.
Example four
In order to complete the above method flow, an application real-time update framework needs to be constructed, and as shown in fig. 5, the framework includes three parts: the system comprises a long connection management module, a component management layer and a uniform resource management layer.
The long connection management module is responsible for establishing and maintaining the long connection between the application program and the server terminal, and receiving the update message pushed by the server terminal through the long connection. The update message is parsed and information contained in the update message is passed to the component management layer in the form of an update event message.
The component management layer is responsible for binding the updated component information to a proxyActivity component of the application program host module, replacing class files in hot repair and replacing interface resource files. The component management layer is a core module for implementing the method embodiments, and the processing performed is described in detail in the method embodiments.
The uniform resource management layer is responsible for interaction between the overall framework and the bottom operating system and management of the life cycle of each component, namely the layer where the host module is located in the embodiment of the method. 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 a device according to a fifth embodiment of the present invention, where the device may be a plug-in or Software Development Kit (SDK) function unit 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 repair 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 side through the long connection between the application program and the server side.
And the message analysis module 02 is used for acquiring the file containing the update component information from the update message.
The component binding module 03 is configured to bind the update component information to the proxylactivity component of the application host module, so that the proxylactivity component executes a life cycle of the update component.
Furthermore, the message parsing module 02 may further parse the update type information from the update message, and if the update type information indicates that the function is updated, continue to execute the file including the update component information obtained from the update event message.
The component binding module 03 is further configured to create a proxylactivity component if the application host module does not have a proxylactivity component before binding the update component information to the proxylactivity component of the application host module.
Specifically, the component binding module 03 may load the bytecode file object of the update component; acquiring related resource information of the updating component from the updating component information; acquiring each 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 method information corresponding to the life cycle to the ProxyActivity component.
The ProxyActivity component is used for calling a method corresponding to the life cycle by the ProxyActivity component to load a byte code file object of the updating component; instantiating a bytecode file object with the relevant resource information; and calling a method corresponding to the life cycle of the updating component.
For function updating, it can be specifically distinguished as new function or existing function modification. Whether the new function or the existing function is modified, the lifecycle of the update component is bound to the proxyActivity component of the host module by using the update component information contained in the update message. However, if the function is updated to be the 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, if the update type information indicates a hot repair, obtain the class file and the storage path parameter of the class file from the update message.
And the hot repair processing module 04 is configured to replace the class file stored by the application at the address indicated by the storage path parameter with the class file.
Further, the message parsing module 02 may be further configured to, if the update type information indicates that the interface resource is updated, obtain the interface resource file and the storage path parameter of the interface resource file from the update message, 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 with the interface resource file.
The message parsing module 02, the component binding module 03, the thermal remediation processing module 04, and the interface resource updating module 05 related to the apparatus 00 are disposed in the component management layer in the fourth embodiment. The proxylactivity component is disposed in the unified resource management layer in the fourth embodiment.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the application updating method. 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. 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 for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 7, one processor 701 is taken as an example.
The memory 702 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of application program update provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of application update provided herein.
Memory 702, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods of application updating in embodiments of the present application. The processor 701 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 702, that is, implements the method of application program update in the above-described method embodiments.
The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, 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, the memory 702 may optionally include memory located remotely from the 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 other means, and fig. 7 illustrates an example of a connection by a bus.
The input device 703 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic device, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 704 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating 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 can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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.
As can be seen from the above description of the embodiments, the method, apparatus, device, and computer storage medium provided by the present application have the following advantages:
1) according to the method, the application program obtains the update component information pushed by the server side in a long-connection mode, and binds the update component information to the proxy Activity component of the host module, so that the proxy Activity component executes the life cycle of the update component, and the update of the application program is realized.
2) The method and the device are not only suitable for function updating of the application program, but also provide a solution for hot repair and interface resource updating, so that various types of application program updating can be quickly and conveniently realized.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (18)

1. A method of application updating, 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 update message;
and binding the update component information to an agent activity component of an application host module so that the agent activity component can execute the life cycle of the update component.
2. The method of claim 1, further comprising, prior to retrieving the file containing updated component information from the update event message:
and analyzing the update message 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 message.
3. The method of claim 1, prior to binding the update component information to a proxy activity component of an application hosting module, further comprising:
and if the application program host module does not have the agent activity component, creating the agent activity component.
4. The method of any of claims 1-3, wherein binding the update component information to a proxy activity component of an application hosting module comprises:
loading a bytecode file object of the update component;
acquiring related resource information of the updated component from the updated component information;
acquiring each 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 method information corresponding to the life cycle to the agent activity component.
5. The method of claim 4, wherein the agent activity component executing the lifecycle of the update component comprises:
the agent activity component calls a method corresponding to the life cycle to load the byte code file object of the updating component;
instantiating the bytecode file object using the relevant resource information;
and calling a method corresponding to the life cycle of the updating component.
6. The method of claim 2, if the function update is a modification of an existing function, the method further comprising:
and deleting the active component of the existing function corresponding to the updating component.
7. The method of claim 2, further comprising:
if the update type information indicates thermal restoration, 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.
8. 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 with the interface resource file.
9. An apparatus for application update, comprising:
the long connection management module is used for acquiring the update message pushed by the server side through long connection between the application program and the server side;
the message analysis module is used for acquiring a file containing the information of the updating component from the updating message;
and the component binding module is used for binding the information of the updating component to the agent activity component of the application program host module so that the agent activity component can execute the life cycle of the updating component.
10. The apparatus according to claim 9, wherein the message parsing module is further configured to parse the update message to obtain update type information, and if the update type information indicates a function update, continue to obtain a file containing update component information from the update event message.
11. The apparatus of claim 9, wherein the component binding module, prior to binding the updated component information to the proxy active component of the application hosting module, is further configured to create a proxy active component if the proxy active component does not already exist for the application hosting module.
12. The apparatus according to any one of claims 9 to 11, wherein the component binding module is specifically configured to: loading a bytecode file object of the update component; acquiring related resource information of the updated component from the updated component information; acquiring each 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 method information corresponding to the life cycle to the agent activity component.
13. The apparatus according to claim 12, wherein the agent activity component is configured to invoke a method corresponding to a lifecycle to load a bytecode file object of the update component; instantiating the bytecode file object using the relevant resource information; and calling a method corresponding to the life cycle of the updating component.
14. The apparatus of claim 10, wherein the component binding unit 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.
15. The apparatus of claim 10, 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 thermal restoration;
and the hot 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.
16. The apparatus of claim 10, 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 the 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.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202010806694.3A 2020-08-12 2020-08-12 Method, device and equipment for updating application program and computer storage medium Pending CN112130888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010806694.3A CN112130888A (en) 2020-08-12 2020-08-12 Method, device and equipment for updating application program and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010806694.3A CN112130888A (en) 2020-08-12 2020-08-12 Method, device and equipment for updating application program and computer storage medium

Publications (1)

Publication Number Publication Date
CN112130888A true CN112130888A (en) 2020-12-25

Family

ID=73850775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010806694.3A Pending CN112130888A (en) 2020-08-12 2020-08-12 Method, device and equipment for updating application program and computer storage medium

Country Status (1)

Country Link
CN (1) CN112130888A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022228035A1 (en) * 2021-04-25 2022-11-03 花瓣云科技有限公司 Application icon update method and related apparatus
WO2024001403A1 (en) * 2022-06-27 2024-01-04 华为云计算技术有限公司 Application update method, apparatus and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020022952A1 (en) * 1998-03-26 2002-02-21 David Zager Dynamic modeling of complex networks and prediction of impacts of faults therein
CN109933355A (en) * 2017-12-18 2019-06-25 优酷网络技术(北京)有限公司 Application program updating method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020022952A1 (en) * 1998-03-26 2002-02-21 David Zager Dynamic modeling of complex networks and prediction of impacts of faults therein
CN109933355A (en) * 2017-12-18 2019-06-25 优酷网络技术(北京)有限公司 Application program updating method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022228035A1 (en) * 2021-04-25 2022-11-03 花瓣云科技有限公司 Application icon update method and related apparatus
WO2024001403A1 (en) * 2022-06-27 2024-01-04 华为云计算技术有限公司 Application update method, apparatus and system

Similar Documents

Publication Publication Date Title
US9852015B2 (en) Automatic discovery of a JavaScript API
US7707563B2 (en) System and method for network-based computing
JP7232866B2 (en) Mini-program processing method, server, equipment, storage medium, and program
CN111158818A (en) Page rendering method and device
CN111625738B (en) APP target page calling method, device, equipment and storage medium
US9491266B2 (en) Representational state transfer communications via remote function calls
CN111767090A (en) Method and device for starting small program, electronic equipment and storage medium
CN111610972B (en) Page generation method, device, equipment and storage medium
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN111885114B (en) Method, device and storage medium for upgrading application program interface module in gateway
CN112130888A (en) Method, device and equipment for updating application program and computer storage medium
CN113760324A (en) Method and device for constructing micro front-end application
US11294651B2 (en) Code execution method, device, and rendering apparatus
US20200110597A1 (en) System and method for authoring a software application
CN112015468A (en) Interface document processing method and device, electronic equipment and storage medium
CN101876998B (en) Method and system for editing data
CN112764746B (en) Data processing method, device, electronic equipment and storage medium
US20050197157A1 (en) System enabling easy application development on mobile devices
WO2023169193A1 (en) Method and device for generating smart contract
CN112068879A (en) Method and device for constructing client application development framework based on configuration
CN111796851A (en) Client base library updating method and device, electronic equipment and storage medium
CN111966877A (en) Front-end service method, device, equipment and storage medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
JP7147123B2 (en) Source channel determination method, device, equipment, program and computer storage medium
CN112379885B (en) Applet compiling method, device, equipment and readable 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