Application updating method and device and electronic equipment

By loading and loading target components according to the usage environment when the application is started, the problem of long review and queueing in existing application update methods is solved, and fast and instant application updates are achieved, improving user experience and operational efficiency.

CN119556950APending Publication Date: 2025-03-04SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411441581.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing application update method requires a long review and queueing cycle, making it difficult for developers and application manufacturers to quickly push feature updates or fix online problems, affecting user experience and operational efficiency.

Method used

Complete application updates by determining its usage environment when the target application is started and loading and loading the target components according to the environment. This method does not require building the components of the extension function into the application, avoiding store updates and auditing.

Benefits of technology

It realizes application update effect with fast and instant coverage of large-scale users, improves application update efficiency and user experience, and simplifies the execution of operational content strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556950A_ABST
    Figure CN119556950A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an application updating method and device and electronic equipment, and the method comprises the steps: responding to the starting of a target application, and determining the current use environment of the target application; according to the use environment, a component link corresponding to a target component to be loaded is determined, the target component is loaded according to the component link, and the target component is a result obtained by performing component-based development on the extended function of the target application; and loading the target component into a component container of the target application to complete updating of the target application. When the target application is started, the extended function of the application is loaded and called in the form of the component through the component link to complete extension of the function of the target application, and the component corresponding to the extended function does not need to be built in the target application, so that application updating does not need to be completed through a store, long auditing is not needed, the application updating efficiency is improved, and the user experience is improved. And user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of application updating, and specifically to an application updating method, device and electronic device. Background Art

[0002] Currently, to launch a new feature in an application (such as the Roku application), it is often necessary to go through the steps of development coding, testing, project packaging, hardware signing zip package, uploading the application package and passing static detection, and waiting in line for launch.

[0003] Due to the strict application review policy and certain objective factors, applications often fail the review process and are returned for adjustment. After passing the review, they generally face a 3-7 day online queue period. Even if developers or application manufacturers only make minor functional adjustments to the application or fix online problems, they often need to wait for a long period of time before the update can be launched online. Moreover, since there is a certain delay in pushing updates, it often takes at least a week from the completion of the development of a function and submission for review to the coverage of the updated content to the vast majority of application users. This is difficult for application manufacturers to accept in some operating scenarios.

[0004] Therefore, how to push updates for certain functions of the application or fixes for online problems without going through a lengthy review and release process, and achieve rapid and immediate coverage of a wide range of users, will greatly facilitate the implementation of operational content strategies and improve the user experience of the application. Summary of the invention

[0005] The embodiments of the present application provide an application update method, device, and electronic device, which can improve application update efficiency and enhance user experience.

[0006] In a first aspect, an embodiment of the present application provides an application update method, the method comprising:

[0007] In response to the target application being started, determining a current usage environment of the target application;

[0008] Determining a component link corresponding to a target component to be loaded according to the usage environment, and loading the target component according to the component link, wherein the target component is a result of component-based development of a function extended by the target application;

[0009] The target component is loaded into the component container of the target application to complete the update of the target application.

[0010] In a second aspect, an embodiment of the present application further provides an application updating device, the device comprising:

[0011] A response module, configured to determine a current usage environment of the target application in response to the target application being started;

[0012] A loading module, used to determine a component link corresponding to a target component to be loaded according to the usage environment, and load the target component according to the component link, wherein the target component is a result of component-based development of a function extended by the target application;

[0013] The loading module is used to load the target component into the component container of the target application to complete the update of the target application.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and which implements the steps in the above-mentioned application update method when the computer program is executed by the processor.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned application update method are implemented.

[0016] In a fifth aspect, the embodiments of the present application further provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0017] In response to the start of a target application, an embodiment of the present application determines the current usage environment of the target application, determines a component link corresponding to the target component to be loaded based on the usage environment, and loads the target component based on the component link, wherein the target component is a component-based development result of the function extended to the target application, and loads the target component into a component container of the target application to complete the update of the target application.

[0018] Among them, the expansion of the target application function is completed by loading and calling the application extension function in the form of components through component links when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store, and no lengthy review is required, which improves the application update efficiency and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 is a scenario diagram of the application update method provided in an embodiment of the present application;

[0021] Figure 2 is a flowchart of an application updating method provided in an embodiment of the present application;

[0022] Figure 3 This is the process of loading the target component in the application update method provided in the embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a target component for determining files of different formats corresponding to different usage environments of a target application provided by an embodiment of the present application;

[0024] Figure 5 It is a compilation flow chart of target components and target applications corresponding to the development environment provided in the embodiment of the present application;

[0025] Figure 6 It is a compilation flow chart of target components and target applications corresponding to the production environment provided in the embodiment of the present application;

[0026] Figure 7 is a schematic diagram of the structure of an application updating device provided in an embodiment of the present application;

[0027] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] The embodiments of the present application provide an application update method, device, electronic device, and computer-readable storage medium. Specifically, the embodiments of the present application provide an application update device suitable for electronic devices, which is used to update applications to overcome the long review and waiting time for release required for application store updates, and improve application update efficiency. The electronic device includes a terminal device, which includes but is not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, or a television.

[0030] See also Figure 1 , Figure 1 : is a schematic diagram of a scenario in which a terminal device according to an embodiment of the present application executes the application update method, wherein the specific execution process of the terminal device executing the application update method is as follows:

[0031] In response to the start of the target application, the terminal device 10 determines the current usage environment of the target application, determines the component link corresponding to the target component to be loaded according to the usage environment, loads the target component according to the component link, loads the target component into the component container of the target application, and completes the update of the target application.

[0032] The target component is the result of component-based development of the extended functions of the target application.

[0033] It can be understood that the terminal device of the embodiment of the present application completes the expansion of the target application function by loading and calling the application extended function in the form of a component when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store and no lengthy review is required, which improves the application update efficiency and improves the user experience.

[0034] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0035] See also Figure 2 , Figure 2 A flowchart of an application update method provided by an embodiment of the present application. Although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the drawings.

[0036] 101. In response to a target application being started, determine a current usage environment of the target application.

[0037] It is understandable that the use of the application can occur in the actual user use stage, that is, the production environment, or in the developer's development and testing stage, that is, the development environment. Therefore, the use environment at least includes the production environment and the development environment. Among them, the embodiment of the present application takes the target application as the Roku application as an example.

[0038] It should be noted that the production environment usually involves the user's private data. Therefore, compared with the development environment, the production environment usually has some additional encryption and verification operations. It can be understood that the application of the production environment is the application of the development environment with the addition of encryption, verification and other functional operations. In some scenarios, the development environment and the production environment also usually involve different application formats. For example, in the development stage, the application is usually in a compressed format after packaging (such as .zip format), while the production application is in an encrypted non-compressed format (such as .pkg format).

[0039] The startup of an application refers to: executing the entry file of the application (such as Main.brs), activating the main thread of the application, and completing a series of steps, such as initialization steps, scene definition steps, etc. The application can be started by responding to a user's touch operation, or by calling other applications. For example, the current application can be started by calling other applications.

[0040] 102. Determine a component link corresponding to a target component to be loaded according to a usage environment, and load the target component according to the component link, wherein the target component is a result of component-based development of functions extended by a target application.

[0041] The target component is the result of component-based development of the extended functions of the target application. The target component is stored in a specified path, and a component link of the target component is obtained. Based on the component link, the target component can be called and its functions can be used.

[0042] Among them, since the formats of target components required by different usage environments are different, the storage links of target components in different formats are different. Therefore, the component link corresponding to the target component is obtained based on the current usage environment of the target application to improve the accuracy of the target component call.

[0043] 103. Load the target component into the component container of the target application to complete the update of the target application.

[0044] For example, when the target component is loaded, the component element corresponding to the target component is loaded into the component container (Container) defined by the target application by adding child elements, thereby completing the component hot loading process. The process of loading into the component container is equivalent to establishing configuration information for the target component in the configuration file (.XML), so that the target application can be started smoothly and execute the functions of the target component.

[0045] In summary, the embodiments of the present application expand the functions of the target application by loading and calling the extended functions of the application in the form of components through component links when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store and no lengthy review is required, which improves the application update efficiency and improves the user experience.

