CN113867848A - Method, device and equipment for calling graphic interface and readable storage medium - Google Patents

Method, device and equipment for calling graphic interface and readable storage medium Download PDF

Info

Publication number
CN113867848A
CN113867848A CN202010611529.2A CN202010611529A CN113867848A CN 113867848 A CN113867848 A CN 113867848A CN 202010611529 A CN202010611529 A CN 202010611529A CN 113867848 A CN113867848 A CN 113867848A
Authority
CN
China
Prior art keywords
graphical interface
function
interface function
webassembly
native
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
CN202010611529.2A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010611529.2A priority Critical patent/CN113867848A/en
Publication of CN113867848A publication Critical patent/CN113867848A/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/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/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

Landscapes

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

Abstract

The application discloses a calling method, a calling device and a calling equipment of a graphical interface and a readable storage medium, and relates to the field of program design. The method comprises the following steps: operating a target application program, wherein the target application program comprises a program part which is operated in a WebAssembly virtual machine in a WebAssembly coding mode; receiving a graphical interface calling signal; responding to the graphical interface calling signal, and transferring the graphical interface function to the corresponding native graphical interface function through the WebAssembly virtual machine to realize the purpose. The graphics interface function in the wap file is directly transferred to the native graphics interface function through the WebAssembly virtual machine, glue codes are avoided being set, transfer of the interface function is carried out through a JavaScript glue layer, the transfer efficiency of the graphics interface function is improved, and the integral running speed of a browser or a small program is improved.

Description

