Mini-program processing method, device, storage medium and mobile terminal

Obtain the mini program view through the mini program software development toolkit and embed it into the dynamic area, which solves the problem of low maintenance efficiency of the dynamic area in the existing technology, realizes content changes without re-development of functional pages, and improves maintenance efficiency and flexibility. .

CN115080165BActive Publication Date: 2024-09-13HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210740107.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-09-13
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

In the existing technology, content changes in dynamic areas require redevelopment of the functional pages of the application, resulting in low maintenance efficiency.

Method used

Obtain the mini program view through the mini program software development kit, and use multiple pre-built card mini programs to embed business logic into dynamic areas to avoid re-development of functional pages.

Benefits of technology

It improves the maintenance efficiency of dynamic areas, reduces the workload of redevelopment of functional pages, and improves the flexibility and efficiency of page maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080165B
    Figure CN115080165B
Patent Text Reader

Abstract

The present application discloses a method, device, storage medium and mobile terminal for processing a mini-program. The method comprises: obtaining the display type of the target function page after determining that the application is started; controlling the application to open the target function page when the display type of the target function page is not full-screen display; controlling the application to obtain the mini-program view from the mini-program software development kit; the mini-program software development kit is pre-built based on multiple card mini-programs; controlling the application to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area changes. The method designs the business logic using a card mini-program, and controls the application to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area of ​​the target function page changes. Compared with the prior art, there is no need to redevelop the target function page, thereby improving the maintenance efficiency of the dynamic area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mobile Internet, and in particular to a method, device, storage medium and mobile terminal for processing mini-programs. Background Art

[0002] Some functional pages of applications (applications, apps), such as player pages, are often designed as top-down structures (such as Figure 1a As shown), left-right structure (as shown Figure 1b As shown) and suspended structures (as Figure 1c In order to improve the user experience, the function page will display static and dynamic areas to users. Specifically, the static area is used to perform the player function, and the dynamic area is used to display the content sent by the backend (such as advertising, shopping, interaction, etc.).

[0003] In the prior art, native development technology is generally used to achieve content replacement in dynamic areas. However, when native development technology is used to achieve content change in dynamic areas (i.e., maintenance of dynamic areas), the function pages of the app must be redeveloped, which is a large workload and reduces maintenance efficiency.

[0004] Therefore, how to improve the maintenance efficiency of dynamic areas has become an urgent problem to be solved in this field. Summary of the invention

[0005] The present application provides a small program processing method, device, storage medium and mobile terminal, aiming to improve the maintenance efficiency of dynamic areas.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] A small program processing method, comprising:

[0008] After determining that the application is started, obtaining the display type of the target function page; the target function page is the function page selected by the user to browse;

[0009] When the display type of the target function page is not full-screen display, controlling the application to open the target function page;

[0010] Control the application to obtain a mini-program view from a mini-program software development kit; the mini-program software development kit is pre-built based on multiple card mini-programs; the card mini-program uses interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application;

[0011] The application is controlled to embed the applet view into the dynamic area of ​​the target function page so that the content in the dynamic area is changed.

[0012] Optionally, after determining that the application is started, obtaining the display type of the target function page includes:

[0013] After determining that the application is started, obtaining a page jump protocol generated by the application in response to a trigger operation of the user;

[0014] The page jump protocol is parsed to obtain the display type of the target function page.

[0015] Optionally, after determining that the application is started and obtaining the display type of the target function page, the method further includes:

[0016] When the display type of the target function page is full-screen display, the control mini-program software development kit calls the full-screen module in the target card mini-program, generates a full-screen mini-program, and starts the full-screen mini-program, so that the front-end interface of the application program displays the static area in the target function page to the user in full screen.

[0017] Optionally, the controlling the application to obtain the mini-program view from the mini-program software development kit includes:

[0018] Control the application to send a request command to the mini-program software development kit, so that the mini-program software development kit calls the card module in the target card mini-program based on the request command, generates a mini-program view, and feeds back the mini-program view to the application; the target card mini-program is the card mini-program corresponding to the target function page.

[0019] Optionally, the process of obtaining the mini-program software development kit based on the pre-construction of multiple card mini-programs includes:

[0020] Pre-access the backend, and obtain from the backend a card applet corresponding to each function page contained in the application; the card applet includes a full-screen module, a card module, and a message channel; the full-screen module is used to set a container for the card module to obtain a full-screen applet; the full-screen applet is used to: control the front-end interface of the application to display the static area in the function page in full screen; the card module is used to provide a applet view; the message channel is used to establish a communication connection between the card module and the function page;

[0021] Based on each acquired card mini-program, a mini-program software development kit is created, and the mini-program software development kit is saved locally.

[0022] A small program processing device, comprising:

[0023] A type acquisition unit, used to acquire the display type of a target function page after determining that the application is started; the target function page is the function page selected by the user to browse;

[0024] A page opening unit, used for controlling the application to open the target function page when the display type of the target function page is not full screen display;

[0025] A view acquisition unit is used to control the application to acquire a mini-program view from a mini-program software development kit; the mini-program software development kit is pre-built based on multiple card mini-programs; the card mini-program uses interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application;

[0026] The view embedding unit is used to control the application to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area changes.

[0027] Optionally, the type acquisition unit is specifically used to:

[0028] After determining that the application is started, obtaining a page jump protocol generated by the application in response to a trigger operation of the user;

[0029] The page jump protocol is parsed to obtain the display type of the target function page.

[0030] Optionally, also include:

[0031] A full-screen display unit is used to control the mini-program software development kit to call the full-screen module in the target card mini-program, generate a full-screen mini-program, and start the full-screen mini-program when the display type of the target function page is full-screen display, so that the front-end interface of the application program displays the static area in the target function page to the user in full screen.

[0032] A computer-readable storage medium includes a stored program, wherein the program executes the applet processing method.

[0033] A mobile terminal comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0034] The memory is used to store programs, and the processor is used to run programs, wherein the applet processing method is executed when the program is run.

[0035] The technical solution provided by the present application obtains the display type of the target function page after determining that the application is started. The target function page is the function page selected by the user to browse. When the display type of the target function page is not full-screen display, the control application opens the target function page. The control application obtains the mini-program view from the mini-program software development kit. The mini-program software development kit is pre-built based on multiple card mini-programs. The card mini-program uses interface fragments to carry business logic. The business logic is used to provide business functions for the function page of the application. The control application embeds the mini-program view into the dynamic area of ​​the target function page to change the content in the dynamic area. The present application designs the business logic using a card mini-program, and controls the application to embed the mini-program view into the dynamic area of ​​the target function page to change the content in the dynamic area of ​​the target function page. Compared with the prior art, there is no need to redevelop the target function page, thereby effectively improving the maintenance efficiency of the dynamic area. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1a A schematic diagram of the structure of a function page provided in an embodiment of the present application;

[0038] Figure 1b A schematic diagram of the structure of another function page provided in an embodiment of the present application;

[0039] Figure 1c A schematic diagram of the structure of another function page provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of a method for processing a small program provided in an embodiment of the present application;

[0041] Figure 3 A flowchart of another mini-program processing method provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of the architecture of a mini-program processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0044] like Figure 2 As shown, it is a flowchart of a method for processing a mini-program provided in an embodiment of the present application, which can be applied to a mobile terminal (such as a mobile phone, a tablet computer, etc.), and includes the following steps:

[0045] S201: pre-access the backend, and obtain from the backend a card applet corresponding to each function page included in the app.

[0046] Among them, the card applet uses interface fragments to carry business logic, and the business logic carried by the card applet is used to provide business functions for the function page.

[0047] In an embodiment of the present application, the card applet includes a full-screen module, a card module, and a message channel.

[0048] Specifically, the full-screen module is used to set the container of the card module to obtain a full-screen applet, and the full-screen applet is used to control the static area in the full-screen display function page of the front-end interface of the app.

[0049] The card module is used to provide the mini-program view. The app embeds the mini-program view into the dynamic area of ​​the function page to change the content of the dynamic area.

[0050] The message channel is used to establish a communication connection between the card module and the function page. After the communication connection between the card module and the function page is established, the card applet can control the content in the static area of ​​the function page, such as controlling the player. Correspondingly, the static area can also feedback information to the card applet, such as the player feeding back its own playback progress to the card applet.