[0046] Optionally, in an embodiment of the present application, the componentization of the functions of the target application extension may be implemented based on a component library (ComponentLibrary), that is, optionally, in some embodiments of the present application, the step of "loading the target component according to the component link" includes:

[0047] Create a component initialization function;

[0048] Pass the component link as a resource identifier to the component initialization function;

[0049] Execute the component initialization function and load the target component according to the resource identifier.

[0050] Among them, the component initialization function refers to the ComponentLibrary initialization method.

[0051] Among them, the component link can be stored in the target field, such as in the target field of the manifest file, and each usage environment and its corresponding component link can be obtained by using the corresponding relationship between the usage environment and the target field, that is, optionally, in some embodiments of the present application, the step of "determining the component link corresponding to the target component to be loaded according to the usage environment" includes:

[0052] Obtaining a first correspondence between a usage environment and a target field, wherein each target field is used to store a component link;

[0053] According to the corresponding relationship, the field value of the target field is read from the target file according to the current usage environment to obtain the component link.

[0054] like Figure 3 As shown, Figure 3 This is the process of loading the target component in the application update method provided in the embodiment of the present application. Specifically, the process of loading the target component includes:

[0055] 111. Start the target application;

[0056] Specifically, it includes: executing the entry file Main.brs of the target application, activating the main thread of the application, and executing subsequent processes;

[0057] 112. Initialize Screen;

[0058] Specifically, it includes: creating roSGScreen (application screen) and roMessagePort (message port) objects, and receiving and processing various events (such as roSystemLogEvent, roSGScreenEvent, roSGNodeEvent, etc.) through the message port in the main thread.

[0059] 113. Create a Scene and initialize the Scene;

[0060] Specifically, it includes: creating a custom scene in Screen, and some indicative content during the scene initialization process.

[0061] 114. Get the Lib Url sequence set according to the current usage environment;

[0062] Specifically, after the Scene is initialized, it is necessary to obtain the LibUrl (component source) sequence set according to the current target application usage environment, which is divided into the following two environments:

[0063] 1) Development environment (Debug environment).

[0064] a. If the DEBUG_FALLBACK_TO_EMBEDDED flag is identified, the values ​​of the two fields lib_zip_debug_url and lib_zip_embedded_url in the manifest file are read and the sequence is returned:

[0065]

[0066]

[0067] Indicates that the target component's data packet should be used with priority for debugging.

[0068] b. If there is no such flag, only the sequence [{type:“lib_zip_debug_url”,link:lib_zip_debug_url}] is returned.

[0069] 2) Production environment.

[0070] a. Read the LibUrls stored in the Registry. The Urls are generally stored in the Registry Section after obtaining data through the interface for online component version control. If the read data is not empty, the read Lib Url sequence set is directly returned. Otherwise, the three attribute values ​​of lib_squashfs_remote_url, lib_zip_remote_url, and lib_zip_embedded_url in the manifest file are read in sequence and the sequence is returned:

[0071]

[0072] Indicates that the signature package is used first. The signature package refers to a data package with encryption, signature and other target components suitable for the production environment.

[0073] Among them, through the above-mentioned process of obtaining the Lib Url sequence set of the corresponding usage environment, a sequence set that meets the current usage environment is obtained, and different usage environments obtain component links matching the usage environment based on corresponding different attribute values ​​or field values ​​to obtain the Lib Url sequence set.

[0074] 115. Traverse the sequence set in sequence through the pointer, and determine whether the component links traversed in sequence are valid. If not, execute step 116; if valid, execute step 117;

[0075] Specifically, it includes: judging whether the current url pointer is valid in the url sequence set: the url pointer represents the corresponding index of the value taken from the Lib Url sequence set returned in step 114, the initial state is 0, recorded as libUrlIndex; when libUrlIndex is greater than or equal to the number of elements in the LibUrl sequence set, it can be regarded that the value of libUrlIndex is invalid, otherwise, it is valid.

[0076] 116. Perform target component acquisition exception processing;

[0077] Specifically, when the target component (lib for short) gets an exception, it is necessary to clear the LibUrls recorded in the Registry, and pop up a target component error prompt to remind the developer or user of the problem point so as to provide feedback, and then end the application update process, that is, end the target component loading process.