Method, device and equipment for calling graphic interface and readable storage medium
Technical Field
The embodiment of the application relates to the field of program design, in particular to a method, a device and equipment for calling a graphical interface and a readable storage medium.
Background
The WebAssembly language is a high-performance assembly-like language executed on the Web, has a compact binary format, can run at a performance close to a native language, and provides a compiling target for languages such as C/C + +, that is, after a program is written in the languages such as C/C + +, the program is compiled into the WebAssembly language by a compiler and then runs, and the WebAssembly language is usually applied to a browser or an applet in cooperation with JavaScript.
In the related art, the WebAssembly language may be applied to pure logic operation, and may also be applied to the calling process of drawing, audio, web, and the like, where when the WebAssembly language is applied to the calling process of drawing, audio, web, and the like, a glue code written by a JavaScript language is needed to call a corresponding WebAPI to implement, that is, when the WebAssembly program is executed, an OpenGL graphics interface needs to be converted into a WebGL interface call, and therefore a program written by a layer of JavaScript language is needed to be used as a link.
However, in the calling process of the drawing, the audio, the network and the like, the corresponding WebAPI needs to be called through the glue code to be realized, the calling overhead and the data transmission overhead are both large, and the whole realization performance and the operation speed of the calling process are poor.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for calling a graphical interface and a readable storage medium, which can improve the performance and the running speed of the graphical interface in the calling process. The technical scheme is as follows:
in one aspect, a method for invoking a graphical interface is provided, where the method includes:
running a target application program, wherein the target application program comprises a WebAssembly virtual machine and a first program code, the WebAssembly virtual machine is used for running a second program code in the target application program, and the second program code is obtained by compiling the first program code in a WebAssembly coding mode;
receiving a graphical interface calling signal in the running process of the second program code, wherein the graphical interface calling signal is used for indicating to call a graphical interface function, the graphical interface function is a function in the second program code, and the graphical interface function is obtained by compiling a native graphical interface function in the first program code;
and responding to the graphical interface calling signal, and transferring the graphical interface function to the native graphical interface function through the WebAssembly virtual machine.
In another aspect, an apparatus for invoking a graphical interface is provided, the apparatus comprising:
the system comprises an operation module, a first application program module and a second application program module, wherein the operation module is used for operating a target application program, the target application program comprises a WebAssembly virtual machine and a first program code, the WebAssembly virtual machine is used for operating a second program code in the target application program, and the second program code is obtained by compiling the first program code in a WebAssembly coding mode;
a receiving module, configured to receive a graphical interface call signal in an operation process of the second program code, where the graphical interface call signal is used to instruct to call a graphical interface function, the graphical interface function is a function in the second program code, and the graphical interface function is obtained by compiling a native graphical interface function in the first program code;
and the calling module is used for responding to the graphical interface calling signal and transferring the graphical interface function to the native graphical interface function through the WebAssembly virtual machine.
In another aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the method for invoking a graphical interface as described in any of the embodiments of the present application.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by the processor to implement the method for invoking a graphical interface as described in any of the embodiments of the present application.
In another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the calling method of the graphic interface in any one of the above embodiments.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the graphics interface function in the wap file is directly transferred to the native graphics interface function through the WebAssembly virtual machine, glue codes are avoided being set, transfer of the interface function is carried out through a JavaScript glue layer, the calling efficiency of the graphics interface function is improved, the running speed of calling logics such as drawing, audio and network is improved, and the overall running speed of a browser or a small program is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram illustrating a process for transferring a graphical interface function through glue codes in the related art according to an exemplary embodiment of the present application;
FIG. 2 is a process diagram for directly transferring native graphical interface functions provided by an exemplary embodiment of the present application;
FIG. 3 is a schematic illustration of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 4 is a flowchart of a method for invoking a graphical interface provided by an exemplary embodiment of the present application;
FIG. 5 is a schematic diagram of a WebAssembly virtual machine running in a racing game provided based on the embodiment shown in FIG. 4, in which a program written in native code is compiled into a wasm file;
FIG. 6 is a flowchart of a method for invoking a graphical interface provided by another exemplary embodiment of the present application;
FIG. 7 is a flowchart of a method for invoking a graphical interface, as provided by another illustrative embodiment of the present application;
FIG. 8 is a schematic diagram of a graphics interface in a wasm file being directly tuned to a native graphics interface by the WebAssembly virtual machine provided based on the embodiment shown in FIG. 7;
FIG. 9 is a block diagram illustrating an exemplary calling device of a graphical interface according to an embodiment of the present application;
FIG. 10 is a block diagram illustrating an exemplary calling device of a graphical interface according to an exemplary embodiment of the present application;
fig. 11 is a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, a brief description is given of terms referred to in the embodiments of the present application:
WebAssembly: the method is a low-level assembly language, and is a binary coding format with small volume and high loading speed. The WebAssembly module is typically used in conjunction with JavaScript to provide an efficient compilation target for low-level source languages such as C, C + + and Rust. Optionally, the WebAssembly and the JavaScript generally run in the same virtual machine, and the virtual machine cooperatively loads the two languages.
The computer is composed of various electronic elements, for convenience of representation, only two states of opening and closing exist, corresponding binary systems are 0 and 1, numbers and logic are represented by binary systems, namely machine codes which are directly loaded to the computer to run are extremely poor in readability of the machine codes, and therefore developers can compile programs through a high-level programming language and then run after the machine codes are compiled into the machine codes during program development. Because the similarity between the WebAssembly and the machine code is high, the WebAssembly can be quickly translated into the machine code of the corresponding architecture, and therefore, the running speed of the WebAssembly is closer to that of the machine code.
Illustratively, advantages of WebAssembly include at least one of:
1. the size is small, the browser or the applet only needs to load the compiled byte codes when running, and the same logic is smaller than that of a JavaScript file described by a character string;
2. the loading is fast, and due to the fact that the file size is small, and the explanation and the operation are not needed in the loading process, the WebAssembly can load and instantiate faster, and the waiting time of the operation is shortened;
3. the compatibility problem is less, and because WebAssembly is the byte code specification of the bottom layer, the change is less after the formulation is finished.
A graphical interface: namely, the OpenGL interface is called through WebAssembly, and the product is converted into the WebGL interface for calling.
Glue code: when the WebAssembly code is executed and an OpenGL graphical interface needs to be called, the WebGL graphical interface is converted into a code for calling the WebGL interface through JavaScript writing, and the glue code serves as a communication bridge to connect the OpenGL interface with the WebGL interface.
Optionally, the WebAssembly is in a binary coding format, and for internal functions, the functions can be declared as being imported from the outside or exported to the outside, an OpenGL graphics interface is called in the developer's code, and when the developer compiles a wap file (i.e. a file in the WebAssembly coding format), the OpenGL functions are declared as functions imported from the outside. Illustratively, a glDrawElements interface is called in developer code, and after a wasm file is compiled and generated, the wasm file is compiled into a wat format through a decompilation tool, wherein the glDrawElements are declared as import type functions, namely functions imported from the outside, the functions have no specific implementation in the wasm, and the specific implementation needs to be imported from the outside.
Taking the glDrawElements interface as an example for explanation, in the related art, the implementation of the function is written in the middle JavaScript glue code, and when the WebAssembly executes the glDrawElements interface function, the function is transferred to the glDrawElements function in the glue code, and then the method is transferred to the DrawElements method of the glue gl, whereas the method is transferred to the WebGL, and the implementation of the bottom layer returns to the glDrawElements method of the OpenGL. Illustratively, referring to fig. 1, as shown in fig. 1, first, an OpenGL function 110 is executed in a wap file generated by compilation, and the function is declared as a function imported from the outside, so that the function is transferred to a glue code written in JavaScript to implement a WebGL method 120, and finally transferred to a native OpenGL method 130.
However, performance loss is caused because a glue code needs to be transferred between an OpenGL interface and a WebGL interface in the related art, which is schematic, a developer calls an OpenGL function written in C + +, when the developer compiles the function into a wap file and executes the wap file, the WebGL interface which is converted into a JavaScript language is transferred in the middle, and then the WebGL interface is transferred back to the native OpenGL call, the middle glue code is the JavaScript language, performance is greatly different from that of the native code, and both the transfer overhead and the data transfer overhead are large, so that the performance of the WebAssembly is poor when the graphics program is executed.
In the embodiment of the application, when the graphical interface is called, the middle JavaScript glue code is removed, that is, when the WebAssembly virtual machine executes the wasm file, the graphical interface is directly docked to the native OpenGL function when the graphical interface is called. Illustratively, as shown in fig. 2, when an OpenGL function 210 is executed in a wasm file generated by compilation, the function is directly tuned to a native OpenGL function 220.
In conjunction with the above noun introduction, the application scenarios involved in the embodiments of the present application are described:
first, the method for invoking a graphical interface provided in the embodiment of the present application is applied to a browser, where WebAssembly and JavaScript run cooperatively in the browser, where WebAssembly is a scheme in which a code written in a non-JavaScript programming language runs in the browser, the browser includes a second program code running in a WebAssembly virtual machine in a WebAssembly coding manner, and the second program code is compiled from a first program code, and optionally, the first program code is written by a developer in a native language, and the developer writes the second program code in the native language, for example: and the OpenGL function calls written by C language, C + +, Rust and the like are directly transferred to an OpenGL native graphical interface through a WebAssembly virtual machine when the OpenGL function calls are compiled into a wap file and executed, namely the OpenGL graphical interface is called in a browser.
Illustratively, when a game picture of a racing car mini-game is played in a browser, the wasm file is directly transferred to an OpenGL native graphical interface through a WebAssembly virtual machine, so that the game picture is played.
Second, the method for calling a graphical interface provided in the embodiment of the present application is applied to an applet, where the applet is used to indicate that an application program that can be executed without downloading and installing the application program, and optionally, the applet may be a program that is hosted by a host program or a program provided in an operating system. Optionally, the applet includes at least one of a wechat applet (i.e., an applet hosted by the host program), a fast application (a program provided in the operating system that is applicable without download installation).
The WebAssembly and the JavaScript cooperatively run in the applet, the WebAssembly is a scheme that codes written by using a non-JavaScript programming language can run in the applet, the applet comprises a second program code running in a WebAssembly virtual machine in a WebAssembly coding mode, the second program code is compiled by a first program code, optionally, the first program code is written by a developer through a native language, and the developer can run through the native language such as: and the OpenGL function call written by C language, C + +, Rust and the like is directly transferred to an OpenGL native graphical interface through a WebAssembly virtual machine when the OpenGL function call is compiled into a wap file to be executed, namely the OpenGL graphical interface is called in the applet.
Illustratively, the small program is implemented as a racing game, and in the process of carrying out the racing game in the racing game, the wasm file is directly transferred to the OpenGL native graphical interface through the WebAssembly virtual machine, so that the playing of a game picture is realized.
It should be noted that the application scenarios of the browser and the applet are only illustrative examples in the embodiment of the present application, and the method for invoking the graphics interface provided in the present application may also be applied to other schemes for directly transferring the graphics interface to the native interface in the WebAssembly virtual machine, and the specific application scenarios are not limited in the embodiment of the present application.
It should be noted that the racing game described above is merely an illustrative example, and the graphical interface call may also be applied to, for example: the method comprises the following steps of operation processes of programs such as picture/video editing, image recognition, live video, developer tools and the like.
Schematically, an application scenario of an applet is taken as an example for illustration, and fig. 3 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, as shown in fig. 3, in the implementation environment, a server 310 and a terminal 320 are included, where the server 310 and the terminal 320 are connected through a communication network 330;
the terminal 320 is provided with a host program, and in the process of applying the host program by a user, the start of the applet is triggered, so that the terminal 320 acquires an application package of the applet from the server 310 and runs the applet through the application package, wherein the applet comprises a part running through a WebAssembly virtual machine, and when the call of the native OpenGL function is compiled into wasm for execution, the native OpenGL function is directly transferred to the native OpenGL function through the WebAssembly virtual machine.
The terminal 320 may be implemented as a mobile terminal such as a mobile phone, a tablet computer, a portable laptop computer, an intelligent wearable device, or a desktop computer; the server 310 may be implemented as a physical server or a cloud server, and the server 310 may be implemented as one server or a server cluster formed by a group of servers, which is not limited in this embodiment of the application.
With reference to the application scenario and the implementation environment, a method for invoking a graphical interface provided in an embodiment of the present application is introduced, and fig. 4 is a flowchart of a method for invoking a graphical interface provided in an exemplary embodiment of the present application, which is described by taking an application of the method in a terminal as an example, as shown in fig. 4, the method includes:
step 401, a target application program is run, and the target application program comprises a WebAssembly virtual machine and a first program code.
Optionally, the WebAssembly virtual machine is used for running a second program code in the target application program, and the second program code is compiled from the first program code in a WebAssembly coding manner. Optionally, the first program code is code written in a native language (e.g., C + +, Rust, etc.).
Optionally, the target application includes at least one of a browser and an applet, where the applet is used to indicate a download-free installed program, that is, the applet is a program that can be run in the terminal without downloading and installing. Alternatively, the applet may be a program that is hosted by the host program or a program provided in the operating system. Optionally, the applet includes at least one of a wechat applet (i.e., an applet hosted by the host program), a fast application (a program provided in the operating system that is applicable without download installation).
Illustratively, a wechat applet is taken as an example for description, in an application process of a user to wechat, starting of a racing applet is triggered, so that a terminal obtains a package of the racing applet from a server and runs the applet through the package, wherein the package includes a WebAssembly virtual machine and a program code. Optionally, the package further includes a JavaScript virtual machine. The program code can run in a WebAssembly virtual machine and can also run in a JavaScript virtual machine. Optionally, the WebAssembly virtual machine and the JavaScript virtual machine may also be implemented as the same virtual machine, and the form of the virtual machine is not limited in the embodiment of the present application.
Optionally, the WebAssembly is in a bytecode format, and different from JavaScript interpretation and operation, the bytecode of the WebAssembly has a higher similarity to the underlying machine code, and can be loaded and operated quickly, so that the performance is greatly improved compared with the JavaScript interpretation and operation, and the WebAssembly is not a programming language, but a bytecode standard, and needs to use a high-level programming language to compile the bytecode and place the bytecode in the WebAssembly virtual machine for operation.
When a developer develops a program, the developer writes the program through a high-level programming language, and then the program is compiled into machine code by a machine and runs the machine code. Because the similarity between the WebAssembly and the machine code is high, the WebAssembly can be quickly translated into the machine code of the corresponding architecture, and therefore, the running speed of the WebAssembly is closer to that of the machine code.
In step 402, a graphical interface call signal is received during execution of the second program code.
Optionally, the graphics interface call signal is used to instruct to call a graphics interface function, where the graphics interface function is a function in the second program code, and the graphics interface function is compiled from a native graphics interface function in the first program code. Optionally, the graphics interface function does not have a specific implementation of the function, but needs to be called to perform a specific implementation of the function in the native graphics interface function.
Optionally, taking an operation process of the applet as an example for explanation, when a user triggers a graphics function (such as game video playing) in the applet, compiling the native graphics interface calling method into a wap file to run in the WebAssembly virtual machine, and generating a graphics interface calling signal. And the compiled wasm file can be regarded as a part corresponding to the native graphical interface calling method in the second program code.
Referring to fig. 5, schematically, a start control 511 of a racing game is displayed in the applet interface 510, and when a trigger signal on the start control 511 is received, a program written in native code is compiled into a wasm file and runs in the WebAssembly virtual machine.
And 403, in response to the graphical interface calling signal, transferring the graphical interface function to the native graphical interface function through the WebAssembly virtual machine.
Optionally, a transfer path of the graphics interface function is defined in the WebAssembly virtual machine, and the graphics interface function is transferred to the corresponding native graphics interface function according to the transfer path, so as to implement the graphics function corresponding to the graphics interface.
Optionally, a modulation path corresponding to the graphical interface function is determined through the WebAssembly virtual machine, the modulation path includes a modulation target corresponding to the graphical interface function, and the graphical interface function is modulated to the native graphical interface function according to the modulation path.
Optionally, determining a native graphical interface function as a transposition target of the graphical interface function according to the transposition path, and transposing the graphical interface function to the native graphical interface function.
Illustratively, a developer calls an OpenGL function written in a C + + programming language, and when the OpenGL function is compiled into a WebAssembly file in an applet and executed, the WebAssembly virtual machine directly transfers the wasm file to a native OpenGL function developed in C + +, so as to realize the calling of the graphical interface.
To sum up, according to the method for calling the graphical interface provided in the embodiment of the present application, the WebAssembly virtual machine directly transfers the graphical interface function in the wasm file to the native graphical interface function, so that setting of the glue code is avoided, and transfer of the interface function is performed through the JavaScript glue layer, so that the calling efficiency of the graphical interface function is improved, thereby improving the operation speed of calling logics such as drawing, audio, network and the like, and improving the overall operation speed of the browser or the applet.
In an optional embodiment, a transfer path is set in the WebAssembly virtual machine, so as to implement direct transfer of a graphics interface function to a native graphics interface function, fig. 6 is a flowchart of a method for calling a graphics interface provided in another exemplary embodiment of the present application, which is described by taking application of the method in a terminal as an example, as shown in fig. 6, the method includes:
step 601, running a target application program, wherein the target application program comprises a WebAssembly virtual machine and a first program code.
Optionally, the WebAssembly virtual machine is used for running a second program code in the target application program, and the second program code is compiled from the first program code in a WebAssembly coding manner.
Optionally, the target application includes at least one of a browser and an applet.
Illustratively, a wechat applet is taken as an example for description, in an application process of a user to wechat, starting of a racing applet is triggered, so that a terminal obtains a package of the racing applet from a server and runs the applet through the package, wherein the package includes a WebAssembly virtual machine and a program code.
When a developer develops a program, the developer writes the program through a high-level programming language, and then the program is compiled into machine code by a machine and runs the machine code. Because the similarity between the WebAssembly and the machine code is high, the WebAssembly can be quickly translated into the machine code of the corresponding architecture, and therefore, the running speed of the WebAssembly is closer to that of the machine code.
In step 602, a graphical interface call signal is received during the operation of the second program code.
Optionally, the graphics interface call signal is used to instruct to call a graphics interface function, where the graphics interface function is a function in the second program code, and the graphics interface function is compiled from a native graphics interface function in the first program code.
Optionally, taking an operation process of the applet as an example for explanation, when a user triggers a graphics function (such as game video playing) in the applet, compiling the native graphics interface calling method into a wap file to run in the WebAssembly virtual machine, and generating a graphics interface calling signal.
Optionally, the first program code is developed in a native language, the first program code includes a function call method, the function call method is compiled into a WebAssembly coding mode, the function call method is used for calling a native graphical interface function, and in the WebAssembly virtual machine, the function call method compiled in the second program code is executed, and a graphical interface call signal is generated.
Step 603, determining a modulation path corresponding to the graphical interface function through the WebAssembly virtual machine.
Optionally, a transfer path corresponding to at least one graphics interface function is defined in the WebAssembly virtual machine, and when the graphics interface function called in the wasm file defines a transfer path in the WebAssembly virtual machine, the transfer path is acquired. Optionally, the graphical interface function is declared as an import function implemented by external import in the wap, and in the related art, the import parameter of the webassembly.
And step 604, transferring the graphic interface function to the native graphic interface function according to the transfer path to realize the corresponding graphic function.
In the embodiment of the application, after the transfer path of the graphics interface function is determined in response to a graphics interface call signal, namely in response to an externally-imported import function, the transfer path is directly transferred to the native function for realization.
Optionally, the performance loss of the conventional scheme mainly lies in glue codes transferred in an interface calling process, illustratively, a developer calls an OpenGL function written by a C + + programming language, and when the glue code is compiled into a wap file and executed, the middle part of the OpenGL function is converted into a JavaScript WebGL call, and then the WebGL call returns to a native OpenGL call, where the middle glue code is a JavaScript language, and the performance is relatively large compared with the native code, so that the call overhead and the data transmission overhead are relatively large, and the performance of the WebAssembly is relatively poor when executing a graphics program.
In the embodiment of the application, through the WebAssembly virtual machine, the JavaScript glue codes in the middle are removed, and the graphical interface function is directly connected to the native OpenGL function in an abutting mode, so that the performance in the graphical interface calling process is improved.
To sum up, according to the method for calling the graphical interface provided in the embodiment of the present application, the WebAssembly virtual machine directly transfers the graphical interface function in the wasm file to the native graphical interface function, so that setting of the glue code is avoided, and transfer of the interface function is performed through the JavaScript glue layer, so that the calling efficiency of the graphical interface function is improved, thereby improving the operation speed of calling logics such as drawing, audio, network and the like, and improving the overall operation speed of the browser or the applet.
According to the method provided by the embodiment, after the graphical interface calling signal is received, the graphical interface function is directly transferred to the corresponding native graphical interface function by determining the transfer path, the glue code is avoided being set, and the transfer of the interface function is performed through the JavaScript glue layer, so that the calling efficiency of the graphical interface function is improved.
In an alternative embodiment, in response to an externally imported import function, a graphical interface function is directly transferred to a native function implementation, fig. 7 is a flowchart of a method for invoking a graphical interface according to another exemplary embodiment of the present application, which is described by taking as an example that the method is applied to a terminal, and as shown in fig. 7, the method includes:
step 701, running a target application program, wherein the target application program comprises a WebAssembly virtual machine and a first program code.
Optionally, the WebAssembly virtual machine is used for running a second program code in the target application program, and the second program code is compiled from the first program code in a WebAssembly coding manner.
Optionally, the target application includes at least one of a browser and an applet.
Illustratively, a wechat applet is taken as an example for description, in an application process of a user to wechat, starting of a racing applet is triggered, so that a terminal obtains a package of the racing applet from a server and runs the applet through the package, wherein the package includes a WebAssembly virtual machine and a program code.
When a developer develops a program, the developer writes the program through a high-level programming language, and then the program is compiled into machine code by a machine and runs the machine code. Because the similarity between the WebAssembly and the machine code is high, the WebAssembly can be quickly translated into the machine code of the corresponding architecture, and therefore, the running speed of the WebAssembly is closer to that of the machine code.
In step 702, a graphical interface call signal is received during the operation of the second program code.
Optionally, the graphics interface call signal is used to instruct to call a graphics interface function, where the graphics interface function is a function in the second program code, and the graphics interface function is compiled from a native graphics interface function in the first program code.
Optionally, taking an operation process of the applet as an example for explanation, when a user triggers a graphics function (such as game video playing) in the applet, compiling the native graphics interface calling method into a wap file to run in the WebAssembly virtual machine, and generating a graphics interface calling signal.
Optionally, the target application program includes a function call method developed in a native language, the function call method is compiled into a WebAssembly coding mode, and the function call method is used for calling a native graphical interface function, executing the compiled function call method in a WebAssembly virtual machine, and generating a graphical interface call signal.
And 703, generating an external function import signal according to the graphical interface call signal.
Optionally, since the graphical interface such as OpenGL is declared as a function imported from the outside, that is, an import function, in the legacy call process, the import parameter of the webassembly.
In the embodiment of the application, the JavaScript layer is skipped to realize the import function, and the graphics interface function is determined to be the import function, namely the external import function, in response to the graphics interface call signal, so that the external function import signal is generated.
Step 704, transferring the graphic interface function to the native graphic interface function according to the external function import signal, so as to implement the corresponding graphic function.
Optionally, when executing the wap file, the WebAssembly virtual machine directly transfers to the native function implementation when encountering an externally-imported import function. That is, in response to the graphics interface call signal, an external function import signal is generated, the external function import signal is used to indicate that the graphics interface function is an externally imported import function, and the graphics interface function is directly transferred to the native graphics interface function according to the external function import signal.
Schematically, referring to fig. 8, a JavaScript module 810 loads a wasm file in a WebAssembly virtual machine 820, and when an OpenGL graphics interface needs to be called, the WebAssembly virtual machine directly transfers the OpenGL graphics interface in the wasm file to a native C + + OpenGL graphics interface for implementation.
Through tests, when a WebAssembly program video of a racing program runs on a mobile phone with a specific model, the time consumed by calling each frame of graphic interface function is reduced from 90ms to 10ms, and the speed is improved by 9 times.
To sum up, according to the method for calling the graphical interface provided in the embodiment of the present application, the WebAssembly virtual machine directly transfers the graphical interface function in the wasm file to the native graphical interface function, so that setting of the glue code is avoided, and transfer of the interface function is performed through the JavaScript glue layer, so that the calling efficiency of the graphical interface function is improved, thereby improving the operation speed of calling logics such as drawing, audio, network and the like, and improving the overall operation speed of the browser or the applet.
According to the method provided by the embodiment, the function type of the graphical interface function is determined, when the function type is an externally-introduced import type function, the graphical interface function in the wasm file is directly transferred to the native graphical interface function, glue codes are avoided being set, transfer of the interface function is performed through a JavaScript glue layer, and the transfer efficiency of the graphical interface function is improved.
Fig. 9 is a block diagram illustrating a structure of a calling apparatus of a graphical interface according to an exemplary embodiment of the present application, where, as shown in fig. 9, the apparatus includes:
an operation module 910, configured to operate a target application program, where the target application program includes a WebAssembly virtual machine and a first program code, the WebAssembly virtual machine is configured to operate a second program code in the target application program, and the second program code is obtained by compiling the first program code in a WebAssembly coding manner;
a receiving module 920, configured to receive a graphical interface call signal in an operation process of the second program code, where the graphical interface call signal is used to instruct to call a graphical interface function, the graphical interface function is a function in the second program code, and the graphical interface function is obtained by compiling a native graphical interface function in the first program code;
a calling module 930, configured to, in response to the graphics interface calling signal, transfer the graphics interface function to the native graphics interface function through the WebAssembly virtual machine.
In an optional embodiment, a modulation path of the graphic interface function is defined in the WebAssembly virtual machine;
as shown in fig. 10, the invoking module 930 includes:
a determining unit 931, configured to determine, by the WebAssembly virtual machine, the modulation path corresponding to the graphics interface function, where the modulation path includes a modulation target corresponding to the graphics interface function;
a calling unit 932, configured to transfer the graphical interface function to the native graphical interface function according to the transfer path.
In an optional embodiment, the invoking unit 932 is specifically configured to determine, according to the transferring path, the native graphical interface function as the transferring target of the graphical interface function; transferring the graphical interface function to the native graphical interface function.
In an alternative embodiment, the first program code is developed in a native language, the first program code including a function call method therein;
the receiving module 920 is specifically configured to compile the function calling method into the WebAssembly coding manner, where the function calling method is used to call the native graphical interface function; and executing the function calling method compiled in the second program code in the WebAssembly virtual machine to generate the graphical interface calling signal.
In an optional embodiment, the invoking module 930 is specifically configured to generate an external function import signal according to the graphics interface invoking signal; and transferring the graphic interface function to the native graphic interface function according to the external function import signal.
In an optional embodiment, the target application program comprises at least one of a browser and an applet;
wherein the applet is used to indicate the download-free installed program.
To sum up, the graphics interface calling device provided in the embodiment of the present application directly transfers the graphics interface function in the wasm file to the native graphics interface function through the WebAssembly virtual machine, avoids setting the glue code, and improves the calling efficiency of the graphics interface function through transferring the interface function by the JavaScript glue layer, thereby improving the operation speed of calling logics such as drawing, audio, network, and the like, and improving the overall operation speed of the browser or the applet.
Fig. 11 shows a block diagram of a terminal 1100 according to an exemplary embodiment of the present application. The terminal 1100 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1100 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
In general, terminal 1100 includes: a processor 1101 and a memory 1102.
Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement a calling method of a graphical interface provided by method embodiments of the present application.
In some embodiments, the terminal 1100 may further include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, touch display screen 1105, camera 1106, audio circuitry 1107, positioning component 1108, and power supply 1109.
The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 may be implemented on separate chips or circuit boards, which is not limited by this embodiment.
The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1104 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1105 may be one, providing the front panel of terminal 1100; in other embodiments, the display screens 1105 can be at least two, respectively disposed on different surfaces of the terminal 1100 or in a folded design; in still other embodiments, display 1105 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.
Positioning component 1108 is used to locate the current geographic position of terminal 1100 for purposes of navigation or LBS (Location Based Service). The Positioning component 1108 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1109 is configured to provide power to various components within terminal 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1100 can also include one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.
Acceleration sensor 1111 may detect acceleration levels in three coordinate axes of a coordinate system established with terminal 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the touch display screen 1105 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1112 may detect a body direction and a rotation angle of the terminal 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user with respect to the terminal 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1113 may be disposed on a side bezel of terminal 1100 and/or on an underlying layer of touch display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the terminal 1100, the holding signal of the terminal 1100 from the user can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the touch display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1114 may be disposed on the front, back, or side of terminal 1100. When a physical button or vendor Logo is provided on the terminal 1100, the fingerprint sensor 1114 may be integrated with the physical button or vendor Logo.
Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the touch display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is turned down. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.
Proximity sensor 1116, also referred to as a distance sensor, is typically disposed on a front panel of terminal 1100. Proximity sensor 1116 is used to capture the distance between the user and the front face of terminal 1100. In one embodiment, the touch display screen 1105 is controlled by the processor 1101 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 becomes gradually larger, the touch display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of terminal 1100, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
Embodiments of the present application further provide a computer device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the calling method of the graphics interface provided by the foregoing method embodiments.
Embodiments of the present application further provide a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored on the computer-readable storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the method for calling a graphical interface provided by the foregoing method embodiments.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the calling method of the graphic interface in any one of the above embodiments.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (14)

