Sub-application running method and apparatus, and computer device and storage medium

By displaying the sub-application identifier in the application and parsing the compiled program package, and running the sub-application directly in the application, the cumbersome operation problems in the existing technology are solved and the operation efficiency of the sub-application is improved.

WO2024239757A1PCT designated stage expired Publication Date: 2024-11-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/079896
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-23
Filing Date
2024-03-04
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

In the prior art, when users use sub-applications when browsing web pages, the mobile terminal needs to scan the graphics code of the sub-applications, which is cumbersome and inefficient.

Method used

By displaying the sub-application identifier in the application's business page, in response to the trigger operation initiating the sub-application run request, the virtual server obtains the compiled program package and parses the file data, and runs the sub-application directly in the application, avoiding scanning of mobile devices Steps of Graphic Code.

Benefits of technology

Simplify the operation of sub-applications and improve efficiency. By directly parsing compiled packages into the application, the operation complexity and improve operation efficiency are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079896_28112024_PF_FP_ABST
    Figure CN2024079896_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a sub-application running method and apparatus, and a computer device, a storage medium and a computer program product. The method can be applied to the field of computer software, for example, to a scenario where a sub-application is run by means of application programs installed in a vehicle-mounted device and other smart terminals. The method comprises: when a service page displayed by means of an application program comprises a sub-application identifier, initiating a sub-application running request in response to a trigger operation for the sub-application identifier (step 202); when the sub-application running request is acquired by a virtual server, acquiring, by means of the virtual server, a compiled program package corresponding to the sub-application identifier, and parsing the program package to obtain file data (step 204); and on the basis of the file data, running in the application program a sub-application corresponding to the sub-application identifier (step 206).
Need to check novelty before this filing date? Find Prior Art

Description

Sub-application operation method, device, computer equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 23, 2023, with application number 2023105949799, and invention name “Sub-application operating method, device, computer equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for running a sub-application. Background Art

[0003] With the development of computer technology, a variety of applications have provided users with many conveniences. Using applications to work, obtain information, and conduct online shopping has become an indispensable part of daily life.

[0004] Currently, when a user needs to use a sub-application while browsing a webpage, the user usually needs to scan a graphic code of the sub-application on a mobile terminal and use the sub-application on the mobile terminal. However, this operation is cumbersome and inefficient.

[0005] Summary of the Invention

[0006] According to various embodiments provided in the present application, a method, apparatus, computer device, computer-readable storage medium, and computer program product for running a sub-application are provided.

[0007] In a first aspect, the present application provides a method for running a sub-application, which is executed by a terminal, comprising:

[0008] When a sub-application identifier is included in a business page displayed by an application, a sub-application execution request is initiated in response to a triggering operation on the sub-application identifier; when the sub-application execution request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data; and in the application, the sub-application identified by the sub-application is executed based on the file data.

[0009] In a second aspect, the present application further provides a sub-application running device. The device includes:

[0010] a triggering module configured to initiate a sub-application execution request in response to a triggering operation on the sub-application identifier when the business page displayed by the application includes the sub-application identifier;

[0011] A file data acquisition module is used to obtain the compiled program package corresponding to the sub-application identifier through the virtual server when the sub-application execution request is obtained by the virtual server, and parse the program package to obtain file data; and

[0012] The sub-application running module is used to run the sub-application identified by the sub-application based on the file data in the application program.

[0013] In a third aspect, the present application further provides a computer device comprising a memory and one or more processors, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processors, the one or more processors perform the following steps:

[0014] When a sub-application identifier is included in a business page displayed by an application, a sub-application execution request is initiated in response to a triggering operation on the sub-application identifier; when the sub-application execution request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data; and in the application, the sub-application identified by the sub-application is executed based on the file data.

[0015] In a fourth aspect, the present application further provides one or more non-volatile readable storage media having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the following steps are implemented:

[0016] When a sub-application identifier is included in a business page displayed by an application, a sub-application execution request is initiated in response to a triggering operation on the sub-application identifier; when the sub-application execution request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data; and in the application, the sub-application identified by the sub-application is executed based on the file data.

[0017] In a fifth aspect, the present application further provides a computer program product, comprising computer-readable instructions, which, when executed by a processor, implement the following steps:

[0018] When a sub-application identifier is included in a business page displayed by an application, a sub-application execution request is initiated in response to a triggering operation on the sub-application identifier; when the sub-application execution request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data; and in the application, the sub-application identified by the sub-application is executed based on the file data.

[0019] The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are merely exemplary embodiments of this application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0021] FIG1 is an application environment diagram of a method for running a sub-application in one embodiment;

[0022] FIG2a is a schematic diagram of an application scenario of a method for running a sub-application in one embodiment;

[0023] FIG2 b is a schematic flow chart of a method for running a sub-application in one embodiment;

[0024] FIG3 is a schematic diagram of displaying a sub-application identifier on a business page in one embodiment;

[0025] FIG4 is a schematic diagram of running a sub-application in a newly created page in one embodiment;

[0026] FIG5 is a schematic diagram of running a sub-application in a sub-page of a business page in one embodiment;

[0027] FIG6 is a schematic diagram of the structure of a sub-application when it is running according to an embodiment;

[0028] FIG7 is a schematic diagram of a virtual server obtaining file data in one embodiment;

[0029] FIG8 is a schematic diagram of a process of an application program running a sub-application in one embodiment;

[0030] FIG9 is a schematic diagram of a process for sending a parent application interface call request in one embodiment;

[0031] FIG10 is a schematic diagram of launching a mini-program via a browser in one embodiment;

[0032] FIG11 is a schematic diagram of a question details page of a mini program in one embodiment;

[0033] FIG12 is a schematic diagram of launching a mini-program by scanning a graphic code of the mini-program in a browser via a mobile device in the related art;

[0034] FIG13 is a schematic flow chart of a method for operating a sub-application in another embodiment;

[0035] FIG14 is a structural block diagram of a running device of a sub-application according to an embodiment;

[0036] FIG15 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0038] In this specification and the accompanying drawings, substantially the same or similar steps and elements are denoted by the same or similar reference numerals, and repeated descriptions of these steps and elements will be omitted. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance or ranking.

[0039] The sub-application operation method provided in the embodiments of the present application can be applied in the application environment shown in FIG1 . In this embodiment, terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated with server 104 or placed in the cloud or other network servers.

[0040] The terminal displays the sub-application identifier on the business page of the application; the terminal can initiate a sub-application running request in response to a trigger operation on the sub-application identifier; when the sub-application running request is obtained by the virtual server, the terminal obtains the compiled program package corresponding to the sub-application identifier through the virtual server, and parses the program package to obtain file data; the terminal runs the sub-application identified by the sub-application based on the file data in the application.

[0041] The terminal 102 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, IoT device, or portable wearable device. IoT device may be a smart speaker, smart TV, smart air conditioner, or smart car device. Portable wearable device may be a smart watch, smart bracelet, or head-mounted device.

[0042] The server 104 may be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP).

[0043] In addition, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0044] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus), or a network, and this application does not impose any limitation thereto.

[0045] The sub-application running method provided in the embodiment of the present application can be applied to the application scenario shown in Figure 2a; the business page a02 is displayed through the terminal application, and the sub-application identifier a04 is displayed in the business page a04. In response to the triggering operation of the sub-application identifier a04, a sub-application running request is initiated. When the sub-application running request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier a04 is obtained through the virtual server, and the program package is continued to obtain file data. In the application, the sub-application a06 with the sub-application identifier is run based on the file data.

[0046] In some embodiments, as shown in FIG2b , a method for running a sub-application is provided, which is described by taking the method executed by the terminal in FIG1 as an example, and includes the following steps:

[0047] Step 202: In a case where the business page displayed by the application includes a sub-application identifier, a sub-application execution request is initiated in response to a triggering operation on the sub-application identifier.

