CN112596824A - Information interaction method and device, electronic equipment and storage medium - Google Patents

Information interaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112596824A
CN112596824A CN202110003393.1A CN202110003393A CN112596824A CN 112596824 A CN112596824 A CN 112596824A CN 202110003393 A CN202110003393 A CN 202110003393A CN 112596824 A CN112596824 A CN 112596824A
Authority
CN
China
Prior art keywords
object function
execution result
calling
micro application
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.)
Pending
Application number
CN202110003393.1A
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.)
Tianjin Zhongxin Zhiguan Information Technology Co ltd
Tianjin Meiteng Technology Co Ltd
Original Assignee
Tianjin Zhongxin Zhiguan Information Technology Co ltd
Tianjin Meiteng Technology 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 Tianjin Zhongxin Zhiguan Information Technology Co ltd, Tianjin Meiteng Technology Co Ltd filed Critical Tianjin Zhongxin Zhiguan Information Technology Co ltd
Priority to CN202110003393.1A priority Critical patent/CN112596824A/en
Publication of CN112596824A publication Critical patent/CN112596824A/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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an information interaction method, an information interaction device, electronic equipment and a storage medium. The method is applied to a micro application end, the micro application end is embedded into a native end, and the method comprises the following steps: acquiring a user operation instruction, and creating an object according to the user operation instruction; calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function; sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal; and monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier. The technical scheme disclosed by the embodiment of the invention realizes the improvement of the interaction safety between the webpage and the micro application.

Description

