Application function updating method and device, equipment, storage medium and program product

By obtaining and applying update programs in the target application to independently update functions, the problem of low function update efficiency in the existing technology is solved, and more efficient application function updates are achieved.

CN119440596APending Publication Date: 2025-02-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310940675.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the function update of the application usually requires the full update of all functions of the application, resulting in low efficiency of function update.

Method used

By running a target application with native and derived functions, an update program corresponding to the target function that meets the version update conditions, and independently update the target function in the target application based on the update program.

Benefits of technology

It has achieved the improvement of the application's functional update efficiency, and can be targeted and independently updated native programs or derivative programs, improving the update efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440596A_ABST
    Figure CN119440596A_ABST
Patent Text Reader

Abstract

The invention provides an application function updating method and device, equipment, a storage medium and a program product. The method comprises the steps that a target application with a native function and a derivative function is run, the native function is achieved through a native program of the target application, and the derivative function is achieved through a corresponding derivative program in the target application; in the process of running the target application, when a target function in the target application meets a version updating condition, obtaining an updating program corresponding to the target function; wherein the target function is one of a native function and a derivative function, and the update program is one of an update program corresponding to a native program and an update program corresponding to a derivative program; and on the basis of the updating program, independently performing function updating on the target function in the target application. Through the application, the function updating efficiency of the application can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment, storage medium and program product for updating application functions. Background Art

[0002] With the rapid development of mobile Internet and the continuous improvement of mobile terminal intelligent technology, a large number of applications are downloaded and installed by mobile terminals, which greatly enriches people's mobile life. In order to continuously improve the various functions in the application, it is often necessary to update the functions and upgrade the versions of various functions.

[0003] In the related art, since the application program is run in the form of a program package, the application program can realize various functions of the application. For the function update of the application, usually only the program package can be updated as a whole. This results in that in order to update a certain function of the application, all functions of the application have to be fully updated, which results in low efficiency of the function update of the application. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for updating application functions, which can effectively improve the efficiency of updating application functions.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application embodiment provides a method for updating application functions, including:

[0007] Running a target application having native functions and derived functions, wherein the native functions are implemented by native programs of the target application, and the derived functions are implemented by corresponding derived programs of the target application;

[0008] During the running of the target application, when a target function in the target application meets a version update condition, obtaining an update program corresponding to the target function;

[0009] The target function is one of the native function and the derived function, and the update program is one of the update program corresponding to the native program and the update program corresponding to the derived program;

[0010] Based on the update program, the target function in the target application is independently updated.

[0011] The present application embodiment provides a function update device for an application, including:

[0012] A running module, used to run a target application having native functions and derived functions, wherein the native functions are implemented by native programs of the target application, and the derived functions are implemented by corresponding derived programs of the target application;

[0013] an acquisition module, configured to acquire, during the process of running the target application, an update program corresponding to the target function when the target function in the target application meets a version update condition; wherein the target function is one of the native function and the derived function, and the update program is one of the update program corresponding to the native program and the update program corresponding to the derived program;

[0014] An update module is used to independently update the target function in the target application based on the update program.

[0015] In the above scheme, the function update device of the above application also includes: an access module, which is used to obtain a native program for realizing the native function, and based on the native program, run a native application with the native function; in the process of running the native application, in response to a creation instruction for the derivative function, obtain a derivative program corresponding to the derivative function, and determine a target access method for the derivative program to access the native application; according to the target access method, access the derivative program in the native application to obtain a target application with the native function and the derivative function.

[0016] In the above scheme, the above access module is also used to obtain auxiliary information of the derivative function, and the auxiliary information is used to indicate whether the derivative function of the target application is a native function of other applications; when the auxiliary information indicates that the derivative function is a native function of the other application, the target access method is determined as the first access method; when the auxiliary information indicates that the derivative function is not a native function of the other application, the target access method is determined as the second access method; wherein the access cost of the second access method is greater than the access cost of the first access method.

[0017] In the above scheme, the above-mentioned access module is also used to create a derivative process in the native application for accessing the derived program, and access the derived program through the derivative process to obtain the target application; the above-mentioned running module is also used to call the native process of the target application, run the native program to implement the native function of the target application, and call the derivative process of the target application, run the derivative program to implement the derivative function of the target application.

[0018] In the above scheme, the above-mentioned access module is also used to adapt the derivative program corresponding to the derivative function to obtain the target derivative program, and the target derivative program can adapt to the native process of the native application; access the target derivative program through the native process of the native application to obtain the target application; the above-mentioned running module is also used to call the native process of the target application, run the native program and the target derivative program, so as to realize the native function and the derivative function of the target application.

[0019] In the above scheme, the function update device of the above application also includes: a determination module, which is used to obtain the program version corresponding to the native program in the currently running target application, and the program version corresponding to the derived program in the currently running target application; when the running time of the target application reaches a first duration threshold, obtain the latest program version corresponding to the native program; based on the latest program version corresponding to the native program and the program version corresponding to the native program, determine the native function information of the native function, and the native function information is used to indicate whether the native function is a target function that meets the version update condition; when the running time of the target application reaches a second duration threshold, obtain the latest program version corresponding to the derived program, and the first duration threshold is less than the second duration threshold; based on the latest program version corresponding to the derived program and the program version corresponding to the derived program, determine the derived function information of the derived function, and the derived function information is used to indicate whether the derived function is a target function that meets the version update condition.

[0020] In the above scheme, the above determination module is also used to determine the native function information as the first function information when the program version corresponding to the native program is the latest program version corresponding to the native program, and the first function information is used to indicate that the native function is not the target function that meets the version update condition; when the program version corresponding to the native program is not the latest program version corresponding to the native program, determine the native function information as the second function information, and the second function information is used to indicate that the native function is the target function that meets the version update condition.

[0021] In the above scheme, the above determination module is also used to determine the native function information as second function information when the program version corresponding to the native program is not the latest program version corresponding to the native program and an update instruction for the native function is received. The second function information is used to indicate that the native function is a target function that meets the version update condition.

[0022] In the above scheme, the above determination module is also used to determine the derived function information as third function information when the program version corresponding to the derived program is the latest program version corresponding to the derived program, and the third function information is used to indicate that the derived function is not a target function that meets the version update condition; when the program version corresponding to the derived program is not the latest program version corresponding to the derived program and an update instruction for the derived function is received, determine the derived function information as fourth function information, and the fourth function information is used to indicate that the derived function is a target function that meets the version update condition.

[0023] In the above scheme, the above determination module is also used to respond to an update instruction for the native function, obtain the latest program version corresponding to the native program, and the program version corresponding to the native program in the currently running target application; when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function is determined as the target function that meets the version update condition.

[0024] In the above scheme, the above determination module is also used to respond to an update instruction for the derivative function, obtain the latest program version corresponding to the derivative program, and the program version corresponding to the derivative program in the currently running target application; when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, the derivative function is determined as a target function that meets the version update condition.

[0025] In the above scheme, the above update module is also used to, when the target function is the native function, replace the native program connected to the target application with the update program corresponding to the native program, so as to obtain the target application after the native function is independently updated; when the target function is the derivative function, replace the derivative program connected to the target application with the update program corresponding to the derivative program, so as to obtain the target application after the derivative function is independently updated.

[0026] An embodiment of the present application provides an electronic device, including:

[0027] A memory for storing computer executable instructions or computer programs;

[0028] The processor is used to implement the function update method of the application provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.

[0029] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute and implement a function update method for an application provided by an embodiment of the present application.

[0030] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the function update method of the application described in the embodiment of the present application.

[0031] The embodiments of the present application have the following beneficial effects:

[0032] By running a target application with native functions and derivative functions, when the target function in the target application meets the version update condition, the update program corresponding to the target function is obtained, and the target function in the target application is independently updated based on the update program. In this way, by independently updating the target function in the target application based on the update program corresponding to the obtained target function during the running of the target application, the native program or derivative program is independently updated in a targeted manner, effectively improving the function update efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the architecture of the function update system of the application provided in the embodiment of the present application;

[0034] Figure 2 is a structural diagram of an electronic device for updating application functions provided in an embodiment of the present application;

[0035] Figures 3 to 13 It is a flowchart of a function update method of an application provided in an embodiment of the present application;

[0036] Figure 14 to Figure 15 It is a schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application;

[0037] Fig.16 It is a flowchart of a function update method of an application provided in an embodiment of the present application;

[0038] Figures 17 to 19 It is a schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application;

[0039] Fig. 20 It is a flowchart of the function update method of the application provided in the embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0041] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0042] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0045] 1) Front-end development framework (Electron): It is a cross-platform desktop application framework built using JavaScript, HTML and CSS. Electron is compatible with Mac, Windows and Linux, and can build applications for the three platforms.