[0048] Among them, the application can be a browser; the page is a page displayed in the browser, that is, a network page; the business page is a page used to execute a certain business, that is, a certain business can be executed in the business page of the browser. For example, a business page is developed for a certain business, and the business page can be displayed in the browser through the access address of the business page.

[0049] For example, the business may be a business of developing sub-applications, in which a business page for developing sub-applications is displayed through a browser, and sub-applications can be developed in the business page displayed in the browser; the business may also be a business of customizing public accounts, in which a business page for customizing public accounts is displayed through a browser, and public accounts can be customized in the business page displayed in the browser.

[0050] Among them, the sub-application is related to the business executed by the business page. For example, the business executed by the business page includes multiple links, and the sub-application can be used to execute at least one link included in the business; the sub-application identifier can be an identifier for starting the sub-application, which can be understood as the style of the sub-application entrance displayed on the business page, that is, triggering the sub-application identifier is equivalent to triggering the sub-application entrance, and the sub-application entrance is used to start the sub-application, that is, the sub-application can be run in the application through the sub-application identifier displayed on the business page.

[0051] In actual applications, the sub-application can be a mini-program, that is, at least one link in the business performed by the business page can be implemented through the mini-program; it should be noted that when the application is a browser and the sub-application is a mini-program, the embodiment of the present application can be used to implement the running of the mini-program in the browser; since the data required to run the mini-program is relatively small, it takes less time to load the required data when running the mini-program through the browser, and the mini-program can be entered quickly and conveniently.

[0052] Exemplarily, the application is a browser and the sub-application is a mini-program. As shown in FIG3 , the browser is run on the terminal and a business page 301 is displayed in the browser. The corresponding business can be executed through the business page 301. The business page 301 includes a sub-application identifier 302 corresponding to the mini-program entrance.

[0053] Among them, the trigger operation can be a click operation, a long press operation, a sliding operation, and of course other operations used to indicate the selection of the sub-application identifier; the trigger operation can be performed by the target object on the sub-application identifier in the business page, and the target object can be the object that logs in to the business account through the business page; the business account is the account of the target object under the business page.

[0054] For example, the target object logs in to its business account on the business page. While browsing the business page, the target object clicks, long presses, or slides on the sub-application identifier on the business page to trigger the sub-application identifier.

[0055] The sub-application running request is used to start the sub-application, and can be specifically used to obtain data required to start the sub-application.

[0056] In some embodiments, when the terminal runs an application and a business page displayed in the application includes a sub-application identifier, the terminal initiates a sub-application execution request in response to a target object performing a trigger operation on the sub-application identifier in the business page.

[0057] For example, when the application is a browser and the sub-application is a mini-program, for the sub-application identifier displayed in the browser's business page, the terminal initiates a sub-application running request in response to the trigger operation performed by the target object on the sub-application identifier. The sub-application running request is used to start the mini-program in the application.

[0058] Step 204: When the sub-application execution request is received by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data.

[0059] The terminal includes a virtual server, which runs on a service thread of an application program. The service thread is a resident thread of the application program. The virtual server can provide static resource processing services for the application program.

[0060] The program package obtained by the virtual server is the compiled program package required to start the sub-application; since the virtual server obtains the compiled program package, the sub-application can be directly run using the program package without the need to compile the source code of the sub-application, making the running of the sub-application in the application more efficient and the process of calling up the sub-application through the application smoother.

[0061] The file data is the data obtained by parsing the program package, and the file data is also the data required to run the sub-application. In actual applications, the program package is also called the code package. Accordingly, the file data is the data obtained by unpacking the code package.

[0062] In some embodiments, the terminal also includes a class library, which encapsulates various methods for running sub-applications, and the class library runs on the main thread of the application; a sub-application running request is generated through the class library, and the sub-application running request is sent to the virtual server running on the service thread. The virtual server obtains the compiled program package of the sub-application based on the sub-application running request, and parses the program package to obtain file data.

[0063] In some embodiments, the sub-application execution request includes an identity number (AppID) of the sub-application. The identity number is a unique number of the sub-application, and the sub-application identifier and the program package can be associated through the identity number. After the virtual server obtains the sub-application execution request, it obtains the AppID included in the sub-application execution request, and the virtual server obtains the compiled program package corresponding to the AppID.

[0064] In some embodiments, the application is the first parent application of the sub-application, and the sub-application can also run in the second parent application. The compiled program package of the sub-application can be the program package used to run the sub-application in the second parent application. That is, the sub-application can be run through the same program package in the first parent application and the second parent application, and thus there is no need to develop an additional program package for the first parent application, saving development resources. In addition, the sub-application used through the first parent application and the sub-application used through the second parent application have the same human-computer interaction interface and usage functions, so that the sub-application used through the first parent application can achieve the same usage experience as the sub-application used through the second parent application.

[0065] In some embodiments, the second parent application may be an instant messaging application; when the application is a browser and the sub-application is a mini-program, the virtual server obtains the compiled program package of the mini-program based on the AppID of the mini-program. The program package may be the program package used to run the mini-program in the instant messaging application, so that running the mini-program in the browser has the same user experience as running the mini-program in the instant messaging application.

[0066] Step 206: In the application program, run the sub-application identified by the sub-application based on the file data.

[0067] In some embodiments, after the virtual server parses the program package to obtain file data, the virtual server obtains data required to run the sub-application from the file data, and the terminal runs the sub-application in the application program according to the data required to run the sub-application.

[0068] In some embodiments, the terminal initiates a resource request, the virtual server intercepts the resource request, and returns the corresponding sub-application entry file based on the resource request. The terminal executes the sub-application entry file. In the process of executing the sub-application entry file, based on the sub-application entry file, the terminal obtains the data required to run the sub-application from the file data obtained from the virtual server. The terminal runs the sub-application in the application data based on the data required to run the sub-application.

[0069] In some embodiments, the application is a browser, and the business page is a page displayed by the browser. In response to a triggering operation on a sub-application identifier displayed on the business page, the terminal displays a new page in the browser and initiates a sub-application execution request. When the sub-application execution request is received by the virtual server, the virtual server obtains the compiled program package corresponding to the sub-application identifier, parses the program package to obtain file data, and then executes the sub-application based on the file data in the new page of the browser. In other words, invoking the sub-application through the browser can mean displaying the executed sub-application in the new page of the browser.

[0070] Exemplarily, the sub-application is a mini-program, referring to Figures 3 and 4. A business page 301 is displayed in the browser. In response to a triggering operation on the sub-application identifier 302 in the business page 301, a new page 401 is displayed in the browser to facilitate the subsequent display of the running mini-program in the new page 401. When the browser completes the startup of the mini-program, the main page 402 of the mini-program is displayed in the new page 401.

[0071] In some embodiments, in response to a triggering operation on a sub-application identifier displayed on a business page, the terminal displays the sub-page on the business page and initiates a sub-application execution request. After obtaining the file data from the virtual server, the terminal executes the sub-application based on the file data on the sub-page of the business page. In other words, invoking the sub-application through the browser may involve displaying the executed sub-application on the sub-page of the business page.

[0072] Exemplarily, the sub-application is a mini-program. Referring to Figures 3 and 5, a business page 301 is displayed in a browser. In response to a triggering operation on the sub-application identifier 302 in the business page 301, a sub-page 501 is displayed on the business page 301 to facilitate the subsequent display of the running mini-program in the sub-page 501. The sub-page 501 is the main page of the mini-program.

[0073] In the above-mentioned sub-application running method, when the business page displayed by the application includes a sub-application identifier, a sub-application running request is initiated in response to a triggering operation on the sub-application identifier. When the sub-application running request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained by the virtual server, and the program package is parsed to obtain file data, and the sub-application is run in the application through the file data; that is, by triggering the sub-application identifier in the business page of the application, the sub-application can be run directly in the application. Compared with the related art, the solution of running the sub-application in the mobile device by scanning the graphic code of the sub-application displayed in the application by a mobile device, running the sub-application directly in the application greatly reduces the operational complexity of running the sub-application and improves the efficiency of running the sub-application; in addition, since the virtual server obtains the compiled program package, it can directly parse the program package and run the sub-application through the parsed file data, without the need to perform the compilation process, so that the efficiency of running the sub-application in the application is higher and the process of calling the sub-application through the application is smoother.