Information interaction method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of mobile communication, in particular to an information interaction method, an information interaction device, electronic equipment and a storage medium.
Background
In the existing technology for interaction between webview and micro-application, the first mode is as follows: the node APIs are configured for the micro applications through webview, and the micro applications can directly access the node APIs, so that the system local files can be operated, and unpredictable risks are caused. The second mode is as follows: the iframe is used for embedding the micro application, the postMessage is used for sending data for interaction, invasion is caused to the main program frame, and some styles and functions influence the layout of the frame.
Disclosure of Invention
The invention provides an information interaction method, an information interaction device, electronic equipment and a storage medium, and aims to improve the interaction security between a webpage and a micro application.
In a first aspect, an embodiment of the present invention provides an information interaction method, where the method is applied to a micro application end, and the micro application end is embedded in a native end, where the method includes:
acquiring a user operation instruction, and creating an object according to the user operation instruction;
calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function;
sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal;
and monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
In a second aspect, an embodiment of the present invention further provides an information interaction method, where the method is applied to a native terminal, where at least one micro application terminal is embedded in the native terminal, and the method includes:
receiving an object function and a calling identifier of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction;
executing the object function and determining an execution result of the object function;
and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal.
In a third aspect, an embodiment of the present invention further provides an information interaction apparatus, where the apparatus is applied to a micro application end, and the micro application end is embedded in a native end, and the apparatus includes:
the object creating module is used for acquiring a user operation instruction and creating an object according to the user operation instruction;
the object function calling module is used for calling an object function corresponding to the user operation instruction from a pre-loaded object function script and generating a calling identifier of the object function;
the object function sending module is used for sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding the execution result and the calling identifier corresponding to the execution result back to the micro application terminal;
and the execution result monitoring module is used for monitoring the execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
In a fourth aspect, an embodiment of the present invention further provides an information interaction apparatus, where the apparatus is applied to a native end, and at least one micro application end is embedded in the native end, where the apparatus includes:
the object function receiving module is used for receiving an object function and a calling identifier of the object function, which are sent by the micro application end, wherein the object function is called from a preset object function script by the micro application end based on a received user operation instruction;
the object function execution module is used for executing the object function and determining the execution result of the object function;
and the object function sending module is used for sending the execution result of the object function and the calling identifier of the object function to the micro application terminal.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the information interaction method provided by any embodiment of the invention.
In a sixth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the information interaction method provided in any embodiment of the present invention.
The technical scheme of the embodiment of the invention specifically comprises the steps of obtaining a user operation instruction, and creating an object according to the user operation instruction; calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function; and sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal. According to the technical scheme provided by the embodiment of the invention, the object function is integrated in the object function script, the required object function is called when the instruction is obtained, the calling identifier is generated, the calling identifier and the object function are transmitted to the native terminal for execution, and the execution result of the native terminal is monitored, so that the interaction safety between the webpage and the micro application is improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of an information interaction method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an information interaction method according to a second embodiment of the present invention;
fig. 3 is an interaction flow diagram of an information interaction method provided by a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information interaction apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an information interaction apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an information interaction method according to an embodiment of the present invention, which is applicable to a case of information interaction between a native end and a micro application. The embodiment mainly embodies a method executed by the micro application terminal in the information interaction process. The method can be performed by an information interaction device, which can be implemented by means of software and/or hardware.
Before the technical solution provided by the embodiment of the present invention is introduced, an application scenario of the embodiment is introduced exemplarily: in the field of desktop application development, regarding information interaction between a webview and a micro application when the micro application is embedded in the webview, a method for realizing the information interaction between the webview and the micro application in the prior art may be to configure a node api open to the micro application through the webview, so as to achieve the capability that the micro application can directly access the node api, but because the micro application can directly access the node api, a local file of a system may be operated, and unpredictable risks are present, such as: automatic deletion of local files, automatic ejection of advertisement windows, etc. Of course, the method for implementing information interaction between the webview and the micro application may also be: the iframe embedded micro application is used, and the postMessage is used for sending data for interaction, but the iframe embedded webpage is displayed, so that invasion can be caused to a main program frame, and some styles and functions can influence the layout of the frame.
In order to solve the technical problems, the technical scheme of the embodiment of the invention realizes the interaction and the function with the micro application without developing an Electron module and a node module for the micro application in order to ensure the safety of the interaction information and the integrity of the interaction page. The micro application end in the technical scheme of the embodiment specifically executes the following operations: and when a starting instruction of the micro application end is detected, preloading the object function script, wherein the object function script comprises object functions corresponding to the operation instructions.
The start instruction of the micro application end may be an operation instruction of the user to the micro application, such as an operation instruction of downloading, sending, opening, and the like. An object function is an execution method of an operation instruction. Specifically, when a start instruction of the micro application terminal is detected, each object function script is preloaded, so that a corresponding object function is called conveniently from the object function script according to the operation instruction.
As shown in fig. 1, the method specifically includes the following steps:
s110, obtaining a user operation instruction, and creating an object according to the user operation instruction.
In the embodiment of the present invention, the user operation instruction is an operation of a user on a micro application, the micro application may be an applet embedded in a native terminal or a public number, and the native terminal may be embedded with at least one micro application. The operation instruction may be an instruction generated based on an operation of the micro application by the user, opening a document in the applet, downloading data in the applet, sending a message in the applet, and the like. The object is a null object and is used for storing an object function corresponding to the operation instruction called according to the user operation instruction.
Specifically, the user operation instruction is obtained according to the operation of the user on the micro application, and an object is created according to the operation instruction and used for storing the subsequent object function called according to the operation instruction.
S120, calling the object function corresponding to the user operation instruction from the pre-loaded object function script, and generating a calling identifier of the object function.
The calling identifier may be a unique identifier of the call generated when the object function corresponding to the user operation instruction is called, and is used to mark a specific calling operation of the object function. Specifically, the identifier may be, but is not limited to, a name, a number, or a character string formed by at least one of a number, a letter, and a character of the called target function, and may be, for example, a unique identifier generated according to a calling time of the target function, a function name of the target function, and the like.
Specifically, when a user operation instruction is detected, an object function corresponding to the user operation instruction is called from a pre-loaded object function script according to the user operation instruction, and a unique calling identifier called at this time by the object function is generated and used for marking the calling operation of the object function at this time.
S130, sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal.
The native end can be a web interface such as webview for embedding micro applications. The execution result may be an execution result of the object function sent to the native side for processing, for example, the execution result may be that the native side successfully executes or fails to execute the object function.
Specifically, the called object function and the calling identifier of the object function are sent to the native terminal, so that the native terminal executes the method corresponding to the object function, the execution result corresponding to the calling identifier is generated according to the calling identifier of the object function, and the execution result and the calling identifier corresponding to the execution result are fed back to the micro application terminal. Alternatively, the object function and the execution result may be transmitted between the micro application terminal and the native terminal in a Communication manner based on IPC (Inter-Process Communication).
S140, monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
Optionally, the calling identifier fed back by the originating terminal is monitored, and an execution result is determined based on a callback function corresponding to the calling identifier. Among other things, the callback functions may include a resolve callback function and a reject callback function. Specifically, a calling identifier of a called object function sent by the micro application end and fed back by the native end is monitored, and a corresponding callback function and an execution result of the calling identifier are determined according to the calling identifier. For example, when the callback function corresponding to the call identifier is a resolve callback function, determining that the execution result corresponding to the call identifier is successful according to the callback function; and when the callback function corresponding to the calling identifier is a reject callback function, determining that the execution result corresponding to the calling identifier is execution failure according to the callback function.
The technical scheme of the embodiment of the invention specifically comprises the steps of obtaining a user operation instruction, and creating an object according to the user operation instruction; calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function; and sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal. According to the technical scheme provided by the embodiment of the invention, the object function is integrated in the object function script, the required object function is called when the instruction is obtained, the calling identifier is generated, the calling identifier and the object function are transmitted to the native terminal for execution, the execution result of the native terminal is monitored, and the interaction safety between the native terminal and the micro application is improved.
Example two
Fig. 2 is a flowchart of an information interaction method according to a second embodiment of the present invention, which is applicable to a case of information interaction between a native end and a micro application. On the basis of the foregoing embodiments, the present embodiment mainly embodies a method executed by a native terminal in an information interaction process. The method can be performed by an information interaction device, which can be implemented by means of software and/or hardware.
In order to solve the technical problem in the above embodiments, the technical solution of the embodiments of the present invention specifically performs the following operations at the native end: as shown in fig. 2, the method specifically includes the following steps:
s210, receiving an object function and a calling identifier of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction.
In the embodiment of the present invention, specifically, when the micro application terminal calls the object function corresponding to the user operation instruction from the object function script and sends the call identifier generated according to the call of the object function to the native terminal, the native terminal receives the object function and the call identifier of the object function, and is configured to process the object function at the native terminal, so as to implement response of the micro application operation instruction.
S220, executing the object function, and determining an execution result of the object function.
Specifically, the native terminal executes an execution method of a corresponding operation instruction in the received object function, and determines an execution result of the object function, where the execution result includes an execution success or an execution failure.
And S230, determining a callback function according to the execution result, wherein the callback function comprises a successful callback function and a failed callback function.
Optionally, a callback function is determined according to the execution result, where the callback function includes a successful callback function and a failed callback function, for example, the callback function may include a resolve callback function and a reject callback function.
Specifically, when the callback function corresponding to the call identifier is a resolve callback function, determining that the execution result corresponding to the call identifier is successful according to the callback function; and when the callback function corresponding to the calling identifier is a reject callback function, determining that the execution result corresponding to the calling identifier is execution failure according to the callback function.
Optionally, the callback function and the call identifier are sent to the micro application end, so that the micro application end determines an execution result corresponding to the call identifier based on the received callback function.
The technical scheme of the embodiment specifically includes receiving an object function and a calling identifier of the object function, which are sent by the micro application end, wherein the object function is called from a preset object function script by the micro application end based on a received user operation instruction; executing the object function and determining an execution result of the object function; and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal. According to the technical scheme of the embodiment of the invention, the calling identification and the object function of the micro application terminal are obtained, the object function is executed, and the execution result is fed back to the micro application terminal to realize data interaction between the micro application terminal and the native terminal, so that the interaction safety between the native terminal and the micro application is improved.
EXAMPLE III
Fig. 3 is a schematic flow chart of an information interaction method according to a third embodiment of the present invention, which is applicable to information interaction between a native end and a micro application. On the basis of the above embodiments, the present embodiment mainly embodies an interaction process between the native end and the micro application end in an information interaction process between the native end and the micro application end. As shown in fig. 3, the method specifically includes the following steps:
s310, the micro application terminal obtains the user operation instruction and creates an object according to the user operation instruction.
S320, the micro application terminal calls the object function corresponding to the user operation instruction from the pre-loaded object function script and generates a calling identifier of the object function.
S330, the micro application end sends the calling identification and the object function to the native end, so that the native end executes the object function to obtain an execution result corresponding to the calling identification, and feeds the execution result and the calling identification corresponding to the execution result back to the micro application end.
S340, the native terminal receives the object function sent by the micro application terminal and the calling identification of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on the received user operation instruction.
S350, the native terminal executes the object function and determines an execution result of the object function.
And S360, the native terminal determines a callback function according to the execution result, wherein the callback function comprises a successful callback function and a failed callback function.
And S370, the micro application end monitors the execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
On the basis of the above embodiment, the present embodiment exemplarily introduces the information interaction flow between the native client and the micro-application client, where the smart letter is used as the native client, and the smart mail application is used as at least one micro-application embedded in the native client. Specifically, when the intelligent mail application is opened on the intelligent mail interface, mail details are checked later, the attachment is clicked for downloading, the intelligent mail calls a downloading function provided by the intelligent mail for the micro application, the downloading function and a calling identifier generated when the downloading function is called are downloaded by the intelligent mail when the intelligent mail receives the downloading function and the calling identifier, the downloading processing is carried out, after the processing is finished, a corresponding callback function is sent to the intelligent mail according to a processing result, and the intelligent mail determines the processing result according to the callback function.
The technical scheme of the embodiment of the invention specifically comprises the steps that the micro application end integrates an object function into an object function script, the needed object function is called when an instruction is obtained, a calling identifier is generated, the calling identifier and the object function are transmitted to the native end to be executed, the native end obtains the calling identifier and the object function of the micro application end, the object function is executed, the execution result is fed back to the micro application end to realize data interaction between the micro application end and the native end, then the micro application end monitors the execution result of the native end, and the interaction safety between the native end and the micro application is improved.
The following is an embodiment of an information interaction apparatus provided in an embodiment of the present invention, and the apparatus and the information interaction method in the foregoing embodiments belong to the same inventive concept, and details that are not described in detail in the embodiment of the information interaction apparatus may refer to the embodiment of the information interaction method.
Example four
Fig. 4 is a schematic structural diagram of an information interaction device according to a fourth embodiment of the present invention, which is applicable to information interaction between a native end and a micro application. On the basis of the above embodiments, the present embodiment mainly embodies a device executed by a micro application terminal in an information interaction process. The specific structure of the information interaction device comprises: an object creating module 410, an object function calling module 420, an object function sending module 430 and an execution result monitoring module 440; wherein the content of the first and second substances,
an object creating module 410, configured to obtain a user operation instruction, and create an object according to the user operation instruction;
an object function calling module 420, configured to call an object function corresponding to the user operation instruction from a pre-loaded object function script, and generate a calling identifier of the object function;
an object function sending module 430, configured to send the calling identifier and the object function to a native end, so that the native end executes the object function to obtain an execution result corresponding to the calling identifier, and feeds back the execution result and the calling identifier corresponding to the execution result to the micro application end;
and the execution result monitoring module 440 is configured to monitor, according to the call identifier, an execution result corresponding to the call identifier fed back by the originating terminal.
The technical scheme of the embodiment of the invention specifically comprises the steps of obtaining a user operation instruction, and creating an object according to the user operation instruction; calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function; and sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal. According to the technical scheme provided by the embodiment of the invention, the object function is integrated in the object function script, the required object function is called when the instruction is obtained, the calling identifier is generated, the calling identifier and the object function are transmitted to the native terminal for execution, the execution result of the native terminal is monitored, and the interaction safety between the native terminal and the micro application is improved.
On the basis of the above technical solution, before the object creating module 410, the apparatus further includes:
and the object function script preloading unit is used for preloading the object function script when a starting instruction of the micro application end is detected, wherein the object function script comprises an object function corresponding to each operation instruction.
On the basis of the technical scheme, the primary end and the micro application end carry out data transmission based on an IPC communication mode.
On the basis of the above technical solution, the execution result monitoring module 440 includes:
and the execution result determining unit is used for monitoring the calling identifier fed back by the native terminal and determining an execution result based on a callback function corresponding to the calling identifier.
The information interaction device provided by the embodiment of the invention can execute the information interaction method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the information interaction apparatus, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an information interaction device according to a fifth embodiment of the present invention, which is applicable to information interaction between a native end and a micro application. On the basis of the foregoing embodiments, the present embodiment mainly embodies a device executed by a native terminal in an information interaction process. The embodiment can be applied to the condition of information interaction between the native terminal and the micro application. The specific structure of the information interaction device comprises the following steps: an object function receiving module 510, an object function executing module 520, and an object function transmitting module 530; wherein the content of the first and second substances,
an object function receiving module 510, configured to receive an object function and a calling identifier of the object function, where the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction;
an object function executing module 520, configured to execute the object function and determine an execution result of the object function;
an object function sending module 530, configured to send the execution result of the object function and the call identifier of the object function to the micro application.
The technical scheme of the embodiment specifically includes receiving an object function and a calling identifier of the object function, which are sent by the micro application end, wherein the object function is called from a preset object function script by the micro application end based on a received user operation instruction; executing the object function and determining an execution result of the object function; and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal. According to the technical scheme of the embodiment of the invention, the calling identification and the object function of the micro application terminal are obtained, the object function is executed, and the execution result is fed back to the micro application terminal to realize data interaction between the micro application terminal and the native terminal, so that the interaction safety between the native terminal and the micro application is improved.
On the basis of the above technical solution, the object function sending module 530 includes:
a callback function determining unit, configured to determine a callback function according to the execution result, where the callback function includes a successful callback function and a failed callback function;
and the callback function sending unit is used for sending the callback function and the call identifier to the micro application terminal based on the determined callback function.
The information interaction device provided by the embodiment of the invention can execute the information interaction method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the information interaction apparatus, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 6, electronic device 12 is embodied in the form of a general purpose computing electronic device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 6, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and sample data acquisition by running the program stored in the system memory 28, for example, implementing an information interaction method provided by the embodiment of the present invention, where the information interaction method includes:
acquiring a user operation instruction, and creating an object according to the user operation instruction;
calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function;
sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal;
and monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
The information interaction method further comprises the following steps:
receiving an object function and a calling identifier of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction;
executing the object function and determining an execution result of the object function;
and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal.
Of course, those skilled in the art can understand that the processor may also implement the technical solution of the sample data obtaining method provided in any embodiment of the present invention.
EXAMPLE seven
The seventh embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements, for example, the steps of an information interaction method provided in this embodiment, where the information interaction method includes:
acquiring a user operation instruction, and creating an object according to the user operation instruction;
calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function;
sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal;
and monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
The information interaction method further comprises the following steps:
receiving an object function and a calling identifier of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction;
executing the object function and determining an execution result of the object function;
and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It will be understood by those skilled in the art that the modules or steps of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented by program code executable by a computing device, such that it may be stored in a memory device and executed by a computing device, or it may be separately fabricated into various integrated circuit modules, or it may be fabricated by fabricating a plurality of modules or steps thereof into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An information interaction method is applied to a micro application terminal, the micro application terminal is embedded into a native terminal, and the method comprises the following steps:
acquiring a user operation instruction, and creating an object according to the user operation instruction;
calling an object function corresponding to the user operation instruction from a pre-loaded object function script, and generating a calling identifier of the object function;
sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding back the execution result and the calling identifier corresponding to the execution result to the micro application terminal;
and monitoring an execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
2. The method according to claim 1, wherein before the obtaining of the user operation instruction, the method further comprises:
and when a starting instruction of the micro application end is detected, preloading the object function script, wherein the object function script comprises object functions corresponding to the operation instructions.
3. The method of claim 1, wherein the native client and the micro-application client perform data transmission based on IPC communication.
4. The method according to claim 1, wherein the monitoring, according to the calling identifier, an execution result corresponding to the calling identifier fed back by the originating terminal includes:
monitoring the calling identification fed back by the native terminal and determining an execution result based on a callback function corresponding to the calling identification.
5. An information interaction method is applied to a native terminal, wherein at least one micro application terminal is embedded in the native terminal, and the method comprises the following steps:
receiving an object function and a calling identifier of the object function, wherein the object function is called from a preset object function script by the micro application terminal based on a received user operation instruction;
executing the object function and determining an execution result of the object function;
and sending the execution result of the object function and the calling identifier of the object function to a micro application terminal.
6. The method according to claim 1, wherein the sending the execution result of the object function and the call identifier of the object function to a micro application side comprises:
determining a callback function according to the execution result, wherein the callback function comprises a successful callback function and a failed callback function;
and sending the call-back function and the call identifier to the micro application terminal based on the determined call-back function.
7. An information interaction device, which is applied to a micro application end, wherein the micro application end is embedded into a native end, and the device comprises:
the object creating module is used for acquiring a user operation instruction and creating an object according to the user operation instruction;
the object function calling module is used for calling an object function corresponding to the user operation instruction from a pre-loaded object function script and generating a calling identifier of the object function;
the object function sending module is used for sending the calling identifier and the object function to a native terminal so that the native terminal executes the object function to obtain an execution result corresponding to the calling identifier, and feeding the execution result and the calling identifier corresponding to the execution result back to the micro application terminal;
and the execution result monitoring module is used for monitoring the execution result corresponding to the calling identifier fed back by the primary end according to the calling identifier.
8. An information interaction device, applied to a native terminal, wherein at least one micro application terminal is embedded in the native terminal, the device comprising:
the object function receiving module is used for receiving an object function and a calling identifier of the object function, which are sent by the micro application end, wherein the object function is called from a preset object function script by the micro application end based on a received user operation instruction;
the object function execution module is used for executing the object function and determining the execution result of the object function;
and the object function sending module is used for sending the execution result of the object function and the calling identifier of the object function to the micro application terminal.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the information interaction method of any of claims 1-4 or 5-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the information interaction method according to any one of claims 1 to 4 or 5 to 6.
CN202110003393.1A 2021-01-04 2021-01-04 Information interaction method and device, electronic equipment and storage medium Pending CN112596824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110003393.1A CN112596824A (en) 2021-01-04 2021-01-04 Information interaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110003393.1A CN112596824A (en) 2021-01-04 2021-01-04 Information interaction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112596824A true CN112596824A (en) 2021-04-02