[0078] 117. Clear the relevant storage data of the current component;

[0079] Specifically, it includes: when the URL can be effectively obtained from the sequence set according to libUrlIndex, first clear the component library (ComponentLibrary) and related storage data that may be contained in the target application (where the target application is relative to the target component, also known as the parent application), that is, clear the previous version or historical data of the target component, and read the link field value from the obtained URL as the uri, and pass it to the ComponentLibrary initialization method.

[0080] 118. Create a new component library and assign uri to initiate a request;

[0081] Specifically, it includes: creating ComponentLibrary and assigning uri to initiate a request: when the ComponentLibrary initialization method receives the uri parameter, manually create a ComponentLibrary element in the Scene, assign a value to the uri attribute of the element and listen to the asynchronous state of the component obtained from the uri;

[0082] 119. Monitor whether the loading status of the target component is failed. If it is failed, execute step 120; if it is ready, execute step 121;

[0083] Among them, the state of loading Lib from uri (component source) is divided into two situations, namely fail state and ready state.

[0084] 120. The value of the url pointer libUrlIndex is increased by 1, and the process returns to step 115;

[0085] 121. It indicates that the target component loading work is completed, then the ComponentLibrary element of the target component is directly loaded into the component container (Container) defined by the target application by adding child elements, so as to complete the component loading process.

[0086] In addition, after the target component is loaded, the target application will enter the subsequent component internal page initialization and logic execution.

[0087] In the embodiment of the present application, different usage environments of the target application correspond to different application formats of the target application, that is, different application formats correspond to different usage environments, and different usage environments or application formats can process or call target components of different formats, wherein the different formats of the target components refer to format files produced at different processing stages in the generation cycle of the target components.

[0088] That is, optionally, in some embodiments of the present application, before the step of “obtaining a first correspondence between the usage environment and the target field”, the method further includes:

[0089] In at least one generation phase of a generation cycle of the target component, format files of different formats of the target component are respectively generated;

[0090] Establishing a second correspondence between each application format and each format file in a generation cycle of the target application, each application format corresponds to a different usage environment;

[0091] Determine the storage path of each format file and obtain the component link;

[0092] Generate target fields for each component link and obtain a first correspondence between the usage environment and the target field.

[0093] Among them, in an embodiment of the present application, the target component of the corresponding format file can be selected based on the application format of the target application, that is, the requirements or characteristics of the target application. For example, for the application format that needs to meet the encryption requirements of the production environment, it is necessary to match the encrypted target component; for the application format that does not need to meet the encryption requirements of the development environment, it can match the unencrypted target component.

[0094] like Figure 4 , Figure 4 : is a schematic diagram of determining target components of files of different formats corresponding to different usage environments of a target application provided by an embodiment of the present application. Among them, the embodiment of the present application shows four matching situations of target components of files of different formats with different usage environments, specifically, including:

[0095] Matching method 1: After the target component Lib is compiled through source code, the compilation result (LibDist) is generated in the build directory; Lib Dist is packaged into a Lib.zip package, which can be accessed through the specified port of the local service; the App source code of the target application is compiled and packaged to generate an App.zip package in the dist directory. When the App.zip package is loaded onto the Roku hardware and runs (that is, when the target application in the App.zip format is started), the specified local service port is accessed through "lib_zip_debug_url" to obtain Lib.zip, and then the target component in the Lib.zip format can be loaded;

[0096] Matching method 2: The target component Lib is compiled and packaged through source code. After the Lib.zip package is generated in the dist directory, a Lib directory is generated in the parent application App source code directory, and Lib.zip is copied to the Lib directory; then the parent application is compiled and packaged together with the App source code and Lib.zip, and the App.zip package is output in the dist directory; at this time, when the App.zip package is loaded into the Roku hardware (that is, after the target application in the App.zip format is started), the Lib.zip in the local directory of the project is accessed through "lib_zip_embedded_url" (for example: pkg: / components / Lib / Lib.zip), and then the target component in the Lib.zip format can be loaded;