[0074] In some embodiments, in response to a triggering operation on a sub-application identifier, a sub-application running request is initiated, including: in response to a triggering operation on a sub-application identifier, a class library interface call request is initiated through an application component of an application program; the class library interface call request is used to instruct the class library to initiate a sub-application running request to a virtual server.

[0075] Among them, the application component is a component of the business page, that is, the business page can be a complete page packaged by multiple components; the application component can be a component that encapsulates the sub-application entrance, and the sub-application logo can be understood as the visual style of the application component.

[0076] In actual applications, application components can be components implemented based on Vue or components implemented based on React. Vue and React are both user interface frameworks for JavaScript (a programming language) that can be used to develop components. In this way, the running methods of sub-applications can be easily connected to pages implemented based on Vue and React.

[0077] Among them, the class library encapsulates various methods for running sub-applications, runs on the main line layer of the application, and can be used to initiate sub-application running requests; the class library interface call request is a request to call the class library interface.

[0078] In some embodiments, the trigger operation for the sub-application identifier can be understood as a trigger operation for the application component corresponding to the sub-application identifier; when the application component corresponding to the sub-application identifier receives the trigger operation, a class library interface call request is initiated through the application component, and the class library interface call request is used to call the class library interface, thereby achieving access to the class library; when the class library receives the class library interface call request initiated by the application component, it initiates a sub-application running request to the virtual server.

[0079] In some embodiments, the sub-application running request is a request for initializing the sub-application; when the application component corresponding to the sub-application identifier receives a trigger operation, a class library interface call request is initiated through the application component. When the class library receives the class library interface call request, it triggers the initialization of the sub-application, and then initiates a sub-application running request to the virtual server to request the initialization of the sub-application.

[0080] In some embodiments, the sub-application can be a mini-program, which triggers the sub-application identifier displayed on the business page and initiates a class library interface call request through the application component. When the class library receives the class library interface call request initiated by the application component, it initiates a sub-application running request to the virtual server to request the initialization of the mini-program.

[0081] In the above embodiment, the business page can be a complete page packaged by multiple components, and the sub-application entrance is encapsulated as an application component corresponding to the sub-application identifier. In this way, the sub-application entrance can be connected to different business pages without making additional improvements to the implementation framework of the business page, so that the sub-application operation method can be directly applied to the existing page, thereby improving the adaptability of the sub-application operation method.

[0082] In some embodiments, the application is the first parent application of the sub-application. When the sub-application execution request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data, including: downloading the compiled program package corresponding to the sub-application identifier from the target server through the virtual server; wherein the target server is used to run the second parent application of the sub-application, and the first parent application and the second parent application are different applications.

[0083] Among them, the target server is used to run the second mother application of the sub-application, which means that when the second mother application is running, it needs to communicate with the target server to obtain the data required to run the second mother application, and provide other services for the second mother application; it should be noted that when running the sub-application in the second mother application, it is also necessary to communicate with the target server to obtain the data required to run the sub-application; the target server can be understood as the background server of the second mother application.

[0084] The program package of the sub-application may be a program package compiled using the official development tool of the second parent application, that is, the program package obtained by the virtual server is the same as the program package loaded when the sub-application is started in the second parent application.

[0085] In related technologies, sub-applications are usually run in a second parent application, so the compiled program package of the sub-application is an existing program package. The virtual server can directly obtain the program package used to run the sub-application in the second parent application without the need to develop an additional program package for the application, saving time and cost in implementing the sub-application running method.

[0086] For example, the second parent application is an instant messaging application, and the child application is a mini-program. In actual applications, the mini-program mainly runs in the instant messaging application. The background server (target server) of the instant messaging application has the program package of the mini-program. When the mini-program is run in the browser, the virtual server can directly obtain the program package of the mini-program from the background server of the instant messaging application.

[0087] In some embodiments, the virtual server determines a download address of the program package according to the sub-application execution request, and obtains the compiled program package of the sub-application from the target server according to the download address of the program package.

[0088] In some embodiments, the sub-application execution request includes an identity number of the sub-application. The virtual server obtains the identity number of the sub-application included in the sub-application execution request, and determines the download address of the program package based on the identity number of the sub-application. The virtual server generates a program package acquisition request based on the download address, sends the program package acquisition request to the target server, and receives the compiled program package sent by the target server.

[0089] In the above embodiment, the program package obtained by the virtual server is the same as the program package loaded when the sub-application is started in the second parent application, so that the sub-application started in the application based on the program package has the native effect of starting the sub-application in the second parent application, and there is no need to develop an additional program package for the sub-application for the application, saving time and expenses in implementing the sub-application running method; in addition, the program package is a compiled program package, and there is no need to execute the process of compiling according to the source code of the sub-application, so that the efficiency of running the sub-application in the application is higher, and the experience of calling up the sub-application through the application is smoother.

[0090] In some embodiments, downloading the compiled program package corresponding to the sub-application identifier from the target server through the virtual server includes: obtaining the program package download address corresponding to the sub-application identifier from the proxy server through the virtual server; and downloading the compiled program package corresponding to the sub-application identifier from the target server based on the program package download address.

[0091] The terminal also includes a proxy server, which can provide an address lookup service for the program package.

[0092] In some embodiments, when the virtual server receives a sub-application execution request, it sends an address query request to the proxy server. The proxy server returns the package download address corresponding to the sub-application identifier based on the address query request. After obtaining the package download address, the virtual server downloads the compiled package corresponding to the sub-application identifier from the target server based on the package download address.

[0093] In some embodiments, the sub-application execution request includes an identity label of the sub-application; obtaining, through the virtual server, from the proxy server, a program package download address corresponding to the sub-application identity, includes: generating, through the virtual server, an address query request corresponding to the identity label; sending the address query request to the proxy server to instruct the proxy server to obtain the program package download address corresponding to the sub-application identity; and obtaining the program package download address corresponding to the sub-application identity returned by the proxy server. By sending the address query request to the proxy server, the program package download address corresponding to the sub-application identity can be quickly obtained.

[0094] In one possible scenario, the virtual server obtains the identity label included in the sub-application running request, generates an address query request based on the identity label, and sends the address query request to the proxy server. The proxy server obtains the identity label in the address query request, queries the version number of the sub-application identifier based on the identity label, and obtains the package download address corresponding to the version number. The proxy server can send the package download address corresponding to the version number to the virtual server, so that the virtual server obtains the package download address corresponding to the sub-application identifier; the version number can be the current latest version number of the sub-application.

[0095] In another possible scenario, after obtaining the identification number from the address query request, the proxy server uses the identification number to search the package list. The package list includes the download addresses of each package. Each package download address is the download address of each compiled package required to start the sub-application with the corresponding version number. The proxy server sends the package list to the virtual server, which then determines the package download address based on the package list.

[0096] In some embodiments, the terminal includes a sub-application runtime, which can serve as an engine for running the sub-application in the application program; when the sub-application is a mini-program, the sub-application runtime can also be recorded as the mini-program runtime.

[0097] Exemplarily, as shown in FIG6 , the sub-application runtime includes an application component, a class library, a virtual server, and a proxy server; as shown in FIG7 , the sub-application runtime responds to a trigger operation for the sub-application identifier and initiates a class library interface call request through the application component. Based on the class library interface call request, the class library initiates a sub-application running request to the virtual server. The sub-application running request is used to initialize the sub-application.

[0098] When the virtual server receives a sub-application execution request, it sends an address query request to the proxy server based on the sub-application execution request. The proxy server returns a package list to the virtual server based on the address query request. The virtual server then determines the package download address based on the package list. After determining the package download address, the virtual server creates a static service instance, downloads the package from the target server based on the package download address, and parses the package to obtain the file data to complete the creation of the static service instance. The virtual server then returns the instance identifier of the static service instance to the class library. Upon receiving the instance identifier, the class library initializes the sub-application instance and controller corresponding to the instance identifier to complete the initialization of the sub-application.