[0051] It should be noted that fragment is a logic encapsulation component provided by fragment technology. Fragment technology is a lightweight UI development technology provided by the Android development framework. Compared with traditional UI development technology, fragment technology disperses business logic and can encapsulate different business functions into different fragments. Fragments can be attached to different activities. For example, my order is encapsulated as a fragment, and the shopping cart is encapsulated as another fragment, and a business Activity is built based on the two fragments.

[0052] In addition, the so-called Activity is a basic component of the app, providing a visual interface for the app to interact with the user. In the embodiment of the present application, the operating system of the mobile terminal includes but is not limited to the Android system.

[0053] S202: Based on each acquired card mini-program, create a mini-program software development kit (Software Development Kit, SDK), and save the mini-program SDK locally.

[0054] S203: After determining that the app is started, obtain a page jump (scheme) protocol generated by the app in response to a trigger operation of the user.

[0055] S204: Parse the scheme protocol to obtain the display type of the target function page.

[0056] The target function page is the function page selected by the user for browsing.

[0057] S205: When the display type of the target function page is full-screen display, the control mini-program SDK calls the full-screen module in the target card mini-program, generates a full-screen mini-program, and starts the full-screen mini-program, so that the front-end interface of the app displays the static area in the target function page to the user in full screen.

[0058] Among them, the target card applet is: the card applet corresponding to the target function page.

[0059] S206: When the display type of the target function page is not full-screen display, control the app to open the target function page.

[0060] S207: After determining that the target function page is open, control the app to send a request command to the mini program SDK, so that the mini program SDK calls the card module in the target card mini program based on the request command, generates the mini program view of the target card mini program, and feeds back the message channel and mini program view of the target card mini program to the app.

[0061] S208: Control the app to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area of ​​the target function page changes.

[0062] It should be noted that the card applet is made into an ordinary applet view. If you want to display the card applet in the dynamic area, you can directly embed the applet view of the card applet into the dynamic area. You only need to change the applet view to change the content in the dynamic area. The content in the static area of ​​the same function page remains static, which improves flexibility. With the powerful unified distribution of the applet, page maintenance is greatly facilitated. The content of the dynamic area is carried by the applet, which is conducive to innovation.

[0063] In summary, this embodiment uses a card applet to design the business logic, and controls the app to embed the applet view of the target card applet into the dynamic area of ​​the target function page, so that the content in the dynamic area of ​​the target function page changes. Compared with the prior art, there is no need to redevelop the target function page, thereby effectively improving the maintenance efficiency of the dynamic area.

[0064] It should be noted that S201 mentioned in the above embodiment is an optional implementation of the mini-program processing method shown in this application. In addition, S205 mentioned in the above embodiment is also an optional implementation of the mini-program processing method shown in this application. To this end, the process mentioned in the above embodiment can be summarized as follows: Figure 3 The method shown.

[0065] like Figure 3 FIG. 1 is a flow chart of another mini-program processing method provided in an embodiment of the present application, comprising the following steps:

[0066] S301: After determining that the application is started, obtaining the display type of the target function page.

[0067] The target function page is the function page selected by the user for browsing.

[0068] S302: When the display type of the target function page is not full-screen display, control the application to open the target function page.

[0069] S303: Control the application program to obtain the mini-program view from the mini-program software development kit.

[0070] Among them, the mini program software development toolkit is pre-built based on multiple card mini programs; the card mini program uses interface fragments to carry business logic; the business logic is used to provide business functions for the function pages of the application.

[0071] S304: Control the application to embed the applet view into the dynamic area of ​​the target function page, so that the content in the dynamic area changes.

[0072] In summary, this embodiment designs the business logic using a card applet, and controls the application to embed the applet view of the target card applet into the dynamic area of ​​the target function page, so that the content in the dynamic area of ​​the target function page changes. Compared with the prior art, there is no need to redevelop the target function page, thereby effectively improving the maintenance efficiency of the dynamic area.

[0073] Corresponding to the mini-program processing method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a mini-program processing device.

[0074] like Figure 4 FIG. 1 is a schematic diagram of the architecture of a mini-program processing device provided in an embodiment of the present application, including:

[0075] The type acquisition unit 100 is used to acquire the display type of the target function page after determining that the application is started; the target function page is the function page selected by the user to browse.

[0076] Optionally, the type acquisition unit 100 is specifically used to: after determining that the application is started, obtain the page jump protocol generated by the application in response to the user's trigger operation; parse the page jump protocol to obtain the display type of the target function page.

[0077] The full-screen display unit 200 is used to control the mini-program software development kit to call the full-screen module in the target card mini-program, generate a full-screen mini-program, and start the full-screen mini-program when the display type of the target function page is full-screen display, so that the front-end interface of the application program displays the static area in the target function page to the user in full screen.

[0078] The page opening unit 300 is used to control the application to open the target function page when the display type of the target function page is not full screen display.

[0079] The view acquisition unit 400 is used to control the application to obtain the mini-program view from the mini-program software development kit; the mini-program software development kit is pre-built based on multiple card mini-programs; the card mini-program uses interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application.

[0080] Optionally, the view acquisition unit 400 is specifically used to: control the application to send a request command to the mini-program software development kit, so that the mini-program software development kit calls the card module in the target card mini-program based on the request command, generates the mini-program view, and feeds back the mini-program view to the application; the target card mini-program is the card mini-program corresponding to the target function page.

[0081] The view acquisition unit 400 is specifically used for: pre-accessing the backend, and obtaining from the backend the card applet corresponding to each function page contained in the application; the card applet includes a full-screen module, a card module, and a message channel; the full-screen module is used to set the card module as a container to obtain the full-screen applet; the full-screen applet is used to: control the front-end interface of the application to display the static area in the function page in full screen; the card module is used to provide the applet view; the message channel is used to establish a communication connection between the card module and the function page; based on the obtained card applets, a mini-program software development kit is created, and the mini-program software development kit is saved locally.

[0082] The view embedding unit 500 is used to control the application to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area changes.

[0083] In summary, this embodiment designs the business logic using a card applet, and controls the application to embed the applet view of the target card applet into the dynamic area of ​​the target function page, so that the content in the dynamic area of ​​the target function page changes. Compared with the prior art, there is no need to redevelop the target function page, thereby effectively improving the maintenance efficiency of the dynamic area.

[0084] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the applet processing method provided by the present application.

[0085] The present application also provides a mobile terminal, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the applet processing method provided by the present application is executed, including the following steps:

[0086] After determining that the application is started, obtaining the display type of the target function page; the target function page is the function page selected by the user to browse;

[0087] When the display type of the target function page is not full-screen display, controlling the application to open the target function page;

[0088] Control the application to obtain a mini-program view from a mini-program software development kit; the mini-program software development kit is pre-built based on multiple card mini-programs; the card mini-program uses interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application;

[0089] The application is controlled to embed the applet view into the dynamic area of ​​the target function page so that the content in the dynamic area is changed.

[0090] Specifically, based on the above embodiment, after determining that the application is started, obtaining the display type of the target function page includes:

[0091] After determining that the application is started, obtaining a page jump protocol generated by the application in response to a trigger operation of the user;

[0092] The page jump protocol is parsed to obtain the display type of the target function page.

[0093] Specifically, based on the above embodiment, after determining that the application is started and obtaining the display type of the target function page, the method further includes:

[0094] When the display type of the target function page is full-screen display, the control mini-program software development kit calls the full-screen module in the target card mini-program, generates a full-screen mini-program, and starts the full-screen mini-program, so that the front-end interface of the application program displays the static area in the target function page to the user in full screen.

[0095] Specifically, based on the above embodiment, the controlling the application to obtain the mini-program view from the mini-program software development kit includes:

[0096] Control the application to send a request command to the mini-program software development kit, so that the mini-program software development kit calls the card module in the target card mini-program based on the request command, generates a mini-program view, and feeds back the mini-program view to the application; the target card mini-program is the card mini-program corresponding to the target function page.

[0097] Specifically, based on the above embodiment, the process of pre-building the mini-program software development kit based on multiple card mini-programs includes:

[0098] Pre-access the backend, and obtain from the backend a card applet corresponding to each function page contained in the application; the card applet includes a full-screen module, a card module, and a message channel; the full-screen module is used to set a container for the card module to obtain a full-screen applet; the full-screen applet is used to: control the front-end interface of the application to display the static area in the function page in full screen; the card module is used to provide a applet view; the message channel is used to establish a communication connection between the card module and the function page;

