CN113971073A - Data calling method and device, electronic equipment and computer storage medium - Google Patents

Data calling method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN113971073A
CN113971073A CN202111400623.4A CN202111400623A CN113971073A CN 113971073 A CN113971073 A CN 113971073A CN 202111400623 A CN202111400623 A CN 202111400623A CN 113971073 A CN113971073 A CN 113971073A
Authority
CN
China
Prior art keywords
page
container
data
preset interface
stack manager
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.)
Pending
Application number
CN202111400623.4A
Other languages
Chinese (zh)
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.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte 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 Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202111400623.4A priority Critical patent/CN113971073A/en
Publication of CN113971073A publication Critical patent/CN113971073A/en
Pending legal-status Critical Current

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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a data calling method, a data calling device, electronic equipment and a computer storage medium, wherein the data calling method comprises the following steps: when a first page is loaded in a first container, if the first page needs to call data of a second page, registering a preset interface of the first container as a listener of the second page in a page stack manager; the page stack manager responds to the request for jumping to the second page, jumps to the second page and loads the second page by using a second container; when the preset interface monitors a return result event of the second page, the page stack manager is utilized to call back the data of the second page to the first container through the preset interface; and loading the first page by using the data of the first container and the second page. The data communication between the containers is realized, independent development is not needed, the application range is wider, the realization is very convenient, and the development cost is reduced.

Description