[0097] Matching methods 3 and 4: After the target component Lib is compiled and packaged through source code, compressed with squashfs and encrypted with Roku hardware, two packages, Lib.squashfs.zip and Lib.pkg, are generated in the release directory. Lib.pkg and Lib.zip are published to the public network warehouse for version and download management. On the target application APP side, App Source is also compiled and packaged through source code, compressed with squashfs and encrypted with Roku hardware, and two packages, App.squashfs.zip and App.pkg, are generated in the release directory. After App.pkg is released through official channels, it can be installed and initialized on Roku hardware and can be downloaded remotely through "lib_squashfs_remote_url" and "lib_zip_remote_url". Then, the target component in the format of Lib.pkg or Lib.zip can be loaded.

[0098] Among them, in the above method, App.zip corresponds to the target application of the development environment, and App.pkg corresponds to the target application of the production environment.

[0099] Accordingly, since the file formats obtained by packaging at different stages of the target component generation cycle are different, for example, the Lib zip package of matching mode 3 may have two packages, Lib.squashfs.zip and Lib.zip, in terms of format. Then, according to the actual deployment strategy of the Lib package, it may be deployed on servers in N regions. Therefore, only matching mode 3 may have 2*N Lib package download links. Therefore, there may be multiple component links suitable for the current use environment. Therefore, it is necessary to select a target component link from multiple component links to load the target component, that is, optionally, in some embodiments of the present application, the component link includes at least two steps "loading the target component according to the component link", including:

[0100] Filtering a target component link from at least two component links according to a preset strategy;

[0101] Loads the target component according to the target component link.

[0102] The preset strategies include priority, file size, etc., wherein the priority can be determined by the loading success rate of each component link in the historical time. For example, a component link with a high success rate has a higher priority.

[0103] It is understandable that in order to ensure that the target application can successfully load the target component, the target component may be compiled first, and then the target application may be compiled. That is, optionally, in some embodiments of the present application, before the step of "in response to the target application starting, determining the target application in the current usage environment", the method further includes:

[0104] The first compilation process of the target component is executed first, and then the second compilation process of the target application is executed, wherein:

[0105] If the use environment is a development environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing and compilation processing;

[0106] If the use environment is a production environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing, compilation processing and post-compilation processing.

[0107] For details, please refer to Figure 5 As shown, Figure 5 This is a compilation flow chart of the target component and target application corresponding to the development environment provided in the embodiment of the present application. Among them, the compilation of the target component is first processed, and the pre-component compilation work (preBuild: dev), component compilation work (build: dev), and component post-component compilation work (postBuild: dev) need to be performed in sequence; then the compilation work of the target application in the development environment needs to be processed, and the pre-application compilation work (preBuild: dev) and application compilation work (build: dev) need to be performed in sequence; the contents of the above-mentioned tasks are as follows:

[0108] 131. Work before component compilation (preBuild:dev): Delete the componentLib directory under the build directory, which is used to store the Lib source code compilation results;

[0109] 132. Component compilation (build:dev): Use brighterscript to compile the component source code to the build / componentLib directory, and compress the contents of the directory into a zip package to the dist directory; the contents of build / componentLib will be automatically packaged into the local service when debugging is started, and the zip package can be accessed through the configured specified port;

[0110] 133. Post-component compilation work (postBuild:dev): Create a new Lib directory under the App source code directory, and copy the Lib.zip package generated in the previous step under dist to the Lib directory;

[0111] 134. Pre-application compilation work (preBuild:dev): Delete the app directory under the build directory, which is used to store the App source code compilation results;

[0112] 135. Application compilation (build:dev): compile the App source code to the build / app directory through brighterscript, and zip the contents of the directory to the dist directory;

[0113] In summary, after executing the above steps in sequence, the compiled content and zip packages related to App and Lib are available in the build and dist directories, and then the loading process of the target component, that is, the application update process, can be executed. Similarly, after the execution of steps 131 to 135, a joint debugging test can also be performed to verify whether the target application can successfully load the target component.

[0114] For example, Figure 6 , Figure 6 This is a compilation flow chart of the target component and target application corresponding to the production environment provided by the embodiment of the present application. Among them, the compilation of the target component is first processed, and the pre-component compilation work (preBuild: dev), component compilation work (build: dev), and component post-compilation work (postBuild: dev) need to be performed in sequence; then the compilation work of the target application in the development environment needs to be performed in sequence. The pre-application compilation work (preBuild: dev), application compilation work (build: dev), and application post-compilation work (postBuild: prod) need to be performed; the contents of the above-mentioned tasks are as follows:

[0115] 141. Work before component compilation (preBuild:dev): Delete the componentLib directory under the build directory, which is used to store the Lib source code compilation results;

[0116] 142. Component compilation (build:dev): Lib / build:prod: Use brighterscript to compile the component source code to the build / componentLib directory, and compress the contents of the directory into a zip package in the dist directory; the contents of build / componentLib will be automatically packaged into the local service when debugging is started, and the zip package can be accessed through the configured specified port, but Source Map is not enabled during the compilation process; that is, the mapping relationship between the compilation result and the source file is generated, which plays a role in source code protection;

[0117] 143. Post-component compilation work (postBuild:dev): Create a new Lib directory in the App source directory, and copy the Lib.zip package generated in the previous step under dist to the Lib directory. At the same time, copy the Lib.zip under dist to the release directory, and perform squashfs compression based on Lib.zip to generate Lib.squashfs.zip, and encrypt Lib.squashfs.zip through Roku hardware to generate Lib.pkg;

[0118] 144. Pre-application compilation work (preBuild:dev): Delete the app directory under the build directory, which is used to store the App source code compilation results;

[0119] 145. Application compilation (build:dev): Use brighterscript to compile the App source code to the build / app directory, and zip the contents of the directory to the dist directory, but do not enable Source Map generation during the compilation process;

[0120] 146. Post-application compilation work (postBuild:prod): Copy App.zip in the dist directory to the release directory, perform squashfs compression based on App.zip to generate App.squashfs.zip, and encrypt App.squashfs.zip through Roku hardware to generate App.pkg;

[0121] In summary, by sequentially executing the above steps 141 to 146, after obtaining the required zip package and pkg package and publishing them to the public network warehouse, online application loading processing can be performed through matching methods 2, 3, and 4.

[0122] The description of each component link is as follows:

[0123] 1.lib_zip_debug_url: the zip package address of the target component of the local server in online debug mode;

[0124] 2.lib_zip_embedded_url: The target component is compiled and packaged separately, and the local file address of the zip package of the target component embedded in the target application;

[0125] 3.lib_zip_remote_url: The remote download address of the zip package of the target component that is compiled and packaged separately and published to the public network warehouse;

[0126] 4.lib_squashfs_remote_url: The remote download address of the pkg package published to the public network warehouse after the target component is compiled and zipped separately, compressed by squashfs and encrypted and signed by Roku hardware.

[0127] Among them, in the embodiments of the present application, after the compilation processes of the development environment and the production environment Lib and app are formulated, the compilation instructions of the two environments can be added to the editor plug-in script and distinguished. The compilation package of which environment is needed can select the corresponding instructions for execution, that is, optionally, in some embodiments of the present application, the step of "first executing the first compilation process of the target component, and then executing the second compilation process of the target application" includes:

[0128] Determine the target compilation instructions according to the usage environment;

[0129] The first compilation process and the second compilation process of the use environment are triggered in sequence according to the target compilation instructions, wherein the first compilation process is used to compile the target component, and the second compilation process is used to compile the target application.

[0130] It can be understood that by switching the compilation process of target applications and target components corresponding to different usage environments through target compilation instructions, developers can seamlessly switch between the two environments and complete application integration and efficiency improvement.

[0131] Optionally, in the embodiment of the present application, an online component version control strategy may be set to control the online component version rollback, for example, according to Figure 1 In the component update loading scheme shown, when obtaining the component URL in the production environment, as described in the production environment section of step 114, the Lib is first obtained according to the urls recorded in the Registry; and the urls recorded in the Registry are the data requested from the cloud service through the network interface after the application is started; this means that the source and priority of the Lib that the online parent application needs to obtain can be configured through the cloud interface;

[0132] Therefore, when there are problems with the versions of some online components in use, you can use the background component version configuration to specify the normally functioning version for priority loading, which will take effect immediately the next time the user opens the application, thereby implementing an efficient version control strategy based on the application update solution.

[0133] In summary, the embodiments of the present application expand the functions of the target application by loading and calling the extended functions of the application in the form of components through component links when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store and no lengthy review is required, which improves the application update efficiency and improves the user experience.

[0134] Specifically, ComponentLibrary is used to implement componentization of application functions, and four methods of constructing Lib packages and loading them into APP are provided. For different environments, APP and Lib will have different compilation and packaging processes. The Lib packages generated by different processes will generate independent acquisition links after deployment, and finally be added to the LibUrl sequence set of the appropriate environment, and return data to the APP in the form of an interface to call and obtain the latest LibUrl sequence set; when the APP is running, it will select the Lib link in LibUrl to obtain and hot load the component package according to the current environment and appropriate strategies.

[0135] In order to better implement the application update method of the present application, the present application also provides an application update device based on the above application update method. The meanings of the terms are the same as those in the above application update method, and the specific implementation details can refer to the description in the method embodiment.

[0136] See also Figure 7 , Figure 7 : is a schematic diagram of the structure of an application updating device provided in an embodiment of the present application, wherein the application updating device may be specifically as follows:

[0137] A response module 201 is used to determine the current usage environment of the target application in response to the target application being started;

[0138] The loading module 202 is used to determine the component link corresponding to the target component to be loaded according to the use environment, and load the target component according to the component link, wherein the target component is the result of component-based development of the function extended by the target application;

[0139] The loading module 203 is used to load the target component into the component container of the target application to complete the update of the target application.

[0140] Optionally, in some embodiments of the present application, loading the target component according to the component link includes:

[0141] Create a component initialization function;

[0142] Pass the component link as a resource identifier to the component initialization function;

[0143] Execute the component initialization function and load the target component according to the resource identifier.

[0144] Optionally, in some embodiments of the present application, determining a component link corresponding to a target component to be loaded according to a usage environment includes:

[0145] Obtaining a first correspondence between a usage environment and a target field, wherein each target field is used to store a component link;

[0146] According to the corresponding relationship, the field value of the target field is read from the target file according to the current usage environment to obtain the component link.

[0147] Optionally, in some embodiments of the present application, before obtaining the first correspondence between the usage environment and the target field, the method further includes:

[0148] In at least one generation phase of a generation cycle of the target component, format files of different formats of the target component are respectively generated;

[0149] Establishing a second correspondence between each application format and each format file in a generation cycle of the target application, each application format corresponds to a different usage environment;

[0150] Determine the storage path of each format file and obtain the component link;

[0151] Generate target fields for each component link and obtain a first correspondence between the usage environment and the target field.

[0152] Optionally, in some embodiments of the present application, the component link includes at least two, and loading the target component according to the component link includes:

[0153] Filtering a target component link from at least two component links according to a preset strategy;

[0154] Loads the target component according to the target component link.

[0155] Optionally, in some embodiments of the present application, in response to the target application being started, determining that the target application is before the current usage environment, the method further includes:

[0156] The first compilation process of the target component is executed first, and then the second compilation process of the target application is executed, wherein:

[0157] If the use environment is a development environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing and compilation processing;

[0158] If the use environment is a production environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing, compilation processing and post-compilation processing.

[0159] Optionally, in some embodiments of the present application, the first compilation process of the target component is executed first, and then the second compilation process of the target application is executed, including:

[0160] Determine the target compilation instructions according to the usage environment;

[0161] The first compilation process and the second compilation process of the use environment are triggered in sequence according to the target compilation instructions, wherein the first compilation process is used to compile the target component, and the second compilation process is used to compile the target application.

[0162] In the embodiment of the present application, the response module 201 first responds to the start of the target application and determines the current usage environment of the target application. Then, the loading module 202 determines the component link corresponding to the target component to be loaded according to the usage environment, and loads the target component according to the component link, wherein the target component is the result of component-based development of the extended functions of the target application. Subsequently, the loading module 203 loads the target component into the component container of the target application to complete the update of the target application.

[0163] Among them, the embodiment of the present application completes the expansion of the target application function by loading and calling the application extension function in the form of components through component linking when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store, and no lengthy review is required, which improves the application update efficiency and improves the user experience.