1. A method for invoking a graphical interface, the method comprising:
running a target application program, wherein the target application program comprises a WebAssembly virtual machine and a first program code, the WebAssembly virtual machine is used for running a second program code in the target application program, and the second program code is obtained by compiling the first program code in a WebAssembly coding mode;
receiving a graphical interface calling signal in the running process of the second program code, wherein the graphical interface calling signal is used for indicating to call a graphical interface function, the graphical interface function is a function in the second program code, and the graphical interface function is obtained by compiling a native graphical interface function in the first program code;
and responding to the graphical interface calling signal, and transferring the graphical interface function to the native graphical interface function through the WebAssembly virtual machine.
2. The method according to claim 1, wherein a modulation path of the graphics interface function is defined in the WebAssembly virtual machine;
the transferring, by the WebAssembly virtual machine, the graphics interface function to the native graphics interface function in response to the graphics interface call signal includes:
determining the modulation path corresponding to the graphic interface function through the WebAssembly virtual machine, wherein the modulation path comprises a modulation target corresponding to the graphic interface function;
and transferring the graphic interface function to the native graphic interface function according to the transfer path.
3. The method of claim 2, wherein said transferring said graphical interface function to said native graphical interface function according to said transfer path comprises:
determining the native graphical interface function as the transposition target of the graphical interface function according to the transposition path;
transferring the graphical interface function to the native graphical interface function.
4. The method according to any one of claims 1 to 3, wherein the first program code is developed in a native language, and the first program code includes a function call method;
the receiving a graphical interface call signal during the operation of the second program code includes:
compiling the function calling method into the WebAssembly coding mode, wherein the function calling method is used for calling the native graphic interface function;
and executing the function calling method compiled in the second program code in the WebAssembly virtual machine to generate the graphical interface calling signal.
5. The method according to any one of claims 1 to 3, wherein said transferring, by said WebAssembly virtual machine, said graphics interface function to said native graphics interface function in response to said graphics interface call signal comprises:
generating an external function import signal according to the graphical interface calling signal;
and transferring the graphic interface function to the native graphic interface function according to the external function import signal.
6. The method according to any one of claims 1 to 3,
the target application program comprises at least one of a browser and an applet;
wherein the applet is used to indicate the download-free installed program.
7. An apparatus for invoking a graphical interface, the apparatus comprising:
the system comprises an operation module, a first application program module and a second application program module, wherein the operation module is used for operating a target application program, the target application program comprises a WebAssembly virtual machine and a first program code, the WebAssembly virtual machine is used for operating a second program code in the target application program, and the second program code is obtained by compiling the first program code in a WebAssembly coding mode;
a receiving module, configured to receive a graphical interface call signal in an operation process of the second program code, where the graphical interface call signal is used to instruct to call a graphical interface function, the graphical interface function is a function in the second program code, and the graphical interface function is obtained by compiling a native graphical interface function in the first program code;
and the calling module is used for responding to the graphical interface calling signal and transferring the graphical interface function to the native graphical interface function through the WebAssembly virtual machine.
8. The apparatus according to claim 7, wherein a modulation path of the graphics interface function is defined in the WebAssembly virtual machine;
the calling module comprises:
a determining unit, configured to determine, by the WebAssembly virtual machine, the modulation path corresponding to the graphical interface function, where the modulation path includes a modulation target corresponding to the graphical interface function;
and the calling unit is used for transferring the graphic interface function to the native graphic interface function according to the transfer path.
9. The apparatus according to claim 8, wherein the invoking unit is specifically configured to determine the native graphical interface function as the redirection target of the graphical interface function according to the redirection path; transferring the graphical interface function to the native graphical interface function.
10. The apparatus according to any one of claims 7 to 9, wherein the first program code is developed in a native language, and the first program code includes a function call method therein;
the receiving module is specifically configured to compile the function calling method into the WebAssembly coding mode, where the function calling method is used to call the native graphical interface function; and executing the function calling method compiled in the second program code in the WebAssembly virtual machine to generate the graphical interface calling signal.
11. The apparatus according to any one of claims 7 to 9, wherein the invoking module is specifically configured to generate an external function import signal according to the graphical interface invoking signal; and transferring the graphic interface function to the native graphic interface function according to the external function import signal.
12. The apparatus according to any one of claims 7 to 9,
the target application program comprises at least one of a browser and an applet;
wherein the applet is used to indicate the download-free installed program.
13. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement a method of invocation of a graphical interface as claimed in any one of claims 1 to 6.
14. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a calling method of a graphical interface according to any one of claims 1 to 6.
CN202010611529.2A 2020-06-30 2020-06-30 Method, device and equipment for calling graphic interface and readable storage medium Pending CN113867848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010611529.2A CN113867848A (en) 2020-06-30 2020-06-30 Method, device and equipment for calling graphic interface and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010611529.2A CN113867848A (en) 2020-06-30 2020-06-30 Method, device and equipment for calling graphic interface and readable storage medium