[0046] 2) Code: Code is a source file written by programmers in a language supported by development tools. It is a set of clear rules that use characters, symbols or signal code elements to represent information in discrete form. The principles of code design include unique certainty, standardization and universality, extensibility and stability, ease of identification and memory, short and uniform format, and easy modification. Source code is a branch of code. In a sense, source code is equivalent to code. In modern programming languages, source code can appear in the form of books or tapes, but the most commonly used format is text files. The purpose of this typical format is to compile computer programs. The ultimate goal of computer source code is to translate human-readable text into binary instructions that can be executed by computers. This process is called compilation, which is completed by a compiler.

[0047] 3) Hot update: dynamic update of the server during operation, including configuration update, process function update, etc.

[0048] 4) Cloud Storage: Cloud Storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions. At present, the storage method of the storage system is to create a logical volume. When creating a logical volume, a physical storage space is allocated to each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, the data is stored on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, IDentity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object. Therefore, when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object. The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0049] 5) Compilation: It can be the process of using a compiler to generate a target program from a source program written in a source language, or it can be the action of using a compiler to generate a target program. Compilation is to convert a high-level language into a binary language that can be recognized by a computer. Computers only recognize 1 and 0, and the compiler converts the language familiar to people into binary. The process of a compiler translating a source program into a target program is divided into five stages: lexical analysis, syntax analysis, semantic checking and intermediate code generation; code optimization; target code generation. It mainly performs lexical analysis and syntax analysis, also known as source program analysis. If any syntax errors are found during the analysis, prompt information will be given. Compiled language is a programming language implemented by a compiler. Unlike a literally translated language, it is not run by an interpreter sentence by sentence, but by a compiler, which first compiles the code into machine code and then runs it. In theory, any programming language can be compiled or literally translated. The difference between them is only related to the application of the program.

[0050] 6) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.

[0051] During the implementation of the embodiments of the present application, the applicant discovered that the related technology has the following problems:

[0052] In the related art, since the application program is run in the form of a program package, the application program can realize various functions of the application. For the function update of the application, usually only the program package can be updated as a whole. This results in that in order to update a certain function of the application, all functions of the application have to be fully updated, which results in low efficiency of the function update of the application.

[0053] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for updating application functions, which can effectively improve the efficiency of updating application functions. The following describes an exemplary application of the application function update system provided by the embodiments of the present application.

[0054] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the application function update system 100 provided in an embodiment of the present application. The terminal (terminal 400 is shown as an example) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0055] The terminal 400 is used for the user to use the client 410, and the native functions and derived functions of the target application are displayed on the graphical interface 410-1 (the graphical interface 410-1 is shown as an example). The terminal 400 and the server 200 are connected to each other via a wired or wireless network.

[0056] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart TV, a smart watch, a car terminal, etc., but is not limited thereto. The electronic device provided in the embodiment of the present application may be implemented as a terminal or as a server. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application.

[0057] In some embodiments, the terminal 200 runs a target application having native functions and derivative functions. During the running of the target application, when the target function in the target application meets the version update condition, an update program corresponding to the target function is obtained, and based on the update program, the target function in the target application is independently updated.

[0058] In other embodiments, the terminal 200 runs a target application having native functions and derivative functions. During the process of running the target application, when the target function in the target application meets the version update condition, the server 200 obtains the update program corresponding to the target function and sends the update program to the terminal 200. Based on the update program, the terminal 200 independently updates the target function in the target application.

[0059] In other embodiments, the embodiments of the present application can be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing.

[0060] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.

[0061] See also Figure 2 , Figure 2 is a structural diagram of an electronic device 500 for updating application functions provided in an embodiment of the present application, wherein: Figure 2 The electronic device 500 shown may be Figure 1 The server 200 or the terminal 400 in Figure 2 The electronic device 500 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the electronic device 500 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0062] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0063] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0064] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0065] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0066] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0067] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB).

[0068] In some embodiments, the function update device of the application provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The function updating device 455 of the application stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: an operation module 4551, an acquisition module 4552, and an update module 4553. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0069] In other embodiments, the function update device of the application provided in the embodiments of the present application can be implemented in hardware. As an example, the function update device of the application provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the function update method of the application provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASIC, Application Specific Integrated Ci rcuit), DSP, programmable logic device (PLD, Programmable Logic Device), complex programmable logic device (CPLD, Complex Programmable Logic Device), field programmable gate array (FPGA, Field-Progra mmable Gate Array) or other electronic components.

[0070] In some embodiments, the terminal or server can implement the function update method of the application provided in the embodiment of the present application by running a computer program or a computer executable instruction. For example, the computer program can be a native program (e.g., a dedicated function update program) or a software module in the operating system, for example, a function update module that can be embedded in any program (such as an instant messaging client, an album program, an electronic map client, a navigation client); for example, it can be a native target application (APP, Application), that is, a program that needs to be installed in the operating system to run. In short, the above-mentioned computer program can be any form of target application, module or plug-in.

[0071] The function update method of the application provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server or terminal provided in the embodiment of the present application.

[0072] See also Figure 3 , Figure 3 is a flow chart of a function update method for an application provided in an embodiment of the present application, which will be combined with Figure 3 Steps 101 to 103 are shown for illustration. The function update method of the application provided in the embodiment of the present application can be implemented by a server or a terminal alone, or by a server and a terminal in collaboration. The following will be described using the server alone as an example.

[0073] In step 101 , a target application having native functions and derived functions is run.

[0074] In some embodiments, the native functions are implemented by native programs of the target application, and the derived functions are implemented by corresponding derived programs in the target application.

[0075] In some embodiments, native functions refer to original application functions in the target application, and derived functions refer to functions other than the original application functions in the target application. The type of the target application may be a web application, a mobile terminal application, etc. The target application can generally be divided into personal user applications and enterprise-level applications in terms of object orientation.

[0076] In some embodiments, see Figure 4 , Figure 4 It is a flowchart of the function update method of the application provided in the embodiment of the present application. Figure 3 Before step 101 shown, the Figure 4 From step 104 to step 107 shown, a target application is obtained.

[0077] In step 104, a native program for implementing the native function is obtained, and a native application with the native function is run based on the native program.

[0078] In some embodiments, a native program refers to an application used to implement native functions. An application refers to a computer program for completing one or more specific tasks. It runs in user mode, can interact with users, and has a visual user interface. The application is usually divided into two parts: a graphical user interface (GUI) and an engine.

[0079] In some embodiments, the above-mentioned running a native application with native functions based on a native program refers to compiling the native program through a running environment to run the native application with native functions.

[0080] In step 105 , during the running of the native application, in response to a creation instruction for a derivative function, a derivative program corresponding to the derivative function is obtained.

[0081] In some embodiments, during the running of a native application, a trigger control of a corresponding derivative function can be displayed in the display interface of the native page, and a creation instruction for the derivative function is generated in response to a trigger operation on the trigger control. In response to the creation instruction for the derivative function, a derivative program corresponding to the derivative function is obtained.

[0082] In step 106, a target access method for the derivative program to access the native application is determined.

[0083] In some embodiments, the target access method is used to indicate an access method for a derivative program to access a native application, and different types of derivative programs have different access methods for accessing a native application.

[0084] In some embodiments, see Figure 5 , Figure 5 is a flowchart of a function update method of an application provided in an embodiment of the present application, Figure 4 Step 106 shown may be performed by Figure 5 Steps 1061 to 1063 are implemented as shown.

[0085] In step 1061, the auxiliary information of the derivative function is obtained.

[0086] In some embodiments, the auxiliary information is used to indicate whether the derived function of the target application is a native function of other applications.

[0087] As an example, the native function of the target application is function A, and the native function of other applications is function B, then function A is the native function of the target application and is a derived function of other applications. Function B is a derived function of the target application and is a native function of other applications, and the attached information of the derived function (function B) of the target application is used to indicate that the derived function (function B) of the target application is a native function of other applications.

[0088] In step 1062, when the auxiliary information indicates that the derived function is a native function of other applications, the target access method is determined to be the first access method.

[0089] As an example, the first access method may be an access method through a uniform resource locator (URL).

[0090] As an example, the first access method may be accessing the derived program in the native application by creating a derived process in the native application for accessing the derived program.

[0091] In step 1063, when the auxiliary information indicates that the derived function is not a native function of other applications, the target access method is determined to be the second access method.

[0092] As an example, the first access method may be an access method through a component, and the first access method may be an access method through accessing a derivative program in a native process in a native application.

