CN112559069A - Running control method and device of sub-application, storage medium and electronic equipment - Google Patents

Running control method and device of sub-application, storage medium and electronic equipment Download PDF

Info

Publication number
CN112559069A
CN112559069A CN202011443431.7A CN202011443431A CN112559069A CN 112559069 A CN112559069 A CN 112559069A CN 202011443431 A CN202011443431 A CN 202011443431A CN 112559069 A CN112559069 A CN 112559069A
Authority
CN
China
Prior art keywords
application
native page
sub
module
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011443431.7A
Other languages
Chinese (zh)
Other versions
CN112559069B (en
Inventor
王陶
周虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011443431.7A priority Critical patent/CN112559069B/en
Publication of CN112559069A publication Critical patent/CN112559069A/en
Application granted granted Critical
Publication of CN112559069B publication Critical patent/CN112559069B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a running control method and device of a sub-application, a storage medium and electronic equipment, and belongs to the technical field of computers. According to the running control method of the sub-application, when the sub-application is started, the native page of the sub-application is loaded, and the operation interface of the functional module of the sub-application is displayed in the native page. And if receiving multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring the multimedia data through the native page and playing the multimedia data. In the running process of the sub-application, the jump between different functional modules can only exist in the native page, and the jump between different native pages can not be carried out. Therefore, in the running process of the sub-application, the multimedia data played through the browser component corresponding to the native page cannot be influenced or interrupted due to the jump of the native page.

Description

Running control method and device of sub-application, storage medium and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a running control method and device of a sub-application, a storage medium and an electronic device.
Background
With the development of communication technology and the popularization of intelligent terminals, the sub-application has become an important form of mobile internet application as a light application, such as a user can handle various services or perform social activities through the sub-application based on a third-party application. The third-party application may be a social application, such as an instant messaging application. The sub-application has the characteristic of being used without downloading and installing, and does not occupy the storage space of the electronic equipment, so that the sub-application is widely accepted by users.
Currently, a sub-application usually includes a plurality of native pages, each of which can perform a function of the sub-application, and different native pages perform different functions. During the running process of the sub-application, jump from one native page to another is often carried out. If multimedia data such as audio/video real-time call, audio and the like are being played in a certain native page, the multimedia data can be interrupted when the native page jumps to another native page.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present application provide a method and an apparatus for controlling running of a sub-application, a storage medium, and an electronic device, which can prevent playing of multimedia data being played from being interrupted during a native page jump of the sub-application.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an operation control method for a sub-application, where the method includes:
displaying an operation interface of the parent application;
in response to the operation of the sub application being started in the operation interface of the parent application, loading the native page of the sub application; the sub-application comprises a plurality of functional modules, and each functional module is associated with an operation interface; the native page is used for displaying an operation interface of the functional module of the sub-application;
and responding to multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring multimedia data through the native page and playing the multimedia data.
In a second aspect, an embodiment of the present application further provides an apparatus for controlling running of a sub-application, where the apparatus includes:
the native page loading unit is used for displaying an operation interface of a parent application, responding to the operation of a child application in the operation interface of the parent application and loading a native page of the child application; the sub-application comprises a plurality of functional modules, and each functional module is associated with an operation interface; the native page is used for displaying an operation interface of the functional module of the sub-application;
and the multimedia data operation unit is used for responding to multimedia data access operation triggered in the operation interface of the currently displayed functional module, acquiring multimedia data through the native page and playing the multimedia data.
In an alternative embodiment, the native page has a load lifecycle function and a display lifecycle function; the native page loading unit is specifically configured to:
responding to the operation of a sub-application in an operation interface of the parent application, and calling a loading life cycle function of the native page through a browser component corresponding to the native page of the sub-application so as to load the native page of the sub-application;
and calling a display life cycle function of the native page to display the native page of the sub-application.
In an alternative embodiment, each of the functional modules has a module loading lifecycle function and a module display lifecycle function; the native page loading unit is further configured to:
calling a module loading life cycle function of each functional module through a display life cycle function of the native page so as to load each functional module;
taking the set routing path of the initial function module as the routing path of the operation interface displayed in the native page;
and calling a module display life cycle function of the initial function module through the display life cycle function of the native page so as to display an operation interface of the initial function module through the native page.
In an optional embodiment, the apparatus further comprises an interface jump control unit, configured to:
responding to an operation interface switching operation input in an operation interface of a currently displayed function module, and hiding the operation interface of the currently displayed function module;
displaying an operation interface of the target function module through the native page; and the target function module is a target function module for the switching operation instruction skip of the operation interface.
In an optional embodiment, the interface jump control unit is specifically configured to:
determining a routing path of a target function module which is jumped according to the switching operation instruction of the operation interface;
switching the routing path of the operation interface from the currently displayed routing path of the functional module to the routing path of the target functional module;
and displaying an operation interface of the target function module through the native page.
In an alternative embodiment, the native page has a hidden lifecycle function and a display lifecycle function; each functional module is provided with a module hiding life cycle function and a module display life cycle function; the interface jump control unit is further configured to:
calling a module hiding life cycle function of the currently displayed functional module through the hiding life cycle function of the native page so as to hide an operation interface of the currently displayed functional module;
and calling a module display life cycle function of the target function module through the display life cycle function of the native page so as to display an operation interface of the target function module.
In an optional embodiment, the native page has routing configuration information, and the routing configuration information stores a correspondence between a name of each functional module and a routing path; the interface jump control unit is specifically configured to:
determining the name of a target function module which is jumped according to the switching operation instruction of the operation interface;
and searching the routing path of the target function module from the routing configuration information of the native page according to the name of the target function module.
In an optional embodiment, the interface jump control unit is further configured to:
respectively acquiring the name and the routing path of each functional module of the sub-application;
and for each functional module, performing associated storage on the name of the functional module and the routing path to obtain the routing configuration information of the native page.
In an optional embodiment, the multimedia data execution unit is further configured to:
stopping playing the multimedia data in response to the ending of the multimedia data access operation triggered in the operation interface of the currently displayed functional module; alternatively, the first and second electrodes may be,
and stopping playing the multimedia data in response to the operation of exiting the sub-application in the native page of the sub-application.
In an alternative embodiment, the native page has an unload lifecycle function; each of the functional modules has a module offload lifecycle function; the apparatus also includes a native page unload unit to:
in response to an operation of exiting a sub-application in a native page of the sub-application, calling an uninstalling lifecycle function of the native page, and calling a module uninstalling lifecycle function of each functional module through the uninstalling lifecycle function of the native page to uninstall the each functional module;
uninstalling the native page of the sub-application through the uninstall lifecycle function of the native page.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for controlling the running of the sub-application in the first aspect is implemented.
In a fourth aspect, the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor is enabled to implement the method for controlling the running of the sub-application in the first aspect.
According to the operation control method and device of the sub-application, the storage medium and the electronic device, the sub-application comprises a native page and a plurality of functional modules, each functional module is associated with an operation interface, and the native page of the sub-application is used for displaying the operation interfaces of the functional modules of the sub-application. And when the sub-application is started, loading a native page of the sub-application, and displaying an operation interface of the functional module of the sub-application in the native page. And if receiving multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring the multimedia data through the native page and playing the multimedia data. In the running process of the sub-application, the jump between different functional modules can only exist in the native page, and the jump between different native pages can not be carried out. Therefore, in the running process of the sub-application, the multimedia data played through the browser component corresponding to the native page cannot be influenced or interrupted due to the jump of the native page.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario of an operation control method for a sub-application according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a creating process of a function module according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a process of merging functional modules according to an embodiment of the present disclosure;
fig. 4 is a flowchart of an operation control method for a sub-application according to an embodiment of the present application;
fig. 5 is an interface diagram illustrating operation control of a sub-application according to an embodiment of the present disclosure;
fig. 6 is an interface diagram illustrating operation control of another seed application according to an embodiment of the present disclosure;
fig. 7 is an interface diagram illustrating operation control of another sub-application according to an embodiment of the present disclosure;
fig. 8 is a flowchart of another operation control method for a seed application according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating a process of switching functional modules according to an embodiment of the present application;
fig. 10 is a schematic diagram illustrating another functional module switching process provided in the embodiment of the present application;
fig. 11 is a schematic structural diagram of an operation control device for a sub-application according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an operation control device for another sub-application provided in an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that references in the specification of the present application to the terms "comprises" and "comprising," and variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
(1) The sub-applications are as follows: the application program which can be run based on the third-party application on the terminal device does not need to be downloaded and installed. The sub-applications may include applets or the like that run based on the instant messaging application.
(2) Native page: and the page form in the sub application is used for bearing or realizing one or more functions of the sub application. In the embodiment of the application, one sub-application has one native page, and the native page can bear each function module of the sub-application and show an operation interface associated with each function module.
(3) A functional module: a sub-application may include a plurality of functional modules, each functional module may perform a function of the sub-application, different functional modules may perform different functions, and a plurality of functional modules may be carried in a native page of the sub-application, and thus may also be referred to as sub-modules of the native page. Each function module is associated with an operation interface, and the operation interface associated with each function module can be displayed through a native page of the sub-application.
(4) Life cycle function: both native pages and functional modules in a sub-application may be referred to as objects. In the sub-application, the creation, operation and destruction processes of an object are always accompanied by corresponding events, which are called lifecycle functions and can include loading lifecycle functions, displaying lifecycle functions, hiding lifecycle functions, unloading lifecycle functions and the like.
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The terms "first" and "second" are used herein for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
In order to better understand the technical solution provided by the embodiment of the present application, some brief descriptions are provided below for application scenarios to which the technical solution provided by the embodiment of the present application is applicable, and it should be noted that the application scenarios described below are only used for illustrating the embodiment of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The running control method of the sub-application provided by the embodiment of the application can be applied to the application scenario shown in fig. 1. Referring to fig. 1, the server 100 is communicatively connected to the terminal device 300 through a network 200, wherein the network 200 may be, but is not limited to, a local area network, a metropolitan area network, a wide area network, or the like, and the number of the terminal devices 300 connected to the server 100 may be plural. The terminal device 300 can transmit communication data and messages to and from the server 100 through the network 200.
The terminal 300 may be a portable device (e.g., a mobile phone, a tablet Computer, a notebook Computer, etc.), or may be a Computer, a smart screen, a Personal Computer (PC), etc. The server 100 may be a server or a server cluster or a cloud computing center composed of a plurality of servers, or a virtualization platform, and may also be a personal computer, a large and medium-sized computer, or a computer cluster, etc. According to implementation needs, the application scenario in the embodiment of the present application may have any number of terminal devices and servers. The embodiment of the present application is not particularly limited to this.
Illustratively, the terminal device 300 has an instant messenger application installed thereon, and a plurality of sub-applications may be run based on the instant messenger application. The user may start a sub-application through the instant messaging application installed on the terminal device 300. The terminal device 300 receives an operation of starting a certain sub-application by the user, and the terminal device 300 downloads the data related to the sub-application from the server 100 and runs the sub-application.
In the related art, a sub-application usually includes a plurality of native pages, and each native page can implement a function. For example, in a music applet, one native page is used to present various lists of music available for selection to the user, another native page is used to play music selected by the user, and so on. In the running process of the sub-application, when a first native page needs to be displayed, a Webview (browser) component is started first and used for loading the first native page. If the user starts the audio and video real-time call function in the first native page, hardware using interfaces such as a microphone, a camera and a loudspeaker of the terminal device can be called through the Webview component so as to play and collect multimedia data such as audio and video. When the first native page needs to be switched to the second native page, the Webview component corresponding to the first native page is interrupted, and a new Webview component is started and used for loading the second native page. The Webview component corresponding to the first native page and the Webview component corresponding to the second native page are independent Webview components. When the Webview component corresponding to the first native page is interrupted, the multimedia data being played based on the first native page is also interrupted.
In order to prevent interruption of playing of multimedia data being played in a page jump process of a sub-application, an embodiment of the present application provides an operation control method of the sub-application. The sub-application operation control method provided by the embodiment of the application can be executed by an electronic device for performing sub-application operation control, or executed by a client installed on the electronic device and bearing a third-party application of the sub-application. The electronic device may be the terminal device 300, and the terminal device 300 or a client of the third-party application receives an operation of starting a certain sub-application from a user, may download relevant data such as a native page of the sub-application from the server 100 and store the data locally, and then run the sub-application. The native page of the sub-application is one, and a plurality of functional modules may be included in the native page. When the sub-application is started, the Webview component corresponding to the native page can be started to load the native page of the sub-application, and then each functional module in the native page is loaded. If a user triggers multimedia data access operation in an operation interface associated with a first function module displayed on a native page, the multimedia data access operation can be an operation of starting an audio and video real-time call function, and a client of a third-party application can call hardware use interfaces of a microphone, a camera, a loudspeaker and the like of a terminal device through a Webview component corresponding to the native page so as to play and acquire multimedia data of audio and video and the like. When the browser component needs to jump from the first functional module to the second functional module, the Webview component corresponding to the native page does not need to be restarted due to jumping among the functional modules, so that the multimedia data played by the browser component corresponding to the native page can be played continuously without being influenced or interrupted.
In order to more conveniently understand the embodiment of the present application, the creation process of the native page of the sub application provided by the embodiment of the present application is first described below. The creation process is executed by the sub-application development device, or the sub-application developer completes the creation process of the native page of the sub-application on the sub-application development device.
Fig. 2 shows a process of creating a functional module in a sub-application, where the functional module may be any one of the functional modules in the sub-application, and the creating process of the functional module is taken as an example in this embodiment to describe in detail, and the creating processes of other functional modules are the same as this.
As shown in fig. 2, creating a functional module of a sub-application may include the following steps:
step S201, a template file and a js file corresponding to the function module are created.
Both the template file and the js file may be selected and configured by a sub-application developer. Wherein the js file may be an xx.wxml file and an xx.js file. And the XX.wxml file is used for the view display of the XX module, and the XX.js file is used for realizing the life cycle and the custom logic control of the XX module.
Step S202, naming the function module.
After the creation of the template file and the js file of the function module is completed, the function module may be named, that is, a name attribute is added to the function module, or a name is set for the function module, for example, the name of the function module may be module 1. The name of the functional module may also be entered by the named sub-application developer. The name of the function module is a unique identifier of the function module, and can be used for route switching among the function modules, so that the names of the function modules are not allowed to be repeated.
After receiving the names of the function modules input by the sub-application developers, the sub-application development equipment can compare the input names of the function modules with the names of the existing function modules one by one. If the existing function module name has no name which is the same as the input function module name, the comparison result is 0, the input function module name is not repeated with the existing function module name, and the function module is allowed to be named as the name input by the sub-application developer; if the existing function module name has the same name as the input function module name, the comparison result is 1, the fact that the input function module name is repeated with the existing function module name is shown, the sub-application development equipment pops up a function module name repeated prompt message, and the sub-application development personnel are prompted to input a name for the function module again.
Step S203, adding the life cycle function in the js file.
Step S203 may also be performed before step S202, i.e. before or after function module naming, a lifecycle function may be added in the created js file. The lifecycle functions of the functional module may include a module load lifecycle function onLoad, a module display lifecycle function onShow, a module hidden lifecycle function onHide, and a module unload lifecycle function onUnload. When the life cycle functions are added into the js files, corresponding processing logic can be written for each life cycle function.
And step S204, adding custom logic in the functional module.
The custom logic of the functional module may include custom data and custom processing logic. The custom data is data content added with a custom in the data of the function module, and may include data content such as key1, key2, and key3, for example. When the function module is subsequently merged into the native page, the self-defined data of the function module is added with a prefix according to the name (namely, the name attribute) of the function module, so that the name of the self-defined data of the function module is relatively random, and even if the name of the self-defined data is the same as that of the self-defined data in other function modules, the self-defined data cannot be covered due to repeated names when the function module is merged into the native page.
Custom processing logic may include events that respond to page operations, private functions encapsulated within a module, etc., and the naming of the custom processing logic does not allow for duplication. The custom processing logic can also be understood as a custom function, and when the custom functions are combined into the original page subsequently, the prefixes cannot be added to the custom functions of the functional modules, so that the naming of the custom functions of the functional modules is not allowed to be repeated; that is, the naming of the custom function of a functional module can be neither the same as the naming of other custom functions of that functional module, nor the naming of the custom functions of other functional modules.
After the creation of each functional module of the sub-application is completed, a native page of the sub-application may be created, and each functional module that is completed is introduced into the native page. The process of creating a native page of a sub-application may include the steps of:
and a, creating a native page of the sub application.
Firstly, a native page is created, and the lifecycle functions of the native page, including loading lifecycle function onLoad, displaying lifecycle function onShow, hiding lifecycle function onHide, and unloading lifecycle function onUnload, may be created at the same time, and the created native page is a carrier of each functional module, and is used to carry each functional module created according to the method shown in fig. 2.
And b, adding a functional module into the native page.
After the creation of the native page of the sub-application is completed, all the required files of each function module may be added to the native page, including the template file and the js file of the function module. In this step, the sub-application development device displays the function module which can be added to the native page to the sub-application developer, the sub-application developer selects a required function module from the sub-application development device, and the sub-application development device adds the function module selected by the sub-application developer to the native page, or the sub-application development device stores the template file and the js file of the function module to a storage area corresponding to the native page.
In this step, the sub-application developer may also set a default initial function module. And when the sub-application is started, automatically displaying the operation interface associated with the default initial function module in the native page after the native page is displayed.
And c, acquiring the name, the custom data, the module life cycle function and the custom processing function of each functional module.
And for each functional module selected by the sub-application developer, respectively acquiring the name, the custom data, the module life cycle function and the custom processing function of each functional module from the template file and the js file of each functional module.
And d, generating routing configuration information according to the names and routing paths of the functional modules.
For each functional module, obtaining a routing path of the functional module, wherein the routing path refers to an offset address of a storage address of the functional module relative to a first address of a storage area corresponding to a native page. And establishing a corresponding relation between the name of each functional module and the routing path thereof, and generating routing configuration information for storing the corresponding relation between the name of each functional module and the routing path thereof.
And e, combining the acquired custom data, the module life cycle function and the custom processing function of each functional module into the native page.
Specifically, as shown in fig. 3, the custom data of each function module may be added with the name of the corresponding function module as a prefix, and then merged into the custom data of the native page, the custom processing function of each function module is used as the custom processing function to the native page, and an association relationship between each lifecycle function of the native page and the module lifecycle function of each function module is established. Illustratively, the display life cycle function of the native page, the loading life cycle function of each functional module and the display life cycle function of each functional module are established in an incidence relation, so that the display life cycle function of the native page can call the loading life cycle function of each functional module and the display life cycle function of each functional module.
For example, 4 functional modules may be merged into a native page according to the above process, and the native page shown in fig. 3 is finally obtained, where the native page includes 4 functional modules.
By the method, a plurality of functional modules of the sub-application can be integrated into one native page, and the creating process of each functional module is similar to that of the native page, so that for the sub-application comprising a plurality of native pages in the related technology, the multi-page form can be modified into the single-page form by only slightly modifying, and the modification required comprises the following steps: and taking each native page as a functional module, newly building a native page for bearing each functional module, and combining all the functional modules into the newly built native page. Meanwhile, if the single-page form needs to be restored to the multi-page form, only minor changes need to be made, including separating each functional module from the newly-built native page and storing each functional module as a native page. The method can effectively reduce the cost of page modification of the existing sub-applications and development of new single-page sub-applications.
After the creation of the native pages and the related data and files of the sub-applications is completed, the native pages and the related data and files may be saved to a corresponding server, such as the server 100 shown in fig. 1. The sub-application created according to the method comprises a native page and a plurality of functional modules, wherein the native page is used as a bearing of the functional modules and is used for bearing the functional modules. When a client of a third-party application installed on a certain terminal device starts the sub-application, the terminal device may download relevant data such as a native page of the sub-application from the server 100 and store the data locally, and then execute the sub-application, where an operation process of the sub-application will be described in detail below with reference to fig. 4.
Fig. 4 shows a flowchart of an operation control method for a sub-application according to an embodiment of the present application, which may be executed by the terminal device 300 in fig. 1, that is, by a client of a third-party application installed on the terminal device, such as an instant messaging application, or by another electronic device. By way of example, a specific implementation process of the operation control method for a sub-application according to the embodiment of the present application is described below with a client of an instant messaging application for carrying and operating the sub-application as an execution subject.
As shown in fig. 4, the operation control method of the sub-application includes the following steps:
and step S401, displaying an operation interface of the parent application.
The parent application may be a third-party application carrying child applications, and is an operation interface of the parent application as shown in page a in fig. 5.
Step S402, responding to the operation of the sub-application in the operation interface of the parent application, and loading the native page of the sub-application.
The user may start the applet or the sub-application by starting the applet in the instant messaging application, taking the sub-application as the applet in the instant messaging application as an example, the user clicks an applet icon in the instant messaging application shown in a page a in fig. 5, enters an applet display interface shown in a page b in fig. 5, a plurality of applet icons are displayed in the applet display interface, and the user clicks an icon of an XX conference therein, so that the applet or the sub-application can be started.
The client of the instant messaging application receives the sub-application operation input by the user, and the native page of the sub-application is added through the browser component corresponding to the native page of the sub-application. The browser component can be Webview, the sub-application can comprise a plurality of function modules, each function module is associated with an operation interface, and the native page of the sub-application can be used for displaying the operation interfaces of the function modules of the sub-application.
In one embodiment, the native page of the sub-application has a loading life cycle function onLoad and a displaying life cycle function onShow, when a user starts the sub-application in the instant messaging application, a client of the instant messaging application receives a start application operation input by the user, the loading life cycle function onLoad of the native page is called through a browser component corresponding to the native page of the sub-application to load the native page of the sub-application, and then the displaying life cycle function onShow of the native page is called to display the native page onShow of the sub-application.
In some embodiments, the client of the instant messaging application receives a start application operation input by a user, and may call the loading lifecycle function onLoad of the native page through the browser component corresponding to the native page to load the native page, and then call the display lifecycle function onShow of the native page to display the native page of the sub-application. After the native page of the sub-application is displayed, a module loading lifecycle function onLoad of each functional module can be called through a display lifecycle function onShow of the native page to load each functional module, then a set routing path of the default displayed initial functional module is used as a routing path of an operation interface displayed in the native page, and the module display lifecycle function onShow of the initial functional module is called through the display lifecycle function onShow of the native page to display the operation interface of the initial functional module through the native page.
After the operation interface of the initial function module is displayed through the native page, the operation interface can be switched according to the interface jump operation of the user, and the operation interfaces of other function modules of the sub-application are displayed through the native page.
Step S403, in response to a multimedia data access operation triggered in the operation interface of the currently displayed functional module, obtaining multimedia data through the native page and playing the multimedia data.
Illustratively, the operation interface of some functional modules is provided with an audio/video real-time call functional key, such as an audio call key, a video conference key or a teleconference key. When a user clicks an audio and video real-time call function key, the client of the instant messaging application receives multimedia data access operation triggered by the user in the operation interface of the currently displayed function module. And when the user clicks the audio and video real-time call function key, the client of the instant messaging application receives multimedia data access operation triggered by the user in the operation interface of the currently displayed function module.
And responding to the multimedia data access operation by the client of the instant messaging application, and acquiring and playing the multimedia data through the browser component corresponding to the native page.
In some embodiments, the client of the instant messaging application may obtain and play the multimedia data stored in the terminal device through the browser component corresponding to the native page. For example, a user may click a music playing key on an operation interface of an audio playing function module of a sub-application through a music file stored in the sub-application playing terminal device, where the terminal device is a terminal device of a client that installs and runs the instant messaging application. The client of the instant messaging application receives the operation of the user, displays the audio files stored in the terminal equipment, the user selects one music file from the displayed audio files, the client of the instant messaging application calls a hardware using interface of a loudspeaker of the terminal equipment through a browser component corresponding to the native page, and the loudspeaker of the terminal equipment is used for playing the music file.
In other embodiments, the client of the instant messaging application may obtain and play the multimedia data on the network through the browser component corresponding to the native page. For example, a plurality of audios are displayed on an operation interface of an audio playing function module of the sub-application, and the audios are all audios published on a certain website, when a user clicks one of the audios, a client of the instant messaging application may call a hardware using interface of a communication module of the terminal device through a browser component corresponding to a native page to acquire the audio from the network, call a hardware using interface of a speaker of the terminal device, and play the audio using the speaker of the terminal device.
In other embodiments, when a user clicks on multimedia data sent by other users in the instant messaging application, the multimedia data may be obtained and played through a browser component corresponding to a native page of the sub-application. For example, other users send a certain audio frequency displayed in the operation interface of the audio frequency playing function module of the sub-application to the users through the instant messaging application, after the users click the audio frequency, the client in the instant messaging application can call the sub-application, call the hardware using interface of the loudspeaker of the terminal device through the browser component corresponding to the native page of the sub-application, and play the audio frequency by using the loudspeaker of the terminal device.
In an alternative embodiment, as shown in fig. 6, in the sub-application "XX conference", if a user clicks a "teleconference" button in an operation interface of a currently displayed function module, a client in the instant messaging application receives a multimedia data access operation input by the user, invokes, through a browser component corresponding to a native page, a hardware usage interface of a communication module of the terminal device to receive voice data of an opposite-end user of the teleconference through a network, invokes a hardware usage interface of a speaker of the terminal device, and plays the received voice data by using the speaker of the terminal device. And the client in the instant messaging application calls a hardware use interface of a microphone of the terminal equipment through a browser component corresponding to the native page, collects voice data of the local user, calls a hardware use interface of a communication module of the terminal equipment, and transmits the voice data of the local user to the terminal equipment of the opposite-end user through a network. That is, in some embodiments, the operation control method of the sub application may further include: and responding to multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring multimedia data through a browser component corresponding to the native page, and transmitting the multimedia data.
On the basis of the foregoing embodiment, fig. 8 shows a flowchart of another method for controlling the running of a sub-application provided in an embodiment of the present application, and as shown in fig. 8, the method may include the following steps:
in step S801, in response to the operation of the sub application, the native page of the sub application is loaded.
Step S802, displaying the operation interface of the functional module of the sub application through the native page of the sub application.
Step S803, in response to a multimedia data access operation triggered in the operation interface of the currently displayed functional module, obtaining multimedia data through the native page and playing the multimedia data.
The multimedia data may be video data, or audio data, such as voice data. For example, as shown in fig. 6, if a user clicks a "teleconference" button in an operation interface of a currently displayed function module, a client in the instant messaging application receives a multimedia data access operation input by the user, acquires and plays voice data of an opposite-end user of the teleconference through a browser component corresponding to a native page, and acquires and transmits voice data of a local user.
Step S804, in response to the operation interface switching operation input in the operation interface of the currently displayed function module, hides the operation interface of the currently displayed function module.
Step S805, the operation interface of the target function module indicated by the operation interface switching operation is displayed through the native page.
The user can switch the operation interface of the displayed function module according to the use requirement. For example, a "next page" key is provided in the operation interface of the currently displayed function module, and the key indicates switching to the operation interface of the set next function module. The user can switch to the operation interface of the next functional module by clicking the key. For another example, the user may also complete the task of editing the schedule while conducting a teleconference. The user clicks an "edit schedule" button in the operation interface of the function module shown in fig. 6, the "edit schedule" button indicates to switch to the operation interface of the target function module shown in fig. 7, and the user can create a new schedule, modify the schedule, and the like in the operation interface. In the embodiment of the present application, when the operation interface of the target function module shown in fig. 7 is displayed, the telephone conference is continued, and the voice data in the conference is normally received and played without being affected or interrupted.
In an embodiment, a client in an instant messaging application receives an operation interface switching operation input by a user, determines a target function module indicated by the switching operation, and may call a module hidden lifecycle function onHide of a currently displayed function module through a hidden lifecycle function of a native page to hide an operation interface of the currently displayed function module. And the module display life cycle function onShow of the target function module can be called through the display life cycle function of the native page so as to display the operation interface of the target function module.
For example, as shown in fig. 9, when the currently displayed operation interface of the function module is the operation interface of the function module1, the operation interface switching operation instruction input by the user is switched to the operation interface of the function module 2. In this case, the function module 2 is a target function module. The client in the instant messaging application receives the operation interface switching operation, and can call the currently displayed module hiding life cycle function onHide of the functional module1 through the hiding life cycle function of the native page so as to hide the operation interface of the functional module 1. Then, the module display lifecycle function onShow of the functional module 2 may be called by the display lifecycle function of the native page to display the operation interface of the functional module 2.
In another embodiment, the client in the instant messaging application receives an operation interface switching operation input by a user, and may call the module hidden lifecycle function onHide of the currently displayed functional module through the hidden lifecycle function of the native page, so as to hide the operation interface of the currently displayed functional module. And determining the routing path of the target function module which is jumped by the operation interface switching operation instruction, and switching the routing path of the operation interface from the currently displayed routing path of the function module to the routing path of the target function module.
Specifically, since the native page has the routing configuration information in which the corresponding relationship between the name of each functional module and the routing path is stored, the name of the target functional module to which the operation interface switching operation instruction skips may be determined, and then the routing path of the target functional module may be searched from the routing configuration information of the native page according to the name of the target functional module, thereby determining the routing path of the target functional module to which the operation interface switching operation instruction skips. For example, a user clicks a certain key to trigger an operation interface switching operation, the key is associated with a name of a target function module to which the operation interface switching operation instruction is directed, and a routing path of the target function module is searched from routing configuration information of a native page according to the name of the target function module. According to the routing path, the routing path of the operation interface can be switched from the currently displayed routing path of the function module to the routing path of the target function module. And then, calling a module display life cycle function onShow of the target function module through the display life cycle function of the native page so as to display an operation interface of the target function module.
For example, as shown in fig. 10, when switching from the currently displayed operation interface of the functional module1 to the operation interface of the functional module 4, the module hiding lifecycle function onHide of the functional module1 may be called first through the hiding lifecycle function onHide of the native page to hide the currently displayed operation interface of the functional module 1. Then, according to the corresponding relationship between the name of the functional module 4 and the routing path stored in the routing configuration information of the native page, the routing path of the functional module 4 is searched, according to the routing path of the functional module 4, the routing path of the operation interface is switched from the currently displayed routing path of the functional module1 to the routing path of the functional module 4, and finally, the display life cycle function onShow of the native page is used for calling the module of the functional module 4 to display the life cycle function onShow so as to display the operation interface of the functional module 4.
In an embodiment, after the multimedia data is acquired and played through the browser component corresponding to the native page, the user may stop playing the multimedia data, and the client of the instant messaging application stops playing the multimedia data in response to a multimedia data access ending operation triggered in the operation interface of the currently displayed function module after receiving the playing stopping operation of the user. For example, the user may stop the teleconference by clicking an exit button after returning to the operation interface of the teleconference. The client of the instant communication application receives the operation of quitting the telephone conference input by the user, stops receiving and playing the voice data of the conference and quits the conference.
In step S806, in response to the operation of exiting the sub application, the native page of the sub application is unloaded.
When the user exits the sub-application or stops the running of the sub-application, the client of the instant messaging application receives the operation of the user exiting the sub-application, calls the uninstalling lifecycle function onanload of the native page through the browser component corresponding to the native page of the sub-application, and further calls the module uninstalling lifecycle function onanload of each functional module through the uninstalling lifecycle function onanload of the native page so as to uninstall each functional module. And if the multimedia data are still played at the moment, stopping playing the multimedia data, and unloading the native page of the sub-application and the data related to the native page through the unloading life cycle function onanload of the native page so as to unload the sub-application from the instant messaging application.
According to the operation control method of the sub-application, the sub-application comprises a native page and a plurality of functional modules, each functional module is associated with an operation interface, and the native page of the sub-application is used for displaying the operation interfaces of the functional modules of the sub-application. And when the sub-application is started, the native page of the sub-application is loaded through the browser component corresponding to the native page of the sub-application, and the operation interface of the functional module of the sub-application is displayed in the native page. And if receiving multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring the multimedia data through a browser component corresponding to the native page and playing the multimedia data. In the running process of the sub-application, the jump between different functional modules can only exist in the native page, and the jump between different native pages can not be carried out. Therefore, in the running process of the sub-application, the multimedia data played through the browser component corresponding to the native page cannot be influenced or interrupted due to the jump of the native page.
In the related art, a sub-application includes a plurality of native pages. In the partial sub-application, when the audio data is running in the current native page, if the current native page is switched to another native page, the playing state of the audio data of the current native page can be transferred to the another native page in a way of reference or global shared data in the page switching process, the another native page does not continue to play the audio data of the current page, but when the another native page is switched back to the current native page, the current native page can refresh the playing state of the audio data according to the global shared data. Therefore, when the current native page is switched to another native page, the playing of the audio data is still interrupted. In the process, the audio playing needs to transmit and share data among a plurality of native pages, and the data needs to be refreshed again when the audio playing returns to the current native page, so that the sub-application development process is troublesome to realize, and similar codes exist in the plurality of native pages, so that the maintenance cost is high. Moreover, if the audio/video real-time call data is played in the current native page, the playing state of the audio/video real-time call data cannot be transmitted among the native pages in a parameter transmission or global data sharing mode, so that the audio/video real-time call data which is being played is directly transmitted to the terminal when the native pages are switched, and the audio/video real-time call data cannot be continuously played even if the current native pages are switched back.
In the method provided by the embodiment of the application, the operation interfaces associated with the plurality of functional modules included in the sub-application are all displayed by using one native page, that is, all functions of the sub-application are realized in one native page, and the purpose of switching the operation interfaces with different functions is achieved by controlling to hide and display different functional modules. In the switching process of the operation interface, the normal playing of audio data, video data or audio and video real-time call data cannot be influenced, and the maintenance cost of the sub-application can be reduced, so that the process of running and controlling the sub-application is simpler.
Based on the same inventive concept as the method for controlling the operation of the sub-application shown in fig. 4, the embodiment of the present application further provides an apparatus for controlling the operation of the sub-application, and the apparatus for controlling the operation of the sub-application may be disposed in a terminal device. Because the device is a device corresponding to the operation control method of the sub-application, and the principle of solving the problem of the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and repeated parts are not described again.
Fig. 11 shows a schematic structural diagram of an operation control device of a sub-application provided in an embodiment of the present application, and as shown in fig. 11, the operation control device of the sub-application includes a native page loading unit 1101 and a multimedia data operation unit 1102.
The native page loading unit 1101 is configured to display an operation interface of a parent application, respond to an operation of a child application in the operation interface of the parent application, and load a native page of a child application; the sub-application comprises a plurality of functional modules, and each functional module is associated with an operation interface; the native page is used for displaying an operation interface of the functional module of the sub-application;
the multimedia data operation unit 1102 is configured to, in response to a multimedia data access operation triggered in an operation interface of a currently displayed function module, acquire multimedia data through a native page and play the multimedia data.
In an alternative embodiment, the native page has a load lifecycle function and a display lifecycle function; the native page loading unit 1101 is specifically configured to:
responding to the operation of the sub-application in the operation interface of the parent application, and calling a loading life cycle function of the native page through a browser component corresponding to the native page of the sub-application so as to load the native page of the sub-application;
and calling the display life cycle function of the native page to display the native page of the sub-application.
In an alternative embodiment, each functional module has a module loading lifecycle function and a module display lifecycle function, and the native page loading unit 1101 is further configured to:
calling the module loading life cycle function of each functional module through the display life cycle function of the native page so as to load each functional module;
taking the set routing path of the initial function module as the routing path of the operation interface displayed in the native page;
and calling a module display life cycle function of the initial function module through the display life cycle function of the native page so as to display an operation interface of the initial function module through the native page.
In an alternative embodiment, as shown in fig. 12, the running control apparatus of the sub-application may further include an interface jump control unit 1201, configured to:
responding to an operation interface switching operation input in an operation interface of a currently displayed function module, and hiding the operation interface of the currently displayed function module;
displaying an operation interface of the target function module through the native page; the target function module is a target function module for switching operation instruction jumping of the operation interface.
In an alternative embodiment, the interface jump control unit 1201 is specifically configured to:
determining a routing path of a target function module which is jumped by the switching operation instruction of the operation interface;
switching the routing path of the operation interface from the currently displayed routing path of the functional module to the routing path of the target functional module;
and displaying the operation interface of the target function module through the native page.
In an alternative embodiment, the native page has a hidden lifecycle function and a display lifecycle function; each functional module is provided with a module hiding life cycle function and a module display life cycle function; the interface jump control unit 1201 is further configured to:
calling a module hiding life cycle function of the currently displayed functional module through a hiding life cycle function of the native page so as to hide an operation interface of the currently displayed functional module;
and calling a module display life cycle function of the target function module through the display life cycle function of the native page so as to display an operation interface of the target function module.
In an optional embodiment, the native page has routing configuration information, and the routing configuration information stores a corresponding relationship between the name of each functional module and a routing path; the interface jump control unit 1201 is specifically configured to:
determining the name of a target function module which is jumped according to the switching operation instruction of the operation interface;
and searching the routing path of the target function module from the routing configuration information of the native page according to the name of the target function module.
In an alternative embodiment, the interface jump control unit 1201 is further configured to:
respectively acquiring the name and the routing path of each functional module of the sub-application;
and for each functional module, the name of the functional module and the routing path are stored in an associated manner, so that the routing configuration information of the native page is obtained.
In an alternative embodiment, the multimedia data execution unit 1102 is further configured to:
stopping playing the multimedia data in response to the ending of the multimedia data access operation triggered in the operation interface of the currently displayed functional module; alternatively, the first and second electrodes may be,
and stopping playing the multimedia data in response to the operation of exiting the sub-application in the native page of the sub-application.
In an alternative embodiment, the native page has an unload lifecycle function; each functional module has a module offload lifecycle function; as shown in fig. 12, the apparatus for controlling the running of the sub-application may further include a native page unloading unit 1202, configured to:
in response to the operation of quitting the sub-application in the native page of the sub-application, calling the uninstalling life cycle function of the native page, and calling the module uninstalling life cycle function of each functional module through the uninstalling life cycle function of the native page so as to uninstall each functional module;
the native page of the sub-application is unloaded by the unloading lifecycle function of the native page.
The embodiment of the method and the embodiment of the device are based on the same inventive concept, and the embodiment of the application also provides electronic equipment. The electronic device may be any electronic device such as a mobile phone, a tablet computer, a Point of sale (POS), a vehicle-mounted computer, a smart wearable device, and a Personal Computer (PC), and may also be the terminal device 300 shown in fig. 1.
Fig. 13 shows a block diagram of an electronic device according to an embodiment of the present application. As shown in fig. 13, the electronic apparatus includes: radio Frequency (RF) circuit 310, memory 320, input unit 330, display unit 340, sensor 350, audio circuit 360, wireless fidelity (WiFi) module 370, processor 380, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 13 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the electronic device in detail with reference to fig. 13:
the RF circuit 310 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 380; in addition, the data for designing uplink is transmitted to the base station.
The memory 320 may be used to store software programs and modules, such as program instructions/modules corresponding to the sub-application operation control method and apparatus in the embodiment of the present application, and the processor 380 executes various functional applications and data processing of the electronic device, such as the sub-application operation control method provided in the embodiment of the present application, by executing the software programs and modules stored in the memory 320. The memory 320 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program of at least one application, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 330 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal.
Optionally, the input unit 330 may include a touch panel 331 and other input devices 332.
The touch panel 331, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 331 (for example, operations of the user on the touch panel 331 or near the touch panel 331 using any suitable object or accessory such as a finger, a stylus, etc.), and implement corresponding operations according to a preset program, for example, operations of the user clicking a shortcut identifier of a function module, etc. Alternatively, the touch panel 331 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch panel 331 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Optionally, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by a user or interface information presented to the user, and various menus of the electronic device. The display unit 340 is a display system of the terminal device, and is configured to present an interface, such as a display desktop, an operation interface of an application, or an operation interface of a live application.
The display unit 340 may include a display panel 341. Alternatively, the Display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 331 can cover the display panel 341, and when the touch panel 331 detects a touch operation on or near the touch panel 331, the touch panel is transmitted to the processor 380 to determine the type of the touch event, and then the processor 380 provides a corresponding interface output on the display panel 341 according to the type of the touch event.
Although in fig. 13, the touch panel 331 and the display panel 341 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 331 and the display panel 341 may be integrated to implement the input and output functions of the terminal.
The electronic device may also include at least one sensor 350, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off the backlight of the display panel 341 when the electronic device is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the electronic device, vibration recognition related functions (such as pedometer, tapping) and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
Audio circuitry 360, speaker 361, microphone 362 may provide an audio interface between a user and an electronic device. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signals into electrical signals, which are received by the audio circuit 360 and converted into audio data, which are then processed by the audio data output processor 380 and then transmitted to, for example, another electronic device via the RF circuit 310, or output to the memory 320 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the electronic device can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 370, and it provides wireless broadband internet access for the user. Although fig. 13 shows the WiFi module 370, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 380 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby performing overall monitoring of the electronic device. Optionally, processor 380 may include one or more processing units; optionally, the processor 380 may integrate an application processor and a modem processor, where the application processor mainly processes software programs such as an operating system, applications, and functional modules inside the applications, such as an operation control method of a sub-application provided in this embodiment of the present application. The modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
It will be appreciated that the configuration shown in fig. 13 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 13 or have a different configuration than shown in fig. 13. The components shown in fig. 13 may be implemented in hardware, software, or a combination thereof.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the pronunciation accuracy determination method in the above-described embodiment. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (13)

1. An operation control method for a sub-application, comprising:
displaying an operation interface of the parent application;
in response to the operation of the sub application being started in the operation interface of the parent application, loading the native page of the sub application; the sub-application comprises a plurality of functional modules, and each functional module is associated with an operation interface; the native page is used for displaying an operation interface of the functional module of the sub-application;
and responding to multimedia data access operation triggered in the operation interface of the currently displayed function module, acquiring multimedia data through the native page and playing the multimedia data.
2. The method of claim 1, wherein the native page has a load lifecycle function and a display lifecycle function; the loading the native page of the child application in response to the operation of the child application being started in the operation interface of the parent application comprises:
responding to the operation of a sub-application in an operation interface of the parent application, and calling a loading life cycle function of the native page through a browser component corresponding to the native page of the sub-application so as to load the native page of the sub-application;
and calling a display life cycle function of the native page to display the native page of the sub-application.
3. The method of claim 2, wherein each of said functional modules has a module loading lifecycle function and a module display lifecycle function; after the displaying of the native page of the sub-application, the method further comprises:
calling a module loading life cycle function of each functional module through a display life cycle function of the native page so as to load each functional module;
taking the set routing path of the initial function module as the routing path of the operation interface displayed in the native page;
and calling a module display life cycle function of the initial function module through the display life cycle function of the native page so as to display an operation interface of the initial function module through the native page.
4. The method of claim 1, further comprising:
responding to an operation interface switching operation input in an operation interface of a currently displayed function module, and hiding the operation interface of the currently displayed function module;
displaying an operation interface of the target function module through the native page; and the target function module is a target function module for the switching operation instruction skip of the operation interface.
5. The method according to claim 4, wherein the displaying the operation interface of the target function module through the native page comprises:
determining a routing path of a target function module which is jumped according to the switching operation instruction of the operation interface;
switching the routing path of the operation interface from the currently displayed routing path of the functional module to the routing path of the target functional module;
and displaying an operation interface of the target function module through the native page.
6. The method of claim 4 or 5, wherein the native page has a hidden lifecycle function and a displayed lifecycle function; each functional module is provided with a module hiding life cycle function and a module display life cycle function;
the hiding of the operation interface of the currently displayed function module includes:
calling a module hiding life cycle function of the currently displayed functional module through the hiding life cycle function of the native page so as to hide an operation interface of the currently displayed functional module;
the displaying the operation interface of the target function module through the native page comprises:
and calling a module display life cycle function of the target function module through the display life cycle function of the native page so as to display an operation interface of the target function module.
7. The method according to claim 5, wherein the native page has routing configuration information, and the routing configuration information stores the corresponding relationship between the name of each functional module and the routing path; the determining the routing path of the target function module which is jumped according to the switching operation instruction of the operation interface comprises the following steps:
determining the name of a target function module which is jumped according to the switching operation instruction of the operation interface;
and searching the routing path of the target function module from the routing configuration information of the native page according to the name of the target function module.
8. The method of claim 7, wherein the routing configuration information of the native page is generated by:
respectively acquiring the name and the routing path of each functional module of the sub-application;
and for each functional module, performing associated storage on the name of the functional module and the routing path to obtain the routing configuration information of the native page.
9. The method of claim 1, wherein after the multimedia data is obtained and played by the browser component corresponding to the native page, the method further comprises:
stopping playing the multimedia data in response to the ending of the multimedia data access operation triggered in the operation interface of the currently displayed functional module; alternatively, the first and second electrodes may be,
and stopping playing the multimedia data in response to the operation of exiting the sub-application in the native page of the sub-application.
10. The method of claim 1, wherein the native page has an offload lifecycle function; each of the functional modules has a module offload lifecycle function; after the loading of the native page of the sub-application, the method further comprises:
in response to an operation of exiting a sub-application in a native page of the sub-application, calling an uninstalling lifecycle function of the native page, and calling a module uninstalling lifecycle function of each functional module through the uninstalling lifecycle function of the native page to uninstall the each functional module;
uninstalling the native page of the sub-application through the uninstall lifecycle function of the native page.
11. An operation control device for a sub-application, comprising:
the native page loading unit is used for displaying an operation interface of a parent application, responding to the operation of a child application in the operation interface of the parent application and loading a native page of the child application; the sub-application comprises a plurality of functional modules, and each functional module is associated with an operation interface; the native page is used for displaying an operation interface of the functional module of the sub-application;
and the multimedia data playing unit is used for responding to multimedia data access operation triggered in the operation interface of the currently displayed functional module, acquiring multimedia data through the native page and playing the multimedia data.
12. A computer-readable storage medium having a computer program stored therein, the computer program characterized by: the computer program, when executed by a processor, implements the method of any of claims 1-10.
13. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing the method of any of claims 1-10.
CN202011443431.7A 2020-12-08 2020-12-08 Running control method and device of sub-application, storage medium and electronic equipment Active CN112559069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011443431.7A CN112559069B (en) 2020-12-08 2020-12-08 Running control method and device of sub-application, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011443431.7A CN112559069B (en) 2020-12-08 2020-12-08 Running control method and device of sub-application, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112559069A true CN112559069A (en) 2021-03-26
CN112559069B CN112559069B (en) 2022-04-12

Family

ID=75061032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011443431.7A Active CN112559069B (en) 2020-12-08 2020-12-08 Running control method and device of sub-application, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112559069B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791752A (en) * 2021-09-16 2021-12-14 深圳市芯中芯科技有限公司 Method for synchronously controlling webpage music playing state through js in android system
CN114327687A (en) * 2022-03-09 2022-04-12 恒生电子股份有限公司 Method, device and equipment for constructing sub-application in micro front-end mode and storage medium
CN114398094A (en) * 2021-12-21 2022-04-26 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130097298A1 (en) * 2011-10-18 2013-04-18 OneScreen Inc. Standardized adapter interface for multiple browser-based devices
CN107102880A (en) * 2017-05-11 2017-08-29 腾讯科技(深圳)有限公司 Message treatment method, device, storage medium and computer equipment
CN107277601A (en) * 2017-07-12 2017-10-20 北京潘达互娱科技有限公司 Video broadcasting method and device
CN107957911A (en) * 2016-10-18 2018-04-24 腾讯科技(深圳)有限公司 Method and apparatus, the method and apparatus of module data processing of component call
CN108604245A (en) * 2016-06-22 2018-09-28 华为技术有限公司 A kind of method and device obtaining web page contents
CN110020293A (en) * 2017-10-17 2019-07-16 腾讯科技(深圳)有限公司 Multi-medium data methods of exhibiting, device and storage medium
CN110430473A (en) * 2019-07-18 2019-11-08 东软集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of video playing
CN110442822A (en) * 2019-08-02 2019-11-12 腾讯科技(深圳)有限公司 A kind of small routine content displaying method, device, equipment and storage medium
CN110582017A (en) * 2019-09-10 2019-12-17 腾讯科技(深圳)有限公司 video playing method, device, terminal and storage medium
CN110858242A (en) * 2018-08-22 2020-03-03 阿里巴巴集团控股有限公司 Page skipping method and device
CN110990075A (en) * 2019-11-18 2020-04-10 北京小米移动软件有限公司 Starting method, device and equipment of fast application and storage medium
CN111367622A (en) * 2020-03-09 2020-07-03 联通沃音乐文化有限公司 System and method for playing audio without blocking mobile terminal website
CN111459685A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Communication method, device, equipment and readable medium of page end and native end
CN111859198A (en) * 2019-04-29 2020-10-30 天津五八到家科技有限公司 Page jump method, page jump system, client device and server device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130097298A1 (en) * 2011-10-18 2013-04-18 OneScreen Inc. Standardized adapter interface for multiple browser-based devices
CN108604245A (en) * 2016-06-22 2018-09-28 华为技术有限公司 A kind of method and device obtaining web page contents
CN107957911A (en) * 2016-10-18 2018-04-24 腾讯科技(深圳)有限公司 Method and apparatus, the method and apparatus of module data processing of component call
CN107102880A (en) * 2017-05-11 2017-08-29 腾讯科技(深圳)有限公司 Message treatment method, device, storage medium and computer equipment
CN107277601A (en) * 2017-07-12 2017-10-20 北京潘达互娱科技有限公司 Video broadcasting method and device
CN110020293A (en) * 2017-10-17 2019-07-16 腾讯科技(深圳)有限公司 Multi-medium data methods of exhibiting, device and storage medium
CN110858242A (en) * 2018-08-22 2020-03-03 阿里巴巴集团控股有限公司 Page skipping method and device
CN111459685A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Communication method, device, equipment and readable medium of page end and native end
CN111859198A (en) * 2019-04-29 2020-10-30 天津五八到家科技有限公司 Page jump method, page jump system, client device and server device
CN110430473A (en) * 2019-07-18 2019-11-08 东软集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of video playing
CN110442822A (en) * 2019-08-02 2019-11-12 腾讯科技(深圳)有限公司 A kind of small routine content displaying method, device, equipment and storage medium
CN110582017A (en) * 2019-09-10 2019-12-17 腾讯科技(深圳)有限公司 video playing method, device, terminal and storage medium
CN110990075A (en) * 2019-11-18 2020-04-10 北京小米移动软件有限公司 Starting method, device and equipment of fast application and storage medium
CN111367622A (en) * 2020-03-09 2020-07-03 联通沃音乐文化有限公司 System and method for playing audio without blocking mobile terminal website

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
COLA: "微信小程序模块化与page函数", 《HTTPS://WWW.YIYONGTONG.COM/ARCHIVES/VIEW-3820-1.HTML》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791752A (en) * 2021-09-16 2021-12-14 深圳市芯中芯科技有限公司 Method for synchronously controlling webpage music playing state through js in android system
CN113791752B (en) * 2021-09-16 2024-06-11 深圳市芯中芯科技有限公司 Method for synchronously controlling webpage music playing state in android system through js
CN114398094A (en) * 2021-12-21 2022-04-26 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium
CN114398094B (en) * 2021-12-21 2023-08-18 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium
CN114327687A (en) * 2022-03-09 2022-04-12 恒生电子股份有限公司 Method, device and equipment for constructing sub-application in micro front-end mode and storage medium
CN114327687B (en) * 2022-03-09 2022-05-20 恒生电子股份有限公司 Method, device and equipment for constructing sub-application in micro front-end mode and storage medium

Also Published As

Publication number Publication date
CN112559069B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US11144371B2 (en) Digital assistant extensibility to third party applications
CN112559069B (en) Running control method and device of sub-application, storage medium and electronic equipment
CN108363528B (en) Application page starting method and device, storage medium and electronic equipment
JP2018516396A (en) Dialogue method, terminal and server based on recommended content
CN110858173B (en) Data processing method and device for data processing
CN106484547B (en) Multi-open application management method and device and terminal
WO2018077041A1 (en) Method and apparatus for running application
CN115454286B (en) Application data processing method and device and terminal equipment
WO2020052307A1 (en) Permission configuration method and related product
US10298590B2 (en) Application-based service providing method, apparatus, and system
CN111240774A (en) Dynamic wallpaper generation method and device, storage medium and electronic equipment
CN111857531A (en) Mobile terminal and file display method thereof
CN108268274B (en) Application management method and device, storage medium and electronic equipment
CN113742716B (en) Code running method, device, electronic equipment, storage medium and program product
CN115828845A (en) Multimedia data viewing method, device, medium and equipment
WO2017041604A1 (en) Application acceleration method and device
CN116567133A (en) Resource playing method and related device
CN115905742A (en) Data display method, device, equipment and storage medium
CN112565284B (en) Access control method and device for components in application program and electronic equipment
CN106970814B (en) Processing method, device and system for software upgrading
CN116095384A (en) Multimedia playing control method and device, electronic equipment and storage medium
WO2019100223A1 (en) Method for determining association relationship between mobile phone number and application
CN117348938A (en) Configuration method and device of startup self-startup item, electronic equipment and storage medium
CN115659071A (en) Page jump method and device, electronic equipment and storage medium
CN114489425A (en) Desktop layout migration method and device, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40041361

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant