Host program dynamic update method and terminal device

By dynamically starting plug-ins and components in the terminal device, dynamic updates and interface changes of the application are realized, which solves the problems of dynamic function addition and interface change in the existing technology, and improves the flexibility and resource utilization efficiency of the application.

CN112148331BActive Publication Date: 2024-08-30HISCENE INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011059962.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-30
Publication Date
2024-08-30
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

Existing technology makes it difficult to implement dynamic function additions and interface changes to applications without affecting the use of other functions, resulting in waste of resources and increased complexity.

Method used

By starting the host program in the terminal device, triggering the update process, and using plug-ins, components and pseudo-plug-ins to dynamically start, judge the correlation with the update process based on the task configuration, perform the update operation, and realize dynamic updates and interface modifications of the application.

Benefits of technology

It realizes the dynamic function addition and interface change of the application program, improves the flexibility of tool application, reduces the complexity of the host program, and avoids waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112148331B
    Figure CN112148331B
Patent Text Reader

Abstract

The present application discloses a method for dynamically updating a host program and a terminal device. The method comprises: S1, starting the host program in the terminal device, and the host program triggers a corresponding update process when executing a predetermined operation; S2, at least one tool to be started in the terminal device determines whether it is related to the update process according to its own task configuration, and if so, responds to the update process and performs an update operation. The host program of the present application does not need to manage the tools; each tool is dynamically started to provide the corresponding functions for the host program, but will not affect the use of other functions of the host program; preferably, the dynamically added functions can cause corresponding changes to the relevant interfaces of the host program, thereby improving the flexibility of tool application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application technology, and in particular to a method for dynamically updating a host program and a terminal device. Background Art

[0002] After the smartphone application is installed, it may be necessary to dynamically update the existing application, dynamically add or delete certain functions. However, due to the limitations of the operating system, it is difficult to achieve, or only some simple modifications can be achieved without any connection or interaction between the interfaces. The existing update of the application is to upgrade the version of the installed application, and the corresponding code will be replaced with the new code in the new version of the application. However, since the application involves a lot of functions, controls, resources, etc., if the application is upgraded only because of a small amount of code modification, it will lead to a waste of application version resources.

[0003] To solve this problem, the existing technology has proposed application dynamic update technologies such as H5 technology and hot fix.

[0004] H5 technology uses the web page loading of the application to directly load a web page, and the application and the web page communicate and interact with each other, making the user feel that it is a native application. H5 technology can dynamically modify the web page, thereby realizing the dynamic update of the application; but it can only modify the separate H5 page of the application that uses the web page technology, and cannot modify other non-web pages of the application.

[0005] Hot fix technology is mainly used to fix a vulnerability (bug) in an application. Using hot fix technology avoids the cost of reinstalling the application to fix a bug; however, it can only fix bugs and cannot dynamically add pages or complex functions, that is, it cannot achieve dynamic updates of larger application functions.

[0006] How to implement dynamic addition of functions without affecting the use of other functions of the application; preferably, the dynamically added functions can also cause corresponding changes to the relevant interfaces of the application, which is a technical problem that needs to be solved for dynamic update of the application. Summary of the invention

[0007] The purpose of this application is to provide a dynamic update method and terminal device for a host program to address the problems existing in the prior art, which can realize dynamic update of an application without affecting the use of other functions of the application. Preferably, the dynamic update function can also cause corresponding changes to the relevant interfaces of the application.

[0008] To achieve the above-mentioned purpose, the present application provides a method for dynamically updating a host program, which includes the following steps: S1. Starting the host program in the terminal device, and the host program triggers a corresponding update process when executing a predetermined operation; S2. At least one tool to be started in the terminal device determines whether it is related to the update process based on its own task configuration, and if so, responds to the update process and performs an update operation.

[0009] To achieve the above-mentioned purpose, the present application also provides a terminal device for realizing dynamic update of a host program, wherein the terminal device comprises: a host program, which is used to trigger a corresponding update process when executing a predetermined operation; and at least one tool to be started, which is used to determine whether it is related to the update process based on its own task configuration, and if so, respond to the update process and perform an update operation.

[0010] To achieve the above objectives, the present application also provides a computer-readable medium, which stores computer-executable instructions. When the computer-executable instructions are executed, the method described in the present application is executed.

[0011] The advantages of the present application are that the various tools of the present application are dynamically started to provide corresponding functions for the host program, and the host program does not need to manage the tools; preferably, the dynamically added functions can cause corresponding changes to the relevant interfaces of the host program, but will not affect the use of other functions of the host program, thereby improving the flexibility of tool application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0013] Figure 1 The architecture flow chart of the dynamic update method of the host program of this application;

[0014] Figure 2 This is a communication method architecture diagram shown in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a tool modification host program interface shown in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of a tool modification host program interface shown in another embodiment of the present application;

[0017] Figure 5A schematic diagram of the architecture of a terminal device for applying to implement dynamic update of a host program. DETAILED DESCRIPTION

[0018] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0019] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a mechanical connection, an electrical connection or mutual communication; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0020] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the specific features, structures or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0021] The present application provides a method for dynamically updating a host program. After the host program in a terminal device is started, the host program triggers a corresponding update process when executing a predetermined operation; at least one tool to be started in the terminal device determines whether it is related to the update process according to its own task configuration, and if it is related, it responds to the update process and executes the update operation. Wherein, the tool includes: at least one of a plug-in, a component, and a pseudo-plug-in. In some embodiments, only the host program is running at the beginning of the entire application, and each tool is dynamically started and run; in some embodiments, if the tool is a plug-in, the host program needs to load the plug-in before the plug-in starts running. The host program does not need to know which tools are installed in the terminal device, nor does it directly manage these tools. The host program only needs to trigger the corresponding update process according to the operation performed by itself (for example, entering a predetermined interface, or the user performs certain predetermined operations on the host program, or executes a predetermined event, etc.). The tool and the host program adopt a self-organizing form, and the tool chooses whether to take corresponding actions according to the update process to execute the update operation, thereby reducing the complexity of the host program.

[0022] See also Figure 1 , the architecture flow chart of the dynamic update method of the host program of the present application. The dynamic update method of the host program comprises the following steps: S1, starting the host program in the terminal device, and the host program triggers the corresponding update process when executing a predetermined operation; S2, at least one tool to be started in the terminal device determines whether it is related to the update process according to its own task configuration, and if so, responds to the update process and executes the update operation. The following is a detailed description.

[0023] Regarding step S1, starting the host program in the terminal device, the host program triggers a corresponding update process when executing a predetermined operation.

[0024] In some embodiments, the main program running the application is called the host program. When the tool is not started, the host program can run alone. In some embodiments, only the host program of the entire application is running at the beginning, and each tool is started and run dynamically; in some embodiments, if the tool is a plug-in, the host program needs to load the plug-in before the plug-in starts running. The host program does not perceive the existence of these tools, nor does it manage these tools. When the host program executes a predetermined operation, the corresponding update process is triggered. The predetermined operation can be, reaching a predetermined system time (for example, reaching 9 o'clock system time, etc.), or the terminal device receiving certain predetermined interactive operations (for example, the camera is turned on, the call is ended, etc.), or entering a predetermined interface (for example, entering the contact interface, entering the call interface, etc.), or other predetermined events. The predetermined operation here is only an example and is not limited.

[0025] In a further embodiment, the host program may trigger the corresponding update process in any of the following ways: 1) sending an event broadcast related to the predetermined operation; 2) changing the information of the predetermined data area; 3) sending an event callback message for notification. Specifically, the event broadcast may be a global event broadcast or a local event broadcast. The global event broadcast refers to a broadcast that can be received by all applications (including all tools) of the terminal device; the local event broadcast refers to a broadcast that can be received by the host program and the tools in the host program (including some tools, such as plug-ins and components). Specifically, the event callback is pre-registered in the host program by the corresponding tool.

[0026] Regarding step S2, at least one tool to be started in the terminal device determines whether it is related to the update process based on its own task configuration, and if so, responds to the update process and performs an update operation.

[0027] After the tool is installed in the terminal device, when the host program is running, after the corresponding update process is triggered, if the corresponding tool detects the update process and determines that it is related to the update process based on its own tasks, it will respond to the update process and perform the update operation. That is, the host program does not directly manage the tool, and the tool and the host program adopt a self-organizing form. The tool itself chooses whether to take corresponding actions according to the update process to perform the update operation, thereby reducing the complexity of the host program. The host program does not need to know which tools have been installed in the terminal device, and the host program does not need to care about the interaction between the tools, thereby further reducing the complexity of the host program.

[0028] In a further embodiment, according to the implementation method of triggering the corresponding update process by the host program, at least one tool to be started in the terminal device determines whether it is related to the update process based on its own task configuration; and when it is related to the update process, it responds to the update process and performs corresponding operations.

[0029] Specifically, when the host program executes a predetermined operation, it sends an event broadcast related to the predetermined operation; the tool listens to the event broadcast, and when it determines that it is related to the event corresponding to the event broadcast, it responds to the update process. That is, the host program sends relevant event broadcast messages, and the tool listens to these messages and takes corresponding actions. Further, the event broadcast can be a global event broadcast or a local event broadcast. In some embodiments, when the host program sends a relevant global event broadcast, all applications (including all tools) of the terminal device can receive the broadcast; in other embodiments, when the host program sends a relevant local event broadcast, the host program and the tools in the host program (including some tools, such as plug-ins and components) can receive the broadcast.

[0030] Specifically, when the host program is performing a predetermined operation, the information of the predetermined data area is changed; the tool detects the change of the information of the predetermined data area, and responds to the update process when it is determined that the tool is related to the change. That is, the host program can change the information of the data area that the tool can access (for example, change some memory information, change the information of the secure digital card (SD card), etc.); the tool can detect whether the information of the data area has changed by itself; for example, the tool detects the change of data in the data area at a predetermined time interval, and thus takes corresponding actions. In other embodiments, when the host program is performing a predetermined operation, the predetermined information of the predetermined data area is changed; the tool detects the change of the predetermined information of the predetermined data area, and responds to the update process when it is determined that the tool is related to the change. That is, the host program can change the predetermined information of the data area that the tool can access (for example, change some predetermined memory information, change the predetermined information of the secure digital card (SD card), etc.); the tool can detect whether the predetermined information of the data area has changed by itself, for example, the tool detects the change of predetermined data in the data area at a predetermined time interval, and thus takes corresponding actions.

[0031] Specifically, when the host program is executing a predetermined operation, an event callback message is sent; when the tool detects the event callback message, it responds to the update process. The event callback is pre-registered in the host program by the corresponding tool. In some embodiments, the host provides an event interface, and the tool calls the event interface for registration. When an event occurs, the host calls the interface to notify all registered tools; the registered tools will receive information about the event after the event occurs, and take corresponding actions. That is, the tool pre-registers the event callback in the host program; when a corresponding event occurs in the host program, the corresponding tool is notified directly through the event callback pre-registered by the tool; the tool takes corresponding actions based on the event callback message.

[0032] In a further embodiment, the communication between the tools in the terminal device and / or between the tools and the host program includes a communication method based on an inter-process communication (IPC) mechanism. Specifically, the inter-process communication includes broadcasting, memory sharing, Android Interface Definition Language (AIDL), bus, etc. AIDL can be used to allow a service to communicate with multiple applications across processes, so that multiple applications can share the same service; for example, AIDL can be used to allow a plug-in to communicate with multiple host programs across processes. In some embodiments, the underlying inter-process communication mechanism is implemented using a shared memory method, which is conducive to large-scale and high-frequency communication between processes. Specifically, using inter-process communication, the data receiving end and the sending end are connected; when starting to send, the data sending end notifies the receiving end of the maximum size of the message body, and the receiving end is ready to receive; notifies the receiving end of the location of the shared memory; the data sending end sends data, first writes the data into the shared memory, and then tells the data receiving end to read the data from the shared memory.

[0033] In a further embodiment, the tool described in the present application includes: at least one of a plug-in, a component and a pseudo-plug-in. Among them, the plug-in is a program written in accordance with a certain specification of the application program interface; it can realize on-demand loading and dynamic updating of functional modules, and its essence is to dynamically load an uninstalled installation package (apk). The pseudo-plug-in is a program that can be loaded on demand and run as a separate process; it cannot be inserted into the host program as a plug-in, and the installation process requires the APP installation interface to pop up, but like the plug-in, it can be loaded on demand and the user is not aware of it. The component is a software entity in the software system that has relatively independent functions, interfaces specified by contracts, has obvious dependencies with the context, can be independently deployed, and can be assembled.

[0034] Specifically, the plug-in and pseudo-plug-in can be downloaded independently on demand, installed independently, uninstalled independently, displayed independently, etc.; and the installation package of the plug-in can be stored in the cloud or in the host program (that is, the host apk and the plug-in apk are packaged into one apk). The component is packaged into the corresponding host program and depends on the host program (that is, the host program and the component program are packaged into one apk); that is, the component is integrated with the host program, downloaded following the download of the host program, and installed following the installation of the host program. In some embodiments, plug-ins communicate with each other, and / or pseudo-plug-ins communicate with pseudo-plug-ins through inter-process communication. In some embodiments, plug-ins communicate with host programs, and / or plug-ins communicate with components, and / or plug-ins communicate with pseudo-plug-ins through inter-process communication. In some embodiments, pseudo-plug-ins communicate with host programs, and / or pseudo-plug-ins communicate with components, and / or pseudo-plug-ins communicate with plug-ins through inter-process communication, and so on. In other embodiments, the underlying inter-process communication mechanism is implemented using a shared memory method.

[0035] See also Figure 2 , a communication method architecture diagram shown in an embodiment of the present application. Figure 2 As shown, the communication method between the tools in the terminal device and between the tools and the host program includes a communication method based on the IPC mechanism.

[0036] Specifically, in some embodiments, the host program 21 and each plug-in 22 can communicate with each other using a system routing in the form of a bus bridge (BridgeBUS) 29; wherein the bus bridge 29 is encapsulated based on IPC. The host program 21 sends a notification when executing a predetermined operation, and each plug-in 22 uses the bus bridge 29 to receive the notification and choose whether to take corresponding actions according to the notification; the host program 21 does not need to know which plug-ins have been installed in the terminal device, which reduces the complexity of the host program.

[0037] In one embodiment, when the host program enters the call interface, a voice change plug-in will start a voice change function. If the voice change plug-in has been installed, the voice change plug-in will be loaded after the host program enters the call interface, and the voice change plug-in will start to add its own voice change function button to the call interface; at this time, the call interface will automatically add the voice change function button. If the voice change plug-in is not installed, there will be no voice change button on the call interface. In another embodiment, when the host program enters the contact interface, a drone plug-in will insert a drone identification button on the contact interface. If the drone plug-in has been installed, the drone plug-in will be loaded after the host program enters the contact interface, and the drone plug-in will start to add its own drone identification button to the contact interface; at this time, the contact interface will automatically add the drone identification button. If the drone plug-in is not installed, there will be no drone identification button on the contact interface.