[0093] In some embodiments, since the native process in the native application is a process created for the native program, the native process is adapted to the native program, and the native process cannot be adapted to the derived program. Therefore, it is necessary to adapt the derived program to obtain the target derived program. The target derived program can be adapted to the native process, so that the derived program can be indirectly accessed through the native process to achieve access to the derived program.

[0094] In some embodiments, the access cost of the second access method is greater than the access cost of the first access method.

[0095] In some embodiments, the access cost is used to indicate the adaptation cost of the derived program. Since the first access method does not require adaptation of the derived program, and the second access method requires adaptation of the derived program, the access cost of the second access method is greater than the access cost of the first access method.

[0096] In step 107, the derivative program is accessed into the native application according to the target access mode to obtain a target application having native functions and derivative functions.

[0097] In some embodiments, see Figure 6 , Figure 6 is a flow chart of a function update method of an application provided in an embodiment of the present application. When the target access mode is the first access mode, Figure 4 Step 107 shown may be performed by Figure 6 Step 1071A is shown implemented.

[0098] In step 1071A, a derivative process for accessing the derivative program is created in the native application, and the derivative program is accessed through the derivative process to obtain the target application.

[0099] In some embodiments, the derivative process can run in parallel with the native process. The derivative process is used in the native application to access and run the derivative program, and the derivative process is compatible with the derivative program.

[0100] In some embodiments, the target application is an application that is connected to both a derivative program and a native program of the target application. That is, the target application is an application that is connected to a derivative program based on the native application and can implement derivative functions.

[0101] In some embodiments, see Figure 7 , Figure 7 is a flow chart of a function update method of an application provided in an embodiment of the present application. When the target access mode is the first access mode, Figure 3 The step 101 shown may be performed by Figure 7 Steps 1011A to 1012A are implemented as shown.

[0102] In step 1011A, the native process of the target application is called and the native program is run to implement the native function of the target application.

[0103] In some embodiments, since the native program is an application program compatible with the native process, the native program can be run through the native process, and since the native program has native functions, the native functions of the target application can be implemented by running the native program.

[0104] In step 1012A, the derivative process of the target application is called and the derivative program is run to implement the derivative function of the target application.

[0105] In some embodiments, since the derivative program is an application program compatible with the derivative process, the derivative program can be run through the derivative process, and since the derivative program has derivative functions, the derivative functions of the target application can be implemented by running the derivative program.

[0106] In this way, by creating a derivative process in the native application for accessing the derivative program, and accessing the derivative program through the derivative process, the target application is obtained, the native process of the target application is called, and the native program is run to implement the native functions of the target application, and the derivative process of the target application is called and the derivative program is run to implement the derivative functions of the target application, thereby effectively implementing the native functions and derivative functions in the target application through the native process and the derivative process, and realizing effective access to the derivative program.

[0107] In some embodiments, see Figure 8 , Figure 8 is a flow chart of a function update method of an application provided in an embodiment of the present application. When the target access mode is the second access mode, Figure 4 Step 107 shown may be performed by Figure 8 Steps 1071B to 1072B are implemented as shown.

[0108] In step 1071B, the derivative program corresponding to the derivative function is adapted to obtain a target derivative program, and the target derivative program can adapt to the native process of the native application.

[0109] In some embodiments, since the native process in the native application is a process created for the native program, the native process is adapted to the native program, and the native process cannot be adapted to the derived program. Therefore, it is necessary to adapt the derived program to obtain the target derived program. The target derived program can be adapted to the native process, so that the derived program can be indirectly accessed through the native process to achieve access to the derived program.

[0110] In some embodiments, both the target derivative program and the derivative program have derivative functions, and the derivative functions can be implemented by running the target derivative program or the derivative program.

[0111] In step 1072B, the target derivative program is accessed through the native process of the native application to obtain the target application.

[0112] In some embodiments, since the target derivative program can be adapted to the native process of the native application, the target derivative program can be accessed through the native process of the native application to implement the operation of the target derivative program.

[0113] In some embodiments, see Fig. 9 , Fig. 9 is a flow chart of a function update method of an application provided in an embodiment of the present application. When the target access mode is the second access mode, Figure 3 Step 101 shown may be performed by Fig. 9 Step 1011B is shown implemented.

[0114] In step 1011B, the native process of the target application is called, and the native program and the target derived program are run to implement the native functions and derived functions of the target application.

[0115] In some embodiments, since the target derivative program has been connected to the native process of the target application, the target derivative program and the native program have been connected to the native process of the target application, and the native process can be adapted to the target derivative program and the native program. Therefore, the native functions and derivative functions of the target application can be implemented by running the native program and the target derivative program.

[0116] In this way, by accessing the derivative program in the native process of the native application, accessing the target derivative program through the native process of the native application, obtaining the target application, calling the native process of the target application, running the native program and the target derivative program, to implement the native functions and derivative functions of the target application, thereby effectively implementing the native functions and derivative functions in the target application through the native process, and realizing effective access to the derivative program.

[0117] In step 102, during the running of the target application, when the target function in the target application meets the version update condition, the update program corresponding to the target function is obtained.

[0118] In some embodiments, the target function is one of a native function and a derived function, and the update program is one of an update program corresponding to the native program and an update program corresponding to the derived program.

[0119] In some embodiments, when the target function is a native function, the update program is an update program corresponding to the native program; when the target function is a derivative function, the update program is an update program corresponding to the derivative program.

[0120] In some embodiments, the update program corresponding to the native program is the latest version of the native program, and the update program corresponding to the derivative program is the latest version of the derivative program.

[0121] In some embodiments, see Fig.10 , Fig.10 is a flow chart of a method for updating application functions provided in an embodiment of the present application. When running a target application having native functions and derivative functions, Figure 3 Prior to step 102 shown, the target function may be determined by executing steps 108A to 110A.

[0122] In step 108A, a program version corresponding to a native program in the currently running target application and a program version corresponding to a derivative program in the currently running target application are obtained.

[0123] As an example, the program version corresponding to the native program in the currently running target application may be the 10th version of the native program, and the program version corresponding to the derivative program in the currently running target application may be the 21st version of the derivative program.

[0124] In step 109A, when the running time of the target application reaches a first time threshold, the latest program version corresponding to the native program is obtained; based on the latest program version corresponding to the native program and the program version corresponding to the native program, the native function information of the native function is determined.

[0125] In some embodiments, the native function information is used to indicate whether the native function is a target function that meets the version update condition.

[0126] In some embodiments, the first duration threshold is smaller than a version cycle of the target application, that is, the first duration threshold is smaller than an operating cycle of a version of the target application.

[0127] In some embodiments, when there is an update to the native program, the latest program version corresponding to the native program is an updated version of the program version corresponding to the native program; when there is no update to the native program, the latest program version corresponding to the native program is the program version corresponding to the native program.

[0128] In some embodiments, when the running time of the target application reaches a first time threshold, the latest program version corresponding to the native program is automatically obtained, and the native function information of the native function is determined based on the latest program version corresponding to the native program and the program version corresponding to the native program.

[0129] In some embodiments, the above-mentioned step 109A of determining the native function information of the native function based on the latest program version corresponding to the native program and the program version corresponding to the native program can be implemented as follows: when the program version corresponding to the native program is the latest program version corresponding to the native program, the native function information is determined as the first function information; when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function information is determined as the second function information.

[0130] In some embodiments, the first function information is used to indicate that the native function is not a target function that satisfies the version update condition, and the second function information is used to indicate that the native function is a target function that satisfies the version update condition.

[0131] In some embodiments, when the program version corresponding to the native program is the latest program version corresponding to the native program, it means that the native function is already the latest version. At this time, there is no need to update the native function. The native function information is determined as the first function information used to indicate that the native function is not the target function that meets the version update conditions.

[0132] In some embodiments, when the program version corresponding to the native program is not the latest program version corresponding to the native program, it means that the native function is not the latest version. At this time, the native function needs to be updated. Then, the native function information can be determined as the second function information used to indicate that the native function is the target function that meets the version update conditions.

[0133] In this way, when the running time of the target application reaches the first time threshold, the latest program version corresponding to the native program is obtained. When the program version corresponding to the native program is the latest program version corresponding to the native program, the native function information is determined as the first function information; when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function information is determined as the second function information. Therefore, when the running time of the target application reaches the first time threshold, the native program is automatically updated when the version update conditions are met, which effectively improves the update efficiency of the native program.

[0134] In other embodiments, the above-mentioned step 109A of determining the native function information of the native function based on the latest program version corresponding to the native program and the program version corresponding to the native program can also be implemented in the following way: when the program version corresponding to the native program is not the latest program version corresponding to the native program and an update instruction for the native function is received, the native function information is determined as the second function information.

