A mobile application-oriented subpackaging method and related equipment

Through the subcontracting method for mobile applications, the use of authority, guiding data packets, and technical means to load on demand to solve the problem of too long time loading of mobile applications, and achieve a faster loading response time and a better user experience.

CN118672684BActive Publication Date: 2025-01-21STATE GRID INFORMATION & TELECOMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411142192.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2025-01-21
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The loading time of mobile applications is too long, resulting in poor user experience, and the existing technology is difficult to effectively solve this problem.

Method used

The subcontracting method for mobile applications is adopted, and the first page of the first page is used to guide the data packet, load guidance data packets, display the first page, and loads the corresponding second data packet according to the trigger operation of the functional identification to realize the dynamic subcontracting of the mobile application on demand.

Benefits of technology

It reduces the loading response time, improves the user experience, and can cover a wider range of business scenarios. It combines H5 and mobile application native technology to achieve dynamic subcontracting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672684B_ABST
    Figure CN118672684B_ABST
Patent Text Reader

Abstract

The present disclosure provides a subpackaging method and related equipment for mobile applications. The method includes: in response to a startup operation for the mobile application, authenticating the startup operation; in response to the authentication of the startup operation being passed, loading a boot data packet of the mobile application; loading a first data packet of the mobile application based on the boot data packet, and displaying a first page corresponding to the first data packet; wherein the first page includes at least one function identifier; in response to a first trigger operation for the function identifier, loading a second data packet associated with the function identifier, and / or displaying a function page corresponding to the function identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of wireless communications, and in particular to a mobile application-oriented packet splitting method and related equipment. Background Art

[0002] When a user starts a mobile application to download the corresponding data package, the loading time is often too long, resulting in a poor user experience. Summary of the invention

[0003] The present disclosure proposes a mobile application-oriented subpackaging method and related devices to solve the technical problem of long loading time of mobile applications to a certain extent.

[0004] In a first aspect, the present disclosure provides a mobile application-oriented packaging method, comprising:

[0005] In response to a start-up operation for the mobile application, authenticating the start-up operation;

[0006] In response to the authentication of the startup operation being passed, loading a boot data packet of the mobile application;

[0007] Loading a first data packet of the mobile application based on the boot data packet, and displaying a first page corresponding to the first data packet; wherein the first page includes at least one function identifier;

[0008] In response to a first trigger operation for the function identifier, a second data packet associated with the function identifier is loaded, and / or a function page corresponding to the function identifier is displayed.

[0009] In a second aspect of the present disclosure, a mobile application-oriented packaging device is provided, comprising:

[0010] an authentication module, configured to authenticate the startup operation in response to the startup operation for the mobile application;

[0011] A loading module, configured to load a boot data packet of the mobile application in response to the authentication of the startup operation being passed; and load a first data packet of the mobile application based on the boot data packet;

[0012] A display module, configured to display a first page corresponding to the first data packet; wherein the first page includes at least one function identifier;

[0013] The loading module is further configured to load a second data packet associated with the function identifier in response to a trigger operation on the function identifier;

[0014] The display module is also used to display the function page corresponding to the function identifier.

[0015] In a third aspect of the present disclosure, an electronic device is provided, comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method described in the first aspect.

[0016] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect.

[0017] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect.

[0018] From the above, it can be seen that the present disclosure provides a packaging method and related equipment for mobile applications, which are based on H5 and mobile application native technologies to achieve dynamic packaging of mobile applications loaded on demand, can cover a wider range of business scenarios, reduce loading response time and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic diagram of a sub-packaging architecture for mobile applications according to an embodiment of the present disclosure.

[0021] Figure 2 The figure is a schematic diagram of the hardware structure of an exemplary electronic device according to an embodiment of the present disclosure.

[0022] Figure 3 The figure is a flowchart of a mobile application-oriented packaging method according to an embodiment of the present disclosure.

[0023] Figure 4 A schematic diagram of a mobile application-oriented packaging method according to an embodiment of the present disclosure.