[0099] It's important to note that static service instances provide file data obtained by parsing a package, while sub-application instances implement sub-application functionality. For example, they encapsulate code injector methods for injecting custom scripts into the sub-application's native components. They also encapsulate event emitter methods for processing communication messages from virtual servers and proxy servers, emitting events, and reference utilities for referencing specific objects in native components. Controllers provide applications with the ability to control sub-applications, such as creating, destroying, and restarting them.

[0100] In the above embodiment, the virtual server obtains the program package download address from the proxy server, and then downloads the compiled program package corresponding to the program package download address from the target server, so that the sub-application launched according to the program package in the application has the native effect of launching the sub-application in the second parent application; and there is no need to execute the process of compiling according to the source code of the sub-application, so that the efficiency of running the sub-application in the application is higher, and the experience of calling up the sub-application through the application is smoother.

[0101] In some embodiments, in an application, running a sub-application identified by a sub-application based on file data includes: initiating a resource request including a virtual resource locator; when the resource request is obtained by the virtual server, obtaining the sub-application entry file corresponding to the virtual resource locator through the virtual server; obtaining response data required for the sub-application entry file in the file data; and in the application, running the sub-application identified by the sub-application based on the sub-application entry file and the response data.

[0102] The resource locator refers to a URL (Uniform Resource Location), which can be used to locate the specific location of a resource; the virtual resource locator (virtual URL) refers to the specific location of a resource in a virtual server.

[0103] The sub-application entry file is generated by the virtual server. The sub-application entry file can be understood as the sub-application's main directory, including but not limited to the basic libraries, native components, and file paths required to run the sub-application. The basic libraries and native components included in the sub-application entry file provide the framework required to run the sub-application. The file paths included in the sub-application entry file can import the response data required to run the sub-application. The response data is the page resource data required to run the sub-application. The sub-application can be run using the sub-application entry file and response data. In actual applications, the sub-application entry file can be recorded as index.html, which is the sub-application's main directory.

[0104] In some embodiments, a terminal may initiate a resource request through a class library. When the class library initiates a resource request, an acquisition event is triggered. When the virtual server detects the acquisition event, the virtual server may intercept the resource request initiated by the class library, i.e., the resource request is acquired by the virtual server. It should be noted that the action of the virtual server detecting the acquisition event may be continuous to ensure that the virtual server can intercept the resource request initiated by the class library.

[0105] The virtual server obtains the virtual URL included in the resource request, obtains the corresponding sub-application entry file based on the virtual URL, and returns the sub-application entry file to the class library so that the class library obtains the sub-application entry file; the terminal executes the sub-application entry file through the class library, and in the process of executing the sub-application entry file, obtains response data from the file data of the virtual server according to the file path included in the sub-application entry file, and the class library runs the sub-application in the application based on the sub-application entry file and the response data.

[0106] In the above embodiment, the virtual server intercepts the resource request so that the resource request is not actually issued. Instead, the resource request is processed by the virtual server to obtain the sub-application entry file, and the response data required to run the sub-application is obtained through the sub-application entry file. Based on the sub-application entry file and the response data, the sub-application can be directly run in the application, which greatly reduces the operational complexity of running the sub-application.

[0107] In some embodiments, initiating a resource request including a virtual resource locator includes: creating an embedded page frame instance; the location of the external resource pointed to by the embedded page frame instance is the virtual resource locator; and initiating a resource request including the virtual resource locator through the embedded page frame instance. Creating the embedded page frame instance and initiating the resource request through the embedded page frame instance facilitates subsequent loading of the embedded page frame instance with acquired data to embed a page running a sub-application within the business page, thereby enabling the sub-application to be run directly within the application, significantly reducing the operational complexity of running the sub-application.

[0108] Among them, the embedded page frame instance refers to the iframe instance, iframe is an HTML tag, and HTML is a language for describing web pages; the iframe instance can be used to embed a page in a page. In an embodiment of the present application, an embedded page frame instance is created to embed a page running a sub-application in a business page.

[0109] The location pointing to the external resource is a property of the embedded page frame instance, which is used to limit the address of the document embedded in the iframe instance.

[0110] The terminal creates an iframe instance through the class library. The src of the iframe instance (the location of the external resource) is a virtual URL. The class library runs the iframe instance to initiate a resource request including the virtual URL. The class library can create the iframe instance after completing the initialization of the sub-application instance and controller.

[0111] In some embodiments, obtaining the response data required by the sub-application entry file in the file data includes: initiating a file acquisition request based on the file path included in the sub-application entry file by embedding a page frame instance; and obtaining the response data required by the sub-application entry file in the file data through the file acquisition request.

[0112] Among them, the sub-application entry file includes a file path. Since the sub-application entry file is generated by a virtual server, the file path is the storage path of the file data in the virtual server. Therefore, based on the file path included in the sub-application entry file, the corresponding response data can be found from the file data of the virtual server.

[0113] The resource request initiated by the class library is intercepted by the virtual server, and the virtual server returns the sub-application entry file based on the virtual URL included in the resource request. The terminal executes the sub-application entry file through the iframe instance created by the class library, generates a file acquisition request based on the file path included in the sub-application entry file, and sends the file acquisition request to the virtual server. After receiving the file acquisition request, the virtual server obtains the corresponding response data from the file data based on the file path included in the file acquisition request, and sends the response data to the class library. The class library loads the iframe instance based on the sub-application entry file and the response data to realize the running of the sub-application in the application.

[0114] In the above embodiment, the sub-application entry file is executed by embedding the page frame instance to initiate a file acquisition request including the file path, obtain the response data corresponding to the file path from the virtual server, and then load the embedded page frame instance based on the sub-application entry file and the response data to embed the page running the sub-application in the business page, thereby realizing the direct running of the sub-application in the application, greatly reducing the operational complexity of running the sub-application, and because the running of the sub-application involves less data, the sub-application can be quickly run and started in the application.

[0115] In some embodiments, after parsing the program package to obtain the file data, the sub-application running method also includes: storing the file data in the cache area of ​​the virtual server; obtaining the response data required for the sub-application entry file in the file data, including; obtaining the response data required for the sub-application entry file based on the file data in the cache area.

[0116] In some embodiments, the program package of the sub-application is downloaded through the virtual server and the program package is parsed. The virtual server stores the file data obtained by parsing the program package in the cache area; the terminal sends a file acquisition request to the virtual server through the class library, and the virtual server obtains the response data corresponding to the file acquisition request in the cache area.

[0117] In some embodiments, the file acquisition request includes a file path. After receiving the file acquisition request, the virtual server obtains the file path included in the file acquisition request and obtains corresponding response data from the file data stored in the cache area based on the file path.

[0118] In the above embodiment, the virtual server stores the file data obtained by parsing the program package in the cache area and manages the file data in the cache area. The virtual server serves as a resident service thread of the application and provides the application with resource processing services for the sub-application, so that the application can obtain the data required to run the sub-application from the virtual server, so that the application can run the sub-application based on the file data in the cache area, thereby realizing the direct running of the sub-application in the application and greatly reducing the operational complexity of running the sub-application.

[0119] In some embodiments, the sub-application running method further includes: when the response data required by the sub-application entry file is not obtained in the cache area, downloading the response data required by the sub-application entry file from the target server via the virtual server. Providing sub-application resource processing services to the application program via the virtual server enables the application program to obtain the data required to run the sub-application from the virtual server, thereby enabling the sub-application to be run directly within the application program, significantly reducing the operational complexity of running the sub-application.

[0120] It can be seen from the above embodiments that the response data required for the sub-application entry file is obtained in the cache area by initiating a file acquisition request through the file path included in the sub-application entry file, and obtaining the response data corresponding to the file path in the cache area. Therefore, when the response data required for the sub-application entry file is not obtained in the cache area, it means that the response data corresponding to the file path is missing in the cache area. It may be that the program package was not downloaded successfully or was accidentally lost. The virtual server can re-download the response data required to download the sub-application entry file from the target server.