[0164] In addition, the present application also provides an electronic device, such as Figure 8 As shown, it shows a schematic diagram of the structure of the electronic device involved in this application, specifically:

[0165] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0166] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.

[0167] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0168] The electronic device also includes a power supply 303 for supplying power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 303 can also include any components such as one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, and power status indicators.

[0169] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0170] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application program stored in the memory 302, thereby implementing the steps in any one of the application update methods provided in the embodiments of the present application.

[0171] Embodiments of the present application

[0172] In response to the start of the target application, the current usage environment of the target application is determined, the component link corresponding to the target component to be loaded is determined according to the usage environment, and the target component is loaded according to the component link, wherein the target component is a component-based development result of the function extended to the target application, and the target component is loaded into the component container of the target application to complete the update of the target application.

[0173] Among them, the expansion of the target application function is completed by loading and calling the application extension function in the form of components through component links when the target application is started. Since there is no need to build the components corresponding to the extended functions into the target application, there is no need to complete the application update through the store, and no lengthy review is required, which improves the application update efficiency and improves the user experience.

[0174] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0175] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0176] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any application update method provided in the present application.

[0177] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0178] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0179] Since the instructions stored in the computer-readable storage medium can execute the steps in any application update method provided in the present application, the beneficial effects that can be achieved by any application update method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0180] The above is a detailed introduction to an application update method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An application update method, characterized in that: The method comprises: In response to the target application being started, determining a current usage environment of the target application; Determine a component link corresponding to a target component to be loaded according to the usage environment, and load the target component according to the component link, wherein the target component is a result of component-based development of a function extended by the target application; The target component is loaded into the component container of the target application to complete the update of the target application.

2. The application updating method according to claim 1, characterized in that: The loading of the target component according to the component link comprises: Create a component initialization function; Passing the component link as a resource identifier to the component initialization function; The component initialization function is executed, and the target component is loaded according to the resource identifier.

3. The application updating method according to claim 1, characterized in that: The determining, according to the usage environment, a component link corresponding to the target component to be loaded includes: Obtaining a first correspondence between a usage environment and a target field, wherein each target field is used to store a component link; According to the corresponding relationship, the field value of the target field is read from the target file according to the current usage environment to obtain the component link.

4. The application updating method according to claim 3, characterized in that: Before obtaining the first correspondence between the usage environment and the target field, the method further includes: In at least one generation phase of the generation cycle of the target component, format files of different formats of the target component are respectively generated; Establishing a second correspondence between each application format and each format file in the generation cycle of the target application, each application format corresponds to a different usage environment; Determine the storage path of each format file and obtain the component link; A target field for each component link is generated, and a first corresponding relationship between the use environment and the target field is obtained.

5. The application updating method according to claim 1, characterized in that: The component links include at least two, and the loading of the target component according to the component links includes: Filtering a target component link from at least two of the component links according to a preset strategy; The target component is loaded according to the target component link.

6. The application updating method according to claim 1, characterized in that: In response to the target application being started, determining that the target application is before the current usage environment, the method further includes: The first compilation process of the target component is first executed, and then the second compilation process of the target application is executed, wherein: If the use environment is a development environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing and compilation processing; If the use environment is a production environment, the first compilation process includes pre-compilation processing, compilation processing and post-compilation processing, and the second compilation process includes pre-compilation processing, compilation processing and post-compilation processing.

7. The application updating method according to claim 6, characterized in that: The first compilation process of the target component is first executed, and then the second compilation process of the target application is executed, including: Determine the target compilation instruction according to the usage environment; The first compilation process and the second compilation process of the use environment are triggered in sequence according to the target compilation instructions, wherein the first compilation process is used to compile the target component, and the second compilation process is used to compile the target application.

8. An application updating device, characterized in that: The device comprises: A response module, configured to determine a current usage environment of the target application in response to the target application being started; A loading module, used to determine a component link corresponding to a target component to be loaded according to the usage environment, and load the target component according to the component link, wherein the target component is a result of component-based development of a function extended by the target application; The loading module is used to load the target component into the component container of the target application to complete the update of the target application.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the application updating method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the application updating method according to any one of claims 1 to 7 are implemented.