[0038] In the present embodiment, each plug-in 22 uses an IPC mechanism to achieve communication. It should be noted that each plug-in 22 can also use a bus bridge 29 or a newly built bus to achieve communication. In some embodiments, a self-organizing architecture is also adopted between the plug-ins, and the communication between the plug-ins is independent of the host program, which reduces the complexity of the host program. In some embodiments, a general function can be used as a plug-in alone, for example, a general algorithm function can be used as an algorithm plug-in alone, and other plug-ins call the algorithm plug-in to obtain the algorithm result. In this way, the algorithm does not need to be exposed, which is beneficial to system security. In other embodiments, an information acquisition plug-in has the function of acquiring information (for example, collecting video, audio, GPS, etc.), and other plug-ins need the information (video, audio, GPS, etc.), then the information acquisition plug-in can send information to the plug-in that needs information. In some embodiments, a bus bridge form can be used between the component 210 and the plug-in 22 to achieve communication based on the IPC mechanism.

[0039] In this embodiment, the pseudo-plug-in 24 and the plug-in 22, the pseudo-plug-in 24 and the host program 21, and the pseudo-plug-in 24 and the component 210 can also use the communication method based on the IPC mechanism 28 to achieve communication. In some embodiments, an IPC communication module can be set at one end of each of the pseudo-plug-in 24 and the plug-in 22 to provide a transmission channel (based on the IPC mechanism 28) between the pseudo-plug-in 24 and the plug-in 22, so as to ensure that the pseudo-plug-in 24 and the plug-in 22 can achieve communication based on the communication method of the IPC mechanism 28; an IPC communication module can also be set at one end of each of the pseudo-plug-in 24 and the host program 21 to provide a transmission channel (based on the IPC mechanism 28) between the pseudo-plug-in 24 and the host program 21, so as to ensure that the pseudo-plug-in 24 and the host program 21 can achieve communication based on the communication method of the IPC mechanism 28. The pseudo-plug-in 24 and the host program 21 are at the same level. For the system, the pseudo-plug-in 24 and the host program 21 are two applications. In some embodiments, the pseudo-plug-in 24 runs in the background of the host program 21 and directly provides data to the host program 21, the component 210 or other plug-ins 22; in other embodiments, the pseudo-plug-in 24 can modify the host interface, such as hiding the corresponding elements of the host interface, displaying the corresponding elements of the host interface, adding the corresponding elements of the host interface, and modifying the corresponding elements of the host interface. When the host program 21 performs a predetermined operation, it sends a notification to the outside, and the pseudo-plug-in 24 can respond to the execution. It should be noted that since the component 210 is packaged in the host program 21, the two are essentially an application; therefore, the communication between the host program 21 and the component 210, and between the components 210 is direct communication of the same process, rather than inter-process communication. It is worth noting that the communication method between the above-mentioned plug-in 22, pseudo-plug-in 24, component 210 and host program 21 is only an example, and the entire system can adopt one or more communication methods, which are not limited here. For example, when the amount of data communicated between the plug-in 22 and the host program 21 is small, the two can communicate based on the bus bridge 29; when the amount of data communicated between the pseudo plug-in 24 and the host program 21 is large, the two can communicate based on the IPC mechanism 28, and the IPC mechanism 28 is implemented by a shared memory method at the bottom layer, which is not limited here. In some embodiments, the host program is only a container for tools (plug-ins and / or components) and does not need to manage the tools.

[0040] Please continue reading Figure 1, the execution of the update operation described in step S2 further includes: the tool modifies the host program interface, or the tool runs in the background of the host program. Wherein, the host program interface includes the host interface of the host program. In some embodiments, the host program can overlay a layer container on the host interface, and the host program interface includes the host interface and the layer container. In other embodiments, the host interface does not overlay a layer container, and the host program interface is the host interface.

[0041] In some embodiments, the tool modifies the host program interface, which may be that when the layer corresponding to the tool is added to the host program interface, if the original display elements on the host interface and the layer corresponding to the tool produce an occlusion problem, the host interface or the layer corresponding to the tool is modified to eliminate the occlusion problem. Among them, the layer corresponding to the tool may be all the display elements of the layer corresponding to the tool itself, or it may be a part of the display elements (such as buttons, icons, etc.) of the layer corresponding to the tool itself, which is not limited here. Specifically, when the layer corresponding to the tool is added to the host program interface, the original display elements (such as buttons, icons, etc.) on the host interface may block the layer corresponding to the tool, or the layer corresponding to the tool may block the original display elements on the host interface. If the layer corresponding to the tool is selected to be displayed first, the original display elements of the host interface can be modified, such as hiding the corresponding display elements, or modifying the position or size of the corresponding display elements, so that it does not block the layer corresponding to the tool. If the host interface is selected to be displayed first, the layer corresponding to the tool can be modified, such as adjusting the size or position of the layer corresponding to the tool, so that it does not block the host interface.