[0135] In some embodiments, the second function information is used to indicate that the native function is a target function that meets the version update condition.

[0136] In some embodiments, when the program version corresponding to the native program is not the latest program version corresponding to the native program, it indicates that the program version corresponding to the native program can be updated to the latest program version, indication information that the native program meets the update conditions can be displayed, and in response to a trigger operation on the indication information, an update instruction for the native function is generated, and when the update instruction for the native function is received, the native function information is determined as the second function information.

[0137] In this way, when the program version corresponding to the native program is not the latest program version corresponding to the native program, and the indication information that the native program meets the update conditions is displayed, and in response to the trigger operation of the indication information, an update instruction for the native function is generated, the native function information is determined as the second function information, and the native program is semi-automatically updated when the version update conditions are met, thereby effectively improving the timeliness of the update of the native program.

[0138] In step 110A, when the running time of the target application reaches a second time threshold, the latest program version corresponding to the derivative program is obtained; based on the latest program version corresponding to the derivative program and the program version corresponding to the derivative program, the derivative function information of the derivative function is determined.

[0139] In some embodiments, the derivative function information is used to indicate whether the derivative function is a target function that meets the version update condition, and the first duration threshold is less than the second duration threshold.

[0140] In some embodiments, the first duration threshold is smaller than the version cycle of the target application, that is, the first duration threshold is smaller than the running cycle of one version of the target application, and the first duration threshold is smaller than the second duration threshold.

[0141] In some embodiments, when there is an update to the derived program, the latest program version corresponding to the derived program is an updated version of the program version corresponding to the derived program; when there is no update to the derived program, the latest program version corresponding to the derived program is the program version corresponding to the derived program.

[0142] In some embodiments, when the running time of the target application reaches a second time threshold, the latest program version corresponding to the derivative program is automatically obtained, and the derivative function information of the derivative function is determined based on the latest program version corresponding to the derivative program and the program version corresponding to the derivative program.

[0143] In some embodiments, the above-mentioned step 110A of determining the derivative function information of the derivative function based on the latest program version corresponding to the derivative program and the program version corresponding to the derivative program can be implemented as follows: when the program version corresponding to the derivative program is the latest program version corresponding to the derivative program, the derivative function information is determined as the third function information; when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program and an update instruction for the derivative function is received, the derivative function information is determined as the fourth function information.

[0144] In some embodiments, the fourth function information is used to indicate that the derived function is a target function that satisfies the version update condition, and the third function information is used to indicate that the derived function is not a target function that satisfies the version update condition.

[0145] In some embodiments, when the program version corresponding to the derived program is the latest program version corresponding to the derived program, it means that the derived function is already the latest version. At this time, there is no need to update the derived function. The derived function information is determined as the third function information used to indicate that the derived function is not the target function that meets the version update conditions.

[0146] In some embodiments, when the program version corresponding to the derived program is not the latest program version corresponding to the derived program, it means that the derived function is not the latest version. At this time, the derived function needs to be updated. Then, the derived function information can be determined as the fourth function information used to indicate that the derived function is the target function that meets the version update conditions.

[0147] In this way, when the running time of the target application reaches the second time threshold, the latest program version corresponding to the derivative program is obtained, and when the program version corresponding to the derivative program is the latest program version corresponding to the derivative program, the derivative function information is determined as the third function information; when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, the derivative function information is determined as the fourth function information. Thus, when the running time of the target application reaches the second time threshold, the derivative program is automatically updated when the version update condition is met, which effectively improves the update efficiency of the derivative program.

[0148] In other embodiments, the above-mentioned step 109A of determining the derivative function information of the derivative function based on the latest program version corresponding to the derivative program and the program version corresponding to the derivative program can also be implemented in the following way: when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program and an update instruction for the derivative function is received, the derivative function information is determined as the third function information.

[0149] In some embodiments, the third function information is used to indicate that the derived function is a target function that meets the version update condition.

[0150] In some embodiments, when the program version corresponding to the derived program is not the latest program version corresponding to the derived program, it indicates that the program version corresponding to the derived program can be updated to the latest program version, indication information that the derived program meets the update conditions can be displayed, and in response to a trigger operation on the indication information, an update instruction for the derived function is generated, and when the update instruction for the derived function is received, the derived function information is determined as the third function information.

[0151] In this way, when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, and the indication information that the derivative program meets the update conditions is displayed, and in response to the trigger operation of the indication information, an update instruction for the derivative function is generated, the derivative function information is determined as the third function information, and the derivative program is semi-automatically updated when the version update conditions are met, thereby effectively improving the timeliness of the update of the derivative program.

[0152] In some embodiments, see Fig.11 , Fig.11 is a flow chart of a method for updating application functions provided in an embodiment of the present application. When running a target application having native functions and derivative functions, Figure 3 Prior to step 102 shown, the target function may be determined by executing steps 108B to 109B.

[0153] In step 108B, in response to the update instruction for the native function, the latest program version corresponding to the native program and the program version corresponding to the native program in the currently running target application are obtained.

[0154] In some embodiments, update indication information of the native program can be displayed, and in response to a trigger operation on the indication information, an update instruction for the native function can be generated. In response to the update instruction for the native function, the latest program version corresponding to the native program and the program version corresponding to the native program in the currently running target application can be obtained.

[0155] In step 109B, when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function is determined as a target function that meets the version update condition.

[0156] In some embodiments, when the program version corresponding to the native program is not the latest program version corresponding to the native program, it means that the program version corresponding to the native program can be updated to the latest program version, so the native function is determined as the target function that meets the version update condition.

[0157] In some embodiments, see Fig.12 , Fig.12 is a flow chart of a method for updating application functions provided in an embodiment of the present application. When running a target application having native functions and derivative functions, Figure 3 Prior to step 102 shown, the target function may be determined by executing steps 108C to 109C.

[0158] In step 108C, in response to the update instruction for the derivative function, the latest program version corresponding to the derivative program and the program version corresponding to the derivative program in the currently running target application are obtained.

[0159] In some embodiments, update indication information of the derivative program can be displayed, and in response to a trigger operation on the indication information, an update instruction for the derivative function is generated. In response to the update instruction for the derivative function, the latest program version corresponding to the derivative program and the program version corresponding to the derivative program in the currently running target application are obtained.

[0160] In step 109C, when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, the derivative function is determined as a target function that meets the version update condition.

[0161] In some embodiments, when the program version corresponding to the derived program is not the latest program version corresponding to the derived program, it means that the program version corresponding to the derived program can be updated to the latest program version, so the derived function is determined as the target function that meets the version update condition.

[0162] In this way, by responding to an update instruction for a native function or responding to an update instruction for a derivative function, the native function or the derivative function is updated independently, thereby achieving update efficiency of the native function and the derivative function in the target application.

[0163] In step 103, based on the update program, the target function in the target application is independently updated.

[0164] In some embodiments, see Fig.13 , Fig.13is a flowchart of a function update method of an application provided in an embodiment of the present application, Figure 3 Step 103 shown can be performed by executing Fig.13 Steps 1031 to 1032 are implemented as shown.

[0165] In step 1031, when the target function is a native function, the native program connected to the target application is replaced with an update program corresponding to the native program, thereby obtaining the target application after the native function is independently updated.

[0166] In some embodiments, when the target function is a native function, the update program obtained is the update program corresponding to the native function. At this time, the native program connected to the target application can be replaced with the update program corresponding to the native program to obtain the target application after the native function is independently updated, thereby realizing independent update of the native function in the target application.

[0167] In step 1032, when the target function is a derivative function, the derivative program connected to the target application is replaced with an update program corresponding to the derivative program, thereby obtaining the target application after the derivative function is independently updated.

[0168] In some embodiments, when the target function is a derivative function, the update program obtained is the update program corresponding to the derivative function. At this time, the derivative program connected to the target application can be replaced with the update program corresponding to the derivative program to obtain the target application after the derivative function is independently updated, thereby realizing independent update of the derivative function in the target application.

[0169] In this way, by running a target application with native functions and derivative functions, when the target function in the target application meets the version update condition during the running of the target application, the update program corresponding to the target function is obtained, and based on the update program, the target function in the target application is independently updated. In this way, by independently updating the target function in the target application based on the update program corresponding to the obtained target function during the running of the target application, the native program or derivative program is updated independently in a targeted manner, effectively improving the function update efficiency of the application.

[0170] Below, an exemplary application of the embodiment of the present application in an actual application scenario of a front-end development framework (Electron) will be described.