Family

ID=75206817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110003393.1A Pending CN112596824A (en) 2021-01-04 2021-01-04 Information interaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112596824A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220380A (en) * 2021-05-25 2021-08-06 北京小米移动软件有限公司 Calling method and device of local native program, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193610A (en) * 2017-05-31 2017-09-22 广东欧珀移动通信有限公司 A kind of loading method of dynamic base, device, terminal device and storage medium
CN107329843A (en) * 2017-06-30 2017-11-07 百度在线网络技术(北京)有限公司 Application program sound control method, device, equipment and storage medium
CN108845838A (en) * 2018-05-30 2018-11-20 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN109976831A (en) * 2019-03-28 2019-07-05 山东浪潮通软信息科技有限公司 Data interactive method between a kind of JavaScript and primary APP
CN110691136A (en) * 2019-09-29 2020-01-14 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN111459489A (en) * 2020-02-27 2020-07-28 湖南大学 Automatic service packaging method, system and application of dynamic library
CN111459685A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Communication method, device, equipment and readable medium of page end and native end
CN111722936A (en) * 2019-03-20 2020-09-29 阿里巴巴集团控股有限公司 Communication method and device of page end and native end, electronic equipment and readable medium
CN112100561A (en) * 2020-11-03 2020-12-18 南京研利科技有限公司 Method, electronic device and storage medium for calling local function by webpage

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193610A (en) * 2017-05-31 2017-09-22 广东欧珀移动通信有限公司 A kind of loading method of dynamic base, device, terminal device and storage medium
CN107329843A (en) * 2017-06-30 2017-11-07 百度在线网络技术(北京)有限公司 Application program sound control method, device, equipment and storage medium
CN108845838A (en) * 2018-05-30 2018-11-20 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN111459685A (en) * 2019-01-18 2020-07-28 阿里巴巴集团控股有限公司 Communication method, device, equipment and readable medium of page end and native end
CN111722936A (en) * 2019-03-20 2020-09-29 阿里巴巴集团控股有限公司 Communication method and device of page end and native end, electronic equipment and readable medium
CN109976831A (en) * 2019-03-28 2019-07-05 山东浪潮通软信息科技有限公司 Data interactive method between a kind of JavaScript and primary APP
CN110691136A (en) * 2019-09-29 2020-01-14 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN111459489A (en) * 2020-02-27 2020-07-28 湖南大学 Automatic service packaging method, system and application of dynamic library
CN112100561A (en) * 2020-11-03 2020-12-18 南京研利科技有限公司 Method, electronic device and storage medium for calling local function by webpage

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220380A (en) * 2021-05-25 2021-08-06 北京小米移动软件有限公司 Calling method and device of local native program, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10263910B2 (en) Resource calling for hybrid applications
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
US20110202854A1 (en) Metadata Capture for Screen Sharing
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
US20180159724A1 (en) Automatic task tracking
CN111246238A (en) Live broadcast method, device, storage medium and live broadcast system
CN108334779B (en) Application processing method, device and computing storage medium
CN113672405A (en) Data interaction system and page display method based on data interaction system
CN112769876B (en) Method, device, equipment and medium for acquiring equipment channel information
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN109165372B (en) Webpage loading method, device, equipment and storage medium
CN112596824A (en) Information interaction method and device, electronic equipment and storage medium
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
CN111813623A (en) Page monitoring method and device, electronic equipment and storage medium
CN109597952B (en) Webpage information processing method, system, electronic equipment and storage medium
CN114205156A (en) Message detection method and device for tangent plane technology, electronic equipment and medium
CN114928603A (en) Client software upgrading method and device, electronic equipment and medium
CN112631812A (en) Identification setting method and device, electronic equipment and storage medium
CN109669737B (en) Application processing method, device, equipment and medium
CN112596838B (en) Method, device, equipment and storage medium for displaying universal Web page
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN112257004B (en) Method, device, server and storage medium for page backup
CN112565271B (en) Web attack detection method and device
CN109376023B (en) Method and equipment for generating calling information and issuing return code group

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