[0024] Figure 5 Schematic diagram of a second data packet according to an embodiment of the present disclosure.

[0025] Figure 6 A schematic diagram of the deployment of sub-packetized data according to an embodiment of the present disclosure.

[0026] Figure 7A schematic diagram of a verification file according to an embodiment of the present disclosure.

[0027] Figure 8 A schematic diagram of a packaging device for mobile applications according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0029] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0032] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] Figure 1 A schematic diagram of a mobile application-oriented sub-packaging architecture according to an embodiment of the present disclosure is shown. Figure 1, the sub-packaging architecture 100 for mobile applications may include a server 110, a terminal 120, and a network 130 that provides a communication link. The server 110 and the terminal 120 may be connected via a wired or wireless network 130. The server 110 may be an independent physical server, or a server cluster or distributed system consisting 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, security services, and CDN.

[0034] The terminal 120 may be implemented in hardware or software. For example, when the terminal 120 is implemented in hardware, it may be various electronic devices having a display screen and supporting page display, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, and desktop computers, etc. When the terminal 120 device is implemented in software, it may be installed in the electronic devices listed above; it may be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.

[0035] It should be noted that the mobile application-oriented packaging method provided in the embodiment of the present application can be executed by the terminal 120 or by the server 110. It should be understood that Figure 1 The number of terminals, networks and servers in the embodiment is only for illustration and is not intended to limit the number of terminals, networks and servers. Any number of terminals, networks and servers may be provided as required.

[0036] Figure 2 FIG. 2 shows a schematic diagram of the hardware structure of an exemplary electronic device 200 provided in an embodiment of the present disclosure. Figure 2 As shown, the electronic device 200 may include: a processor 202, a memory 204, a network module 206, a peripheral interface 208 and a bus 210. The processor 202, the memory 204, the network module 206 and the peripheral interface 208 are connected to each other in communication within the electronic device 200 through the bus 210.

[0037] Processor 202 may be a central processing unit (CPU), a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 202 may be used to perform functions related to the technology described in this disclosure. In some embodiments, processor 202 may also include multiple processors integrated into a single logical component. For example, Figure 2 As shown, processor 202 may include a plurality of processors 202a, 202b, and 202c.

[0038] The memory 204 may be configured to store data (eg, instructions, computer code, etc.). Figure 2 As shown, the data stored in the memory 204 may include program instructions (for example, program instructions for implementing the mobile application-oriented subpackaging method of the embodiment of the present disclosure) and data to be processed (for example, the memory may store configuration files of other modules, etc.). The processor 202 may also access the program instructions and data stored in the memory 204, and execute the program instructions to operate on the data to be processed. The memory 204 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 204 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.

[0039] The network module 206 can be configured to provide the electronic device 200 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples. In some embodiments, the network module 306 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc., in any combination.

[0040] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.

[0041] The bus 210 may be configured to transmit information between various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.

[0042] It should be noted that, although the architecture of the electronic device 200 only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208 and the bus 210, in the specific implementation process, the architecture of the electronic device 200 may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the architecture of the electronic device 200 may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.

[0043] With the popularization of mobile Internet and the promotion of digital transformation in various industries, more and more functions are being built, and the types of business that need to be handled in program applications APP are increasing. However, when users click to enter the micro application from the main page, due to the download of the application package, there is often a long waiting time on one end, which reduces the user experience. The main reason for this loading time is that after confirming that the user information is correct, the H5 front-end package is downloaded in its entirety as an offline application before entering the mini program. In this "one-time bundling" mode, functions and codes are mostly coupled together, and there are problems such as large package size and long loading time of micro applications; in addition, there are also a few mobile applications (APPs) that choose pure native languages ​​(IOS, Android development languages ​​for development). This method is not conducive to the rapid iteration and development of App applications. Every time important content is changed, users need to re-download the newly released installation package, which usually has a high development cost. In addition, it will consume a lot of user traffic and have a negative impact on mobile applications. Therefore, the main challenges faced in the face of complex business needs of mobile Internet include but are not limited to: mobile network and instability, poor network environment, too large front-end H5 package, and too long network delay time. The processing power of mobile application devices is lower than that of web terminals, and the file processing ability is weaker. There are many types of mobile applications, which cannot be unified, and there is no good combination of the advantages of mobile native and front-end H5.