[0171] Front-end development framework (Electron): It uses C++ as the underlying architecture and JavaScript, HTML and CSS as the development languages ​​to build a cross-platform desktop application framework. Electron is compatible with Mac, Windows and Linux, and can build applications for the three platforms.

[0172] The embodiment of the present application can be used in any desktop application developed based on the Electron framework. For some sub-business page resources in the application, the dynamic package solution provided by the present invention can be used to independently release the version and hot update it separately at runtime. When the sub-business is running, it has the same system call capability and loading speed as the main business to ensure the consistency of user experience. To develop a dynamic package, it is first necessary to solve the problem of how to access the code of the sub-business. The access method determines how to maintain the login state, how to process requests, and how to open up cross-process system calls, which is the core of the entire architecture. If no conditions are constrained, there are many ways to achieve the purpose. It is hoped that on the basis of "being usable", the demands of "easy to use" and "stable" can be further met, while reducing the access cost and pursuing runtime performance. For this reason, the embodiment of the present application provides two different access solutions-Url embedding solution and component embedding solution, which can be selected on demand according to the characteristics of the sub-business. And a set of general version management mechanisms is provided.

[0173] In some embodiments, see Fig.14 , Fig.14 is a schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application. The function update method of the application provided in the embodiment of the present application can be performed by Fig.14 The version management architecture shown is implemented.

[0174] In some embodiments, see Fig.14 , the Url embedding solution is explained, which is suitable for the migration of existing online projects. Such projects are usually developed earlier, with a large gap between the technology stack and the main business, and high cost of change. However, if the online Url is directly referenced, the opening speed is slow, and offline startup is not supported, resulting in a poor experience. Therefore, the embodiment of the present application designs an access solution based on the online Url, using its original architecture as much as possible. In order to speed up the opening speed of the embedded Url, the embodiment of the present application adds a layer of resource cache locally. The developer of the sub-business only needs to add a glue layer on the basis of the existing code and adapt the client's call to achieve smooth migration.

[0175] In some embodiments, see Fig.15 , Fig.15 is a schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application. The URL embedding solution provided in the embodiment of the present application can be Fig.15The process shown is implemented. Start the window (WebviewContainer Window), switch the route and add the Webviewcontainer component. When the user clicks on the business entrance, the main process reads the current package configuration (packageConfug), and initializes (creates) the sessionHelper object according to the configuration. The main responsibility of this object is to manage the session context during business runtime. Specifically, it includes three items: local resource loading, business ticket acquisition and management, and request interception processing. The first item is to convert the http request in the sub-business container into a local file read through a custom protocol (for example, the app protocol), thereby realizing a local resource replacement loading mechanism similar to the offline package. The second and third items are to create an execution environment for the sub-business simulation that includes the current account login state. Requests from the sub-business will be intercepted, tickets (pskey, skey) will be inserted, and cross-domain control fields will be set, etc., so that the business running on the client is similar to that running on the browser, and the developer of the sub-business does not need to do too much adaptation. After the session Helper is created, the embodiment of the present application will evoke a container window and pass through <webview>tag loads the entry URL of the sub-business and <webview>Load a special preload script, in which the IPC channel is established (details will be described later). Since the preload script is executed before the business code, the sub-business can directly use the native capabilities prepared by the host. At this point, the startup preparation of the sub-business is complete.

[0176] In some embodiments, see Fig.16 , Fig.16 is a flow chart of a method for updating the function of an application provided in an embodiment of the present application, through Fig.16 The process shown can implement protocol registration and request interception. When the user clicks on the entry, the domain name host of the currently loaded sub-business is obtained by parsing the url, and the ticket is obtained for the host, and the session context is allocated (using the businessName of the dynamic package as the partition can ensure the global uniqueness of the session). The obtained ticket is stored in a cache structure called cookieCacheMap in this embodiment of the application. CookieCacheMap is a two-layer kv structure. The key of the first layer is the domain name, and the value is a list of all cookies under this domain name. And this value contains the kv structure of the cookie itself. This design is because some complex projects need to embed multiple entry Urls, and these Urls may belong to different domain names, so the embodiment of the present application must dynamically maintain the cache for the current domain name when the page starts. After that, the embodiment of the present application continues through <webview>tag to load the sub-service code. When the sub-service is running, the http request it sends can be intercepted by the session allocated in the previous embodiment of the present application. The embodiment of the present application first intercepts the on BeforeRequest hook to determine whether it is a static resource request. If it is, the request is redirected to the custom app protocol and converted to the reading of the local file. If not, the embodiment of the present application continues to intercept the onBeforSendHeaders hook, where the request header is expanded. Specifically, it is to parse the host of the current request url and obtain the corresponding ticket from the cookieCacheMap, expand it into the cookie header, and set the request refer to the current url root path. Finally, the embodiment of the present application intercepts the onHeadersReceived hook again, where the response header is processed. Specifically, if there is a set-cookie field in the response header, the cookie needs to be parsed to update the local cookieCacheMap cache, so as to ensure that the cache is always the latest and valid cookie, and set the CORS field in the response header to meet the cross-domain requirements of the sub-service. The above strategy demonstrates the complete capabilities provided by the host, but for each sub-service, not all of them need to be executed. Which strategies are specifically executed can be flexibly configured according to the needs of the sub-service itself. This set of policies can meet the authentication and cross-domain request requirements of most sub-businesses. If a project has special rules, the logic can also be customized according to the business name. Since sessions of different projects are independent of each other, there is no need to worry about cross-platform issues. In addition, independent sessions are created only when the business entrance is clicked, so there is no additional performance burden when the user does not use the business.

[0177] In some embodiments, see Fig.16 ,pass Fig.16 Steps 201 to 218 shown may implement protocol registration and request interception.

[0178] In step 201, click on the entry.

[0179] In step 202, the URL is parsed to extract the host.

[0180] In step 203, pskey is obtained.

[0181] In step 204, a session is allocated.

[0182] In step 205, load <webview>.

[0183] In step 206, various requests are sent within the page.

[0184] In step 207, attribute resolution is requested.

[0185] In step 208, it is determined whether it is a static resource.

[0186] In step 209A, redirect to app: / / .

[0187] In step 210A, map the url to a file.

[0188] In step 211A, a local file is read.

[0189] In step 209B, the request header is intercepted.

[0190] In step 210B, the URL is parsed to extract the host.

[0191] In step 211B, a cookie header is set.

[0192] In step 212B, refer is set.

[0193] In step 213B, a network request is sent.

[0194] In step 214B, the response header is intercepted.

[0195] In step 205B, the URL is parsed to extract the host.

[0196] In step 216B, cacheMap is updated and the setCookie field in the response header is read.

[0197] In step 217B, the cors field is set.

[0198] In step 218B, the request is completed.

[0199] In some embodiments, see Fig.17 , Fig.17 This is a schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application. The page of the dynamic package runs in the client, and it is inevitable to call some client APIs. Many of the interface capabilities required by the dynamic package are general platform capabilities developed by the main business. <webview>Tag has independent webContents, which is independent of the process and foundation. Therefore, the embodiment of this application needs to develop a new bypass based on the ipc module to open up <webview>The ipc channel between tag and the main process provides the existing methods to the sub-business page. At the same time, due to the outdated technology stack of some old businesses, in order to ensure the standardization of the visual style, common UI components such as pop-ups, toasts, etc. also need to be provided by the main business. This requires the establishment of a two-way data channel between the sub-business page and the host page. When the sub-business is started, the embodiment of the present application injects a global object into the window global variable (the example here is qqApi) through the preload_webview script. Under this global object, different functions are carried through different namespaces, mainly including three functions: invokeIPC: provide an IPC call channel (call the main process from the rendering process), detect Webview Channel, extract ipcChannel+event, ctx={business Name, frame}; distribute to Helper (fsApiHelper), osApiHelper, etc. according to ipcChannel. bindIPC: Provide IPC detection channel (notify rendering process from main process), cache callback, detect sender, when registering (starting), invoke(register Webview), detect register Webview, extract event sender(), cache sender(), call sender; when unregistering (uninstalling), invoke(unRegister Webview), detect unRegister Webview, webviewChannel=businessName+frameld, ui: Provides calls to public components at the UI level of rendering process (here, calling pcqq-kit is used as an example). Let's look at the establishment process of each channel separately: Both ipc channels need to be established by handshaking with the main process, <webview>When the tag starts, it sends a registration event registerWebview to the main process through the preload module. Both parties agree to use the business name businessName plus frameId as the channel name, which can ensure global uniqueness. (frameId can be understood as <webview>tag instance unique identifier, similar to BrowserWindow's webContent sId. Each container instance will be assigned an incremental value when it is created, and there will be no duplication). The main process needs to detect subsequent events sent from the channel, parse out the specific ipc method name, attach the context identifier, and distribute it to the existing processing function. This implements the IPC call channel. At the same time, the main process also needs to collect the sender function on the event object. This sender function is similar to the webContents.send method of an ordinary BrowserWindow and can be used to send events to a specific window. The difference is that the main process does not hold <webview>Because BrowserWindow is created in the main process, <webview>The tag is created in the rendering process. When the first handshake request is received, the main process will know its existence and cache the sender function. The embodiment of the present application can send a push to the sub-service. The bindIpc method is used in the preload function to collect the processing functions registered by the service. When a push is received, they are triggered in sequence, thereby opening the push channel and allowing the service code to receive and process messages from the main process. This implements the IPC detection channel. The UI channel is established between the sub-service and the host page without passing through the main process. Electron also provides an API for the embodiment of the present application. In the preload of the webview, it is ipcRenderer.sendToHost. In the host page, it is<webvie w> .send, the embodiment of the present application only needs to forward the request of the sub-service to the host page, and call the corresponding UI interface on the host page. Note that although they appear to be in the same rendering window, webContents are isolated. The communication between the two can only exchange serialized data, and cannot call functions on each other. Therefore, for complex APIs containing callback functions, the embodiment of the present application needs to manually build a glue layer to collect and maintain the callback functions and trigger them through specific events.