[0121] In some embodiments, the response data required for the sub-application entry file is downloaded from the target server through the virtual server, including: downloading the supplementary program package from the target server through the virtual server, and parsing the supplementary program package to obtain supplementary file data; saving the supplementary file data in a cache area; and obtaining the response data required for the sub-application entry file based on the supplementary file data in the cache area.

[0122] The virtual server can generate an address query request based on the file path and send the address query request to the proxy server. The proxy server returns the download address of the supplementary package based on the address query request. The virtual server obtains the download address of the supplementary package from the target server and downloads the supplementary package from the target server based on the download address of the supplementary package.

[0123] The virtual server may generate an address query request based on the file path. The virtual server may query the download address of the supplementary package in the package list based on the file path. If the download address of the supplementary package is not found in the package list, the address query request is generated based on the file path.

[0124] Exemplarily, as shown in Figure 8, after completing the initialization of the sub-application instance and the controller, the class library creates an embedded page frame instance (iframe instance), the class library runs the iframe instance, initiates a resource request including a virtual URL, the virtual server intercepts the resource request, and returns the sub-application entry file based on the resource request. The class library executes the sub-application entry file through the iframe instance, and initiates a file acquisition request to the virtual server based on the file path included in the sub-application entry file. The virtual server obtains the corresponding response data from the file data in the cache area based on the file acquisition request, and sends the response data to the class library; if the virtual server does not obtain the corresponding response data in the file data in the cache area, it downloads the supplementary program package from the target server based on the file path, the virtual server parses the supplementary program package, obtains the supplementary file data, saves the supplementary file data to the cache area, and then obtains the response data corresponding to the file acquisition request from the cache area, and sends the response data to the class library; the class library loads the iframe instance based on the sub-application entry file and the response data to realize the operation of the sub-application in the application.

[0125] In the above embodiment, when the response data is not obtained in the cache area, the virtual server re-downloads the supplementary program package from the target server and saves it in the cache area, so that when the sub-application needs to be run in the application later, the required response data can be directly obtained from the cache area, avoiding repeated data acquisition, reducing resource consumption, and improving the efficiency of running the sub-application in the application.

[0126] In some embodiments, the sub-application running method also includes: obtaining a target identity ticket in response to a target interface call operation triggered in the sub-application running in the application program; the target identity ticket is the identity ticket of the target object in the second parent application; generating a target interface call request carrying the target identity ticket; verifying the target identity ticket through the proxy server, and forwarding the target interface call request to the target server when the target identity ticket verification is passed.

[0127] Among them, the target interface calling operation is used to call the interface of the target server; in actual applications, calling the interface of the target server can be used to obtain the communication number bound to the target object and the second mother application, and can also obtain the friend relationship of the target object in the second mother application; it should be noted that for the operation of calling the interface of the target server when running the sub-application in the second mother application, it can also be implemented by calling the interface of the target server when running the sub-application in the application.

[0128] The target identity ticket may reflect the identity information of the target object in the second parent application.

[0129] When a sub-application running in an application needs to call the interface of the target server, the target interface call request initiated must carry the target identity ticket so that the proxy server can authenticate based on the target identity ticket and forward the request to call the interface to the target server after the authentication is passed, so that when the target object runs the sub-application in the application, it can call the interface of the target server based on the target identity ticket, and thus the operations performed when running the sub-application in the application can be the same as the operations performed when running the sub-application in the second parent application, that is, it has the native effect of running the sub-application in the second parent application.

[0130] In some embodiments, the sub-application operation method further includes: obtaining a target identity ticket in response to a login operation triggered by a sub-application running in an application program; the target identity ticket is the identity ticket of the target object in the second parent application; generating a parent application interface call request carrying the target identity ticket; verifying the target identity ticket through a proxy server, and sending a parent application interface call request to the target server through the proxy server when the target identity ticket verification is passed; the parent application interface call request is used to instruct the target server to log in to the sub-application based on the target account of the target object in the second parent application.

[0131] The target account is the account registered by the target object in the second parent application, that is, the target object can log in to the second parent application through the target account; the login operation refers to logging in to the sub-application running in the application with the target account.

[0132] The parent application interface call request is used to call the parent application interface, which is an interface belonging to the target server.

[0133] In some embodiments, for a sub-application running in an application, the main page of the sub-application includes a login component, and a login operation can be triggered through the login component; when the login operation is triggered through the login component, the login component obtains the target identity ticket of the target object in the second parent application, generates a parent application interface call request, and sends the parent application interface call request carrying the target identity ticket to the proxy server. The target identity ticket is verified by the proxy server, and the identity of the target object corresponding to the target identity ticket is verified to be legal. Then, the proxy server sends the parent application interface call request to the target server, and the target server responds to the parent application interface call request, obtains the target account of the target object in the second parent application, and logs in to the sub-application in the application based on the target account of the target object.

[0134] It should be noted that the target server logs in the sub-application in the application based on the target account of the target object. The target server may set the login status of the target object in the sub-application (running in the application) to logged in, and send the post-login page data to the terminal, so that the terminal displays the post-login page of the sub-application in the application based on the post-login page data.

[0135] For example, the first parent application is a browser, the second parent application is an instant messaging application, and the child application is a mini-program. When the mini-program is running in the browser, when it is necessary to log in to the mini-program in the browser using the target object's target account in the instant messaging application, the target object's target identity ticket in the instant messaging application is obtained, and the target identity ticket is authenticated through a proxy server. If the authentication is successful, the proxy server sends a parent application interface call request to the target server. The target server then logs in to the mini-program running in the browser using the target object's target account in the instant messaging application.

[0136] In the above embodiment, when the sub-application running in the application needs to call the parent application interface of the target server, a parent application interface call request carrying the target identity ticket is generated, the target identity ticket is authenticated through the proxy server, and if the authentication is passed, the parent application interface call request is sent to the target server, thereby ensuring the data security of the target server. In addition, the sub-application running in the application can call the interface of the target server, so that the functions used when running the sub-application in the second parent application can be used when running the sub-application in the application, and this process does not require the participation of the second parent application, which reduces the operational complexity of running the sub-application and improves the efficiency of running the sub-application.

[0137] In some embodiments, obtaining the target identity ticket includes: obtaining the business identity ticket of the target object in the business page; and obtaining the target identity ticket of the target object in the second parent application through the virtual server based on the business identity ticket.

[0138] Among them, the virtual server is also used to manage tickets; the business identity ticket can be used to reflect the identity information of the target object in the business page. In actual applications, the identity information of the target object in the business page may be different from the identity information of the target object in the second parent application.

[0139] In some embodiments, the terminal obtains the business identity ticket of the target object in the business page from the business server of the business page, and sends the business identity ticket to the virtual server. The virtual server determines the target identity ticket of the target object in the second parent application based on the business identity ticket, so as to realize the exchange of the target identity ticket through the business identity ticket.

[0140] In some embodiments, the terminal obtains the business identity ticket of the target object in the business page from the business server of the business page. This can be done by sending a ticket acquisition request to the proxy server through the front end of the business page, and the proxy server forwards the ticket acquisition request to the business server of the business page. The business server returns the business identity ticket of the target object in the business page based on the ticket acquisition request, so that the terminal obtains the business identity ticket in the business page.

[0141] In some embodiments, the terminal can obtain the business identity ticket in advance and exchange it for the target identity ticket. For example, the terminal can obtain the business identity ticket of the target object in the business page while initiating the sub-application running request, and exchange it for the target identity ticket based on the business identity ticket. It can also be after starting the sub-application in the application, obtain the business identity ticket of the target object in the business page, and exchange it for the target identity ticket based on the business identity ticket.

[0142] In some embodiments, the target object has different business identity tickets in different business pages. The target identity tickets exchanged for the different business identity tickets of the target object are the same, so that when the target object runs the sub-application in different business pages, it can call the interface of the target server through the same target identity ticket.

