Application updating method, device, electronic device and storage medium
By dividing applications according to page dimensions and using containerized technology, the problem of low efficiency of cross-platform application updates is solved, and dynamic updates are realized for the same code to adapt to different platforms, improving development and update efficiency.
Patent Information
- Application Number
- CN202011347607.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-26
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2040-11-26
AI Technical Summary
In the prior art, application update methods need to develop different versions for different platforms, resulting in high development costs and long time, and reducing the efficiency of development and application updates.
Applications are divided according to page dimensions, and use containerization technology to package target update code and application environment information, generate a unified update file, and dynamic updates are achieved by updating configuration information, adapting to different platforms.
Cross-platform application updates are realized through the same code, which improves development and update efficiency and reduces costs and cycles.
Smart Images

Figure CN114546434B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application updating method, device, electronic device, and storage medium. Background Art
[0002] At present, user terminal business needs usually require that the business can be launched quickly and problems can be fixed quickly, so dynamic application updates are very important. In related technologies, application update methods mainly develop different versions for different platforms, and different codes need to be written for different operating system platforms. This increases the development cost and time of developers, reduces the efficiency of development and application updates, and thus increases the cycle of dynamic application updates. Summary of the Invention
[0003] The embodiments of the present application provide an application update method, device, electronic device, and storage medium to improve application update efficiency and achieve adaptation to different platforms.
[0004] The specific technical solutions provided in the embodiments of this application are as follows:
[0005] An embodiment of the present application provides an application update method, including:
[0006] Obtaining a target update code and application environment information for a target page of an application, wherein the application is divided according to a page dimension, so that a target update code is configured correspondingly for at least one page, and the application environment information is encapsulated into a unified container layer;
[0007] Based on containerization technology, the target update code and the application environment information are packaged to obtain an update file of the target page;
[0008] Publishing an updated version of the target page according to the update file, and obtaining update configuration information for the update file, wherein the update configuration information at least includes a page update address;
[0009] The update configuration information is sent to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
[0010] Another embodiment of the present application provides an application update method, including:
[0011] In response to an open trigger operation for an application, obtaining update configuration information for a target page of the application from a server, wherein the update configuration information includes at least a page update address, the update configuration information is obtained by the server packaging the target update code and application environment information of the target page of the application based on containerization technology to obtain an update file for the target page, and publishing an updated version of the target page according to the update file, and the update configuration information is for the update file;
[0012] In response to an opening trigger operation on the target page, the target page corresponding to the page update address in the update configuration information is displayed.
[0013] Another embodiment of the present application provides an application updating device, including:
[0014] A first acquisition module is configured to acquire a target update code and application environment information of a target page of an application, wherein the application is divided according to a page dimension so as to configure a target update code corresponding to at least one page, and the application environment information is encapsulated into a unified container layer;
[0015] A generation module, configured to package the target update code and the application environment information based on containerization technology to obtain an update file for the target page;
[0016] A publishing module, configured to publish an updated version of the target page according to the update file;
[0017] A second acquisition module is configured to obtain update configuration information for the update file, wherein the update configuration information at least includes a page update address;
[0018] The sending module is used to send the update configuration information to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
[0019] Another embodiment of the present application provides an application updating device, including:
[0020] an acquisition module, configured to, in response to an open trigger operation for an application, acquire update configuration information for a target page of the application from a server, wherein the update configuration information includes at least a page update address, and the update configuration information is obtained by the server packaging the target update code and application environment information of the target page of the application based on containerization technology to obtain an update file for the target page, and publishing an updated version of the target page according to the update file, wherein the update configuration information is for the update file;
[0021] The display module is used to display the target page corresponding to the page update address in the update configuration information in response to an opening trigger operation on the target page.
[0022] Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned application update methods when executing the program.
[0023] Another embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above-mentioned application updating methods when executed by a processor.
[0024] In an embodiment of the present application, the application is divided according to the page dimension, so that the target update code is configured for at least one page respectively, and the application environment information is encapsulated into a unified container layer. After obtaining the target update code and application environment information of the target page of the application, the target update code and the application environment information are packaged based on the containerization technology to obtain the update file of the target page; according to the update file, the updated version of the target page is published, and the update configuration information for the update file is obtained, and then the update configuration information is sent to the terminal. The terminal can jump and open the target page of the updated version according to the page update address in the update configuration information. In this way, it is only necessary to provide the target update code for the updated target page, and there is no need to worry about the differences between different platforms. The same code can be used to generate update files adapted to different platforms, and the containerization technology is used to ensure the same running effect on each platform. The terminal can jump to the updated target page by pulling the update configuration information, thereby realizing dynamic update of the application, compatibility with different platforms, and improving development and update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a schematic diagram of the architecture of the application update method in an embodiment of the present application;
[0026] Figure 2 This is a flow chart of an application update method in an embodiment of the present application;
[0027] Figure 3 This is a schematic diagram of the code hierarchy structure in the embodiment of this application;
[0028] Figure 4 This is a code call logic diagram in the embodiment of this application;
[0029] Figure 5 This is a flow chart of another application update method in an embodiment of the present application;
[0030] Figure 6 This is a schematic diagram of the engineering structure divided by page dimension in the embodiment of this application;
[0031] Figure 7 A comparative diagram showing updated versions of pages in different stages of the application in the embodiment of the present application;
[0032] Figure 8 This is the overall logic diagram of the application update method in the embodiment of the present application;
[0033] Figure 9 This is a schematic diagram of the structure of an application updating device according to an embodiment of the present application;
[0034] Figure 10 This is a structural diagram of another application updating device in an embodiment of the present application;
[0035] Figure 11 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0037] To facilitate understanding of the embodiments of this application, several concepts are briefly introduced below:
[0038] Flutter: Google's mobile user interface (UI) framework enables rapid construction of high-quality native user interfaces on Apple's iPhone operating system (iOS) and Android. Flutter works with existing code and is currently completely free and open source. Its main advantages include: cross-platform development capabilities, supporting iOS, Android, and the web; hot reloading for improved development efficiency; a custom-drawn UI engine and compilation to native code, enabling high runtime performance; and the use of the Dart language, which currently also supports compilation to web code.
[0039] Cross-platform: In the embodiments of this application, the platform mainly refers to the operating system on which the application runs, such as Android, iOS, etc., and the embodiment of this application implements cross-platform dynamic application updates, which means that application updates on different platforms can be achieved by using the same code.
[0040] Web page: The APP needs to call the browser kernel of the operating system first, which is equivalent to operating in a web page. It is slightly less stable than the native APP, but web page development is easier and can be cross-platform. For example, the web page is an HTML 5 (H5) page.
[0041] Native page: indicates that the native system kernel is used, which is equivalent to operating directly on the operating system and is more stable.
[0042] Container technology: This technology effectively divides the resources of a single operating system into isolated groups to better balance conflicting resource usage requirements between isolated groups.
[0043] JSBridge: It mainly provides JavaScript with an interface for calling Native functions, allowing the front-end part of hybrid development to easily use Native functions. JSBridge is also a bridge between Native and non-Native. The core is to build a channel for message communication between Native and non-Native. This channel is bidirectional. For example, it can realize data communication between Web and Native, so that Native can call Web's js code, and Web can call Native native code. Among them, when Web calls Native native code, it does not call it directly, but can notify Native what to do according to the rules agreed upon by Web and Native. Native can execute the corresponding code according to the rules.
[0044] Message Channel: It is a web page channel interface that allows you to create a new message channel and send data through its two message port properties.
[0045] Component: A simple encapsulation of data and methods. Typically, a component is a specific object with its own properties and methods. Properties are simple accessors to component data, while methods are simple, visible functions of the component. Components enable drag-and-drop programming, fast property manipulation, and true object-oriented design.
[0046] In related technologies, application update methods mainly develop different versions for different platforms, and different codes need to be written for different operating system platforms. It is impossible to adapt the same code to multiple different platforms, and the performance is poor, which increases the development cost and time of developers, reduces the development and application update efficiency, and increases the cycle of dynamic application updates.
[0047] Therefore, in order to solve the above problems, an application update method is provided in an embodiment of the present application. The application is divided according to the page dimension, so that the target update code is configured for at least one page respectively. Each page can be developed and deployed as an independent project. After obtaining the target update code and application environment information of the target page of the application, the target update code and application environment information are packaged based on the containerization technology to obtain the update file of the target page. According to the update file, the updated version of the target page is published, and the update configuration information for the update file is obtained, and then the update configuration information is sent to the terminal so that the terminal can access the page update according to the page update address in the update configuration information. The address is used to open the target page of the updated version. In this way, the same code, namely the target update code, can be used to generate update products corresponding to different platforms, and the containerization technology can be used to achieve consistent running effects on various platforms and adapt to different platforms. When a target page logic of the application is updated, an update file is generated and an updated version of the target page is released, and the update configuration information of the target page is configured. The application in the terminal can execute the page jump rules according to the page update address in the update configuration information and jump to the target page of the updated version, thereby realizing dynamic update of the target page. The same code can be used for different platforms to implement application updates, saving costs and time and improving update efficiency.
[0048] See Figure 1 , which is a schematic diagram of the architecture of the application update method in an embodiment of the present application, including a terminal 100 and a server 200.
[0049] The terminal 100 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. Various apps may be installed on the terminal 100, such as live broadcast apps, instant messaging apps, etc. Apps are usually constantly updated. When the app in the terminal 100 detects a new version, it may pull the updated version from the server 200 and update and use the updated version of the app.
[0050] The server 200 is the background server of the terminal 100 and can provide various network services for the terminal 100. For different APPs, the server 200 can be considered as the corresponding background server. For example, the server 200 can provide update services for the APP in the terminal 100. Specifically, in the embodiment of the present application, the server 200 can also provide the function of developing and publishing application updates. For example, in the embodiment of the present application, when updating a target page of the application, the developer can create a project for the target page on the development platform, compile, publish, etc., and then generate an update file for the target page. The update configuration information corresponding to the target page can be configured through the management background, and then the update configuration information can be sent to the terminal 100. When the application opening operation is triggered in the terminal 100, the update configuration information can be pulled, and when the opening trigger operation for the target page is received, the page update address can be jumped and accessed according to the page update address in the update configuration information, that is, the updated version of the target page is opened, thereby realizing the dynamic update function of the target page.
[0051] In addition, the process of obtaining the updated file of the target page during the development phase in the embodiment of the present application, and the process of updating the configuration information of the target page of the dynamic configuration application in the management background, can be executed on different servers respectively, or can be deployed on the same server, and there is no restriction in the embodiment of the present application.
[0052] Among them, server 200 can 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), as well as big data and artificial intelligence platforms.
[0053] The terminal 100 and the server 200 can be connected directly or indirectly via wired or wireless communication, which is not limited in this application. Figure 1In the example, the terminal 100 and the server 200 are connected via the Internet to achieve communication between them. Optionally, the above-mentioned Internet uses standard communication technologies, protocols, or a combination of the two. The Internet is typically the Internet, but it can also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or a virtual private network. In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML) and Extensible Markup Language (XML) are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Sockets Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0054] It is worth noting that the application architecture diagram in the embodiment of the present application is intended to more clearly illustrate the technical solutions in the embodiment of the present application, and does not constitute a limitation on the technical solutions provided in the embodiment of the present application. It can be applied to update scenarios of any application, and the technical solutions provided in the embodiment of the present application are also applicable to similar problems. In each embodiment of the present application, the application is applied to Figure 1 The application architecture shown is used as an example for schematic description.
[0055] Based on the above embodiments, see Figure 2 FIG. 1 is a flow chart of an application update method according to an embodiment of the present application, which is applied to the server side. The method includes:
[0056] Step 200: Obtain the target update code and application environment information of the target page of the application, wherein the application is divided according to the page dimension, so as to configure the target update code corresponding to at least one page respectively, and the application environment information is encapsulated into a unified container layer.
[0057] In an embodiment of the present application, the application can be divided according to the page dimension, and each page can be developed and deployed as an independent project, that is, the target update code can be configured for each page separately, so that the update configuration can be performed only for the target page to be updated, thereby improving the simplicity and efficiency of development.
[0058] Among them, the target update code of the target page is used to represent the business logic implementation of the target page. The application environment information includes at least components and operating systems, and in order to achieve consistent running effects on different platforms, it can be adapted to different platforms. Therefore, a containerized architecture can be adopted. Containerization technology can be used to encapsulate the application environment information into a unified container layer. The application environment information of different platforms can be encapsulated in the container layer, and the interface adaptation layer in the container layer communicates with the business logic layer of the upper target update code to shield the differences between different platforms.
[0059] Step 210: Based on the containerization technology, the target update code and the application environment information are packaged to obtain the update file of the target page.
[0060] In this way, through containerization technology, the same target update code can be used to generate update files for different platforms, ensuring consistent operating effects on different platforms.
[0061] Step 220: Publish the updated version of the target page according to the update file, and obtain update configuration information for the update file, wherein the update configuration information at least includes the page update address.
[0062] When executing step 220, it specifically includes:
[0063] 1) Publish the updated version of the target page based on the updated file.
[0064] At present, the application launch process usually requires that after developers develop a new application or a new version of an application, it needs to be released to various application markets. It will be put online for users to download and use only after it is reviewed and approved by the application market. This requires a certain period of time. A long period will reduce the user experience. Therefore, in the embodiment of the present application, after the application development is completed and before the review and launch, the Web version of the target page can be released first, that is, the type of the updated version of the target page can be a Web version, and the update configuration information of the target page can be configured in the background, so that the application can dynamically jump and switch between the Native page and the Web page to enable users to use the updated version of the target page and realize dynamic update of the target page.
[0065] In addition, after the updated version of the target page is reviewed and launched, the embodiment of the present application can also realize automatic overwriting of the native version of the target page to improve the stability of the application. In this way, in the embodiment of the present application, only the web page is used for the dynamically updated target page, and other pages of the application use the native page, which can ensure consistency with the native in terms of performance.
[0066] 2) Obtain update configuration information for the update file.
[0067] In the embodiment of the present application, after the developer obtains the update file of the target page during the development phase, it is also possible to support dynamic configuration of the update configuration information of the target page in the background.
[0068] Among them, the update configuration information includes at least the page update address, and may also include application identification, platform, version number, page identification, page name, page type, etc., which is not limited in the embodiments of the present application.
[0069] Step 230: Send the update configuration information to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
[0070] Specifically, when the terminal receives an open trigger operation for the application, the update configuration information is sent to the terminal so that after opening the application, the terminal responds to the open trigger operation for the target page and accesses the page update address in the update configuration information to open the updated version of the target page.
[0071] That is, in an embodiment of the present application, after the terminal starts the application, the corresponding update configuration information can be pulled from the background server, and then a judgment can be made when the target page is triggered to open. For example, based on the page identifier and version number, when it is determined that the target page has been updated, it can automatically jump to the updated target page according to the page update address.
[0072] In an embodiment of the present application, the application is divided according to the page dimension, and the application environment information is encapsulated into a unified container layer. After obtaining the target update code and application environment information of the target page of the application, the target update code and application environment information are packaged based on the containerization technology to obtain the update file of the target page. According to the update file, the updated version of the target page is published, and the update configuration information for the update file is obtained. Then, the update configuration information can be sent to the terminal so that the terminal accesses the page update address according to the page update address in the update configuration information to open the updated version of the target page. In this way, through the containerization technology, the same target update code can be used to adapt to different platforms, generate corresponding update files, ensure the same operating effect on each platform, and configure the update configuration information of the target page so that when the terminal opens the target page of the application, it can jump to the updated version of the target page, thereby realizing dynamic update of the application. Only the same code needs to be used for different platforms, which is adapted to different platforms, improves development and application update efficiency, and reduces development costs and cycles.
[0073] Based on the above embodiment, the above step 210 is described in detail below. In the embodiment of the present application, a containerized architecture is used to ensure that the same code is consistent on different platforms. In order to better understand the execution process of step 210, the hierarchical structure of the code in the embodiment of the present application is first introduced. Figure 3 The figure shows a schematic diagram of the code hierarchy structure in an embodiment of the present application.
[0074] like Figure 3 As shown, the top layer is the UI layer and the business logic layer, which is the code hierarchy structure corresponding to the target update code and mainly implements business logic functions. The bottom layer can be uniformly called the container layer. The container layer uniformly encapsulates the code hierarchy structure corresponding to the application environment information. In this way, the target update code can be implemented based on the code logic of the container layer to run normally.
[0075] Among them, the container layer includes an interface adaptation layer, a unified interface layer, a general component layer and a platform layer. Specifically, 1) the interface adaptation layer is used to adapt and call the corresponding channel interface according to different platforms. The interface adaptation layer mainly connects the upper business logic layer and the underlying general component layer to shield the differences in interfaces of different platforms; 2) the unified interface layer provides functional interfaces of different update version types. For example, a JavaScript functional interface can be provided for the Web version, and a Dart functional interface can be provided for the Native version, without restriction; 3) the general component layer includes at least the channel interface and components of each platform. For example, the channel interface includes the MessageChannel channel, the JSBridge channel, etc., and components include functional components such as accounts, logs, and sharing; 4) the platform layer provides operating systems for each platform, such as the iOS operating system, the Android operating system, etc.
[0076] based on Figure 3 The code hierarchy structure is as follows:
[0077] S1. According to the specified update version type and the current running platform corresponding to the target page, the functional interface corresponding to the specified update version type is called through the interface adaptation layer, and the channel interface corresponding to the current running platform is called through the corresponding functional interface to obtain the components of the current running platform.
[0078] For example, see Figure 4 As shown, it is a code calling logic diagram in the embodiment of this application, as shown in Figure 4 As shown, the interface adaptation layer communicates with the business logic layer and calls different platform interfaces according to the current running platform. For example, the UI layer and business logic layer are implemented in Dart language. When calling Dart Native, they can ultimately call the underlying components through the MessageChannel channel. Dart Web calls can ultimately call the same underlying components through the JSBridge channel, thereby achieving the use of the same code for the upper Dart business logic layer and the underlying general component layer.
[0079] S2. Based on container technology, the operating system of the current running platform, the obtained components of the current running platform, and the target update code are packaged to obtain the update file of the target page.
[0080] Furthermore, in the embodiments of this application, to enable application updates that can be adapted to different platforms using the same code, it is also necessary to ensure the uniformity of the development language. Specifically, by comparing the performance, consistency, dynamism, and cross-platform support of cross-end development languages such as RN, Weex, React, and Vue, and comprehensively considering various factors, a specific development language can be selected. For example, Flutter may be used as the development language in one or more embodiments.
[0081] It should be noted that the embodiments of the present application do not limit the specific development language, and different development languages can be selected based on actual scenarios and needs. As long as the inventive concept of the application update method in the above-mentioned embodiments of the present application is adopted to achieve dynamic application updates, it should fall within the scope of protection of the embodiments of the present application.
[0082] Based on the above embodiments, see Figure 5 FIG. 1 is a flow chart of another application update method according to an embodiment of the present application, which is applied to a terminal. The method includes:
[0083] Step 500: In response to an opening trigger operation for an application, update configuration information of a target page of the application is obtained from a server.
[0084] Among them, the update configuration information at least includes the page update address, and of course can also include other information, which is not limited in the embodiment of the present application.
[0085] In addition, the update configuration information is obtained by the server packaging the target update code and application environment information of the target page of the application based on containerization technology, and publishing the updated version of the target page according to the update file, and the update configuration information is for the update file.
[0086] The specific execution process is the same as the implementation method of the application update method on the server side described above, and will not be described in detail here.
[0087] Step 510: In response to the opening trigger operation for the target page, the target page corresponding to the page update address in the update configuration information is displayed.
[0088] Specifically, when it is determined that there is update configuration information corresponding to the target page, the page update address in the update configuration information is accessed, and the target page corresponding to the page update address is opened and displayed.
[0089] That is, after the terminal opens the application, when the user needs to open the target page in the application, the terminal can jump to the target page corresponding to the page update address according to the page update address to open the updated version of the target page. The user can use the updated target page to perform operations on the terminal.
[0090] In an embodiment of the present application, the terminal obtains the updated configuration information of the target page of the application from the server in response to the opening trigger operation for the application, and displays the target page corresponding to the page update address in the updated configuration information in response to the opening trigger operation for the target page. In this way, the same code is used on the server side to adapt to different platforms to generate update files and configure the updated configuration information of the target page. The terminal only needs to pull the updated configuration information from the server when opening the application, and when the target page needs to be opened, it automatically jumps and accesses the updated target page according to the updated configuration information, and displays the updated target page on the terminal, thereby realizing dynamic update of the application and improving update efficiency.
[0091] Based on the above embodiment, the application update method in the embodiment of the present application is described below mainly from the perspective of implementation effect, which can be specifically divided into the following two parts:
[0092] Part 1: In the embodiments of this application, applications are divided according to page dimensions.
[0093] See Figure 6 As shown, it is a schematic diagram of the engineering structure of the application divided by page dimension in the embodiment of the present application. Taking the three pages of the application as an example, namely page (PAGE)_A, PAGE_B, and PAGE_C, the application is divided according to the page dimension. During the specific development, the application is a large project, and each page is developed and deployed as an independent sub-project. For example, for PAGE_A, the component corresponding to PAGE_A is constructed and called, and the component can be called from the local memory or from the remote memory. This is not limited in the embodiment of the present application. For example Figure 6 In the example, PAGE_A may include three local components, Component_A, Component_B, and Component_C, and two remote components, Git_Component_A and Git_Component_B, of the remote storage (Remote Git).
[0094] In this way, each page of the application is treated as an independent project. When a page needs to be updated, a sub-project can be created for the page to implement the update configuration of the page.
[0095] Part II: References Figure 7As shown, it is a comparative diagram of the updated versions of the pages in the application at different stages in the embodiment of the present application. Still taking the three pages of the application as an example, the comparison between the old version, the grayscale version and the new version is explained. After the application is approved and launched in the application market, the existing network users can use the Native page of the application. The Native page is more stable to ensure the user experience. Among them, the old version is the previous version relative to the new version, and the grayscale version is the transitional version before the new version is launched. For example, the old version is V1.0, the new version is V2.0, and the grayscale version is the transitional version of V2.0.
[0096] like Figure 7 As shown in the figure, the three pages of the application in the old version all use Native pages. For example, when updating PAGE_B, a project is created for PAGE_B, and an update file is generated. Then, the Web version of PAGE_B is released, and the corresponding update configuration information is configured and sent to the terminal. After the terminal obtains the PAGE_B update configuration information, it can automatically switch to the Web version of PAGE_B. Figure 7 In the grayscale version, you can open H5_PAGE_B through a browser, that is, open the updated PAGE_B, to achieve dynamic update of the page. Although the updated PAGE_B is a Web page, other pages are still Native pages, which has little impact on users. In this way, dynamic update of pages can be achieved while ensuring performance. Users can experience and use the updated page functions earlier, and then the Web version can be automatically overwritten after it is reviewed and launched, that is, the Native version of PAGE_B can be used in the new version.
[0097] In an embodiment of the present application, when a page is updated, a web version of the page can be published and updated configuration information can be issued, so that dynamic updates of page functions can be achieved based on the updated configuration information. There is no need to distinguish between platforms during development, and the same code can be used to generate update files for different platforms, thereby realizing dynamic updates of cross-platform applications.
[0098] Based on the above embodiment, the overall process of the application update method in the embodiment of the present application is described below using a specific application scenario. Figure 8 As shown in FIG, it is the overall logic diagram of the application update method in the embodiment of the present application, as shown in FIG. Figure 8 As shown, the application update method in the embodiment of the present application can be divided into three parts: development stage, release update stage and execution update stage.
[0099] Part 1: Development phase.
[0100] In an embodiment of the present application, to update a target page of an application, a developer can enter corresponding instructions through the command-line interface (CLI) to create a project, compile a project, and publish a project for the target page, and then deploy the project for the target page on the publishing platform, obtain the updated file of the target page, and publish the Web version of the target page.
[0101] Part 2: Release update phase.
[0102] In the embodiment of the present application, a management background system is also developed on the server, and update configuration information for the target page can be input in the management background, such as application identification, version number, page identification, platform, page type, page update address and other information.
[0103] It should be noted that the development stage and the release and update stage are mainly for developers, and both are operated on the background server. They can also be development terminals for developers, but ultimately they both need to be connected to the server so that the terminal can pull the updated configuration information of the target page from the server.
[0104] Part III: Execution update phase.
[0105] The update execution phase is mainly on the terminal side, facing the users of the application. The user starts the application on the terminal. After the application starts, the updated configuration information of the target page of the application is pulled from the server. When the target page opening operation is triggered, the page update address in the updated configuration information can be automatically jumped to the target page of the Web version and the updated target page is opened. In addition, after the review and launch, the Web version can be automatically overwritten, and the Native version of the target page can be opened at this time.
[0106] In the embodiment of the present application, the same code is supported to adapt to different platforms, such as iOS, Android, Web, etc., and with the support of containerization technology, the running effect on each platform can be guaranteed to be consistent. In this way, when the logic of the target page is updated, the Web version of the target page is released, and the configuration information is updated at the same time, so that the application can jump to the Web version to realize the dynamic update of the App. The same code can be used to generate update files for different platforms, which improves the development and update efficiency and saves development manpower and time.
[0107] Based on the same inventive concept, an application updating device is also provided in the embodiment of the present application. The application updating device may be, for example, the server in the aforementioned embodiment. The application updating device may be a hardware structure, a software module, or a hardware structure plus a software module. Figure 9As shown, an application updating device in an embodiment of the present application specifically includes:
[0108] A first acquisition module 90 is configured to acquire a target update code and application environment information for a target page of an application, wherein the application is divided according to a page dimension, so that a target update code is configured correspondingly for at least one page, and the application environment information is encapsulated into a unified container layer;
[0109] A generation module 91 is configured to package the target update code and the application environment information based on containerization technology to obtain an update file for the target page;
[0110] A publishing module 92, configured to publish an updated version of the target page according to the update file;
[0111] A second obtaining module 93 is configured to obtain update configuration information for the update file, wherein the update configuration information includes at least a page update address;
[0112] The sending module 94 is configured to send the update configuration information to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
[0113] Optionally, the application environment information includes at least components and an operating system; the container layer includes an interface adaptation layer, a unified interface layer, a general component layer, and a platform layer, wherein the interface adaptation layer is used to adapt to and call corresponding channel interfaces according to different platforms, the unified interface layer provides functional interfaces of different update version types, the general component layer includes at least channel interfaces and components for each platform, and the platform layer provides the operating system for each platform;
[0114] Based on the containerization technology, the target update code and the application environment information are packaged to obtain the update file of the target page. The generation module 91 is specifically used to:
[0115] According to the specified update version type and the current operating platform corresponding to the target page, the interface adaptation layer is used to call the functional interface corresponding to the specified update version type, and the channel interface corresponding to the current operating platform is called through the corresponding functional interface to obtain the components of the current operating platform;
[0116] Based on the container technology, the operating system of the current running platform, the obtained components of the current running platform, and the target update code are packaged to obtain the update file of the target page.
[0117] Optionally, the updated version of the target page is a Web version.
[0118] Optionally, when sending the updated configuration information to the terminal, the sending module 94 is specifically configured to:
[0119] When receiving the opening trigger operation of the terminal for the application, the update configuration information is sent to the terminal, so that after opening the application, the terminal responds to the opening trigger operation for the target page and accesses the page update address in the update configuration information to open the updated version of the target page.
[0120] Based on the same inventive concept, an application updating device is also provided in the embodiment of the present application. The application updating device may be, for example, the terminal in the aforementioned embodiment. The application updating device may be a hardware structure, a software module, or a hardware structure plus a software module. Figure 10 As shown, another application updating device in an embodiment of the present application specifically includes:
[0121] Acquisition module 1000 is configured to, in response to an open trigger operation for an application, obtain update configuration information for a target page of the application from a server, wherein the update configuration information includes at least a page update address. The update configuration information is obtained by the server, based on containerization technology, packaging the target update code and application environment information of the target page of the application to obtain an update file for the target page, and publishing an updated version of the target page according to the update file. The update configuration information is specific to the update file.
[0122] The display module 1010 is configured to display the target page corresponding to the page update address in the update configuration information in response to an opening trigger operation on the target page.
[0123] Optionally, when displaying the target page corresponding to the page update address in the update configuration information, the display module 1010 is specifically configured to:
[0124] When it is determined that there is update configuration information corresponding to the target page, the page update address in the update configuration information is accessed, and the target page corresponding to the page update address is opened and displayed.
[0125] Based on the above embodiments, see Figure 11 Shown is a schematic structural diagram of an electronic device in an embodiment of the present application.
[0126] An embodiment of the present application provides an electronic device, which may be the server in the aforementioned embodiment. The electronic device may include a processor 1110 (Center Processing Unit, CPU), a memory 1120, an input device 1130, an output device 1140, and the like.
[0127] The memory 1120 may include a read-only memory (ROM) and a random access memory (RAM), and provides program instructions and data stored in the memory 1120 to the processor 1110. In an embodiment of the present application, the memory 1120 may be used to store a program of any application update method in an embodiment of the present application.
[0128] The processor 1110 calls the program instructions stored in the memory 1120, and the processor 1110 is used to execute any application update method in the embodiments of the present application according to the obtained program instructions.
[0129] Based on the above embodiments, in an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the application update method in any of the above method embodiments is implemented.
[0130] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0131] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. An application update method, characterized in that: include: Obtaining a target update code and application environment information for a target page of an application, wherein the application is divided according to a page dimension, so that a target update code is configured correspondingly for at least one page, and the application environment information is encapsulated into a unified container layer; the target page is a Native page; Based on containerization technology, the target update code and the application environment information are packaged to obtain an update file of the target page; According to the update file, the updated version of the target page is published, and update configuration information for the update file is obtained, wherein the update configuration information includes at least a page update address; the updated version of the target page is a Web version; The update configuration information is sent to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
2. The method according to claim 1, wherein The application environment information includes at least components and operating systems; the container layer includes an interface adaptation layer, a unified interface layer, a general component layer, and a platform layer, wherein the interface adaptation layer is used to adapt to and call corresponding channel interfaces according to different platforms, the unified interface layer provides functional interfaces of different update version types, the general component layer includes at least channel interfaces and components of each platform, and the platform layer provides the operating system of each platform; Based on the containerization technology, the target update code and the application environment information are packaged to obtain the update file of the target page, which specifically includes: According to the specified update version type and the current operating platform corresponding to the target page, the interface adaptation layer is used to call the functional interface corresponding to the specified update version type, and the channel interface corresponding to the current operating platform is called through the corresponding functional interface to obtain the components of the current operating platform; Based on the container technology, the operating system of the current running platform, the obtained components of the current running platform, and the target update code are packaged to obtain the update file of the target page.
3. The method according to claim 1 or 2, wherein: Sending the updated configuration information to the terminal specifically includes: When receiving the opening trigger operation of the terminal for the application, the update configuration information is sent to the terminal, so that after opening the application, the terminal responds to the opening trigger operation for the target page and accesses the page update address in the update configuration information to open the updated version of the target page.
4. An application update method, characterized in that: include: In response to an open trigger operation for an application, update configuration information of a target page of the application is obtained from a server, wherein the update configuration information includes at least a page update address, wherein the update configuration information is obtained by the server packaging a target update code and application environment information of the target page of the application based on containerization technology to obtain an update file of the target page, and publishing an updated version of the target page according to the update file, wherein the update configuration information is for the update file, the application is divided according to a page dimension, so as to configure a target update code corresponding to at least one page, and the application environment information is encapsulated into a unified container layer; the target page is a Native page; and the type of the updated version of the target page is a Web version; In response to an opening trigger operation on the target page, the updated version of the target page corresponding to the page update address in the update configuration information is displayed.
5. The method according to claim 4, wherein Displaying the target page corresponding to the page update address in the update configuration information, specifically including: When it is determined that there is update configuration information corresponding to the target page, the page update address in the update configuration information is accessed, and the target page corresponding to the page update address is opened and displayed.
6. An application updating device, characterized in that: include: A first acquisition module is configured to acquire a target update code and application environment information of a target page of an application, wherein the application is divided according to a page dimension, so that a target update code is configured correspondingly for at least one page, and the application environment information is encapsulated into a unified container layer; the target page is a Native page; A generation module, configured to package the target update code and the application environment information based on containerization technology to obtain an update file for the target page; A publishing module, configured to publish an updated version of the target page according to the update file; the updated version of the target page is a Web version; A second acquisition module is configured to obtain update configuration information for the update file, wherein the update configuration information at least includes a page update address; The sending module is used to send the update configuration information to the terminal, so that the terminal accesses the page update address according to the page update address in the update configuration information to open the target page of the updated version.
7. The device according to claim 6, characterized in that The application environment information includes at least components and operating systems; the container layer includes an interface adaptation layer, a unified interface layer, a general component layer, and a platform layer, wherein the interface adaptation layer is used to adapt to and call corresponding channel interfaces according to different platforms, the unified interface layer provides functional interfaces of different update version types, the general component layer includes at least channel interfaces and components of each platform, and the platform layer provides the operating system of each platform; Based on the containerization technology, the target update code and the application environment information are packaged to obtain the update file of the target page. The generation module is specifically used to: According to the specified update version type and the current operating platform corresponding to the target page, the interface adaptation layer is used to call the functional interface corresponding to the specified update version type, and the channel interface corresponding to the current operating platform is called through the corresponding functional interface to obtain the components of the current operating platform; Based on the container technology, the operating system of the current running platform, the obtained components of the current running platform, and the target update code are packaged to obtain the update file of the target page.
8. An application updating device, characterized in that: include: an acquisition module, configured to, in response to an open trigger operation for an application, obtain update configuration information of a target page of the application from a server, wherein the update configuration information includes at least a page update address, the update configuration information is obtained by the server packaging a target update code and application environment information of the target page of the application based on containerization technology, obtaining an update file of the target page, and publishing an updated version of the target page according to the update file, the update configuration information is for the update file, the application is divided according to a page dimension, so that a target update code is configured for each page, and the application environment information is encapsulated into a unified container layer; the target page is a Native page; and the updated version of the target page is a Web version; A display module is configured to display the updated version of the target page corresponding to the page update address in the update configuration information in response to an opening trigger operation on the target page.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 3 are implemented, or the steps of the method according to any one of claims 4 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented, or the steps of the method according to any one of claims 4 to 5 are implemented.
Citation Information
Patent Citations
Web front-end frame system and architectural approach
CN106775751A
Container application deployment method and device, computer equipment and storage medium
CN108958927A