[0200] In some embodiments, see Fig.18 , Fig.18 It is a schematic diagram of the principle of the function update method of the application provided by the embodiment of the present application. In addition to Url embedding, the embodiment of the present application also provides another set of componentized embedding solutions. The sub-project and the container window share the same process. Compared with the first Url embedding mode, there is no need to allocate an additional container process, which can reduce memory consumption. But the sub-business needs to make more adaptations and changes. Therefore, this solution is suitable for new businesses without historical baggage. More adaptation work is used in exchange for better performance. Component-based embedding is different from url embedding. The sub-business and the host run in the same webContents (used to render and control web pages). By hanging on the dynamic component to read the component static resources and sending network requests to the component, in essence, the embodiment of the present application hopes to turn the sub-business into an ordinary es module (split the program into separate modules that can be imported on demand). It exposes an initialization function to the host to call. After the host completes the environment injection, it calls it to instantiate the component. It is just different from an ordinary module. Its source code is in an external warehouse and will not be compiled into the host's product, but is dynamically confirmed at runtime. At runtime, the embodiment of the present application needs to intercept the import request and map it to a local file containing the version path. The embodiment of the present application uses the Module Federation packaging tool provided by webpack. The sub-business needs to make adjustments in the construction and package itself into an MDF for the main business to reference. Its entry function is an initialization rendering function. The main business introduces this module, passes in a div container when executing the entry, mounts the instantiated component on the container, and retains the public UI area of ​​the outer layer, so that the component level can be embedded. When the user clicks on the business entrance, it is also necessary to read the current package configuration (packageConfig) in the main process, and initialize (create) the sessionHelper object according to the configuration to manage the session context when the business is running. This part is similar to the url embedding mode, and obtains the ticket (pskey, skey). The difference is that when the component is embedded, the component and the host share the context, there is no independent session, but it should be expanded on the basis of the appsession of the host. After sessionHelper is created, the embodiment of the present application will call up a container window and mount the dynamic component of the sub-service, and complete the injection of the global API. Unlike the URL mode, the component mode does not have an independent preload script. The injection of the global API is performed in the host page. However, this part of the logic can also be loaded before the sub-service. The sub-service can directly use the native capabilities prepared by the host. At this point, the startup preparation of the sub-service is completed.The processing of this part is similar to the Url embedding mode, the only difference is that in the Url embedding mode, the protocol registration and request interception are based on an independent session, while in the component embedding mode, since the sub-business and the main business run in the same context, the session of the main business is also reused. The embodiment of the present application needs to expand the logic of the sub-business on the session of the main business (expand appSession), set and update cookies, set refer and set croscontrol. Start the window (WebviewContainer Window), switch the route and add the Webviewcontainer component. When expanding, it is necessary to distinguish and process requests under different domain names according to the configuration of the sub-business to avoid affecting the logic of the main business.

[0201] In some embodiments, see Fig.18 , Fig.18 It is a principle diagram of the function update method of the application provided by the embodiment of the present application. When the sub-business is started, the embodiment of the present application directly injects a global object into the window global variable (the example here is qqApi). This global object also has three namespaces to carry different functions. Among them, the UI channel does not have the problem of cross-process, and it can be implemented by simply calling the UI component of the host page. The invokeIPC and bindIPC channels can also reuse the ipc instance in the host page. Here, the embodiment of the present application provides a getIPCClientInstan ce method, so that the sub-business can easily obtain the ipcLinkClient instance created by the infrastructure side, initiate requests to the main process based on these instances, and detect notifications sent by the main process.

[0202] In some embodiments, see Fig.19 , Fig.19 Schematic diagram of the principle of the function update method of the application provided in the embodiment of the present application. <webview>Tag is simpler to handle because the sub-business and the host page actually run in the same process, similar to a delayed initialization sub-component. When the sub-business starts, the embodiment of the present application directly injects a global object into the window global variable (the example here is qqApi). This global object also has three namespaces to carry different functions. Among them, the UI channel does not have cross-process problems. It only needs to simply call the UI component of the host page (for example, calling pcqq-kit) to achieve it. The invokeIPC and bindIPC channels can also reuse the ipc instance in the host page. Here, the embodiment of the present application provides a getIPCClientInstance method, so that the sub-business can easily obtain the ipcLinkClient instance created by the infrastructure side, initiate requests to the main process based on these instances, and detect notifications sent by the main process.

[0203] In some embodiments, see Fig. 20 , Fig. 20 It is a flow chart of the function update method of the application provided by the embodiment of the present application. After the application is started, the embodiment of the present application will perform a check, pull the online configuration of each business in turn, and if there is a new version, update the local resources silently. At the same time, in order to avoid the user hanging up for a long time, the check strategy is executed every 12 hours. Secondly, after the user clicks the entrance, the embodiment of the present application will also pull the latest configuration to check whether there is an update. But at this time, different businesses have different demands for updates. Some hope to guide users to upgrade and ensure that users always use the latest version. Some do not have strong real-time requirements, and the update timing can be delayed to avoid interrupting user operations. The choice of strategy is also related to the current version-if a version changes a lot, the business hopes to be able to prompt the user to upgrade. If it is an ordinary small version, there is no need to prompt, and the silent update can be taken. To this end, the embodiment of the present application provides an optional configuration to give the permission of the pop-up window to the business itself. If the sub-business adds this configuration, the basic side will not directly pop up the window after pulling the update. Instead, the updated version number is notified to the business through the api, and an interface for evoked pop-up window is provided. The business decides whether to pop up and when to pop up. If you choose to pop up a window, the page will refresh and load the new version after the user completes the update. If not, the embodiment of the present application will silently pull the new version in the background and coexist with the current version, and the user will load it the next time he clicks the entrance. As the sub-businesses are constantly updated, there will be some old versions of resources remaining locally, which need to be cleared centrally. The embodiment of the present application chooses to check for updates after startup / every 12 hours. If the update is successful, the cleanup logic is executed once. The way to clean up is to traverse all files in the sub-business directory and delete all files outside the whitelist. The whitelist includes: -version file; -version directory corresponding to curVersion and preVersion declared in the version file; -version directory corresponding to the cached version in sessionHelper (indicating the version currently in use), so that useless files can be cleaned up regularly without affecting the use & update, keeping the user's local directory simple and clean. For complex version file management, error handling is a more troublesome problem. The embodiment of the present application adds a retry mechanism in the scenarios involving downloads, and pre-buries a variety of fallback mechanisms in the code. If it is found that the resource file does not exist and the module entrance cannot be loaded, the local version file will be deleted and the download will be re-initiated. And count the download and update status of external network users through point reporting.

[0204] In some embodiments, see Fig. 20 , can be Fig. 20 The steps 301 to 304 or steps 401 to 418 shown implement function update, and steps 301 to 304 and steps 401 to 418 will be described below respectively.

[0205] In step 301, start.

[0206] In step 302, the configuration is pulled.

[0207] In step 303, it is determined whether it is a new version.

[0208] In some embodiments, when it is a new version, step 304 is executed, and when it is not a new version, a check is performed every 12 hours.

[0209] In step 304, if it is a new version, the local version is updated.

[0210] In step 401, click on the entry.