Data calling method and device, electronic equipment and computer storage medium
Technical Field
The embodiment of the application relates to the technical field of computer software, in particular to a data calling method and device, electronic equipment and a computer storage medium.
Background
In an Application program (english: Application), dynamic pages are usually used to integrate dynamically changing functional services, and different dynamic pages need different container bearers. In order to reduce the size of an application program, there is a need for function multiplexing between different containers, but due to differences in implementation mechanisms of the different containers, there is a problem that data communication cannot be directly performed between the different containers.
Disclosure of Invention
In view of the above, embodiments of the present application provide a data calling method, an apparatus, an electronic device, and a computer storage medium, so as to solve some or all of the above problems.
According to a first aspect of an embodiment of the present application, there is provided a data calling method, including: when a first page is loaded in a first container, if the first page needs to call data of a second page, registering a preset interface of the first container as a listener of the second page in a page stack manager; the page stack manager responds to the request for jumping to the second page, jumps to the second page and loads the second page by using a second container; when the preset interface monitors a return result event of the second page, the page stack manager is utilized to call back the data of the second page to the first container through the preset interface; and loading the first page by using the data of the first container and the second page.
According to a second aspect of the embodiments of the present application, there is provided a data calling apparatus, including: the registration module is used for registering a preset interface of the first container as a listener of the second page in the page stack manager if the first page needs to call data of the second page when the first container loads the first page; the page stack manager responds to the request for jumping to the second page, jumps to the second page and loads the second page by using a second container; the monitoring module is used for calling back the data of the second page to the first container through the preset interface by using the page stack manager when the preset interface monitors a return result event of the second page; and the page management module is used for loading the first page by using the data of the first container and the second page.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including: the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the data calling method of the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the data call method of the first aspect.
According to the data calling method, the data calling device, the electronic equipment and the computer storage medium, when the first page is loaded by the first container, if the first page needs to call data of the second page, the preset interface of the first container is registered as the listener of the second page in the page stack manager, so that the second page is monitored by the preset interface, when a returned result event of the second page is monitored, the data of the second page can be called back to the first container through the page stack manager and the preset interface, data communication between the containers is achieved, one interface is registered as the listener of a certain page, independent development is not needed, the application range is wider, the data calling method and the device are very convenient to achieve, and development cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic view of a scenario of a data calling method according to an embodiment of the present application;
fig. 2 is a flowchart of a data calling method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a page stack according to an embodiment of the present application;
fig. 4 is a schematic view of a scenario of another data calling method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a structure of a data call apparatus according to a second embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application shall fall within the scope of the protection of the embodiments in the present application.
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Example one
For convenience of understanding, an application scenario of the data calling method provided in the first embodiment of the present application is described, and referring to fig. 1, fig. 1 is a scenario diagram of the data calling method provided in the first embodiment of the present application. Fig. 1 shows a scenario in which each function module of a data call apparatus is shown, where the data call apparatus specifically includes: the device comprises a first container, a second container, a preset interface and a page stack manager. It should be noted that these functional blocks may be implemented by hardware structures such as a processor and a memory, and the memory may store programs for implementing these functional blocks.
The first container is used for loading a first page, the second container is used for loading a second page, and the calling data rules of the first container and the calling data rules of the second container are different; the preset interface is used for realizing a preset function, and the preset function depends on the data of the second page, namely the function of the second container; the page stack manager is used for managing a page stack (at least comprising a first page and a second page).
The data calling device can also be accessed to a Network, connected with the cloud end through the Network and used for data interaction, wherein the Network comprises a Local Area Network (LAN), a Wide Area Network (WAN) and a mobile communication Network; such as the World Wide Web (WWW), Long Term Evolution (LTE) networks, 2G networks (2 th Generation Mobile Network), 3G networks (3 th Generation Mobile Network), 5G networks (5 th Generation Mobile Network), etc. Of course, this is merely an example and does not represent a limitation of the present application.
As shown in fig. 1, when a first page is loaded in a first container, if the first page needs to call data of a second page, a preset interface of the first container is registered as a listener of the second page in a page stack manager; jumping to a second page by using a page stack manager, loading the second page by using a second container, and obtaining data of the second page by using the second container in the process of loading the second page; when a preset interface is used for monitoring a return result of the second page, the page stack manager is used for calling back the data of the second page to the first container through the preset interface; and loading the first page by using the data of the first container and the second page.
With reference to the scenario shown in fig. 1, a data calling method provided in the first embodiment of the present application is described in detail, it should be noted that fig. 1 is only an application scenario of the data calling method provided in the first embodiment of the present application, and does not represent that the data calling method must be applied to the scenario shown in fig. 1, referring to fig. 2, fig. 2 is a flowchart of the data calling method provided in the first embodiment of the present application, and the method includes the following steps:
step 201, when the first page is loaded in the first container, if the first page needs to call the data of the second page, registering the preset interface of the first container as the listener of the second page in the page stack manager.
A container may be a packaged unit of software for applications running from one computing environment to another. In this application, the first container may be used to load a first page, which may be any one of the pages. Optionally, the preset function implemented by the preset interface depends on the second container, and the first container cannot implement the preset function. The second container may be used to load the second page, because the first container cannot implement the preset function, and the implementation of the preset function depends on the second container, therefore, the data returned after the second container is invoked through the preset interface to implement the preset function, that is, the first page invokes the data of the second page through the preset interface.
The page stack manager is configured to manage a page stack, where the page stack may include a plurality of pages, and the plurality of pages includes at least a first page and a second page, as shown in fig. 3, fig. 3 is a schematic diagram of a page stack provided in an embodiment of the present application, and a page may be inserted and deleted in the page stack, where the inserted page may also be referred to as stacking, and the deleted page may also be referred to as popping. Pages in the page stack may be read for display to the user. The page stack manager may manage page lifecycle events for each page in the page stack, which may include, for example: a page load (onLoad) event, a page show (onShow) event, a page unload (onUnload) event, etc. Illustratively, a page loading (onLoad) event is triggered when the onLoad event enters a page for the first time and the page loading is performed, and a parameter for opening a page path can be obtained from parameters of the page loading event; after the page display event is loaded for the first time, triggering when the background is switched to the foreground or the page is re-entered; a page unload event is triggered when a page unloads. Of course, page lifecycle events may also include other events, such as return result (onResult) events, and the like, and are merely exemplary herein.
Optionally, in an embodiment of the present application, because the first page needs to call data of the second page, only the returned result event may be monitored, and registering the preset interface of the first container as a listener of the second page in the page stack manager includes: and registering the preset interface as a listener of a result returning event of the second page in the page manager. And only the returned result event is monitored by utilizing the preset interface, so that the monitoring efficiency is higher, other events irrelevant to the data for calling the second page cannot be monitored, and the monitoring power consumption is also reduced.
Step 202, the page stack manager responds to the request for jumping to the second page, jumps to the second page, and loads the second page by using the second container.
It should be noted that, in the present application, the first container and the second container are two types of containers, and the rule for the first container and the second container to call the data is different, and specifically, the rule for the upper layer application to call the container may be different. Illustratively, the first container and the second container may be two containers of different types among a container of an applet, a container of a dynamic interface technology (AJX), a reaction local (English: read native) container, a weex container, and a flutter container; for example, the first container may be a container of an applet, the applet may be a World Wide Web (WEB) application, and the second container may be a container of dynamic interface technology (AJX) or a dynamic container; alternatively, the first container is a container for AJX and the second container is a container for applets. Of course, this is only an exemplary illustration, the first container and the second container may be different as long as the rule for calling data is satisfied, and if the first container and the second container call the same rule, the first container may directly call the data of the second container, that is, in the process of loading the first page, the first container may directly call the data of the second page.
It should be noted that jumping to the second page by using the page stack manager may be initiated when the preset interface is registered as a listener of the second page, that is, when the preset interface is registered as a listener of the second page to the page stack manager, a request for jumping to the second page is initiated, the page stack manager starts jumping to the second page, then the second page is loaded in the second container and displayed, and the jumping to the second page by the page stack manager and the loading of the second page by the second container may be performed synchronously. Here, two examples are listed to specifically describe the execution actions of the page stack manager and the second container, respectively:
optionally, in the first example, the page stack manager jumps to the second page in response to the request to jump to the second page, including: and jumping to a second page from the current page by using a uniform jump interface of the page stack manager, and displaying the second page. It should be noted that the unified jump interface is used for jumping any page in the page stack. The method has the advantages that the jump of any page in the page stack is completed by using a uniform jump interface, so that the method is more convenient to realize and the page management efficiency is higher.
Optionally, in a second example, loading the second page with the second container includes: and executing the task logic of the second page by using the second container, and obtaining the data of the second page according to an execution result.
It should be noted that, in the process of executing the task logic of the second page by the second container, the second page is gradually loaded, and the user can see the second page.
It should be noted that, in the process of displaying the second page, the user may continue to operate, or the user does not need to operate, to implement the preset function corresponding to the preset interface, and after implementing the preset function, the second container generates the data of the second page.
And 203, when the preset interface monitors a return result event of the second page, calling back the data of the second page to the first container through the preset interface by using the page stack manager.
Optionally, the page stack manager may respond to a plurality of page lifecycle event listeners, and in one implementation, when a preset interface monitors a return result event of the second page, the page stack manager is used to call back data of the second page to the first container through the preset interface, where the method includes: and the page stack manager traverses the page life cycle event listener, returns a monitoring result of a return result event of the second page to the preset interface when the return result event occurs to the second page, and calls back the data of the second page from the second container to the first container through the preset interface. The page stack manager traverses the page life cycle event monitoring, can respond to a plurality of monitors or respond to all the monitors, thereby returning the monitored result to the plurality of monitors, and the management efficiency is higher. Utilize page stack manager from the second container, call back the data of second page to first container through predetermineeing the interface, can realize the data communication between first container and the second container, realize this data communication's in-process, need not develop alone bridging, it is more convenient to realize, can be applied to the scene that various needs communicate between the container, and application scope is wider, and the compatibility is better.
Step 204, loading the first page by using the data of the first container and the second page.
Optionally, after the page stack manager returns the data of the second page to the first container through the preset interface, the page stack manager may jump to the first page, and then load the first page by using the data of the first container and the second page. For example, in one implementation, loading a first page with data of a first container and a second page includes: jumping from the second page to the first page by using a uniform jump interface of the page stack manager; and loading the first page by using the data of the first container and the second page, and displaying the first page. It should be noted that the first page may be displayed according to the loading progress.
With reference to the scenario shown in fig. 1, based on the description of the foregoing steps 201-204, here, another specific scenario is listed to describe the data invoking method described in the steps 201-204, as shown in fig. 4, where fig. 4 is a scenario diagram of another data invoking method provided in the first embodiment of the present application. Here, taking the first container as a container of a WEB applet and the second container as a container of an AJX as an example for explanation, correspondingly, the pages may be WEB applet pages, the second page is an AJX page, the preset interface may be used to call data of the second page (AJX page), in a scene shown in fig. 4, the preset interface may implement a function of selecting a picture, the function of selecting a picture cannot be implemented by the WEB applet, and the container of the AJX may be implemented, so when implementing the function of selecting a picture, data of the AJX page needs to be called.
With reference to the scenario shown in fig. 4, a user triggers a function of selecting a picture through an interactive operation on an applet page, where the interactive operation may include a touch operation, a gesture operation, a voice interactive operation, and the like. After the data calling device detects the interactive operation of the user on the small program page, the container of the small program page calls a preset interface to trigger the function of selecting the picture. Specifically, a preset interface initiates a request of jumping to an AJX page to a page stack manager, the preset interface is registered as a monitor of a return result event of the AJX page in the page stack manager, the page stack manager jumps a currently displayed applet page to the AJX page, the AJX page is loaded and rendered by using a container of the AJX, a data calling device displays the AJX page, a user can complete an operation of selecting a picture in the AJX page, the container of the AJX generates data of the AJX page based on the operation of selecting the picture by the user, the page stack manager traverses the monitor of a page life cycle event, when the container of the AJX page returns the data of the AJX page, the data of the AJX page is called back to a container of the applet through the preset interface, the page stack manager jumps the currently displayed AJX page to the applet page, the container of the applet page loads the applet page according to the data of the AJX page, the data call device displays the applet page to the user.
According to the data calling method provided by the embodiment of the application, when the first page is loaded by using the first container, if the first page needs to call data of the second page, the preset interface of the first container is registered as the listener of the second page in the page stack manager, so that the second page is monitored by using the preset interface, and when a return result event of the second page is monitored, the data of the second page can be called back to the first container through the page stack manager and the preset interface, so that data communication between the containers is realized, one interface is registered as the listener of a certain page, independent development is not needed, the application range is wider, the realization is very convenient, and the development cost is reduced.
Example two
Based on the method described in the first embodiment, a second embodiment of the present application provides a data invoking device, configured to execute the method described in the first embodiment, and referring to fig. 5, the data invoking device 50 includes:
the registering module 501 is configured to register, when a first page is loaded in a first container, a preset interface of the first container as a listener of a second page in a page stack manager if the first page needs to call data of the second page;
the page management module 502 is configured to, in response to a request for jumping to a second page, the page stack manager jumps to the second page and loads the second page using a second container;
the monitoring module 503 is configured to call back, by using the page stack manager, data of the second page to the first container through the preset interface when the preset interface monitors a returned result event of the second page;
the page management module 502 is further configured to load the first page by using the data of the first container and the second page.
Optionally, in an embodiment of the present application, the monitoring module 503 is configured to, by the page stack manager, traverse the page lifecycle event listener, and when a result returning event occurs to the second page, the page stack manager calls back the data of the second page from the second container to the first container through a preset interface.
Optionally, in an embodiment of the present application, the page management module 502 is configured to execute the task logic of the second page by using the second container, and obtain data of the second page according to an execution result.
Optionally, in an embodiment of the present application, the page management module 502 is configured to jump from a current page to a second page using a uniform jump interface of the page stack manager, and display the second page.
Optionally, in an embodiment of the present application, the page management module 502 is configured to jump from the second page to the first page by using a uniform jump interface of the page stack manager; and loading the first page by using the data of the first container and the second page, and displaying the first page.
Optionally, in an embodiment of the present application, the registering module 501 is configured to register the preset interface as a listener of a result returning event of the second page in the page manager.
The data calling device provided by the embodiment of the application, when the first page is loaded by using the first container, if the first page needs to call the data of the second page, the preset interface of the first container is registered as the listener of the second page in the page stack manager, so that the second page is monitored by using the preset interface, when a return result event of the second page is monitored, the data of the second page can be called back to the first container through the page stack manager and the preset interface, data communication between the containers is realized, one interface is registered as the listener of a certain page, independent development is not needed, the application range is wider, the realization is very convenient, and the development cost is reduced.
EXAMPLE III
Based on the method described in the first embodiment, a third embodiment of the present application provides an electronic device, configured to execute the method described in the first embodiment, and referring to fig. 6, fig. 6 is a schematic structural diagram of the electronic device provided in the third embodiment of the present application, and a specific embodiment of the present application does not limit a specific implementation of the electronic device.
As shown in fig. 6, the electronic device may include: a processor (processor)602, a communication Interface 604, a memory 606, and a communication bus 608.
Wherein:
the processor 602, communication interface 604, and memory 606 communicate with one another via a communication bus 608.
A communication interface 604 for communicating with other electronic devices, such as a terminal device or a server.
The processor 602 is configured to execute the program 610, and may specifically perform relevant steps in the foregoing method embodiments.
In particular, program 610 may include program code comprising computer operating instructions.
The processor 602 may be a processor CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present application. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 606 for storing a program 610. Memory 606 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may specifically be configured to cause the processor 602 to execute any one of the methods of the first embodiment.
For specific implementation of each step in the program 610, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing data call method embodiment, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The electronic equipment provided by the embodiment of the application can be used for registering the preset interface of the first container as the listener of the second page by using the page stack manager if the first page needs to call the data of the second page when the first container is used for loading the first page, so that the second page is monitored by using the preset interface, and when a return result event of the second page is monitored, the data of the second page can be called back to the first container through the page stack manager and the preset interface, so that the data communication between the containers is realized, and one interface is registered as the listener of a certain page, so that the electronic equipment does not need to be developed independently, has a wider application range, is very convenient to realize, and reduces the development cost.
Example four
Based on the method described in the first embodiment, a fourth embodiment of the present application provides a computer storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method described in the first embodiment.
The computer storage medium provided by the embodiment of the application, when a first page is loaded by using a first container, if the first page needs to call data of a second page, a preset interface of the first container is registered as a listener of the second page in a page stack manager, so that the second page is monitored by using the preset interface, and when a return result event of the second page is monitored, the data of the second page can be called back to the first container through the page stack manager and the preset interface, so that data communication between the containers is realized, and one interface is registered as the listener of a certain page, so that independent development is not needed, the application range is wider, the realization is very convenient, and the development cost is reduced.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present application may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the methods described herein may be stored in such software processes on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the data invocation methods described herein. Further, when a general-purpose computer accesses code for implementing the data call methods shown herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the data call methods shown herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only used for illustrating the embodiments of the present application, and not for limiting the embodiments of the present application, and those skilled in the relevant art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims (9)