[0044] Although some methods can alleviate the above problems to a certain extent, for example: adopting the solution of nesting online applications, that is, instead of downloading the offline package, an online page is nested in the page, and it is implemented in the form of interface integration. Alternatively, choose to simplify and reduce the package size when packaging the H5 offline application, such as file compression, dynamic introduction of dependent files by CDN, and modular dynamic introduction, to reduce the response time to a certain extent. However, for the solution of nesting online applications, the application deployment is more difficult, and it increases the difficulty of user authentication and mobile adaptation, which is not applicable in many scenarios. When simplifying and reducing the package size when packaging the H5 offline application, all business files still need to be packaged during packaging, so when the business logic is more complex, the optimization effect is not ideal. Therefore, how to reduce the loading time of mobile applications and improve user experience has become a technical problem that needs to be solved urgently.

[0045] In view of this, the embodiments of the present disclosure provide a mobile application-oriented subpackaging method and related devices. Based on H5 and mobile application native technology, dynamic subpackaging of mobile applications loaded on demand is realized, which can cover a wider range of business scenarios, reduce loading response time and improve user experience.

[0046] See also Figure 3 , Figure 3 A schematic flow chart of a mobile application-oriented packaging method according to an embodiment of the present disclosure is shown. The mobile application-oriented packaging method according to an embodiment of the present disclosure can be deployed on a server side. Figure 3 In the embodiment, the mobile application-oriented subpackaging method 300 may further include the following steps.

[0047] In step S310, in response to a startup operation for the mobile application, the startup operation is authenticated.

[0048] Among them, a mobile application can be any application installed on a smartphone or other mobile device. The launch operation can refer to the action performed by the user to start running the mobile application. For example, it is completed by clicking on the application icon or selecting the mobile application from the application list. Authentication can refer to the process of verifying the identity of the user. For example, before the mobile application is launched, the system needs to confirm that the user performing the launch operation is an authorized user. This can be achieved in many ways, such as entering a password, using biometric technology (fingerprint or facial recognition), or based on the status of the device (for example, whether the device is locked).

[0049] In step S320, in response to the authentication of the startup operation being passed, the boot data packet of the mobile application is loaded.

[0050] Among them, authentication passes to indicate that the user's identity authentication process is successfully completed, and the system confirms that the user has the right to start the application. When the mobile application is started, the system will load the boot data packet to guide the application startup process. The boot data packet usually contains the most basic information required for application startup, such as the display of the loading interface (Loading interface), obtaining the basic configuration information of the application (such as the application root directory, user permission information, etc.). Specifically, the boot data packet can be the first module loaded when entering the micro application from the portal (that is, the process of implementing loading), and can be presented in the form of an H5 (HyperText Markup Language5) application. Thanks to the cross-platform nature provided by H5, the function of loading the micro application homepage is realized when entering the micro application for the first time. The boot data packet stores some important information, such as appAgentId (application ID), appName (application name, etc.), hostUrl (sub-package download address), etc., which are stored in the boot data packet in json format. The communication interface can be called by registering the jsSdk method (this method is used to call the interface provided by the native (such as android) in the form of javascript) according to the information provided in the boot data packet. You can also get the root directory of the H5 package of the sharded data and load it, load the main page of the micro-application, and jump to the root page (that is, the main package of the sharded module package) after success.

[0051] See also Figure 4 , Figure 4 A schematic diagram of a mobile application-oriented packaging method according to an embodiment of the present disclosure is shown. Figure 4 In the mobile application portal, users can click on the target mobile application (such as a micro application) to start the target mobile application. The user can be authenticated and the boot data package can be loaded. After loading, the corresponding loading page is displayed. At the same time, the communication interface is called to obtain the root directory and user permission information of the target mobile application.