[0211] In step 402, the configuration is pulled.

[0212] In step 403, it is determined whether it is a new version.

[0213] In step 404, it is determined whether an optional pop-up window is configured.

[0214] In some embodiments, when an optional pop-up window is configured, steps 405 and 406 are executed, and when an optional pop-up window is not configured, step 413 is executed.

[0215] In step 405, the local version is updated.

[0216] In step 406, the service is notified of the version number.

[0217] In step 407, the service determines whether to display a pop-up window.

[0218] In step 408, it takes effect next time.

[0219] In step 409, the user selects whether to update immediately.

[0220] In step 410, the update progress is displayed.

[0221] In step 411, refresh is completed.

[0222] In step 412, it takes effect immediately.

[0223] In step 413, a pop-up window is displayed to query the user.

[0224] In step 414, it is determined whether the user chooses to update immediately.

[0225] In step 415, the local version is updated.

[0226] In step 416, the update progress is displayed.

[0227] In step 417, refresh is completed.

[0228] In step 418, it takes effect immediately.

[0229] In this way, by running a target application with native functions and derivative functions, when the target function in the target application meets the version update condition during the running of the target application, the update program corresponding to the target function is obtained, and based on the update program, the target function in the target application is independently updated. In this way, by independently updating the target function in the target application based on the update program corresponding to the obtained target function during the running of the target application, the native program or derivative program is updated independently in a targeted manner, effectively improving the function update efficiency of the application.

[0230] It is understandable that in the embodiments of the present application, data related to native programs, derivative programs, etc., when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0231] The following continues to describe an exemplary structure of the application function updating device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules in the function update device 455 of the application stored in the memory 450 may include: a running module, used to run a target application having native functions and derivative functions, the native functions are implemented by the native program of the target application, and the derivative functions are implemented by the corresponding derivative programs in the target application; an acquisition module, used to acquire the update program corresponding to the target function when the target function in the target application meets the version update condition during the running of the target application; wherein the target function is one of the native function and the derivative function, and the update program is one of the update program corresponding to the native program and the update program corresponding to the derivative program; an update module, used to independently perform functional updates on the target function in the target application based on the update program.

[0232] In some embodiments, the function update device of the above-mentioned application also includes: an access module, which is used to obtain a native program for implementing the native function, and based on the native program, run a native application with the native function; in the process of running the native application, in response to a creation instruction for the derivative function, obtain a derivative program corresponding to the derivative function, and determine a target access method for the derivative program to access the native application; according to the target access method, access the derivative program in the native application to obtain a target application with the native function and the derivative function.

[0233] In some embodiments, the above-mentioned access module is also used to obtain auxiliary information of the derivative function, and the auxiliary information is used to indicate whether the derivative function of the target application is a native function of other applications; when the auxiliary information indicates that the derivative function is a native function of the other application, the target access method is determined to be a first access method; when the auxiliary information indicates that the derivative function is not a native function of the other application, the target access method is determined to be a second access method; wherein the access cost of the second access method is greater than the access cost of the first access method.

[0234] In some embodiments, the access module is also used to create a derivative process in the native application for accessing the derivative program, and access the derivative program through the derivative process to obtain the target application; the running module is also used to call the native process of the target application, run the native program to implement the native function of the target application, and call the derivative process of the target application, run the derivative program to implement the derivative function of the target application.

[0235] In some embodiments, the above-mentioned access module is also used to adapt the derivative program corresponding to the derivative function to obtain a target derivative program, and the target derivative program can adapt to the native process of the native application; access the target derivative program through the native process of the native application to obtain the target application; the above-mentioned running module is also used to call the native process of the target application, run the native program and the target derivative program to realize the native function and the derivative function of the target application.

[0236] In some embodiments, the function update device of the above-mentioned application also includes: a determination module, used to obtain the program version corresponding to the native program in the currently running target application, and the program version corresponding to the derived program in the currently running target application; when the running time of the target application reaches a first duration threshold, obtain the latest program version corresponding to the native program; based on the latest program version corresponding to the native program and the program version corresponding to the native program, determine the native function information of the native function, and the native function information is used to indicate whether the native function is a target function that meets the version update condition; when the running time of the target application reaches a second duration threshold, obtain the latest program version corresponding to the derived program, and the first duration threshold is less than the second duration threshold; based on the latest program version corresponding to the derived program and the program version corresponding to the derived program, determine the derivative function information of the derivative function, and the derivative function information is used to indicate whether the derivative function is a target function that meets the version update condition.

[0237] In some embodiments, the above-mentioned determination module is also used to determine the native function information as first function information when the program version corresponding to the native program is the latest program version corresponding to the native program, and the first function information is used to indicate that the native function is not a target function that satisfies the version update condition; when the program version corresponding to the native program is not the latest program version corresponding to the native program, determine the native function information as second function information, and the second function information is used to indicate that the native function is a target function that satisfies the version update condition.

[0238] In some embodiments, the above-mentioned determination module is also used to determine the native function information as second function information when the program version corresponding to the native program is not the latest program version corresponding to the native program and an update instruction for the native function is received. The second function information is used to indicate that the native function is a target function that meets the version update condition.

[0239] In some embodiments, the above-mentioned determination module is also used to determine the derived function information as third function information when the program version corresponding to the derived program is the latest program version corresponding to the derived program, and the third function information is used to indicate that the derived function is not a target function that satisfies the version update condition; when the program version corresponding to the derived program is not the latest program version corresponding to the derived program and an update instruction for the derived function is received, determine the derived function information as fourth function information, and the fourth function information is used to indicate that the derived function is a target function that satisfies the version update condition.

[0240] In some embodiments, the above-mentioned determination module is also used to respond to an update instruction for the native function, obtain the latest program version corresponding to the native program, and the program version corresponding to the native program in the currently running target application; when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function is determined as a target function that meets the version update condition.

[0241] In some embodiments, the above-mentioned determination module is also used to respond to an update instruction for the derivative function, obtain the latest program version corresponding to the derivative program, and the program version corresponding to the derivative program in the currently running target application; when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, the derivative function is determined as a target function that meets the version update condition.

[0242] In some embodiments, the above-mentioned update module is also used to, when the target function is the native function, replace the native program connected to the target application with the update program corresponding to the native program, so as to obtain the target application after the native function is independently updated; when the target function is the derivative function, replace the derivative program connected to the target application with the update program corresponding to the derivative program, so as to obtain the target application after the derivative function is independently updated.

[0243] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the function update method of the application described in the embodiment of the present application.

[0244] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the function update method of the application provided by the embodiment of the present application, for example, Figure 3 A method for updating application functions is shown.

[0245] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEP ROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various electronic devices including one or any combination of the above memories.

[0246] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0247] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0248] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0249] In summary, the embodiments of the present application have the following beneficial effects:

[0250] (1) By running a target application having native functions and derivative functions, when the target function in the target application meets the version update condition, an update program corresponding to the target function is obtained, and based on the update program, the target function in the target application is independently updated. In this way, by independently updating the target function in the target application based on the update program corresponding to the obtained target function during the running of the target application, the native program or derivative program is independently updated in a targeted manner, thereby effectively improving the function update efficiency of the application.

[0251] (2) A target application is obtained by creating a derivative process in a native application for accessing a derivative program, and accessing the derivative program through the derivative process. The native process of the target application is called, and the native program is run to implement the native function of the target application. The derivative process of the target application is called, and the derivative program is run to implement the derivative function of the target application. Thus, the native function and the derivative function are effectively implemented in the target application through the native process and the derivative process, and the effective access of the derivative program is achieved.

[0252] (3) By accessing the derivative program in the native process of the native application, accessing the target derivative program through the native process of the native application, obtaining the target application, calling the native process of the target application, running the native program and the target derivative program, to implement the native functions and derivative functions of the target application, thereby effectively implementing the native functions and derivative functions in the target application through the native process, and realizing effective access to the derivative program.

[0253] (4) Since the native process in the native application is a process created for the native program, the native process is compatible with the native program, and the native process cannot be compatible with the derived program. Therefore, it is necessary to adapt the derived program to obtain the target derived program. The target derived program can be adapted to the native process, so that the derived program can be indirectly accessed through the native process to realize the access of the derived program.

[0254] (5) When the running time of the target application reaches the first time threshold, the latest program version corresponding to the native program is obtained. When the program version corresponding to the native program is the latest program version corresponding to the native program, the native function information is determined as the first function information; when the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function information is determined as the second function information. Thus, when the running time of the target application reaches the first time threshold, the native program is automatically updated when the version update conditions are met, which effectively improves the update efficiency of the native program.