[0143] In some embodiments, the sub-application operation method also includes: obtaining a validity ticket corresponding to the target identity ticket; generating a parent application interface call request carrying the target identity ticket, including: when the target identity ticket is determined to be valid based on the validity ticket, generating a parent application interface call request carrying the target identity ticket.

[0144] In some embodiments, the sub-application operation method further includes: when determining that the target identity ticket is invalid based on the validity ticket, obtaining an updated target identity ticket based on the validity ticket; and generating a parent application interface call request carrying the updated target identity ticket.

[0145] In some embodiments, while obtaining the target identity ticket of the target object in the second mother application through the virtual server, the validity ticket corresponding to the target identity ticket can also be obtained, and the validity ticket includes the validity period corresponding to the target identity ticket; before the terminal generates a mother application interface call request carrying the target identity ticket, it can first determine whether the target identity ticket is valid based on the validity ticket. If the time between the current moment and the moment when the target identity ticket is obtained is less than or equal to the validity period, the target identity ticket is determined to be valid, and then a mother application interface call request carrying the target identity ticket is generated; if the time between the current moment and the moment when the target identity ticket is obtained is greater than the validity period, the target identity ticket is determined to be invalid, and then the validity ticket is sent to the virtual server, and the updated target identity ticket is obtained through the virtual server. The terminal can generate a mother application interface call request carrying the updated target identity ticket.

[0146] Exemplarily, as shown in FIG9 , the terminal obtains the business identity ticket of the target object in the business page, initiates a ticket acquisition request through the front end of the business page, and the back end of the business page obtains the business identity ticket based on the ticket acquisition request and sends the business identity ticket to the virtual server. The virtual server returns the target identity ticket and the corresponding validity period ticket to the application component based on the business identity ticket. In response to the login operation triggered by the sub-application, the front end generates a parent application interface call request carrying the target identity ticket if the target identity ticket is determined to be valid based on the validity period ticket, sends the parent application interface call request carrying the target identity ticket to the proxy server, verifies the target identity ticket through the proxy server, and if the verification is successful, sends the parent application interface call request to the target server through the proxy server to log in to the sub-application through the target account. If the target identity ticket is determined to be invalid based on the validity period ticket (content in the dotted box 901 in FIG9 ), the front end sends the validity period ticket to the virtual server, and the virtual server returns an updated target identity ticket to the application component. The updated target identity ticket is used to replace the invalid target identity ticket, so that the front end can log in to the sub-application through the target account based on the updated target identity ticket.

[0147] In the above embodiment, the target object's business identity ticket on the business page is exchanged for the target object's target identity ticket in the second parent application through the virtual server, so that the target server interface can be called later through the target identity ticket.

[0148] In some embodiments, the sub-application operation method further includes: in response to a business interface call operation triggered by a sub-application running in an application program, sending a business interface call request to a business server through a proxy server; the business interface call request is used to instruct the business server to return corresponding business data; receiving the business data, and displaying a business sub-page in the sub-application based on the business data.

[0149] The business interface call request is used to call a business interface, which is an interface belonging to a business server.

[0150] Business data is data obtained from the business interface and is used to display the business subpage of the sub-application; the business subpage can be a secondary page of the sub-application. For example, the business subpage can be entered through the main page of the sub-application, that is, compared with the main page, the business subpage is a secondary page.

[0151] In some embodiments, the main page of the sub-application includes a sub-business entry component. In response to the business interface call operation triggered by the sub-business entry component of the sub-application, a business interface call request is generated by the class library. The class library sends the business interface call request to the proxy server, and the proxy server forwards the business interface call request to the business server. The business server responds to the business interface call request, obtains the corresponding business data, sends the business data to the proxy server, and returns the business data to the class library through the proxy server. The class library displays the business sub-page based on the business data.

[0152] In some embodiments, the main page of the sub-application includes multiple sub-business entry components, and different business sub-pages can be entered through each sub-business entry component. The business data required to display different business sub-pages are also different. The business interface call request includes the page identifier of the business sub-page. The business server obtains the corresponding business data based on the page identifier, so that the class library can display the business sub-page corresponding to the page identifier based on the business data.

[0153] In some embodiments, the page identifier is associated with the sub-business entry component. When the sub-business entry component is triggered, the page identifier associated with the sub-business entry component is obtained through the class library. The class library generates a business interface call request based on the page identifier, and forwards the business interface call request to the business server through the proxy server. The business server obtains the page identifier included in the business interface call request and obtains the corresponding business data based on the page identifier.

[0154] In the above embodiment, when the sub-application running in the application needs to obtain business data, since the application and the business server belong to different autonomous domains, the business interface call request is forwarded to the business server through the proxy server to obtain the business data, and the business sub-page is displayed through the business data. The proxy server solves the limitation that the application cannot make interface calls across domains, so that the sub-application running in the application can call the interface of the business server, and then the functions in the sub-application that require the participation of the business server can be used normally.

[0155] In some embodiments, the sub-application running method can be applied to the scenario of running a mini-program in a browser. As shown in FIG10 , in the process of executing a business through a business page 1001 of the browser, it is necessary to publish a business demand through the mini-program corresponding to the business page 1001. The business page 1001 includes a mini-program identifier (sub-application identifier) ​​1002. When the mini-program identifier 1002 is triggered, a sub-page is displayed on the business page 1001, a sub-application running request is initiated, a compiled program package is obtained through a virtual server, and the program package is parsed to obtain file data. The mini-program is run in the browser based on the file data, and the main page 1003 of the mini-program is displayed through the sub-page of the business page.

[0156] The main page 1003 of the sub-application running in the application includes various sub-business entry components, among which the sub-business entry component 1004 is the entry component of the problem details page. In response to the business interface call operation triggered for the sub-business entry component 1004, a business interface call request is generated. The business interface call request includes the page identifier of the problem details page. The business interface call request is sent to the business server through the proxy server. The business server obtains the business data of the problem details page through the page identifier, sends the business data of the problem details page to the proxy server, and returns the business data to the class library through the proxy server. The class library displays the problem details page based on the business data. The problem details page is shown in Figure 11.

[0157] In the related technology, as shown in Figure 12, the terminal runs a browser, displays a business page 1201 through the browser, and executes business on the business page 1201. When the business executed on the business page 1201 requires at least one link to be completed through a mini program, the graphic code 1202 of the mini program can be displayed on the business page 1201, and the graphic code 1202 is scanned by a second mother application running on a mobile device (such as a mobile phone), and the main page 1203 of the mini program is displayed in the second mother application.

[0158] Obviously, the embodiment of the present application can run the sub-application directly through the application program, which greatly reduces the operational complexity of running the sub-application compared to the related technology.

[0159] In some embodiments, as shown in FIG13 , the method for running a sub-application includes:

[0160] Step 1301: When a business page displayed by the application includes a sub-application identifier, in response to a triggering operation on the sub-application identifier, the application component of the application initiates a class library interface call request; the class library interface call request is used to instruct the class library to initiate a sub-application execution request to the virtual server; the application is the primary parent application of the sub-application, and the sub-application execution request includes the sub-application identifier;

[0161] Step 1302: When the virtual server receives the sub-application execution request, the virtual server generates an address query request corresponding to the identity label; sends the address query request to the proxy server to instruct the proxy server to obtain the package download address corresponding to the sub-application identifier; and obtains the package download address corresponding to the sub-application identifier returned by the proxy server.

[0162] Step 1303: Download the compiled package corresponding to the sub-application identifier from the target server according to the package download address, parse the package to obtain file data, and store the file data in the cache area of ​​the virtual server; wherein the target server is used to run the second parent application of the sub-application, and the first parent application and the second parent application are different applications;

[0163] Step 1304: Create an embedded page frame instance; the location of the external resource pointed to by the embedded page frame instance is a virtual resource locator; initiate a resource request including the virtual resource locator through the embedded page frame instance;