[0052] In step S330, a first data packet of the mobile application is loaded based on the boot data packet, and a first page corresponding to the first data packet is displayed; wherein the first page includes at least one function identifier.

[0053] The first data packet may refer to the main data packet of the mobile application, the first page may refer to the main page of the mobile application, and the main data packet may be used to display the main page. The function identifier may be used to indicate the business function of the mobile application, and triggering the function identifier may start the corresponding business function. Specifically, Figure 4 In the process, after obtaining the root directory and user permission information, only the main data package is loaded and the page corresponding to the main data package is jumped to.

[0054] In some embodiments, loading the first data packet of the mobile application based on the boot data packet includes:

[0055] Using the jsSdk method to call the communication interface to obtain the root directory and user permission information of the mobile application;

[0056] Determine first information of the first data packet based on the user authority information and the root directory; wherein the first information includes an address and an identifier of the first data packet;

[0057] The first data packet is loaded according to the first information.

[0058] Specifically, the jsSdk method is used to call the communication interface to obtain the root directory and user permission information of the mobile application. Based on this information, the system determines the address and identifier of the first data packet, which together constitute the necessary parameters required to load the first data packet. Specifically, the system determines which data packets are accessible based on the user permission information, and determines the storage location of these data packets based on the root directory. The system loads the first data packet based on the address and identifier in the first information. The system locates the correct data packet location and loads it into memory so that the application can use this data to render the user interface or perform other necessary functions.

[0059] In step S340, in response to the first trigger operation for the function identifier, a second data packet associated with the function identifier is loaded, and / or a function page corresponding to the function identifier is displayed.

[0060] The second data packet may refer to a business data packet of a mobile application, each of which implements corresponding business logic according to different application scenarios. The second data packet may be decomposed into different functional modules based on different pages and packaged for subsequent on-demand loading, and will only be loaded when needed by the user.

[0061] In some embodiments, loading the second data packet associated with the function identifier includes: directly loading the second data packet corresponding to the function identifier.

[0062] Among them, the second data packet may correspond to an independent functional data packet, and does not depend on other functional data packets. The second data packet directly corresponds to the functional identifier, such as Figure 5 A module in . Figure 5 , Figure 5 A schematic diagram of a second data packet according to an embodiment of the present disclosure is shown. Figure 5In the example, the first data packet may be the main module homeModule, which includes module A and module B. Module B includes module C, and the execution of module C depends on module B. At this time, the second data packet may be directly loaded when the function identifier is triggered.

[0063] In some embodiments, the second data packet includes a first sub-data packet and a second sub-data packet dependent on the first sub-data packet;

[0064] Then loading a second data packet associated with the function identifier includes: after loading the first sub-data packet, loading the second sub-data packet.

[0065] The second data packet may be a function data packet with a dependency relationship. In this case, the function data packet with a dependency relationship may be loaded when the function identifier is triggered. Figure 5 The C module in the example depends on the B module. When the user triggers the function identifier S corresponding to the C module, the B module and the C module associated with the function identifier S can be loaded.

[0066] In some embodiments, loading a second data packet associated with the function identifier, and / or displaying a function page corresponding to the function identifier, includes:

[0067] Determining whether the second data packet is in the cache;

[0068] In response to the second data packet being present in the cache, directly displaying a function page corresponding to the function identifier;

[0069] In response to the second data packet not existing in the cache, the second data packet is loaded and a function page corresponding to the function identifier is displayed.

[0070] Figure 4 In the main interface, after the jump is completed, it can be determined whether the user has operated other sub-package modules (for example, clicking the announcement tab from the to-do page). If triggered, it is determined whether the sub-package exists (for example, whether it has been cached). If the sub-package data does not exist in the cache, the sub-package of the business logic is downloaded, the sub-package data is cached, and the corresponding page is displayed; if the sub-package has been cached, the corresponding page can be displayed directly. The triggering logic of other pages is similar and will not be repeated here.

[0071] In some embodiments, the function page includes at least one sub-function identifier; and the method further includes:

[0072] In response to a second trigger operation for the sub-function identifier, a third data packet corresponding to the sub-function identifier is loaded, and / or a sub-function page corresponding to the sub-function identifier is displayed.

[0073] Specifically, the homepage may contain multiple function page entrances, i.e., function identifiers, where one function page includes at least one sub-function identifier. When the user performs a second trigger operation on these sub-function identifiers (e.g., clicks or touches a sub-function button), the system will respond to this operation, load a third data packet related to the sub-function identifier, and display the corresponding sub-function page. This process allows users to access and use sub-functions within a function page through simple trigger operations, thereby enhancing the user experience and improving the interactivity and usability of the application.

[0074] In some embodiments, method 300 includes:

[0075] Packing the boot data of the mobile application to obtain the boot data packet; wherein the boot data includes the application identifier, application name and data download address of the mobile application;

[0076] Packing data associated with displaying the first page to obtain the first data packet;

[0077] Packetizing the functional data of the mobile application according to a preset granularity to obtain the second data packet;

[0078] The boot data packet, the first data packet and the second data packet are deployed on a server side.

[0079] Among them, during the development process, the calling method statistics can be encapsulated as a function for easy calling. After registration and authentication, JSBridge can be used to provide JavaScript with an interface and two-way communication for calling native functions. The calling function adopts an asynchronous callback method, which is safe and easy to read. Both the boot data packet and the sub-package need to be uploaded to the background control system in a unified manner, and finally uploaded to the server for users to load the package when using it. In addition, the system also provides verification of packages (sub-packages, boot packages), registration and control of the scope of authority of the corresponding version package users and release and listing functions, maintains parameters such as appAgentId for the verification of each package, and provides functions such as deletion, enabling and disabling for the maintenance of sharding module packages, which is convenient for administrators to compare and control different versions of sharding module packages. Only sharding module packages that have been registered with the system and verified and approved can be downloaded by relevant authorized users in subsequent App use, such as Figure 6 As shown, Figure 6 A schematic diagram showing the deployment of packetized data according to an embodiment of the present disclosure is shown.

[0080] In some embodiments, deploying the boot data packet, the first data packet, and the second data packet on a server side includes:

[0081] Calculating a reference hash value of the boot data packet, the first data packet, or the second data packet;

[0082] Generate a corresponding verification file based on the reference hash value, the size and version number of the boot data packet, the first data packet or the second data packet, wherein the verification file is used to verify the integrity of the loaded boot data packet, the first data packet or the second data packet;

[0083] The boot data packet, the first data packet, the second data packet and the verification file are uploaded to the server.