1. A data calling method, comprising:
when a first page is loaded in a first container, if the first page needs to call data of a second page, registering a preset interface of the first container as a listener of the second page in a page stack manager;
the page stack manager responds to the request for jumping to the second page, jumps to the second page and loads the second page by using a second container;
when the preset interface monitors a return result event of the second page, a page stack manager is utilized to call back the data of the second page to the first container through the preset interface;
and loading the first page by using the data of the first container and the second page.
2. The method of claim 1, wherein the calling back, by a page stack manager, data of the second page to the first container through the preset interface when the preset interface monitors a return result event of the second page comprises:
and the page stack manager traverses a page life cycle event listener, returns a monitoring result of a return result event of the second page to the preset interface when the return result event occurs to the second page, and calls back the data of the second page from the second container to the first container through the preset interface.
3. The method of claim 1, wherein said loading the second page with the second container comprises:
and executing the task logic of the second page by using the second container, and obtaining the data of the second page according to an execution result.
4. The method of claim 1, wherein the page stack manager jumping to the second page in response to a request to jump to the second page, comprises:
and jumping to the second page from the current page by using a uniform jump interface of the page stack manager, and displaying the second page.
5. The method of claim 1, wherein said loading the first page with data of the first container and the second page comprises:
jumping from the second page to the first page using the uniform jump interface of the page stack manager;
and loading the first page by using the data of the first container and the second page, and displaying the first page.
6. The method of claim 1, wherein registering the preset interface of the first container as a listener of the second page at the page stack manager comprises:
and registering the preset interface as a listener of a result returning event of the second page in the page manager.
7. A data invocation apparatus, comprising:
the registration module is used for registering a preset interface of a first container as a listener of a second page in a page stack manager if the first page needs to call data of the second page when the first container loads the first page;
the page stack manager responds to the request for jumping to the second page, jumps to the second page and loads the second page by using a second container;
the monitoring module is used for calling back the data of the second page to the first container through the preset interface by using a page stack manager when the preset interface monitors a return result event of the second page;
and the page management module is used for loading the first page by using the data of the first container and the second page.
8. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the data calling method according to any one of claims 1-6.
9. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements a data call method as claimed in any one of claims 1 to 6.
CN202111400623.4A 2021-11-19 2021-11-19 Data calling method and device, electronic equipment and computer storage medium Pending CN113971073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111400623.4A CN113971073A (en) 2021-11-19 2021-11-19 Data calling method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111400623.4A CN113971073A (en) 2021-11-19 2021-11-19 Data calling method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN113971073A true CN113971073A (en) 2022-01-25