[0042] In some embodiments, the tool modifying the host program interface may be that the tool directly modifies the host program interface without the host program providing host program interface modification permissions; or the host program interface modification permissions are open; or the host program first provides modification permissions, and then the tool can modify the host program interface. In some embodiments, the tool modifying the host program interface further includes: the tool modifying an interface configuration file of the host program interface; the host program reads the modified interface configuration file and dynamically modifies the host program interface; or, the tool directly modifies the host program interface.

[0043] Specifically, the tool can modify the host program interface; the tool can also run in the background of the host program without modifying the host program interface. In some embodiments, a GPS plug-in does not need to modify the host interface, but only needs to provide the host program with a GPS positioning function; therefore, when the GPS plug-in responds to the corresponding update process of the host program, it only needs to run in the background of the host program to provide the host program with a GPS positioning function, and does not modify the host interface.

[0044] In a further embodiment, the host program interface includes a host interface; the step of the tool modifying the host program interface further includes: the host program provides host interface modification permissions for the tool (plug-in and / or component and / or pseudo-plug-in) to dynamically modify the host interface. Wherein, the host program providing host interface modification permissions can be implemented in the following ways: 1) the tool sends an interface modification message to the host program, and the host program responds to the interface modification message and opens the host interface modification permissions; or 2) the host program directly opens the host interface modification permissions. In some embodiments, the tool dynamically modifies the host interface further includes: the tool modifies the interface configuration file of the host program according to the interface modification permissions; the host program reads the modified interface configuration file and dynamically modifies the host interface; or alternatively, the tool directly modifies the host interface of the host program according to the interface modification permissions.

[0045] Specifically, the host interface modification authority includes any of the following: hiding the corresponding elements of the host interface, displaying the corresponding elements of the host interface, adding the corresponding elements of the host interface, and modifying the corresponding elements of the host interface. Among them, modifying the corresponding elements of the host interface may include modifying the position of the corresponding elements of the host interface, or modifying the content, size, etc. of the corresponding elements of the host interface. Among them, at least one of the plug-in, component, and pseudo-plug-in can modify the host interface. In some embodiments, the tool (plug-in and / or component and / or pseudo-plug-in) can add the corresponding elements of the host interface, such as when the predetermined system time is reached, the corresponding tool adds a display element such as an alarm icon to the current host interface. In some embodiments, when the layer corresponding to the plug-in or component is added to the layer container superimposed on the host interface, or when the tool (plug-in and / or component and / or pseudo-plug-in) adds a display element to the host interface, the original display elements (for example, buttons, icons, etc.) on the host interface may block the corresponding layer or the newly added display element. If the corresponding layer or the newly added display element is displayed first, the original display element of the host interface needs to be modified, such as hiding the corresponding display element, or modifying the position or size of the corresponding display element, so that it does not block the corresponding layer or the newly added display element. In other embodiments, when there is no blocking problem, or the priority is changed (the original display element of the host interface is displayed first), the original display element of the host interface is redisplayed, and so on.

[0046] In a further embodiment, the tool includes: at least one of a plug-in and a component, and the host program interface includes at least one layer container superimposed on the host interface; the step of the tool modifying the host program interface also includes: the tool (plug-in and / or component) adds the layer corresponding to itself to the layer container, or deletes the layer corresponding to itself from the layer container. Among them, the layer corresponding to the tool itself can be all display elements of the layer corresponding to the tool itself, or it can be part of the display elements of the layer corresponding to the tool itself, such as buttons, icons, etc., which are not limited here. In some embodiments, the tool modifies the layer container in the host program interface, which can be that the tool directly modifies the layer container without the host program providing the layer container modification permission; or the layer container modification permission is open; or the host program first provides the layer container modification permission, and then the tool can modify the layer container.

[0047] In some embodiments, the layer container is superimposed on the upper layer (the side facing the user) or the lower layer (the side facing away from the user) of the host interface; or, there are two layer containers, which are superimposed on the upper layer and the lower layer of the host interface respectively. Preferably, the layer container is a transparent interface. In some embodiments, when the layer container of the upper layer and the layer container of the lower layer of the host interface are added with corresponding layers by the tool (plug-in and / or component), the display elements in the host interface, the upper layer container, and the lower layer container can all be displayed, so that the user looks like a display interface. In some embodiments, when the tool (plug-in and / or component) needs to display its own elements, its own layer can be dynamically added to the layer container provided by the host program; by displaying the host interface and the layer container at the same time, the host program interface is changed. For the user, the newly added layer is like the interface of the host program itself. In other embodiments, when the tool (plug-in and / or component) is uninstalled, its own layer can be deleted from the layer container provided by the host program, so that the host program interface is changed.

[0048] Furthermore, it can also be dynamically added to the upper layer container or the lower layer container according to the functional requirements of the tool (plug-in and / or component). For example, when a plug-in or component has more layer interactions or needs to respond first, it can be added to the upper layer container first; when another plug-in or component has fewer interactions, or no interactions, or does not need to respond first, it can be added to the lower layer container. When the user interacts with the host program, the interaction can penetrate all layers, first reaching the upper layer container, then reaching the host interface, and finally reaching the lower layer container.

[0049] In some embodiments, when the layer corresponding to the tool is added to the host program interface, for example, when the layer corresponding to the plug-in or component is added to the layer container superimposed on the host interface, or when the tool (plug-in and / or component and / or pseudo-plug-in) adds a display element to the host interface (such as the layer corresponding to the tool is added to the host interface), the original display element on the host interface and the corresponding layer may be blocked. The host interface or the corresponding layer can be modified to eliminate the blocking problem. Specifically, when the layer corresponding to the plug-in or component (for example, a button, an icon, etc.) is added to the layer container superimposed on the host interface, the original display element on the host interface (for example, a button, an icon, etc.) may block the corresponding layer or be blocked by the corresponding layer; or, when the tool (plug-in and / or component and / or pseudo-plug-in) adds a display element to the host interface, the newly added display element may block the original display element on the host interface or be blocked by the original display element on the host interface. If you choose to display the corresponding layer or the newly added display element first, you can modify the original display element of the host interface; for example, hide the corresponding display element, or modify the position or size of the corresponding display element, so that it does not block the corresponding layer or the newly added display element. If you choose to display the host interface first, you can modify the corresponding layer or the newly added display element; for example, based on the prior knowledge of the host interface, adjust the size or position of the corresponding layer or the newly added display element so that it does not block the host interface. For example, when the host program enters the contact interface, a tool (such as a drone plug-in) is loaded into the host program and started. The drone plug-in wants to insert its corresponding layer (such as a drone icon) into the layer container superimposed on the contact interface to display the newly added drone icon in the contact interface corresponding to the host program; if the size of the drone icon is too large, the drone icon is not allowed to be directly inserted into the layer container (it will block the contact information); at this time, the corresponding layer container is inserted only after the size of the drone icon is modified.

[0050] Please also read Figure 3-Figure 4 ,in, Figure 3 This is a schematic diagram of a tool modifying a host program interface shown in an embodiment of the present application. Figure 4 This is a schematic diagram of a tool modifying a host program interface as shown in another embodiment of the present application.

[0051] like Figure 3As shown, when the host program (e.g., a real-time communication collaboration program) enters the contact interface 31, a drone plug-in will insert a drone identification button 32 into the contact interface 31. If the drone plug-in has been installed, the drone plug-in will be loaded and started after the host program enters the contact interface 31. In some embodiments, the drone plug-in will add its own drone identification button 32 to the contact interface 31; at this time, the contact interface 31 will automatically add the drone identification button 32. In other embodiments, the host program will overlay a transparent layer on the contact interface 31; the drone plug-in will add its own drone identification button 32 to the transparent layer overlaid by the contact interface 31; at this time, the user can see that the drone identification button 32 has been added to the contact interface 31. The host program is completely unaware of this drone identification button 32, and in the user's view, this drone identification button 32 seems to be a part of the host program. If the drone plug-in is not installed, there will be no drone identification button 32 on the contact interface 31.

[0052] In some embodiments, the drone plug-in adds the drone identification button 32 to the contact interface 31 (host program interface), and the user's interactive operations such as clicking and graying out the drone identification button 32 are all completed by the drone plug-in itself, independent of the host program, which greatly reduces the complexity of the host program. Other installed tools (plug-ins and / or components) can choose to add their own layers to the host program interface through IPC communication methods such as bus bridges according to their own task configurations; to dynamically add the corresponding functions of the tool, but it will not affect the use of other functions of the host program. And the dynamically added functions can make the relevant interfaces of the host program change accordingly, which improves the flexibility of tool application.

[0053] like Figure 4As shown, after the host program (such as a real-time communication collaboration program) receives an incoming call message and enters the call interface 41 (with the call icon indicated by the label 411); the installed drone plug-in and video acquisition plug-in monitor the incoming call message and start. The video acquisition plug-in will send the video data it has acquired to the host program, and then add the video image 42 to the call interface 41 and display it as the background. The drone plug-in will add its own control button 431 to the call interface 41; the control button 431 can be multiple to achieve different control operations. In this embodiment, the control button 431 is displayed on the side of the call interface 41 to form a side control bar; it should be noted that the control button 431 can also be displayed at other locations of the call interface 41, as long as it does not block the call icon 411 of the call interface 41. The drone plug-in can also calculate in real time based on the drone GPS, drone attitude and other information, so as to display at least one rendered AR marker 432 in the video image 42, such as real-time rendering of the name and introduction of a building in the video, and real-time rendering of the position of a duty officer (such as a police officer, security guard, etc.) in the video, and so on. That is, the current call interface 41 is formed by the combination of the host program + drone plug-in + video acquisition plug-in. It looks like a display interface to the user, but the host program does not need to manage the drone plug-in and the video acquisition plug-in, which reduces the complexity of the host program. Among them, each plug-in can also be used normally alone after being separated from the host program. The functions corresponding to the dynamically added drone plug-in and video acquisition plug-in can cause corresponding changes to the call interface of the host program, but will not affect the use of other functions of the host program (such as the call function), thereby improving the flexibility of the plug-in application. Other installed tools (plug-ins and / or components) can also choose to add their own layers to the call interface 41 according to their own task configuration to dynamically add the functions corresponding to the tools.

[0054] The dynamic update method of the host program described in the present application is that each tool is dynamically started to provide corresponding functions for the host program, and the host program does not need to manage the tools; the functions provided by the tools will not affect the use of other functions of the host program; preferably, the dynamically added functions can make the relevant interfaces of the host program change accordingly, thereby improving the flexibility of tool application.

[0055] Based on the same inventive concept, the present application also provides a terminal device for implementing dynamic update of a host program.

[0056] See also Figure 5, the present application implements a schematic diagram of the architecture of a terminal device for dynamically updating a host program. The terminal device 50 includes: a host program 51 and at least one tool 52 to be started. The host program 51 is used to trigger a corresponding update process when executing a predetermined operation; the tool 52 is used to determine whether it is related to the update process according to its own task configuration, and if so, respond to the update process and perform an update operation. For specific triggering of the update process, responding to the update process, and performing an update operation, please refer to the description of the dynamic update method of the host program mentioned above, which will not be repeated here.

[0057] In the terminal device of the present application, each tool is dynamically started to provide corresponding functions for the host program, and the host program does not need to manage the tools; the functions provided by the tools will not affect the use of other functions of the host program; preferably, the dynamically added functions can make corresponding changes to the relevant interfaces of the host program, thereby improving the flexibility of tool application.

[0058] Based on the same inventive concept, the present application also provides a computer-readable medium, which stores computer-executable instructions. When the computer-executable instructions are executed, the method described above in the present application is executed.

[0059] The methods described in the embodiments of the present application can be implemented using computer systems or architectures known to those skilled in the art. Computer systems, such as PDAs, smart phones, handheld computers, servers, clients, or any other type of dedicated or general-purpose computing devices, can be used because they are applicable or suitable for a specific application or environment. The computer system may include one or more processors, which may be implemented using a general or dedicated processing engine such as a microprocessor, microcontroller, or other control processing module.

[0060] The computer system may also include a main memory, such as a random access memory (RAM) or other dynamic memory, for storing information and instructions to be executed by the processor. Such a main memory may also be used to store temporary variables or other intermediate information during the execution of instructions to be executed by the processor. The computer system may also include a read only memory (ROM) or other static storage device for the processor to store static information and processor instructions.

[0061] The computer system may also include an information storage system, for example, which may include a media drive and a removable storage interface. The media drive may include a drive or other mechanism to support fixed or removable storage media, such as a hard disk drive, a floppy disk drive, a tape drive, an optical disk drive, a compact disc (CD), a digital video drive (DVD), a read or write drive (R or RW) or other removable or fixed media drive. For example, the storage medium may include, for example, a hard disk, a floppy disk, a tape, an optical disk, a CD or DVD or other fixed or removable media that is read and written by a media drive. The storage medium may include a computer-readable medium having specific computer software or data stored therein.

[0062] In an alternative embodiment, the information storage system may include other similar components for allowing computer executable instructions or other instructions or data to be loaded into the computer system. For example, these components may include removable storage units and interfaces, such as program cartridges and cartridge interfaces, removable memory (e.g., flash memory or other removable memory modules) and memory slots, and other removable storage units and interfaces that allow software and data to be transferred from the removable storage unit to the computer system.

[0063] The computer system may also include a communication interface. Such a communication interface may be used to allow software and data to be transmitted between the computer system and external devices. In this embodiment, the communication interface may include a modem, a network interface (e.g., an Ethernet or other NIC card), a communication port (e.g., a universal serial bus (USB) port), a PCMCIA slot and card, etc. The software and data transmitted through the communication interface are transmitted in the form of signals, which may be electronic, electromagnetic, optical or other signals that can be received by the communication interface medium.

[0064] As used herein, the terms "computer executable instructions", "computer readable medium", etc. may be generally used to refer to tangible media, such as memory, storage device, or storage unit. These and other forms of computer readable media may store one or more instructions for use by a processor including a computer system to cause the processor to perform specified operations. These instructions, commonly referred to as "computer program code" (which may be combined in the form of a computer program or other combination), when executed, cause the computer system to perform the functions of the embodiments of the present application. It is noted that the code may directly cause the processor to perform a specific operation, be compiled to do so, and / or be combined with other software, hardware, and / or firmware (e.g., a library that performs standard functions) to do so.

[0065] The non-transitory computer-readable medium may include at least one of the group consisting of a hard disk, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) and a flash memory.

[0066] In embodiments using software-implemented elements, the software may be stored in a computer-readable medium and loaded into a computer system using, for example, a removable storage drive. When executed by a processor in the computer system, the control module (in this example, software instructions or executable computer program code) causes the processor to perform the functions of the present application as described herein.