[0084] Among them, in the process of developing micro-applications (mini-programs), front-end developers transfer all the sub-packages used by the micro-application in the form of multiple H5 compressed packages to the background control system according to their own business logic. After the system administrator and the approval personnel have confirmed the approval, the conditions for user-side use are met. For example: a to-do micro-application consists of three parallel tabs: a to-do page, an announcement page, and a personal page. Based on the sharding principle of this sharding module package, the overall sharding module package can be divided into a to-do module (main page), an announcement module, a personal module, and three business modules. The default main page is the to-do page. In terms of program implementation: the packaging process of the sharding module package is written based on Nodejs and Webpack components, such as Figure 5 The first data packet homeModule.zip, the second data packet moduleA.zip, the second data packet moduleB.zip, and the second data packet moduleC.zip. The specific packaging is: when packaging, the developer only needs to treat each business module as several separate module business files, and its file name matches the module name in the module configuration item in the packaging configuration file. Through the file processing module (fs), file hash value calculation module (folder-hash), encryption module (crypto) and other modules provided by Nodejs and the compression packaging SDK provided by the webpack plug-in, it can finally output several compressed module packages and a release.json file for the background management system to verify the legitimacy of the sub-package, such as Figure 5 See Figure 7 , Figure 7 A schematic diagram of a verification file according to an embodiment of the present disclosure is shown. Figure 7In the example, the verification file can be a configuration file "release.json" in JSON format, which contains some key information about the mobile application (called "demo" in this case). This file is mainly used to manage and update sub-package modules. Among them, appName: "demo" can be the name of the mobile application, which is used to identify the application. version: "2.1.1": can be the version number of the mobile application, which is used to track the differences between different versions. mainModuleName: "homeModule": can be the name of the sub-package directory, that is, the main module or main data package of the application. modules: can be an object containing information about multiple sub-modules, each of which has its own version number, size, hash value and zipHash. build: timestamp, used to verify the release date of the file. size: the size of the data package, used to indicate the capacity of the data package. hash and zipHash: used to check and verify the calculated hash value to ensure that the module has not been tampered with. The hash value is a cryptographic technology that calculates a fixed-length summary of the original data by operation. Any slight change will result in a different hash value. Therefore, by comparing the hash value of the current module with the hash value on the server, it is possible to detect whether the module has been modified.

[0085] When a user opens a mobile app, the app will download a "release.json" file from the server. The app parses this file to obtain information about the main module and other sub-packaged modules. If a module is not found in the local cache or is an older version, the app will download the latest module. During the download process, the app will compare the hash value provided by the server with the hash value calculated locally to ensure that the downloaded module has not been tampered with. This ensures the security and integrity of the mobile app, because each new module downloaded needs to be verified before it can be installed. At the same time, through sub-package loading, the application can load the required parts on demand at runtime, avoiding loading a large amount of resources at one time, which improves the user experience.

[0086] It can be seen that according to the embodiment of the present disclosure, the hybrid development mode is adopted. In the face of frequently changing scenarios, without increasing the development cost, the scalability and reusability are high, replacing the traditional hybrid development mode of offline package single download, significantly reducing the loading delay of mobile applications from portals to micro applications, and greatly improving the user experience. The present disclosure provides a lightweight sub-packaging mode for multi-oriented mobile applications, assisting developers to develop, package and upload more quickly based on this, and provides packaging file configuration and upload verification files and formats. Especially for complex business scenarios, it can flexibly realize the scene-based loading of different business packages of mobile micro applications under the hybrid development mode, and realize lightweight deployment architecture. The boot package and the sub-packaging module package are innovatively used to collaboratively realize the transition from mobile portal to mobile micro application, ensuring that important modules are loaded first, greatly reducing the response time. The development mode and packaging strategy of the sub-packaging optimization method are proposed, so that developers can more conveniently and uniformly carry out actual project development and packaging according to specific strategies and configuration files. A platform solution for subpackaging optimization method is proposed, and a management system is used to uniformly manage boot packages and subpackaging, ensuring the security and stability of mobile micro-applications.

[0087] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0088] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0089] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a subpackaging device for mobile applications, see Figure 8 , the subpackaging device for mobile applications, the device comprising:

[0090] an authentication module, configured to authenticate the startup operation in response to the startup operation for the mobile application;

[0091] A loading module, configured to load a boot data packet of the mobile application in response to the authentication of the startup operation being passed; and load a first data packet of the mobile application based on the boot data packet;

[0092] A display module, configured to display a first page corresponding to the first data packet; wherein the first page includes at least one function identifier;

[0093] The loading module is further configured to load a second data packet associated with the function identifier in response to a trigger operation on the function identifier;

[0094] The display module is also used to display the function page corresponding to the function identifier.

[0095] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0096] The device of the above embodiment is used to implement the corresponding mobile application-oriented subpackaging method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0097] Based on the same technical concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the mobile application-oriented subpackaging method as described in any of the above embodiments.