Publications (1)

Publication Number Publication Date
CN113867848A true CN113867848A (en) 2021-12-31

Family

ID=78981114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010611529.2A Pending CN113867848A (en) 2020-06-30 2020-06-30 Method, device and equipment for calling graphic interface and readable storage medium

Country Status (1)

Country Link
CN (1) CN113867848A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115982784A (en) * 2023-03-21 2023-04-18 紫光同芯微电子有限公司 Method and device for calling function by WebAssembly module
CN116991600A (en) * 2023-06-15 2023-11-03 上海一谈网络科技有限公司 Method, device, equipment and storage medium for processing graphic call instruction
WO2023245375A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Method and apparatus for binding wasm rapid application framework data, and electronic device and storage medium
CN117472336A (en) * 2023-12-28 2024-01-30 芯瞳半导体技术(山东)有限公司 Code generating device based on program API, method, equipment and medium thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023245375A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Method and apparatus for binding wasm rapid application framework data, and electronic device and storage medium
CN115982784A (en) * 2023-03-21 2023-04-18 紫光同芯微电子有限公司 Method and device for calling function by WebAssembly module
CN115982784B (en) * 2023-03-21 2023-09-12 紫光同芯微电子有限公司 Method and device for calling function by WebAsssembly module
CN116991600A (en) * 2023-06-15 2023-11-03 上海一谈网络科技有限公司 Method, device, equipment and storage medium for processing graphic call instruction
CN116991600B (en) * 2023-06-15 2024-05-10 上海一谈网络科技有限公司 Method, device, equipment and storage medium for processing graphic call instruction
CN117472336A (en) * 2023-12-28 2024-01-30 芯瞳半导体技术(山东)有限公司 Code generating device based on program API, method, equipment and medium thereof
CN117472336B (en) * 2023-12-28 2024-04-12 芯瞳半导体技术(山东)有限公司 Code generating device based on program API, method, equipment and medium thereof