[0099] Based on each acquired card mini-program, a mini-program software development kit is created, and the mini-program software development kit is saved locally.

[0100] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0101] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0102] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing a small program, It is characterized in that include: After confirming that the application is started, obtain the display type of the target function page; The target function page is the function page selected by the user to browse; When the display type of the target function page is not full-screen display, controlling the application to open the target function page; The application is controlled to obtain a mini-program view from a mini-program software development kit; the construction process of the mini-program software development kit is: pre-accessing the backend, and obtaining from the backend a card mini-program corresponding to each function page contained in the application; the card mini-program includes a full-screen module, a card module, and a message channel; the full-screen module is used to set a container for the card module to obtain a full-screen mini-program; the full-screen mini-program is used to: control the front-end interface of the application to display the static area in the function page in full screen; the card module is used to provide a mini-program view; The message channel is used to establish a communication connection between the card module and the function page; based on the obtained card applets, a mini-program software development kit is created; the card applets use interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application; The application is controlled to embed the applet view into the dynamic area of ​​the target function page so that the content in the dynamic area is changed.

2. The method according to claim 1, It is characterized in that After determining that the application is started, obtaining the display type of the target function page includes: After determining that the application is started, obtaining a page jump protocol generated by the application in response to a trigger operation of the user; The page jump protocol is parsed to obtain the display type of the target function page.

3. The method according to claim 1, It is characterized in that After determining that the application is started, after obtaining the display type of the target function page, the method further includes: When the display type of the target function page is full-screen display, the control mini-program software development kit calls the full-screen module in the target card mini-program, generates a full-screen mini-program, and starts the full-screen mini-program, so that the front-end interface of the application displays the static area in the target function page to the user in full screen; the target card mini-program is a card mini-program corresponding to the target function page.

4. The method according to claim 1, It is characterized in that The controlling the application to obtain the mini-program view from the mini-program software development kit comprises: Control the application to send a request command to the mini-program software development kit, so that the mini-program software development kit calls the card module in the target card mini-program based on the request command, generates a mini-program view, and feeds back the mini-program view to the application; the target card mini-program is the card mini-program corresponding to the target function page.

5. A small program processing device, It is characterized in that include: A type acquisition unit, used to acquire the display type of the target function page after determining that the application is started; The target function page is the function page selected by the user to browse; A page opening unit, used for controlling the application to open the target function page when the display type of the target function page is not full screen display; A view acquisition unit, used to control the application to acquire a mini-program view from a mini-program software development kit; The construction process of the mini-program software development kit is as follows: pre-accessing the backend and obtaining from the backend a card mini-program corresponding to each function page contained in the application; the card mini-program includes a full-screen module, a card module and a message channel; the full-screen module is used to set a container for the card module to obtain a full-screen mini-program; the full-screen mini-program is used to control the front-end interface of the application to display the static area in the function page in full screen; the card module is used to provide a mini-program view; The message channel is used to establish a communication connection between the card module and the function page; based on the obtained card applets, a mini-program software development kit is created; the card applets use interface fragments to carry business logic; the business logic is used to provide business functions for the function page of the application; The view embedding unit is used to control the application to embed the mini-program view into the dynamic area of ​​the target function page so that the content in the dynamic area changes.

6. The device according to claim 5, It is characterized in that The type acquisition unit is specifically used for: After determining that the application is started, obtaining a page jump protocol generated by the application in response to a trigger operation of the user; The page jump protocol is parsed to obtain the display type of the target function page.

7. The device according to claim 5, It is characterized in that Also includes: A full-screen display unit, used to control the mini-program software development kit to call the full-screen module in the target card mini-program, generate a full-screen mini-program, and start the full-screen mini-program, so that the front-end interface of the application program displays the static area in the target function page to the user in full screen when the display type of the target function page is full-screen display; The target card applet is a card applet corresponding to the target function page.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the applet processing method described in any one of claims 1-4.

9. A mobile terminal, It is characterized in that include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program executes the mini-program processing method described in any one of claims 1 to 4 when running.