[0067] It will be appreciated that, for purposes of clarity, embodiments of the present application have been described above with reference to a single processing logic. However, the present application concept may also be implemented by a plurality of different functional units and processors to provide signal processing functionality. Therefore, references to specific functional units are only considered as references to suitable means for providing the described functionality, rather than indicating a strict logical or physical structure or organization.

[0068] Aspects of the present application can be implemented in any suitable form including hardware, software, firmware and any combination thereof. Optionally, the present application can be implemented at least in part as computer software running on one or more data processors and / or digital signal processors or configurable module components such as FPGA devices. Therefore, the elements and components of the embodiments of the present application can be implemented physically, functionally and logically in any suitable manner. In fact, the function can be implemented in a single unit, multiple units or as a part of other functional units.

[0069] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for dynamically updating a host program, characterized in that: The method comprises the following steps: S1, starting a host program in a terminal device, wherein the host program triggers a corresponding update process when executing a predetermined operation; S2, at least one tool to be started in the terminal device determines whether it is related to the update process according to its own task configuration, and if so, responds to the update process and performs an update operation, wherein the performing of the update operation further includes: the tool modifies the host program interface; Wherein, the host program interface includes a host interface; the step of modifying the host program interface by the tool further includes: the tool adjusting corresponding elements on the host interface; And / or, the host program interface further includes at least one layer container superimposed on the host interface, and the step of the tool modifying the host program interface further includes: the tool adding a layer corresponding to itself to the layer container, or deleting a layer corresponding to itself from the layer container; The tool includes: at least one of a plug-in, a component, and a pseudo plug-in; The host program triggers the corresponding update process when executing the predetermined operation by any of the following methods: Sending an event broadcast related to the predetermined operation; Change the information in the reserved data area; or Send an event callback message.

2. The method according to claim 1, characterized in that When the host program triggers a corresponding update process when executing a predetermined operation, the update process is triggered by sending an event broadcast related to the predetermined operation. Step S2 further includes: the tool listening to the event broadcast, and responding to the update process when determining that the tool is related to the event corresponding to the event broadcast.

3. The method according to claim 2, characterized in that The event broadcast is a global event broadcast or a local event broadcast.

4. The method according to claim 1, characterized in that When the host program triggers a corresponding update process when executing a predetermined operation, including by changing information in a predetermined data area, Step S2 further comprises: the tool detecting a change in the information of the predetermined data area and responding to the update process when determining that the tool is associated with the change.

5. The method according to claim 1, characterized in that When the host program triggers a corresponding update process when executing a predetermined operation, including by sending an event callback message, The event callback is pre-registered in the host program by a corresponding tool; Step S2 further includes: when the tool detects the event callback message, responding to the update process.

6. The method according to claim 1, characterized in that The communication method between the tools in the terminal device and / or between the tools and the host program includes a communication method based on an inter-process communication mechanism.

7. The method according to claim 1, characterized in that The tool includes: at least one of a plug-in, a component and a pseudo plug-in.

8. The method according to claim 1, characterized in that Step S2 further includes: the tool runs in the background of the host program.

9. The method according to claim 1, characterized in that: The host program interface includes a host interface; the step of the tool modifying the host program interface further includes: the host program provides a host interface modification authority for the tool to dynamically modify the host interface.

10. The method according to claim 9, characterized in that The step of providing the host program with host interface modification permissions further includes: The tool sends an interface modification message to the host program, and the host program responds to the interface modification message and opens the host interface modification permission; or The host program directly opens the host interface modification authority.

11. The method according to claim 9, characterized in that The host interface modification authority includes any of the following: hiding corresponding elements of the host interface, displaying corresponding elements of the host interface, adding corresponding elements of the host interface, and modifying corresponding elements of the host interface.

12. A terminal device for implementing dynamic update of a host program, characterized in that: The terminal device comprises: A host program, used to trigger a corresponding update process when executing a predetermined operation; At least one tool to be started, the tool is used to determine whether it is related to the update process according to its own task configuration, and if so, respond to the update process and perform an update operation, wherein the performing of the update operation further includes: the tool modifying the host program interface; Wherein, the host program interface includes a host interface; the step of modifying the host program interface by the tool further includes: the tool adjusting corresponding elements on the host interface; And / or, the host program interface further includes at least one layer container superimposed on the host interface, and the step of the tool modifying the host program interface further includes: the tool adding a layer corresponding to itself to the layer container, or deleting a layer corresponding to itself from the layer container; The tool includes: at least one of a plug-in, a component, and a pseudo plug-in; The host program triggers the corresponding update process when executing the predetermined operation by any of the following methods: Sending an event broadcast related to the predetermined operation; Change the information in the reserved data area; or Send an event callback message.

13. A computer readable medium, characterized in that The computer-readable medium stores computer-executable instructions, and when the computer-executable instructions are executed, the method according to any one of claims 1 to 11 is executed.

Citation Information

Patent Citations

  • Management of data of settings in an operating system of a computer entity

    US20080086719A1