Similar Documents

Publication Publication Date Title
CN109359262B (en) Animation playing method, device, terminal and storage medium
CN108595226B (en) Dynamic loading method and device and computer readable storage medium
CN111752666B (en) Window display method, device and terminal
CN113867848A (en) Method, device and equipment for calling graphic interface and readable storage medium
CN113994317A (en) User interface layout method and electronic equipment
CN108717365B (en) Method and device for executing function in application program
CN110362366B (en) Application interface display method and device
CN113190362B (en) Service calling method and device, computer equipment and storage medium
CN113409427B (en) Animation playing method and device, electronic equipment and computer readable storage medium
CN112749362A (en) Control creating method, device, equipment and storage medium
CN111125602B (en) Page construction method, device, equipment and storage medium
CN111737100A (en) Data acquisition method, device, equipment and storage medium
CN107943484B (en) Method and device for executing business function
CN110677713A (en) Video image processing method and device and storage medium
CN109634872B (en) Application testing method, device, terminal and storage medium
CN113469360A (en) Inference method and device
CN112163677B (en) Method, device and equipment for applying machine learning model
CN115543276A (en) Method, system and electronic equipment for realizing software development
CN113538633A (en) Animation playing method and device, electronic equipment and computer readable storage medium
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN113268234A (en) Page generation method, device, terminal and storage medium
CN109101166B (en) Audio control method, device and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN113051015A (en) Page rendering method and device, electronic equipment and storage medium
CN112231619A (en) Conversion method, conversion device, electronic equipment and storage medium

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