[0164] Step 1305: When the resource request is received by the virtual server, the sub-application entry file corresponding to the virtual resource locator is obtained through the virtual server; a file acquisition request is initiated based on the file path included in the sub-application entry file by embedding the page frame instance;

[0165] Step 1306A, obtaining the response data required by the sub-application entry file based on the file data in the cache area through the file acquisition request;

[0166] Step 1306B: If the response data required by the sub-application entry file is not obtained in the cache area, the supplementary program package is downloaded from the target server via the virtual server, and the supplementary program package is parsed to obtain the supplementary file data; the supplementary file data is stored in the cache area; and the response data required by the sub-application entry file is obtained based on the supplementary file data in the cache area.

[0167] Step 1307: In the application program, the sub-application identified by the sub-application identifier is run based on the sub-application entry file and the response data.

[0168] Step 1308A: In response to a target interface call operation triggered in a child application running within the application, obtain the business identity ticket of the target object in the business page; based on the business identity ticket, obtain the target identity ticket of the target object in the second parent application through the virtual server; obtain the validity period ticket corresponding to the target identity ticket; if the target identity ticket is determined to be valid based on the validity period ticket, generate a target interface call request carrying the target identity ticket; verify the target identity ticket through the proxy server, and if the target identity ticket is verified successfully, forward the target interface call request to the target server;

[0169] Step 1308B: In response to a login operation triggered by a child application running in the application program, obtain the business identity ticket of the target object in the business page; based on the business identity ticket, obtain the target identity ticket of the target object in the second parent application through the virtual server; obtain the validity period ticket corresponding to the target identity ticket, and if the target identity ticket is determined to be valid based on the validity period ticket, generate a parent application interface call request carrying the target identity ticket; verify the target identity ticket through the proxy server, and if the target identity ticket is verified, send the parent application interface call request to the target server through the proxy server; the parent application interface call request is used to instruct the target server to log in to the child application based on the target account of the target object in the second parent application;

[0170] Step 1309, in response to the business interface call operation triggered by the sub-application running in the application, a business interface call request is sent to the business server through the proxy server; the business interface call request is used to instruct the business server to return the corresponding business data; receive the business data, and display the business sub-page in the sub-application based on the business data.

[0171] In the above-mentioned sub-application running method, the sub-application identifier is displayed in the business page of the application, and in response to the triggering operation of the sub-application identifier, a sub-application running request is initiated. When the sub-application running request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data, and the sub-application is run in the application through the file data; that is, by triggering the sub-application identifier in the business page of the application, the sub-application can be run directly in the application. Compared with the related art, the solution of running the sub-application in the mobile device by scanning the graphic code of the sub-application displayed in the application through the mobile device, running the sub-application directly in the application greatly reduces the operational complexity of running the sub-application and improves the efficiency of running the sub-application; in addition, since the virtual server obtains the compiled program package, it can directly parse the program package and run the sub-application through the parsed file data, without the need to perform the compilation process, so that the efficiency of running the sub-application in the application is higher and the process of calling the sub-application through the application is smoother.

[0172] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0173] Based on the same inventive concept, the embodiments of the present application also provide a sub-application running device for implementing the sub-application running method involved above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of the embodiments of the running device for one or more sub-applications provided below can be found in the above limitations of the sub-application running method, and will not be repeated here.

[0174] In one embodiment, as shown in FIG14 , a sub-application running device is provided, including: a display module 1401 , a trigger module 1402 , a file data acquisition module 1402 , and a sub-application running module 1403 , wherein:

[0175] A triggering module 1401 is configured to initiate a sub-application execution request in response to a triggering operation on the sub-application identifier when a business page displayed by the application includes the sub-application identifier;

[0176] The file data acquisition module 1402 is configured to, when a sub-application execution request is acquired by the virtual server, acquire the compiled program package corresponding to the sub-application identifier through the virtual server, and parse the program package to obtain file data;

[0177] The sub-application running module 1403 is configured to run the sub-application identified by the sub-application identifier in the application program based on the file data.

[0178] In some embodiments, the trigger module 1401 is further used to initiate a class library interface call request through the application component of the application program in response to a trigger operation on the sub-application identifier; the class library interface call request is used to instruct the class library to initiate a sub-application running request to the virtual server.

[0179] In some embodiments, the application is the first parent application of the sub-application, and the file data acquisition module 1402 includes a package download unit; the package download unit is used to download the compiled package corresponding to the sub-application identifier from the target server through the virtual server; wherein the target server is used to run the second parent application of the sub-application, and the first parent application and the second parent application are different applications.

[0180] In some embodiments, the program package download unit is further configured to obtain a program package download address corresponding to the sub-application identifier from a proxy server through a virtual server; and download the compiled program package corresponding to the sub-application identifier from a target server based on the program package download address.

[0181] In some embodiments, the sub-application running request includes the identity label of the sub-application, the package download unit, and is also used to generate an address query request corresponding to the identity label through a virtual server; send an address query request to the proxy server to instruct the proxy server to obtain the package download address corresponding to the sub-application identifier; obtain the package download address corresponding to the sub-application identifier returned by the proxy server.

[0182] In some embodiments, the sub-application execution module 1403 includes:

[0183] A resource request sending unit, configured to initiate a resource request including a virtual resource locator;

[0184] The sub-application entry file obtaining unit is used to obtain the sub-application entry file corresponding to the virtual resource locator through the virtual server when the resource request is obtained by the virtual server;

[0185] A response data acquisition unit, used to acquire the response data required by the sub-application entry file from the file data;

[0186] The running unit is used to run the sub-application identified by the sub-application in the application based on the sub-application entry file and response data.

[0187] In some embodiments, the resource request sending unit is also used to create an embedded page frame instance; the location of the external resource pointed to by the embedded page frame instance is a virtual resource locator; a resource request including the virtual resource locator is initiated through the embedded page frame instance; the response data acquisition unit is also used to initiate a file acquisition request through the embedded page frame instance based on the file path included in the sub-application entry file; through the file acquisition request, the response data required for the sub-application entry file is obtained in the file data.

[0188] In some embodiments, the file data acquisition module 1402 is also used to store the file data in the cache area of ​​the virtual server; the response data acquisition unit is also used to obtain the response data required by the sub-application entry file based on the file data in the cache area.

[0189] In some embodiments, the response data acquisition unit is further used to download the response data required by the sub-application entry file from the target server through the virtual server when the response data required by the sub-application entry file is not obtained in the cache area.

[0190] In some embodiments, the response data acquisition unit is also used to download a supplementary program package from a target server through a virtual server, and parse the supplementary program package to obtain supplementary file data; save the supplementary file data in a cache area; and obtain the response data required by the sub-application entry file based on the supplementary file data in the cache area.

[0191] In some embodiments, the sub-application running device also includes: an interface calling module, which is used to obtain a target identity ticket in response to a target interface calling operation triggered in a sub-application running in an application; the target identity ticket is the identity ticket of the target object in the second parent application; generate a target interface calling request carrying the target identity ticket; verify the target identity ticket through a proxy server, and forward the target interface calling request to the target server when the target identity ticket verification is passed.

[0192] In some embodiments, the sub-application running device also includes: a login module, which is used to obtain a target identity ticket in response to a login operation triggered by a sub-application running in an application program; the target identity ticket is the identity ticket of the target object in the second parent application; a parent application interface call request carrying the target identity ticket is generated; the target identity ticket is verified through a proxy server, and when the target identity ticket verification is passed, a parent application interface call request is sent to the target server through the proxy server; the parent application interface call request is used to instruct the target server to log in to the sub-application based on the target account of the target object in the second parent application.

[0193] In some embodiments, the login module is further configured to obtain a business identity ticket of the target object in the business page; and based on the business identity ticket, obtain a target identity ticket of the target object in the second parent application through the virtual server.

[0194] In some embodiments, the sub-application running device also includes: a ticket validity verification module, used to obtain the validity period ticket corresponding to the target identity ticket; generate a parent application interface call request carrying the target identity ticket, including: when the target identity ticket is determined to be valid based on the validity period ticket, generate a parent application interface call request carrying the target identity ticket.