[0098] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0099] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the mobile application-oriented packaging method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0100] It should be understood by those skilled in the art that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0101] In addition, to simplify the description and discussion, and in order not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0102] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.

[0103] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A subpackaging method for mobile applications, comprising: In response to a start-up operation for the mobile application, authenticating the start-up operation; In response to the authentication of the startup operation being passed, loading a boot data packet of the mobile application; Loading a first data packet of the mobile application based on the boot data packet, and displaying a first page corresponding to the first data packet; wherein the first page includes at least one function identifier; In response to a first trigger operation for the function identifier, loading a second data packet associated with the function identifier and displaying a function page corresponding to the function identifier, including: directly loading the second data packet corresponding to the function identifier; or, the second data packet includes a first sub-data packet and a second sub-data packet dependent on the first sub-data packet; then loading the second data packet associated with the function identifier, including: after loading the first sub-data packet, loading the second sub-data packet; The method further comprises: Packing the boot data of the mobile application to obtain the boot data packet; wherein the boot data includes the application identifier, application name and data download address of the mobile application; Packing data associated with displaying the first page to obtain the first data packet; Packetizing the functional data of the mobile application according to a preset granularity to obtain the second data packet; The boot data packet, the first data packet and the second data packet are deployed on a server side.

2. The method according to claim 1, loading a second data packet associated with the function identifier, comprising: Determining whether the second data packet exists in the cache; In response to the second data packet being present in the cache, directly displaying a function page corresponding to the function identifier; In response to the second data packet not existing in the cache, the second data packet is loaded and a function page corresponding to the function identifier is displayed.

3. The method according to claim 1, wherein: Loading a first data packet of the mobile application based on the boot data packet includes: Calling a communication interface to obtain the root directory and user permission information of the mobile application; Determine first information of the first data packet based on the user authority information and the root directory; wherein the first information includes an address and an identifier of the first data packet; The first data packet is loaded according to the first information.

4. The method according to claim 1, wherein: The function page includes at least one sub-function identifier; the method further includes: In response to a second trigger operation for the sub-function identifier, a third data packet corresponding to the sub-function identifier is loaded, and / or a sub-function page corresponding to the sub-function identifier is displayed.

5. The method according to claim 1, wherein: Deploying the guide data packet, the first data packet and the second data packet on a server side includes: Calculating reference hash values ​​of the boot data packet, the first data packet, and the second data packet; Generate a corresponding verification file based on the reference hash value, the boot data packet, the size of the first data packet and the second data packet, and the version number, wherein the verification file is used to verify the integrity of the loaded boot data packet, the first data packet or the second data packet; The boot data packet, the first data packet, the second data packet and the verification file are uploaded to the server.

6. A subpackaging device for mobile applications, comprising: an authentication module, configured to authenticate the startup operation in response to the startup operation for the mobile application; A loading module, configured to load a boot data packet of the mobile application in response to the authentication of the startup operation being passed; loading a first data packet of the mobile application based on the boot data packet; A display module, configured to display a first page corresponding to the first data packet; wherein the first page includes at least one function identifier; The loading module is further configured to load, in response to a trigger operation for the function identifier, a second data packet associated with the function identifier, including: directly loading the second data packet corresponding to the function identifier; or, the second data packet includes a first sub-data packet and a second sub-data packet dependent on the first sub-data packet; then loading the second data packet associated with the function identifier includes: after loading the first sub-data packet, loading the second sub-data packet; The display module is further used to display the function page corresponding to the function identifier; The device is also used for: Packing the boot data of the mobile application to obtain the boot data packet; wherein the boot data includes the application identifier, application name and data download address of the mobile application; Packing data associated with displaying the first page to obtain the first data packet; Packetizing the functional data of the mobile application according to a preset granularity to obtain the second data packet; The boot data packet, the first data packet and the second data packet are deployed on a server side.

7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the program.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Application program starting method and device, medium and electronic equipment

    CN112379933A

  • Page loading method and device, electronic equipment and computer readable storage medium

    CN115509639A