Family

ID=79590082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111400623.4A Pending CN113971073A (en) 2021-11-19 2021-11-19 Data calling method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN113971073A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543649A (en) * 2022-08-31 2022-12-30 荣耀终端有限公司 Data acquisition method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543649A (en) * 2022-08-31 2022-12-30 荣耀终端有限公司 Data acquisition method and electronic equipment
CN115543649B (en) * 2022-08-31 2023-11-03 荣耀终端有限公司 Data acquisition method and electronic equipment

Similar Documents

Publication Publication Date Title
US6745048B2 (en) Sim manager API
CN109408136B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN112052064B (en) Applet page jumping method, device, equipment and computer readable storage medium
CN110933075B (en) Service calling method and device, electronic equipment and storage medium
CN106034138A (en) Remote service calling method and remote service calling device
CN104239156A (en) External service call method and system
CN112835615B (en) Plug-in processing method and device for software development kit and electronic equipment
CN113407383A (en) Main/standby system switching method and device, server and main/standby system
CN113971073A (en) Data calling method and device, electronic equipment and computer storage medium
CN115567594A (en) Microservice request processing method, microservice request processing device, computer equipment and storage medium
CN108712462A (en) A kind of connection method for building up, device and equipment
CN114546648A (en) Task processing method and task processing platform
CN112099965B (en) Method, device, electronic equipment and storage medium for invoking JS by native application
WO2021097683A1 (en) Android system starting method and apparatus, device, and storage medium
CN116319806A (en) Service deployment method, device, equipment, storage medium and computer program product
CN115061796A (en) Execution method and system for calling between subtasks and electronic equipment
CN111367577A (en) Method, device and terminal for loading plug-in of application
CN108197029B (en) Method and device for acquiring process information
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN114756229A (en) Development page generation method based on micro front end and related device thereof
CN113703791A (en) Software deployment method, system, storage medium and equipment
CN112860449A (en) Method, system, equipment and medium for preventing restart caused by message overtime
CN114489826A (en) Chip operation method and device, storage medium and electronic equipment
CN111708519A (en) Business component processing method, device, equipment and storage medium
CN111435320A (en) Data processing method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20240307

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore

TA01 Transfer of patent application right