Mobile application program update method, device, electronic device and storage medium
By obtaining and updating multi-platform-compatible business components, the problem of low update efficiency of mobile application in the existing technology is solved, and fast and efficient cross-platform updates are achieved.
Patent Information
- Application Number
- CN202111302011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2041-11-04
AI Technical Summary
The existing mobile application update method cannot be compatible with different mobile platforms, resulting in a long development cycle and low update efficiency.
By obtaining the latest version of the business component on the server, this component is developed uniformly by the target development framework, compatible with multiple mobile platforms, and updated to mobile applications.
It realizes compatibility of mobile applications on different platforms, shortens the update cycle and improves update efficiency.
Smart Images

Figure CN114035821B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a method, device, electronic device and storage medium for updating a mobile application. Background Art
[0002] With the rapid development of Internet technology, mobile applications emerge in an endless stream, and as user needs accelerate, the speed of updating and iteration of mobile applications is also getting faster and faster. However, in the prior art, when it is necessary to update a mobile application, it is necessary to use Java voice and C language to develop the same business code to obtain a program package that is compatible with the Android platform and the iOS platform of the mobile terminal. Therefore, the existing update method of the mobile application is not compatible with different mobile platforms, resulting in a long development cycle, which makes the update efficiency of the mobile application low. Summary of the invention
[0003] The present application provides a method, device, electronic device and storage medium for updating a mobile application to solve the problem that the existing updating method of mobile application is not compatible with different mobile platforms, resulting in low updating efficiency of mobile application.
[0004] In a first aspect, the present application provides a method for updating a mobile application, the method comprising:
[0005] Obtain the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile terminal application, the target component is included in a preset component library, the components in the preset component library are uniformly developed by a target development framework, and the components in the preset component library are compatible with multiple different types of mobile terminal platforms;
[0006] The business components currently used by the mobile application are updated to the latest version of the business components.
[0007] Optionally, obtaining the latest version of the service group on the server includes:
[0008] When the state of the mobile application is switched to an enabled state, obtaining a first version number corresponding to the latest version of the business component from the server;
[0009] In the case where the first version number is inconsistent with a second version number corresponding to a business component currently used by the mobile application, silently downloading the latest version of the business component from the server based on the first version number;
[0010] The updating of the business component currently used by the mobile terminal application to the latest version of the business component includes:
[0011] When the state of the mobile application is switched to the enabled state again, the business component currently used by the mobile application is updated to the latest version of the business component.
[0012] Optionally, the business component on the server is named according to a preset naming rule, where the preset naming rule is a combination of the page name to be adjusted, the component name to be adjusted, and the version number of the business component;
[0013] When the state of the mobile application is switched to the enabled state, obtaining the first version number corresponding to the latest version of the business component from the server includes:
[0014] When the state of the mobile application is switched to the enabled state, based on the version number of the business component on the server, a first version number corresponding to the latest version of the business component is obtained from the server.
[0015] Optionally, when packaging and generating the latest version of the business component, the target development framework automatically generates a first interface method in the native language for accessing the mobile terminal application, and the native language provides a second interface method exposed to the latest version of the business component; the correspondence between the first interface method and the second interface method is included in a preset configuration table, and the preset configuration table is preset in the target development framework;
[0016] When the state of the mobile application is switched to the enabled state again, updating the business component currently used by the mobile application to the latest version of the business component includes:
[0017] The first interface method is called to connect the latest version of the business component to the native language, and the second interface method is called to update the currently used business component in the native language to the latest version of the business component.
[0018] Optionally, the server performs constraint management on the business component based on at least one of the following: a version number of the business component, an upload time of the business component, a component size of the business component, and an access restriction of the business component;
[0019] Among them, the version number of the business component and the upload time of the business component are used by the server to update the mobile application to a new version or roll back the old version; the component size of the business component is used by the server to return the business component when the business component does not meet a preset threshold; the access restriction of the business component is used by the server to limit the storage domains that the mobile application is allowed to access, and different storage domains of the server are used to store different business components.
[0020] Optionally, the target development framework is a hybrid development framework consisting of an ionic framework and a vue framework.
[0021] In a second aspect, the present application also provides a mobile application update device, the device comprising:
[0022] An acquisition module is used to obtain the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile application, and the target component is included in a preset component library. The components in the preset component library are uniformly developed by a target development framework, and the components in the preset component library are compatible with multiple different types of mobile platforms; an update module is used to update the business component currently used by the mobile application to the latest version of the business component.
[0023] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0024] Memory, used to store computer programs;
[0025] The processor is used to implement the steps of the mobile application update method described in any embodiment of the first aspect when executing the program stored in the memory.
[0026] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for updating a mobile application as described in any embodiment of the first aspect are implemented.
[0027] In an embodiment of the present application, by obtaining the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile application, the target component is included in the preset component library, the components in the preset component library are uniformly developed by the target development framework, and the components in the preset component library are compatible with multiple different types of mobile platforms; the business component currently used by the mobile application is updated to the latest version of the business component. In this way, all components required for the page of the mobile application can be uniformly developed through the target development framework, and then according to business needs, the target components required in the page to be adjusted are packaged to obtain the latest version of the business component, which is uploaded to the server. When the mobile application is started, the mobile application can update the currently used business component in a timely manner, so that the mobile application always maintains the latest version of the business component. Since the latest version of the business component is compatible with different types of mobile platforms, it is not necessary to use multiple development languages to develop the same business code, so that the mobile application can be updated faster, improving the update efficiency of the mobile application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0030] Figure 1 One of the flowcharts of the method for updating a mobile application provided in an embodiment of the present application;
[0031] Figure 2 A second flowchart of a method for updating a mobile application provided in an embodiment of the present application;
[0032] Figure 3 A third flowchart of a method for updating a mobile application provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of the structure of a device for updating a mobile application provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0036] See also Figure 1 , Figure 1 This is one of the flow charts of the method for updating the mobile application provided in the embodiment of the present application. Figure 1 As shown, the updating method of the mobile application may include the following steps:
[0037] Step 101, obtain the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile application, the target component is included in the preset component library, the components in the preset component library are uniformly developed by the target development framework, and the components in the preset component library are compatible with multiple different types of mobile platforms.
[0038] Specifically, the server can be connected to the target development framework and the mobile application. The server can be used to store different versions of business components packaged by the target development framework; the mobile application can download the latest version of the business component according to the version number of the business component on the server to update the business component of the mobile application.
[0039] It should be noted that the latest version of the business component here refers to the target component packaged in the page to be adjusted of the mobile application, which may be the component required to adjust some or all components in the page to be adjusted, and the target component can be directly called from the above-mentioned preset component library. Since the components in the preset component library are all uniformly developed through the target development framework, they are compatible with different types of mobile platforms, such as Android platform and iOS platform, and thus the business components packaged by the target components are also compatible with different types of mobile platforms.
[0040] The mobile application here can be a client / server (Client / Server, referred to as C / S) mode application, or a browser / server (Browser / Server, referred to as B / S) mode application, and this application does not make specific restrictions. When the mobile application is a C / S mode application, the page to be adjusted is a page in the application client; when the mobile application is a B / S mode application, the page to be adjusted is the web page of the application.
[0041] The target development framework here may include but is not limited to: ASP.NET framework, Python with Django framework, Ruby on Rails framework, ionic framework + vue framework, etc.
[0042] Step 102: Update the business components currently used by the mobile application to the latest versions of the business components.
[0043] In this step, after obtaining the latest version of the business component, the mobile application can update the currently used business component based on the latest version of the business component.
[0044] In this embodiment, all components required for the page of the mobile application can be uniformly developed through the target development framework, and then the target components required in the page to be adjusted can be packaged according to business needs to obtain the latest version of the business components, which can be uploaded to the server. When the mobile application is started, the mobile application can update the currently used business components in a timely manner, so that the mobile application always maintains the latest version of the business components. Since the latest version of the business components can be compatible with different types of mobile platforms, there is no need to use multiple development languages to develop the same business code, so that the mobile application can be updated more quickly, improving the update efficiency of the mobile application.
[0045] Further, see Figure 2 , Figure 2 The second flowchart of the method for updating the mobile application provided in the embodiment of the present application is as follows. Figure 1 In the embodiment shown, the above step 101, obtaining the latest version of the service group on the server, may specifically include the following steps:
[0046] Step 1011: when the state of the mobile application is switched to the enabled state, obtain the first version number corresponding to the latest version of the business component from the server;
[0047] Step 1012: If the first version number is inconsistent with the second version number corresponding to the business component currently used by the mobile terminal application, silently download the latest version of the business component from the server based on the first version number;
[0048] The above step 102, updating the business components currently used by the mobile application to the latest version of the business components, includes:
[0049] Step 1021: When the state of the mobile application is switched to the enabled state again, the business component currently used by the mobile application is updated to the latest version of the business component.
[0050] In one embodiment, each time the mobile application switches to the enabled state, the first version number corresponding to the latest version of the business component can be automatically obtained, and the first version number can be compared with the second version number corresponding to the business component currently used by the mobile application. If the first version number is consistent with the second version number corresponding to the business component currently used by the mobile application, it means that the business component currently used by the mobile application is the latest version of the business component, and there is no need to update the business component; if the first version number is inconsistent with the second version number corresponding to the business component currently used by the mobile application, it means that the business component currently used by the mobile application is not the latest version of the business component, and the business component needs to be updated. At this time, the latest version of the business component can be silently downloaded from the server, and the business component currently used by the mobile application will be updated to the latest version of the business component when the mobile application switches to the enabled state next time.
[0051] It should be noted that the silent download here refers to downloading from the server to the local mobile terminal without affecting the current use status of the mobile application. Since the latest version of the business component is downloaded silently, it will not be used directly after downloading, but will be updated and used when the mobile application is switched to the enabled state next time. In addition, in order to ensure that the latest version of the business component can be downloaded before the mobile application is switched to the enabled state next time, the package of the latest version of the business component is generally small, such as about 150K.
[0052] In this embodiment, the latest version of the business components can be downloaded silently, and when the mobile application is switched to the enabled state next time, the business components currently used by the mobile application will be updated to the latest version of the business components, thereby ensuring that the business components of the mobile application are updated to the latest version after the next startup at the latest, thereby ensuring the hot update performance of the mobile application.
[0053] Furthermore, the business components on the server are named according to a preset naming rule, which is a combination of the page name to be adjusted, the component name to be adjusted, and the version number of the business component;
[0054] The above step 1011, when the state of the mobile application is switched to the enabled state, obtaining the first version number corresponding to the latest version of the business component from the server, may specifically include:
[0055] When the state of the mobile application is switched to the enabled state, based on the version number of the business component on the server, a first version number corresponding to the latest version of the business component is obtained from the server.
[0056] In one embodiment, the business components stored on the server can be named according to a preset naming rule, which can be a random combination of the page name to be adjusted, the component name to be adjusted, and the version number of the business component. For example, the name of each business component can be named in the form of page name to be adjusted-component name to be adjusted-business component version number. In this way, it is convenient for the server to manage the version number of the business component, and it is convenient for the mobile application to quickly find the first version number corresponding to the latest version of the business component on the server.
[0057] Furthermore, when the target development framework packages and generates the latest version of the business component, it automatically generates a first interface method in the native language for accessing the mobile terminal application, and the native language provides a second interface method exposed to the latest version of the business component; the correspondence between the first interface method and the second interface method is included in a preset configuration table, and the preset configuration table is preset in the target development framework;
[0058] The above step 1021, when the state of the mobile application is switched to the enabled state again, updating the business component currently used by the mobile application to the latest version of the business component, may specifically include:
[0059] The first interface method is called to connect the latest version of the business component to the native language, and the second interface method is called to update the currently used business component in the native language to the latest version of the business component.
[0060] In one embodiment, a preset configuration table is pre-configured in the target development framework, and the preset configuration table is used to characterize the correspondence between the first interface method and the second interface method. The first interface method and the second interface method can be stored in a key-value (i.e., key-Value) manner in the preset configuration table. Among them, the first interface method is an interface method of the native language of the mobile terminal application that is automatically generated by the target development framework when the latest version of the business component is packaged and generated, and the second interface method is an interface method for the native language to be exposed to the latest version of the business component to realize the business capability. In this way, when the state of the mobile terminal application is switched to the enabled state for the first time and the business component needs to be updated, the latest version of the business component can be connected to the native language by calling the first interface method, and the business component currently used in the native language can be updated to the latest version of the business component by calling the second interface method, thereby adjusting some or all of the components in the page to be adjusted to realize different business functions of the mobile terminal application.
[0061] Further, the server performs constraint management on the business component based on at least one of the following: a version number of the business component, an upload time of the business component, a component size of the business component, and an access restriction of the business component;
[0062] Among them, the version number and upload time of the business component are used by the server to update the mobile application to a new version or roll back the old version. The component size of the business component is used by the server to return the business component when the business component does not meet the preset threshold. The access restriction of the business component is used by the server to limit the storage domains that the mobile application is allowed to access. Different storage domains of the server are used to store different business components.
[0063] In one embodiment, the server manages the business components that are packaged and uploaded, including constraining the version number of the business component, the upload time of the business component, the component size of the business component, and the access restrictions of the business component. Specifically, the version number of the business component can be used for the business component to update the new version and roll back the old version. For example, if the version number of the business component currently uploaded to the server by the developer is 3.1.5, and the version number currently used by the mobile application is 3.1.4, then when the state of the mobile application is switched to the enabled state, the server will give the business component with version number 3.1.5 to the mobile application to implement the new version update of the business component of the mobile application. If there is a problem with the business component currently used by the mobile application (version number 3.1.4), the business component with version number 3.1.4 can be promptly rolled back to the old stable version (version before version number 3.1.4) according to the rollback operation triggered by the user, and when the new version of the business component has completed the problem modification and is re-uploaded to the server, the business component version of the mobile application will be updated to the new version. The upload time of the business component has the same function as the version number of the business component; the size of the business component needs to be defined by the developer. If the size of the business component does not meet the current performance requirements, it can be rolled back and the original business component will perform its original duties; the access restriction of the business component means placing the component or page in different storage domains according to the business implementation. Each different storage domain can only get the business component or interface method of the domain, thereby ensuring data independence and interface independence. In this embodiment, the server can effectively track the complete link of the business component from upload to application through the above-mentioned constraint management, so as to timely update the new version, timely roll back the problem, and timely prohibit illegal access.
[0064] Furthermore, the target development framework is a hybrid development framework consisting of the ionic framework and the vue framework.
[0065] In one embodiment, a page of a mobile application can be developed and updated through the ionic framework and the vue framework, or some components in the page. The components here can include but are not limited to the input box for entering the account when logging in, the title bar at the head of each page, and the label similar to the advertising function that each page needs to highlight. The development and update of a page of a mobile application, or some components in the page, also involves technologies such as js and css. The front-end developer can quickly build business components that meet business needs through the ionic framework and the vue framework according to product requirements, formulate component styles that meet business needs, and establish a preset component library. In this way, while determining the style of the mobile application interface, it is convenient for subsequent direct calls. After the front-end project is built through the vue framework, it can be packaged and converted through the Ionic framework to obtain business components. The Ionic framework will package the business components into native languages and automatically generate the first interface method for accessing the native language. In the Ionic framework, a preset configuration table for docking with the native language will be left. The first interface method and the second interface method that can be recognized by the original language will be marked in the preset configuration table in a key-value manner. The first interface method and the second interface method are methods that can automatically open up corresponding data paths. The basic principle is to define the interface name and write the abstract method name of the business to be implemented under the interface name. In the method of implementing the interface, the abstract method of the business is implemented. Then the place where the interface is connected can automatically obtain the result after the business method is completed. The front-end developer uploads the packaged business components to the server according to the preset naming rules. For example, the naming specification is in the form of the page name to be adjusted-the component name to be adjusted-the version number of the business component. The purpose of this specification is to facilitate the management of the version number of the business component.
[0066] When the mobile application is switched to the enabled state, the mobile application will first install the default components that need to be displayed, and check in the background thread whether the first version number corresponding to the latest version of the business component on the server is consistent with the second version number corresponding to the business component currently used by the mobile application. If they are inconsistent, the latest version of the business component on the server is silently downloaded, and the latest business component is displayed when the mobile application is switched to the enabled state again. At the same time, when a problem is found in a business component, the version number of the officially published business component on the server can be modified to ensure the hot update performance of the mobile application.
[0067] Mobile developers can build component-based capabilities based on the native language of existing mobile applications: remove the corresponding components or pages, and retain the data processing logic and user interface (UI) interface of the original page. Expose the data interface and UI interface to the corresponding business components so that the business components can realize their own business capabilities through the above interfaces. For details on the update process of the above mobile applications, please refer to Figure 3 .
[0068] In this embodiment, the hybrid development framework composed of the ionic framework and the vue framework can be used to develop mobile applications from the perspective of web pages. Since the business components packaged by the ionic framework and the vue framework are compatible with a variety of different types of mobile platforms, the development process of the business components can be greatly shortened, the update efficiency of the business components can be improved, and different types of mobile platforms can maintain a unified page style. In addition, the packaged business components can also ensure the hot update performance of the mobile application.
[0069] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of the updating device of the mobile terminal application provided in the embodiment of the present application. Figure 4 As shown, the updating device 400 of the mobile application comprises:
[0070] The acquisition module 401 is used to acquire the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile application, the target component is included in the preset component library, the components in the preset component library are uniformly developed by the target development framework, and the components in the preset component library are compatible with multiple different types of mobile terminal platforms;
[0071] The updating module 402 is used to update the business components currently used by the mobile application to the latest version of the business components.
[0072] Optionally, the acquisition module 401 includes:
[0073] An acquisition submodule, used to acquire a first version number corresponding to the latest version of the business component from the server when the state of the mobile application is switched to the enabled state;
[0074] A download submodule, used to silently download the latest version of the business component from the server based on the first version number when the first version number is inconsistent with the second version number corresponding to the business component currently used by the mobile terminal application;
[0075] The update module 402 includes:
[0076] The update submodule is used to update the business components currently used by the mobile application to the latest version of the business components when the state of the mobile application is switched to the enabled state again.
[0077] Optionally, the business component on the server is named according to a preset naming rule, where the preset naming rule is a combination of the page name to be adjusted, the component name to be adjusted, and the version number of the business component;
[0078] Get submodules include:
[0079] The acquisition unit is used to acquire the first version number corresponding to the latest version of the business component from the server based on the version number of the business component on the server when the state of the mobile application is switched to the enabled state.
[0080] Optionally, when packaging and generating the latest version of the business component, the target development framework automatically generates a first interface method in the native language for accessing the mobile terminal application, and the native language provides a second interface method exposed to the latest version of the business component; the correspondence between the first interface method and the second interface method is included in a preset configuration table, and the preset configuration table is preset in the target development framework;
[0081] Update submodules include:
[0082] The calling unit is used to call the first interface method to connect the latest version of the business component to the native language, and call the second interface method to update the currently used business component in the native language to the latest version of the business component.
[0083] Optionally, the server performs constraint management on the business component based on at least one of the following: a version number of the business component, an upload time of the business component, a component size of the business component, and an access restriction of the business component;
[0084] Among them, the version number and upload time of the business component are used by the server to update the mobile application to a new version or roll back the old version. The component size of the business component is used by the server to return the business component when the business component does not meet the preset threshold. The access restriction of the business component is used by the server to limit the storage domains that the mobile application is allowed to access. Different storage domains of the server are used to store different business components.
[0085] Optionally, the target development framework is a hybrid development framework consisting of an ionic framework and a vue framework.
[0086] It should be noted that the mobile application updating device 400 can implement the various embodiments of the above-mentioned mobile application updating method and can achieve the same technical effects, which will not be described one by one here.
[0087] See also Figure 5 , Figure 5 The structural diagram of the electronic device provided in the embodiment of the present application includes a processor 511, a communication interface 512, a memory 513 and a communication bus 514, wherein the processor 511, the communication interface 512, and the memory 513 communicate with each other through the communication bus 514.
[0088] Memory 513, used for storing computer programs;
[0089] In one embodiment of the present application, the processor 511 is used to execute the program stored in the memory 513 to implement the method for updating the mobile application provided by any of the above method embodiments, including:
[0090] Obtain the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile application, the target component is included in the preset component library, the components in the preset component library are uniformly developed by the target development framework, and the components in the preset component library are compatible with multiple different types of mobile platforms;
[0091] Update the business components currently used by the mobile application to the latest version of the business components.
[0092] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the mobile application update method provided in any of the aforementioned method embodiments are implemented.
[0093] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0094] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for updating a mobile application program, It is characterized in that The method comprises: Obtain the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile terminal application, the target component is included in a preset component library, the components in the preset component library are uniformly developed by a target development framework, and the components in the preset component library are compatible with multiple different types of mobile terminal platforms; Updating the business components currently used by the mobile application to the latest version of the business components; Wherein, obtaining the latest version of the service group on the server includes: when the state of the mobile application is switched to the enabled state, obtaining the first version number corresponding to the latest version of the service component from the server; when the first version number is inconsistent with the second version number corresponding to the service component currently used by the mobile application, silently downloading the latest version of the service component from the server based on the first version number; The updating of the business components currently used by the mobile application to the latest version of the business components includes: when the state of the mobile application is switched to the enabled state again, updating the business components currently used by the mobile application to the latest version of the business components; When packaging and generating the latest version of the business component, the target development framework automatically generates a first interface method in the native language for accessing the mobile terminal application, and the native language provides a second interface method exposed to the latest version of the business component; the correspondence between the first interface method and the second interface method is included in a preset configuration table, and the preset configuration table is preset in the target development framework; When the state of the mobile application is switched to the enabled state again, the business component currently used by the mobile application is updated to the latest version of the business component, including: calling the first interface method to connect the latest version of the business component to the native language, and calling the second interface method to update the currently used business component in the native language to the latest version of the business component.
2. The method according to claim 1, It is characterized in that The business components on the server are named according to a preset naming rule, where the preset naming rule is a combination of the page name to be adjusted, the component name to be adjusted, and the version number of the business component; When the state of the mobile application is switched to the enabled state, obtaining the first version number corresponding to the latest version of the business component from the server includes: When the state of the mobile application is switched to the enabled state, based on the version number of the business component on the server, a first version number corresponding to the latest version of the business component is obtained from the server.
3. The method according to claim 1, It is characterized in that The server performs constraint management on the business component based on at least one of the following: a version number of the business component, an upload time of the business component, a component size of the business component, and an access restriction of the business component; Among them, the version number of the business component and the upload time of the business component are used by the server to update the mobile application to a new version or roll back the old version; the component size of the business component is used by the server to return the business component when the business component does not meet a preset threshold; the access restriction of the business component is used by the server to limit the storage domains that the mobile application is allowed to access, and different storage domains of the server are used to store different business components.
4. The method according to any one of claims 1 to 3, It is characterized in that The target development framework is a hybrid development framework consisting of the ionic framework and the vue framework.
5. A device for updating a mobile application program, It is characterized in that The device comprises: an acquisition module, used to acquire the latest version of the business component on the server, wherein the latest version of the business component is obtained by packaging the target component, the target component is used to adjust the current page to be adjusted of the mobile terminal application, the target component is included in a preset component library, the components in the preset component library are uniformly developed by a target development framework, and the components in the preset component library are compatible with multiple different types of mobile terminal platforms; an update module, used to update the business component currently used by the mobile terminal application to the latest version of the business component; The acquisition module includes: an acquisition submodule, which is used to acquire the first version number corresponding to the latest version of the business component from the server when the state of the mobile application is switched to the enabled state; a download submodule, which is used to silently download the latest version of the business component from the server based on the first version number when the first version number is inconsistent with the second version number corresponding to the business component currently used by the mobile application; The update module includes: an update submodule, which is used to update the business component currently used by the mobile application to the latest version of the business component when the state of the mobile application is switched to the enabled state again; When packaging and generating the latest version of the business component, the target development framework automatically generates a first interface method in the native language for accessing the mobile terminal application, and the native language provides a second interface method exposed to the latest version of the business component; the correspondence between the first interface method and the second interface method is included in a preset configuration table, and the preset configuration table is preset in the target development framework; The updating submodule includes: a calling unit, which is used to call a first interface method to connect the latest version of the business component to the native language, and call a second interface method to update the currently used business component in the native language to the latest version of the business component.
6. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor is used to implement the steps of the mobile application update method described in any one of claims 1 to 4 when executing a program stored in a memory.
7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for updating the mobile application program described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Application publishing method and device and computer readable storage medium
CN108762767A