[0255] (6) When the program version corresponding to the native program is not the latest program version corresponding to the native program, and indication information indicating that the native program meets the update conditions is displayed, an update instruction for the native function is generated in response to a trigger operation on the indication information, the native function information is determined as the second function information, and the native program is semi-automatically updated when the version update conditions are met, thereby effectively improving the timeliness of the update of the native program.

[0256] (7) When the running time of the target application reaches the second time threshold, the latest program version corresponding to the derivative program is obtained. When the program version corresponding to the derivative program is the latest program version corresponding to the derivative program, the derivative function information is determined as the third function information; when the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, the derivative function information is determined as the fourth function information. Thus, when the running time of the target application reaches the second time threshold, the derivative program is automatically updated when the version update condition is met, which effectively improves the update efficiency of the derivative program.

[0257] (8) When the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program, and indication information indicating that the derivative program meets the update conditions is displayed, and in response to a trigger operation on the indication information, an update instruction for the derivative function is generated, the derivative function information is determined as the third function information, and the derivative program is semi-automatically updated when the version update conditions are met, thereby effectively improving the timeliness of the update of the derivative program.

[0258] (9) By responding to an update instruction for a native function, or responding to an update instruction for a derivative function, the native function or the derivative function is updated independently, thereby achieving update efficiency of the native function and the derivative function in the target application.

[0259] (10) When the target function is a derivative function, the update program obtained is the update program corresponding to the derivative function. At this time, the derivative program connected to the target application can be replaced with the update program corresponding to the derivative program to obtain the target application after the derivative function is independently updated, thereby realizing independent update of the derivative function in the target application and effectively improving the update efficiency of the derivative function of the target application.

[0260] (11) When the target function is a native function, the update program obtained is the update program corresponding to the native function. At this time, the native program connected to the target application can be replaced with the update program corresponding to the native program to obtain the target application after the native function is independently updated, thereby realizing independent update of the native function in the target application, effectively improving the update efficiency of the native function of the target application.

[0261] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.< / webview> < / webview> < / webview> < / webview> < / webview> < / webview> < / webview> < / webview> < / webview> < / webview> < / webview>

Claims

1. A method for updating application functions, characterized in that: The method comprises: Running a target application having native functions and derived functions, wherein the native functions are implemented by native programs of the target application, and the derived functions are implemented by corresponding derived programs of the target application; During the running of the target application, when a target function in the target application meets a version update condition, obtaining an update program corresponding to the target function; The target function is one of the native function and the derived function, and the update program is one of the update program corresponding to the native program and the update program corresponding to the derived program; Based on the update program, the target function in the target application is independently updated.

2. The method according to claim 1, characterized in that Before running the target application having the native function and the derived function, the method further includes: Acquire a native program for realizing the native function, and run a native application having the native function based on the native program; In the process of running the native application, in response to a creation instruction for the derivative function, obtaining a derivative program corresponding to the derivative function, and determining a target access method for the derivative program to access the native application; According to the target access method, the derivative program is accessed into the native application to obtain a target application having the native function and the derivative function.

3. The method according to claim 2, characterized in that The determining a target access method for the derived program to access the native application includes: Acquire auxiliary information of the derived function, where the auxiliary information is used to indicate whether the derived function of the target application is a native function of other applications; When the auxiliary information indicates that the derived function is a native function of the other application, determining the target access mode as the first access mode; When the auxiliary information indicates that the derived function is not a native function of the other application, determining the target access mode as a second access mode; Among them, the access cost of the second access method is greater than the access cost of the first access method.

4. The method according to claim 3, characterized in that: When the target access mode is the first access mode, accessing the derivative program in the native application according to the target access mode to obtain a target application having the native function and the derivative function includes: Creating a derivative process in the native application for accessing the derivative program, and accessing the derivative program through the derivative process to obtain the target application; The running of the target application having native functions and derivative functions includes: The native process of the target application is called and the native program is run to implement the native function of the target application, and the derivative process of the target application is called and the derivative program is run to implement the derivative function of the target application.

5. The method according to claim 3, characterized in that: When the target access mode is the second access mode, accessing the derivative program in the native application according to the target access mode to obtain a target application having the native function and the derivative function includes: Performing adaptation processing on the derivative program corresponding to the derivative function to obtain a target derivative program, wherein the target derivative program can adapt to the native process of the native application; Accessing the target derivative program through the native process of the native application to obtain the target application; The running of the target application having native functions and derivative functions includes: The native process of the target application is called to run the native program and the target derived program to implement the native function and the derived function of the target application.

6. The method according to claim 1, characterized in that When running the target application having the native function and the derived function, the method further includes: Obtaining a program version corresponding to the native program in the currently running target application and a program version corresponding to the derivative program in the currently running target application; When the running time of the target application reaches a first time threshold, obtaining the latest program version corresponding to the native program; Determining native function information of the native function based on the latest program version corresponding to the native program and the program version corresponding to the native program, wherein the native function information is used to indicate whether the native function is a target function that meets the version update condition; When the running time of the target application reaches a second time threshold, obtaining the latest program version corresponding to the derivative program, the first time threshold being less than the second time threshold; Based on the latest program version corresponding to the derived program and the program version corresponding to the derived program, derivative function information of the derived function is determined, wherein the derivative function information is used to indicate whether the derived function is a target function that meets the version update condition.

7. The method according to claim 6, characterized in that The determining the native function information of the native function based on the latest program version corresponding to the native program and the program version corresponding to the native program includes: When the program version corresponding to the native program is the latest program version corresponding to the native program, determining the native function information as first function information, the first function information being used to indicate that the native function is not a target function that satisfies the version update condition; When the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function information is determined as second function information, and the second function information is used to indicate that the native function is a target function that meets the version update condition.

8. The method according to claim 6, characterized in that The determining the native function information of the native function based on the latest program version corresponding to the native program and the program version corresponding to the native program includes: When the program version corresponding to the native program is not the latest program version corresponding to the native program and an update instruction for the native function is received, the native function information is determined as second function information, and the second function information is used to indicate that the native function is a target function that meets the version update condition.

9. The method according to claim 6, characterized in that The determining the derivative function information of the derivative function based on the latest program version corresponding to the derivative program and the program version corresponding to the derivative program includes: When the program version corresponding to the derived program is the latest program version corresponding to the derived program, determining the derived function information as third function information, wherein the third function information is used to indicate that the derived function is not a target function that satisfies the version update condition; When the program version corresponding to the derivative program is not the latest program version corresponding to the derivative program and an update instruction for the derivative function is received, the derivative function information is determined as fourth function information, and the fourth function information is used to indicate that the derivative function is a target function that meets the version update condition.

10. The method according to claim 1, characterized in that When running the target application having the native function and the derived function, the method further includes: In response to the update instruction for the native function, acquiring the latest program version corresponding to the native program and the program version corresponding to the native program in the currently running target application; When the program version corresponding to the native program is not the latest program version corresponding to the native program, the native function is determined as a target function that meets the version update condition.

11. The method according to claim 1, characterized in that: When running the target application having the native function and the derived function, the method further includes: In response to an update instruction for the derivative function, acquiring a latest program version corresponding to the derivative program and a program version corresponding to the derivative program in a currently running target application; When the program version corresponding to the derived program is not the latest program version corresponding to the derived program, the derived function is determined as a target function that meets the version update condition.

12. The method according to claim 1, characterized in that The independently updating the target function in the target application based on the update program includes: When the target function is the native function, the native program connected to the target application is replaced with an update program corresponding to the native program to obtain the target application after the native function is independently updated; When the target function is the derived function, the derived program connected to the target application is replaced with an update program corresponding to the derived program to obtain the target application after the derivative function is independently updated.

13. A device for updating the function of an application, characterized in that: The device comprises: A running module, used to run a target application having native functions and derived functions, wherein the native functions are implemented by native programs of the target application, and the derived functions are implemented by corresponding derived programs of the target application; an acquisition module, configured to acquire, during the process of running the target application, an update program corresponding to the target function when the target function in the target application meets a version update condition; wherein the target function is one of the native function and the derived function, and the update program is one of the update program corresponding to the native program and the update program corresponding to the derived program; An update module is used to independently update the target function in the target application based on the update program.

14. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor is used to implement the function update method of the application described in any one of claims 1 to 12 when executing the computer executable instructions or computer programs stored in the memory.

15. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the function updating method of the application according to any one of claims 1 to 12 is implemented.

16. A computer program product comprising a computer program or computer executable instructions, characterized in that When the computer program or computer executable instruction is executed by a processor, the function updating method of the application according to any one of claims 1 to 12 is implemented.