[0195] In some embodiments, the sub-application running device also includes: a business sub-page display module 1401, which is used to send a business interface call request to the business server through a proxy server in response to a business interface call operation triggered by a sub-application running in the application; the business interface call request is used to instruct the business server to return the corresponding business data; receive the business data, and display the business sub-page in the sub-application based on the business data.

[0196] Each module in the operating device of the above-mentioned sub-application can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor of the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0197] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in Figure 15. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication, and the wireless communication may be implemented via Wi-Fi, a mobile cellular network, NFC (near field communication), or other technologies. When executed by the processor, the computer program implements a method for operating a sub-application. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0198] Those skilled in the art will understand that the structure shown in FIG15 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0199] In one embodiment, a computer device is provided, including a memory and one or more processors, wherein the memory stores computer-readable instructions, which, when executed by the processors, enable the one or more processors to implement the above-mentioned sub-application operation method.

[0200] In one embodiment, one or more non-volatile readable storage media are provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, the one or more processors implement the above-mentioned sub-application operation method.

[0201] In one embodiment, a computer program product is provided, comprising computer-readable instructions, which implement the above-mentioned method for running the sub-application when executed by a processor.

[0202] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0203] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to these.

[0204] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0205] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for running a sub-application, wherein: Executed by a terminal, the method includes: In a case where the business page displayed by the application includes the sub-application identifier, in response to a triggering operation on the sub-application identifier, initiating a sub-application running request; When the sub-application running request is obtained by the virtual server, the compiled program package corresponding to the sub-application identifier is obtained through the virtual server, and the program package is parsed to obtain file data; and In the application program, a sub-application identified by the sub-application identifier is run based on the file data.

2. The method according to claim 1, wherein: The initiating a sub-application execution request in response to the triggering operation on the sub-application identifier includes: In response to the triggering operation on the sub-application identifier, a class library interface call request is initiated through the application component of the application program; the class library interface call request is used to instruct the class library to initiate a sub-application running request to the virtual server.

3. The method according to claim 1 or 2, wherein: The application is the first parent application of the sub-application; The step of obtaining the compiled program package corresponding to the sub-application identifier through the virtual server includes: Downloading the compiled program package corresponding to the sub-application identifier from the target server through the virtual server; The target server is used to run the second parent application of the sub-application, and the first parent application and the second parent application are different application programs.

4. The method according to claim 3, wherein: The downloading, through the virtual server, from the target server the compiled program package corresponding to the sub-application identifier includes: Obtaining, through the virtual server, from a proxy server a program package download address corresponding to the sub-application identifier; and The compiled program package corresponding to the sub-application identifier is downloaded from the target server according to the program package download address.

5. The method according to claim 4, wherein: The sub-application running request includes the identity number of the sub-application; and obtaining the program package download address corresponding to the sub-application identification from the proxy server through the virtual server includes: Generate an address query request corresponding to the identity number through the virtual server; Sending the address query request to the proxy server to instruct the proxy server to obtain the program package download address corresponding to the sub-application identifier; and Obtain the program package download address corresponding to the sub-application identifier returned by the proxy server.

6. The method according to any one of claims 1 to 5, wherein: In the application program, running the sub-application identified by the sub-application based on the file data includes: Initiating a resource request including a virtual resource locator; When the resource request is obtained by the virtual server, the sub-application entry file corresponding to the virtual resource locator is obtained through the virtual server; Obtaining response data required by the sub-application entry file from the file data; and In the application program, the sub-application identified by the sub-application is run based on the sub-application entry file and the response data.

7. The method according to claim 6, wherein: The initiating of a resource request including a virtual resource locator comprises: Creating an embedded page frame instance; the location of the external resource pointed to by the embedded page frame instance is a virtual resource locator; and A resource request including the virtual resource locator is initiated through the embedded page frame instance.

8. The method according to claim 7, wherein: The step of obtaining the response data required for the sub-application entry file from the file data includes: Initiate a file acquisition request according to the file path included in the sub-application entry file through the embedded page frame instance; and Through the file acquisition request, the response data required by the sub-application entry file is obtained from the file data.

9. The method according to claim 6, wherein: After parsing the program package to obtain the file data, the method further includes: storing the file data in a cache area of ​​the virtual server; The step of obtaining the response data required for the sub-application entry file from the file data includes: Based on the file data in the cache area, the response data required by the sub-application entry file is obtained.

10. The method according to claim 9, wherein: The method further comprises: When the response data required by the sub-application entry file is not obtained in the cache area, the response data required by the sub-application entry file is downloaded from the target server through the virtual server.

11. The method according to claim 10, wherein: The response data required for downloading the sub-application entry file from the target server through the virtual server includes: Downloading a supplementary program package from a target server through the virtual server, and parsing the supplementary program package to obtain supplementary file data; storing the supplementary file data in the cache area; and Based on the supplementary file data in the cache area, the response data required by the sub-application entry file is obtained.

12. The method according to any one of claims 1 to 10, wherein: The method further comprises: In response to a target interface call operation triggered in the sub-application running in the application program, obtaining a target identity ticket; the target identity ticket is an identity ticket of the target object in the second parent application; generating a target interface call request carrying the target identity ticket; and The target identity ticket is verified through a proxy server, and when the target identity ticket is verified, the target interface call request is forwarded to the target server.

13. The method according to any one of claims 1 to 10, wherein: The method further comprises: In response to a login operation triggered in the sub-application running in the application program, obtaining a target identity ticket; the target identity ticket is an identity ticket of the target object in the second parent application; Generate a parent application interface call request carrying the target identity ticket; and The target identity ticket is verified through the proxy server, and when the target identity ticket is verified, the parent application interface call request is sent to the target server through the proxy server; the parent application interface call request is used to instruct the target server to log in to the sub-application based on the target account of the target object in the second parent application.

14. The method according to claim 12 or 13, wherein: The obtaining of the target identity ticket comprises: Obtaining the business identity ticket of the target object in the business page; and Based on the business identity ticket, the target identity ticket of the target object in the second parent application is obtained through the virtual server.

15. The method according to claim 13, wherein: After obtaining the target identity ticket, the method further includes: Obtain the validity period ticket corresponding to the target identity ticket; The generating of the parent application interface call request carrying the target identity ticket includes: When it is determined that the target identity ticket is valid according to the validity period ticket, a parent application interface call request carrying the target identity ticket is generated.

16. The method according to any one of claims 1 to 15, wherein: The method further comprises: In response to a service interface call operation triggered by the sub-application running on the application program, a service interface call request is sent to a service server through a proxy server; the service interface call request is used to instruct the service server to return corresponding service data; and The business data is received, and a business sub-page is displayed in the sub-application according to the business data.

17. A sub-application running device, wherein: The device comprises: The trigger module is used for responding to the sub-application identification in the case that the business page displayed by the application includes the sub-application identification. The trigger operation of the sub-application identifier initiates a sub-application running request; a file data acquisition module, configured to acquire, through the virtual server, a compiled program package corresponding to the sub-application identifier, and parse the program package to obtain file data when the sub-application running request is acquired by the virtual server; and A sub-application running module is used to run the sub-application identified by the sub-application in the application program based on the file data.

18. A computer device comprising a memory and one or more processors, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processors, the one or more processors execute the steps of the method according to any one of claims 1 to 16.

19. One or more non-volatile readable storage media having computer readable instructions stored thereon, wherein when the computer readable instructions are executed by the processor, the one or more processors implement the steps of any one of the methods of claims 1 to 16.

20. A computer program product comprising computer readable instructions, which when executed by a processor implement the steps of the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Page loading method and device of application, computer device and storage medium

    CN108132814A

  • Application program processing method and device, storage medium and computer equipment

    CN108196930A

  • Method, device and system for debugging sub application

    CN108920366A

  • Application program processing method and device, storage medium and computer equipment

    CN110244984A

  • Graphical user interface driven programming development environment

    US11269889B1

Cited By

  • Page display method and related product

    CN119760257A