CN116662695A - Method and related device for communication between native application and Web page - Google Patents

Method and related device for communication between native application and Web page Download PDF

Info

Publication number
CN116662695A
CN116662695A CN202210147153.3A CN202210147153A CN116662695A CN 116662695 A CN116662695 A CN 116662695A CN 202210147153 A CN202210147153 A CN 202210147153A CN 116662695 A CN116662695 A CN 116662695A
Authority
CN
China
Prior art keywords
native application
web page
operating system
function
configuration parameters
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
CN202210147153.3A
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 Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN202210147153.3A priority Critical patent/CN116662695A/en
Publication of CN116662695A publication Critical patent/CN116662695A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a method and a related device for communication between a native application and a Web page, and relates to the technical field of computers. In the present application: when the Web page determines that a target function of the native application needs to be called, function calling information is sent to the native application; the Web page receives a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application under a corresponding operation system mode through target configuration parameters defined by corresponding service codes, and the target configuration parameters defined by the service codes under any operation system mode are determined based on a system general communication protocol between the native application and the Web page. The target configuration parameters defined by each service code are determined based on the system general communication protocol no matter what system the native application runs under, i.e. the configuration parameters defined in each service code are consistent, so that the workload of adaptation is reduced and the cost of adaptation is reduced.

Description

Method and related device for communication between native application and Web page
Technical Field
The application relates to the technical field of computers, in particular to a method for communication between a native application and a Web page and a related device.
Background
With the development of network technology, more and more clients are in the field of view of the public, and the clients have both a Native function and a page function, namely a lightweight browser is embedded in a Native (Native) application so as to support the function of a world wide Web (Web) page; and the client is supported by operating systems of various systems.
When the Web page function is turned on in the currently running client, communication will be made between the Native (Native) application and the Web page based on the service code. However, under different operating systems, the defined configuration parameters are different in the service codes specified by the native application; at this time, different adaptation codes need to be developed for Web pages to realize business logic communication.
Therefore, under different operating systems, when the configuration parameters defined in the service codes of the same native application are inconsistent, the workload for Web page adaptation is increased, the adaptation cost is increased, and the research and development efficiency is further reduced.
Disclosure of Invention
The application provides a method and a related device for communication between a native application and a Web page, which are used for avoiding the condition that configuration parameters defined in service codes of the same native application are inconsistent under different operating systems, reducing the workload of Web page adaptation and reducing the adaptation cost.
In a first aspect, an embodiment of the present application provides a method for communicating a native application with a Web page, where the method is applied to the Web page, and the method includes:
when determining that the target function of the native application needs to be called, sending function calling information to the native application;
and receiving a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application under the corresponding operation system mode through the target configuration parameters defined by the corresponding service codes, and the target configuration parameters defined in the service codes under any operation system mode are determined based on a system general communication protocol between the native application and the Web page.
In a second aspect, an embodiment of the present application provides a method for communicating a native application with a Web page, where the method is applied to a native application running in any operating system format, and the method includes:
receiving function call information sent by a Web page;
under the current operating system, determining a function callback result corresponding to the function call information through a target configuration parameter defined by a service code, and returning the function callback result to the Web page; the target configuration parameters defined in the service codes are determined based on a system general communication protocol between the native application and the Web page.
In a third aspect, an embodiment of the present application provides an apparatus for communicating a native application with a Web page, where the apparatus is applied to the Web page, the apparatus includes:
the sending unit is used for sending function calling information to the native application when determining that the target function of the native application needs to be called;
the first receiving unit is used for receiving a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application under a corresponding operation system mode through target configuration parameters defined by corresponding service codes, and the target configuration parameters defined in the service codes under any operation system mode are determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the first receiving unit is specifically configured to:
receiving a function callback result returned by the native application through a defined universal interface; the universal interface is adapted to an interface callback value obtained from a system universal communication protocol.
In a fourth aspect, an embodiment of the present application provides a method for communicating a native application with a Web page, where the method is applied to a native application running in any operating system format, and the device includes:
The second receiving unit is used for receiving the function call information sent by the Web page;
the return unit is used for determining a function callback result corresponding to the function call information through a target configuration parameter defined by the service code under the current operating system, and returning the function callback result to the Web page; the target configuration parameters defined in the service codes are determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the service code is determined by:
carrying out abstract syntax tree scanning analysis on a system general communication protocol to generate a syntax tree containing target configuration parameters;
traversing the grammar tree through the iterator to generate service codes respectively corresponding to the native application under each operating system mode.
In an alternative embodiment, abstract syntax tree scan analysis is performed on a system generic communication protocol to generate a syntax tree containing target configuration parameters, comprising:
converting the system general communication protocol into an identifier sequence based on defined lexical rules by a lexical analyzer, wherein the identifier sequence contains target configuration parameters;
The identifier sequence is converted by a parser into a syntax tree containing target configuration parameters based on defined syntax rules.
In an alternative embodiment, the method further includes, after performing abstract syntax tree scan analysis on the system general communication protocol to generate a syntax tree including the target configuration parameters:
re-editing the grammar tree to obtain a target grammar tree containing target configuration parameters, wherein the level number of the target grammar tree is smaller than that of the grammar tree.
In an optional implementation manner, traversing the syntax tree by an iterator to generate service codes corresponding to the native applications under each operating system, where the service codes include:
if the native application runs under the first operating system, traversing the grammar tree through a first iterator supported by the first operating system to generate a service code in a Java code format;
if the native application runs under the second operating system, traversing the grammar tree through a second iterator supported by the second operating system to generate the service codes in the OC code format.
In an optional implementation manner, after generating the service codes corresponding to the native applications in each operating system format according to the syntax tree, the method further includes:
And submitting the generated service codes to corresponding information management databases respectively.
In an alternative embodiment, the target configuration parameters include: calling a method, requesting parameters and an interface callback value;
the return unit is specifically configured to: and determining a function callback result through a calling method and request parameters defined by the service codes, and returning the function callback result to the Web page through an interface corresponding to the interface callback value.
In a fifth aspect, an embodiment of the present application provides an apparatus for communicating a native application with a Web page, including: a memory and a processor, wherein the memory is for storing computer instructions; and the processor is used for executing computer instructions to realize the steps of the method for communicating the native application and the Web page provided by the embodiment of the application.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium storing computer instructions that, when executed by a processor, implement the steps of a method for communicating with a Web page for a native application provided by embodiments of the present application.
In a seventh aspect, embodiments of the present application provide a computer program product comprising computer instructions stored in a computer readable storage medium; when the processor of the electronic device reads the computer instructions from the computer readable storage medium, the processor executes the computer instructions, so that the electronic device executes the steps of the method for communicating the native application with the Web page provided by the embodiment of the application.
The application has the following beneficial effects:
in the scheme for providing communication between the native application and the Web page, when the Web page determines that a target function of the native application needs to be called, function calling information is sent to the native application, and the native application is an application running in any operating system mode; the Web page receives a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application through target configuration parameters defined by corresponding service codes under a corresponding operating system mode, and the target configuration parameters defined by any service code are determined based on a system general communication protocol between the native application and the Web page. In the embodiment of the application, no matter what system of operating system the native application runs, the target configuration parameters defined by each service code corresponding to the native application are determined based on the system general communication protocol, namely, the configuration parameters defined in each service code are consistent, so that the condition that the configuration parameters defined in each service code of the same native application are inconsistent under different operating systems is avoided, the workload of Web page adaptation is further reduced, and the adaptation cost is reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method for generating a service code according to an embodiment of the present application;
FIG. 3 is a schematic diagram of generating a service code according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a syntax tree according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another syntax tree according to an embodiment of the present application;
FIG. 6 is a schematic diagram of submitting generated service codes to corresponding information management databases respectively according to an embodiment of the present application;
FIG. 7 is a block diagram of a specific implementation of generating a service code according to an embodiment of the present application;
FIG. 8 is a tool for automatically generating a service code according to an embodiment of the present application;
FIG. 9 is a flowchart of a method for implementing native applications and Web pages according to an embodiment of the present application;
FIG. 10 is a flowchart of a method for a native application to communicate with a Web page according to an embodiment of the present application;
FIG. 11 is a flowchart of a method for a native application to communicate with a Web page in accordance with an embodiment of the present application;
FIG. 12 is a block diagram of a device for communication between a native application and a Web page according to an embodiment of the present application;
FIG. 13 is a block diagram of another device for communication between a native application and a Web page according to an embodiment of the present application;
fig. 14 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantageous effects of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to facilitate a better understanding of the technical solutions of the present application, the following description will describe some of the concepts related to the present application.
Native application: an application designed to run in the environment of the terminal device (machine language and operating system).
Web page: is a page in a Web application, and is generally a basic element forming a Web browser, and is used for displaying contents such as pictures and characters.
Communication protocol: the data conversion rule is that the code needs to receive and send data when running, the protocol data packet prescribes the conversion format of the data, such as data length, binary conversion and equivalent, and the communication protocol can be self-defined, for example, the communication protocol corresponding to the IO interface is responsible for converting the data format, and the communication protocol corresponding to the process interface is responsible for processing the data, namely, floating point number operation rule and the like.
Abstract syntax tree (Abstract Syntax Tree, AST): in computer science, an abstract syntax tree may be simply referred to as a syntax tree, an abstract representation of the syntax structure of source code, representing the syntax structure of a programming language in the form of a tree, each node on the tree representing a structure in the source code. This is so "abstract" in that the abstract syntax tree does not represent every detail of the actual syntax appearance. For example, nested brackets are implicit in the tree structure and are not presented in the form of nodes; and conditional jump statements like if-condition-then can be represented using a node with two branches.
Syntax analyzer: typically appearing as a component of a compiler or interpreter, which functions to perform a grammar check and construct a data structure (typically a hierarchical data structure such as a parse tree, abstract syntax tree, etc.) composed of the entered words.
The parser typically uses a separate lexical analyzer to separate individual "words" from the input character stream and takes the word stream as its input.
The first operating system and the second operating system are computer programs developed in different computer languages for managing computer hardware and software resources. And the application program running on the application layer of the first operating system is written by using a development language corresponding to the first operating system; similarly, the application program running on the application layer of the second operating system is written by using a development language corresponding to the second operating system;
for example: the first operating system is an Android operating system, and the Android operating system is developed by taking Java language as a development tool, so that application programs on an application layer of the Android operating system are written by Java, and Java is taken as a development language; the second operating system is an iOS operating system which is developed by taking OC language as a development tool, so that an application program on an application layer of the iOS operating system is written by using OC and the OC is taken as a development language;
It should be noted that, the first operating system may be any operating system developed by Java, and may be a Linux operating system in addition to an Android operating system; similarly, the second operating system may be any operating system developed by using OC, and may be a mac operating system in addition to the iOS operating system; and developing operating systems using Java and OC are merely illustrative, embodiments of the present application may also be applied to operating systems developed using other computer languages;
the Java is an object-oriented programming language, so that various advantages of the C++ language are absorbed, concepts of inheritance, pointers and the like which are difficult to understand in the C++ are abandoned, and therefore the Java has the characteristics of powerful functions, simplicity and easiness in use. OC (object-C) is a package for C language, and a layer of object-oriented grammar is added on the basis of C language, so that the OC code is fully compatible with C language, and C, even c++ code can be used.
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The terms "first," "second," and the like herein are used for descriptive purposes only and are not to be construed as either explicit or implicit relative importance or to indicate the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The following briefly describes the design concept of the embodiment of the present application:
with the development of network technology, more and more clients are in the public view, and the clients have both a Native function and a page function, i.e. a lightweight browser is embedded in a Native (Native) application to support a world wide Web (Web) page function. Because the native application can be directly operated under any standard operating system, for example, an application A developed for an Android system is directly operated under the Android system, or an application A developed for an iOS system is directly operated under the iOS system; therefore, the client is supported by operating systems of various systems.
When the function of the Web page is started in the currently running client, because the authority of the Web page is limited, communication with the original application is needed, and certain function information in the original application is acquired to realize the corresponding function in the client, a communication bridge (JSbridge) is needed to be created between the original application and the Web page, and communication between the original application and the Web page is realized based on the JSbridge. When both native applications and Web pages communicate through Jsbridge, support of business code is required.
Currently, under different operating systems, defined configuration parameters are different in service codes specified for the same native application; at this time, if the Web page needs to adapt to different operating systems, different adapting codes need to be developed for the Web page to realize service logic communication. For example: the Android video client and the iOS video client respectively correspond to service codes, and respectively define corresponding configuration parameters; at this time, the adaptation work of the Web page needs to be performed for the Android video client and the iOS video client respectively, so as to realize service logic communication.
Therefore, under different operating systems, when the configuration parameters defined in the service codes of the same native application are inconsistent, the workload for Web page adaptation is increased, the adaptation cost is increased, and the research and development efficiency is further reduced.
In view of this, the embodiment of the application provides a scheme for generating service codes, and a scheme for executing the service codes by the native application and communicating with the Web page.
In the embodiment of the application, a defined system general communication protocol between the native application and the Web page is analyzed, and a service code corresponding to the native application running under a first operating system and a service code corresponding to the native application running under a second operating system are automatically generated; at this time, no matter the service code corresponding to the native application running under the first operating system or the service code corresponding to the native application running under the second operating system, the configuration parameters in the service code are determined based on the system general communication protocol, so that the consistency of the configuration parameters defined in the service codes corresponding to the same native application under different operating systems is ensured, at this time, when the Web page communicates with the native application, independent adaptation is not required for the native application running under the first operating system and the native application running under the second operating system, the unified communication scheme of the same native application running under different operating systems and the Web page is realized, the workload of Web page adaptation is reduced, and the adaptation cost is reduced.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario in an embodiment of the present application. The application scenario includes a plurality of terminal devices 110 and a server 120, where the terminal devices 110 and the server 120 may communicate through a communication network.
In an alternative embodiment, the communication network may be a wired network or a wireless network. Accordingly, the terminal device 110 and the server 120 may be directly or indirectly connected through wired or wireless communication. For example, the terminal device 110 may be indirectly connected to the server 120 through a wireless access point, or the terminal device 110 may be directly connected to the server 120 through the internet, which is not limited herein.
In the embodiment of the present application, the terminal device 110 includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, an electronic book reader, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, and the like; the terminal equipment can be provided with various clients, and the clients can be application programs (such as a browser, game software and the like), pages, applets and applications supporting a native function and a web function;
The server 120 is a background server corresponding to the client. The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform.
It should be noted that, the method of the native application and the Web page in the embodiment of the present application may be performed by an electronic device, which may be the terminal device 110, that is, the method may be performed by the terminal device 110.
It should be noted that, the number of the terminal devices 110 and the servers 120 is not limited in practice, and is not particularly limited in the embodiment of the present application, which is shown in fig. 1 for illustration only.
In the embodiment of the present application, when the number of servers 120 is plural, plural servers 120 may be formed into a blockchain, and the servers 120 are nodes on the blockchain; the application data viewing method disclosed by the embodiment of the application can be used for storing the related application data on a blockchain.
Based on the above application scenario, the method for communication between the native application and the Web page provided in the exemplary embodiment of the present application will be described below with reference to the above application scenario described above, and it should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principles of the present application, and the embodiment of the present application is not limited in this respect. Moreover, embodiments of the present application are applicable to scenarios involving various clients that include native applications in communication with Web pages, such as: cloud technology, artificial intelligence, intelligent transportation, assisted driving, and the like.
Considering that when the native application and the Web page are communicated, the native application running under different operating system modes developed by adopting different computer languages respectively corresponds to one service code, and the configuration parameters defined in each service code are inconsistent; for example, a native application a running under the Android operating system corresponds to a service code a, a native application a running under the iOS operating system corresponds to a service code B, and configuration parameters defined in the service code a and the service code B are inconsistent;
at this time, the Web page needs to adapt to the native application under each operating system; for example, a Web page is adapted to a native application a running in an Android operating system, and the Web page also needs to be adapted to a native application a running in an iOS operating system.
Therefore, in the embodiment of the application, aiming at the problems that when the native application and the Web page communicate, the native application running in different operating system modes respectively correspond to one service code, and when the configuration parameters defined in each service code are inconsistent, the workload and the adaptation cost of the Web page adaptation are increased, a mode of generating the service code corresponding to the native application is provided, and the configuration parameters defined in the service codes respectively corresponding to the native application running in different operating system modes are ensured to be consistent, so that when the native application and the Web page communicate, the Web page is uniformly adapted to the native application running in different operating system modes, namely, the Web page is uniformly communicated with the native application running in different operating system modes; the workload of Web page adaptation is reduced, the adaptation cost is reduced, and the research and development efficiency is further improved.
By the following embodiments, a scheme of generating a service code corresponding to a native application and a scheme of communicating a native application with a Web page are described, respectively.
Embodiment one: and generating a service code corresponding to the native application.
Referring to fig. 2, fig. 2 is a flowchart for exemplarily providing a method for generating a service code according to an embodiment of the present application, including the following steps:
Step S200, a system general communication protocol between the native application and the Web page is acquired.
In the embodiment of the application, the communication protocol between the native application running in each operating system mode and the Web page is a set of communication protocol; for example, a communication protocol between a native application running in a first operating system mode and a Web page is consistent with a communication protocol between a native application running in a second operating system mode and a Web page, and is a Jsbridge protocol; in the embodiment of the present application, the Jsbridge protocol is referred to as a system general-purpose communication protocol.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating generation of a service code according to an embodiment of the present application. The Jsbridge protocol between the native application and the Web page is obtained from a core database for the storage system generic communication protocol.
In an alternative embodiment, the system general communication protocol includes a module name, a calling method, a request parameter, an interface callback value, and the like; taking a certain video client as an example, the format of the Jsbridge protocol between the native application and the Web page in the video client is as follows:
in the embodiment of the application, after the system general communication protocol is acquired, the system general communication protocol is analyzed to automatically generate the native application running in each operating system mode and the corresponding service code; for example, a service code corresponding to a native application running in a first operating system mode is automatically generated, and a service code corresponding to a native application running in a second operating system mode is automatically generated.
When generating the service code, firstly analyzing the system general communication protocol to obtain a grammar tree corresponding to the system general communication protocol, and then automatically generating the service code according to the grammar tree; see the description of step S201 to step S202 for details.
Step S201, abstract syntax tree scanning analysis is carried out on the general communication protocol of the system, and a syntax tree containing target configuration parameters is generated.
Referring to fig. 3, a core parser is acquired from a parser database for storing core parsers (core), and then a corresponding syntax tree is parsed through a lexical parser and a syntax parser defined in the core parser.
In an alternative embodiment, the system general communication protocol is converted into a token sequence based on defined lexical rules by a lexical analyzer, wherein the token sequence contains target configuration parameters;
the Lexical analyzer may be Lexical analyzer, abbreviated as lex. The lex tool generates a word recognition program according to the requirements of the lexical rule specification, by which individual words in the input text are recognized. Generally, it can be divided into < definition part > < rule part > < user subroutine part >. Wherein the rule part is necessary and the definition and user subroutine parts are optional. When the lex tool analyzes the lexicon, the word is read from character to character, and rule matching is performed from top to bottom.
The format of the identifier sequence corresponding to the system general communication protocol is as follows:
original sentence:
string type; method of logging in/out
After parsing by a character parser (token):
STRING VARIABLE SEMICOLON COMMENT
String–>STRING
Version–>VARIABLE
;–>SEMICOLON
number of/(COMMENT)
It should be noted that the character parser is used to find the next identifier in the system general communication protocol.
The identifier sequence is converted by a parser into a syntax tree containing target configuration parameters based on defined syntax rules.
In the embodiment of the application, the syntax analyzer is Yet Another Compiler Compiler, abbreviated as yacc.
In the embodiment of the application, the defined grammar rules are as follows:
definition exprNode (outer node):
STRING VARIABLE SEMICOLON COMMENT;
definition of paramnod:
(request||callback)L_BRACE[exprNode]R_BRACE;
definition serviceNode (service node)
Service L_BRACE[exprNode]R_BRACE。
And analyzing the identifier sequence by using a grammar analyzer according to the defined grammar rule, and finally generating a grammar tree containing the target configuration parameters. Referring to fig. 4, fig. 4 is a schematic diagram of a syntax tree according to an embodiment of the present application.
Step S202, traversing the grammar tree through an iterator to generate service codes respectively corresponding to the native application under each operating system mode.
In the embodiment of the application, after the grammar tree is obtained, traversing the grammar tree through an iterator to generate the service codes respectively corresponding to the native application under each operating system, wherein the iterator can be an resultator.
Because the native application runs under different operating system modes and programming languages supported by the operating system modes are different, when the native application generates service codes respectively corresponding to the operating system modes, the different operating system modes adopt different iterators.
In an alternative implementation manner, when the native application runs under the first operating system, traversing the grammar tree through a first iterator supported by the first operating system to generate a service code in a Java code format;
when the native application runs under the second operating system, traversing the grammar tree through a second iterator supported by the second operating system to generate a service code in an OC code format;
the first operating system and the second operating system are operating systems developed by adopting different computer languages, the first operating system is an operating system developed by adopting Java language, and the second operating system is an operating system developed by adopting OC language.
Taking the service code in the OC code format as an example, the format of the service code generated based on the above-mentioned system general communication protocol is as follows:
in order to increase the rate of generating the service code, in the embodiment of the application, after generating the grammar tree containing the target configuration parameters, re-editing the grammar tree to obtain the target grammar tree containing the target configuration parameters, wherein the target grammar tree is consistent with the node information contained in the grammar tree, but the level number of the target grammar tree is smaller than that of the grammar tree;
Referring to fig. 5, fig. 5 schematically provides another syntax tree in an embodiment of the present application, so that when a target syntax tree is traversed by an iterator to generate a service code, the number of levels traversed by the iterator is reduced, thereby improving the rate of generating the service code.
In the embodiment of the application, after the original application is generated under each operation system mode and corresponding service codes are respectively generated, each generated service code is respectively submitted to a corresponding information management database.
Referring to fig. 3, after generating a service code in a Java code format for a native application running under a first operating system, submitting the service code in the Java code format to an information management database (jsbridge_android) corresponding to the first operating system for storage; and generating the service codes in the OC code format for the native application running under the second operating system, and then submitting the service codes in the OC code format to an information management database (JSbridge_iOS) corresponding to the second operating system for storage.
The embodiments of the present application are described by taking the first operating system as an Android operating system and the second operating system as an iOS operating system as an example.
In the embodiment of the application, after generating the service codes, an automatic pipeline is triggered to generate the MR submission, the service codes are combined into the information management databases of the first operating system and the second operating system through the MR submission, and referring to fig. 6, fig. 6 is an exemplary schematic diagram for respectively submitting each generated service code to the corresponding information management database in the embodiment of the application, so that the research and development efficiency and communication cost of the native application and the Web page are greatly improved.
Referring to fig. 7, fig. 7 is an architecture diagram for generating a service code according to an embodiment of the present application.
As shown in fig. 7, when the native application and the Web page need a new communication function, a system general communication protocol (Jsbridge protocol) is agreed, wherein the Jsbridge protocol includes a module name, a method name, a request parameter, and an interface callback. After the system general communication protocol is updated, automatically analyzing and generating a service code in a Java code format corresponding to a native application running under a first operating system through a python script, wherein the Java code is exemplified in the figure, and generating a service code in an OC code format corresponding to a native application running under a second operating system, wherein the OC code is exemplified in the figure;
And triggering the automatic pipeline to generate mr submission after generating Java codes and OC codes, and submitting the generated Java codes and OC codes to the information management databases of the first operating system and the second operating system.
In order to realize the generation of the service code corresponding to the native application, the embodiment of the application provides a tool for automatically generating the service code, please refer to fig. 8, fig. 8 is an exemplary interface diagram of the tool for automatically generating the service code in the embodiment of the application.
It should be noted that, in the embodiment of the present application, the system general communication protocol stored in the core database for storing the system general communication protocol is also detected, when a change of the system general communication protocol is detected, the service code corresponding to the native application is redetermined according to the changed system general communication protocol, and the process of determining the service code is consistent with the manner described in fig. 2.
In the embodiment of the application, no matter what system of operating system the native application runs, the target configuration parameters defined by the service codes corresponding to the native application are determined based on the system general communication protocol, namely, the configuration parameters defined in the service codes are consistent, so that the condition that the configuration parameters defined in the service codes of the same native application are inconsistent under different operating systems is avoided.
Embodiment two: a method for a native application to communicate with a Web page.
Referring to fig. 9, fig. 9 is a flowchart illustrating a specific implementation method of a native application and a Web page according to an embodiment of the present application, where the method includes:
in step S900, when the Web page determines that the target function of the native application needs to be called, function call information is sent to the native application.
In the embodiment of the application, the Web page and the native application are two types of functions supported in the same client, and when the Web page is started in the client, the Web page needs to call the functions of the native application in order to realize the Web page function in the client and display related information;
therefore, the Web page runs in the client, and when the target function of the native application needs to be called is determined, function calling information is sent to the native application; the native application is an application running in any operating system mode.
In step S901, the native application receives function call information sent by the Web page.
In step S902, the native application determines a function callback result corresponding to the function call information according to the target configuration parameter defined by the service code in the current operating system.
In step S903, the native application returns the function callback result to the Web page.
In an alternative implementation, the target configuration parameters defined in the service code are determined based on a system general communication protocol between the native application and the Web page, and the target configuration parameters include: calling a method, requesting parameters and an interface callback value;
when determining a function callback result corresponding to the function call information and returning the function callback result to the Web page according to the target configuration parameters defined by the service codes: and determining a function callback result through a calling method and request parameters defined by the service codes, and returning the function callback result to the Web page through an interface corresponding to the interface callback value defined by the service codes.
In step S904, the Web page receives a function callback result returned by the native application through the defined generic interface.
In order to ensure that the Web page is adapted to the native application under each operating system mode, the workload and the cost of the adaptation are reduced, a universal interface is provided for the Web page in the embodiment of the application, and the universal interface is adapted to an interface callback value obtained from a system universal communication protocol;
therefore, the Web page can receive the function callback results returned by the native application under each operating system mode through the universal interface.
Taking a client as a video playing client as an example, the native function and the page function are supported in the video playing client.
The method comprises the steps that a search box is displayed in a display interface corresponding to a video playing client, the search box corresponds to a browser, so that page functions are supported in the video playing client, when search information needing searching is input in the search box, namely, a Web page is started, when the Web page runs and displays corresponding search information, the authority of the Web page is limited, support of a native application is needed, the Web page communicates with the original application, function calling information is sent to the native application, a function callback result returned by the native application is received, and at the moment, the Web page can smoothly display the corresponding search information in the display interface of the client.
Referring to fig. 10, fig. 10 is a flowchart of a method for communication between a native application and a Web page, which is applied to the Web page, according to an embodiment of the present application, and includes the following steps:
step S1000, when determining that the target function of the native application needs to be called, sending function calling information to the native application;
step S1001, receiving a function callback result returned by the native application, where the function callback result is determined and returned by the target configuration parameters defined by the corresponding service codes of the native application in the corresponding operating system, and the target configuration parameters defined in the service codes in any operating system are determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the Web page receives a function callback result returned by the native application through a defined universal interface; the universal interface is adapted to an interface callback value obtained from a system universal communication protocol.
Referring to fig. 11, fig. 11 is a flowchart illustrating a method for communication between a native application and a Web page in another embodiment of the present application, which is applied to a native application running in any operating system, and includes the following steps:
step S1100, receiving function call information sent by a Web page;
step 1101, under the current operating system, determining a function callback result corresponding to the function call information through a target configuration parameter defined by the service code, and returning the function callback result to the Web page; the target configuration parameters defined in the service codes are determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the target configuration parameters include: calling a method, requesting parameters and an interface callback value;
determining a function callback result corresponding to the function call information through a target configuration parameter defined by the service code, and returning the function callback result to the Web page, wherein the method comprises the following steps:
And determining a function callback result through a calling method and request parameters defined by the service codes, and returning the function callback result to the Web page through an interface corresponding to the interface callback value.
In the application, when the native application communicates with the Web page, no matter what system of operating system the native application runs under, the target configuration parameters defined by each service code corresponding to the native application are determined based on the system general communication protocol, i.e. the configuration parameters defined in each service code are consistent, thereby avoiding the condition that the configuration parameters defined in each service code of the same native application are inconsistent under different operating systems, further reducing the workload of Web page adaptation and lowering the adaptation cost.
Embodiment III: a means for the native application to communicate with the Web page.
The method embodiment of the application is based on the same inventive concept, and the application also provides a method applied to Web pages, and the principle of solving the problem of the device is similar to that of the method of the embodiment, so that the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 12, fig. 12 illustrates an apparatus structure diagram for providing communication between a native application and a Web page according to an embodiment of the present application, and the apparatus 1200 for communicating between a native application and a Web page includes:
A sending unit 1201, configured to send function calling information to a native application when determining that a target function of the native application needs to be called;
the first receiving unit 1202 is configured to receive a function callback result returned by the native application, where the function callback result is determined and returned by the native application under a corresponding operating system format through a target configuration parameter defined by a corresponding service code, and the target configuration parameter defined in the service code under any operating system format is determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the first receiving unit 1202 is specifically configured to:
receiving a function callback result returned by the native application through a defined universal interface; the universal interface is adapted to an interface callback value obtained from a system universal communication protocol.
Based on the same inventive concept as the above embodiment of the method of the present application, another device for communication between a native application and a Web page is also provided in the embodiment of the present application, which is applied to a native application running in any operating system format, and the principle of the device for solving the problem is similar to the method of the above embodiment, so that the implementation of the device can refer to the implementation of the above method, and the repetition is omitted.
Referring to fig. 13, fig. 13 is an exemplary diagram for providing an apparatus structure for communication between a native application and a Web page according to an embodiment of the present application, which is applied to a native application running in any operating system format, where an apparatus 1300 for communication between a native application and a Web page includes:
a second receiving unit 1301, configured to receive function call information sent by a Web page;
a return unit 1302, configured to determine a function callback result corresponding to the function call information according to the target configuration parameter defined by the service code under the current operating system format, and return the function callback result to the Web page; the target configuration parameters defined in the service codes are determined based on a system general communication protocol between the native application and the Web page.
In an alternative embodiment, the service code is determined by:
carrying out abstract syntax tree scanning analysis on a system general communication protocol to generate a syntax tree containing target configuration parameters;
traversing the grammar tree through the iterator to generate service codes respectively corresponding to the native application under each operating system mode.
In an alternative embodiment, abstract syntax tree scan analysis is performed on a system generic communication protocol to generate a syntax tree containing target configuration parameters, comprising:
Converting the system general communication protocol into an identifier sequence based on defined lexical rules by a lexical analyzer, wherein the identifier sequence contains target configuration parameters;
the identifier sequence is converted by a parser into a syntax tree containing target configuration parameters based on defined syntax rules.
In an alternative embodiment, the method further includes, after performing abstract syntax tree scan analysis on the system general communication protocol to generate a syntax tree including the target configuration parameters:
re-editing the grammar tree to obtain a target grammar tree containing target configuration parameters, wherein the level number of the target grammar tree is smaller than that of the grammar tree.
In an optional implementation manner, traversing the syntax tree by an iterator to generate service codes corresponding to the native applications under each operating system, where the service codes include:
if the native application runs under the first operating system, traversing the grammar tree through a first iterator supported by the first operating system to generate a service code in a Java code format;
if the native application runs under the second operating system, traversing the grammar tree through a second iterator supported by the second operating system to generate the service codes in the OC code format.
In an optional implementation manner, after generating the service codes corresponding to the native applications in each operating system format according to the syntax tree, the method further includes:
and submitting the generated service codes to corresponding information management databases respectively.
In an alternative embodiment, the target configuration parameters include: calling a method, requesting parameters and an interface callback value;
the return unit 1302 is specifically configured to: and determining a function callback result through a calling method and request parameters defined by the service codes, and returning the function callback result to the Web page through an interface corresponding to the interface callback value.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Having described the method and apparatus for a native application to communicate with a Web page according to an exemplary embodiment of the present application, next, a description is given of a device for a native application to communicate with a Web page according to another exemplary embodiment of the present application.
In some possible embodiments, an apparatus for a native application to communicate with a Web page according to the present application may include at least a processor and a memory. The memory stores therein program code that, when executed by the processor, causes the processor to perform steps in the methods of native application communication with Web pages described in this specification in accordance with various exemplary embodiments of the application.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Having described the method and apparatus for native applications to communicate with Web pages in accordance with an exemplary embodiment of the present application, an electronic device in accordance with another exemplary embodiment of the present application is next described.
Based on the same inventive concept as the above-mentioned method embodiment of the present application, an electronic device is further provided in the embodiment of the present application, please refer to fig. 14, fig. 14 exemplarily provides a block diagram of an electronic device in the embodiment of the present application, where the electronic device includes: communication module 1410, memory 1420, display unit 1430, camera 1440, sensor 1450, audio circuit 1460, bluetooth module 1470, processor 1480, and the like.
The communication component 1410 is for communicating with a server. In some embodiments, a circuit wireless fidelity (Wireless Fidelity, wiFi) module may be included, where the WiFi module belongs to a short-range wireless transmission technology, and the electronic device may help the user to send and receive information through the WiFi module.
Memory 1420 may be used to store software programs and data. The processor 1480 performs various functions of the terminal apparatus 110 and data processing by running software programs or data stored in the memory 1420. Memory 1420 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Memory 1420 stores an operating system that enables terminal device 110 to operate. The memory 1420 of the present application may store an operating system and various clients, and may also store code for performing the methods of communicating native applications with Web pages of embodiments of the present application.
The display unit 1430 may also be used for a graphical user interface (graphical user interface, GUI) of information input by a user or information provided to the user and various menus of the terminal device 110. Specifically, the display unit 1430 may include a display screen 1432 disposed on the front side of the terminal device 110. The display screen 1432 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 1430 may be used for a comment editing interface to be distributed and the like in the embodiment of the present application.
The display unit 1430 may also be used to receive input numeric or character information, generate signal inputs related to user settings and function controls of the terminal device 110, and in particular, the display unit 1430 may include a touch screen 1431 disposed on the front of the terminal device 110, and may collect touch operations on or near the user, such as clicking buttons, dragging scroll boxes, and the like.
The touch screen 1431 may be covered on the display screen 1432, or the touch screen 1431 may be integrated with the display screen 1432 to implement the input and output functions of the terminal device 110, and the integrated touch screen may be simply referred to as a touch screen.
The camera 1440 may be used to capture still images and a user may comment on the images captured by the camera 1440 through an application. The number of cameras 1440 may be one or more. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive elements convert the optical signals into electrical signals, which are then passed to a processor 1480 for conversion into digital image signals.
The terminal device may further comprise at least one sensor 1450, such as an acceleration sensor 1451, a distance sensor 1452, a fingerprint sensor 1453, a temperature sensor 1454. The terminal device may also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, light sensors, motion sensors, and the like.
Audio circuitry 1460, speakers 1461, and microphone 1462 may provide an audio interface between the user and terminal device 110. The audio circuit 1460 may transmit the received electrical signal converted from audio data to the speaker 1461, and convert the electrical signal into a sound signal by the speaker 1461 and output the sound signal. The terminal device 110 may also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, microphone 1462 converts the collected sound signals into electrical signals, which are received by audio circuit 1460 and converted into audio data, which are output to communication module 1410 for transmission to, for example, another terminal device 110, or to memory 1420 for further processing.
The bluetooth module 1470 is used to interact with other bluetooth devices with bluetooth modules via bluetooth protocols. For example, the terminal device may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) that also has a bluetooth module through the bluetooth module 1470, thereby performing data interaction.
The processor 1480 is a control center of the terminal apparatus, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal apparatus and processes data by running or executing software programs stored in the memory 1420, and calling data stored in the memory 1420. In some embodiments, the processor 1480 may include one or more processing units; the processor 1480 may also integrate an application processor that primarily handles operating systems, user interfaces, clients, etc., with a baseband processor that primarily handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 1480. The processor 1480 of the present application may run an operating system, a client, a user interface, and a touch response, as well as methods of viewing application data in embodiments of the present application. In addition, a processor 1480 is coupled to the display unit 1430.
In some possible embodiments, aspects of the methods of native applications and Web pages provided by the present application may also be implemented in the form of a program product comprising a computer program for causing an electronic device to perform the steps of the methods of native applications and Web pages according to the various exemplary embodiments of the present application as described herein above when the program product is run on an electronic device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and comprise a computer program and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
A computer program embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having a computer-usable computer program embodied therein.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (14)

1. A method for a native application to communicate with a Web page, the method comprising:
when determining that a target function of a native application needs to be called, sending function calling information to the native application;
and receiving a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application under a corresponding operation system mode through target configuration parameters defined by corresponding service codes, and the target configuration parameters defined in the service codes under any operation system mode are determined based on a system general communication protocol between the native application and the Web page.
2. The method of claim 1, wherein receiving the function callback results returned by the native application comprises:
receiving a function callback result returned by the native application through a defined universal interface; the universal interface is adapted to an interface callback value obtained from the system universal communication protocol.
3. A method for a native application to communicate with a Web page, the method being applied to a native application running in any operating system format, the method comprising:
receiving function call information sent by a Web page;
under the current operating system, determining a function callback result corresponding to the function call information through a target configuration parameter defined by a service code, and returning the function callback result to the Web page; wherein the target configuration parameters defined in the service code are determined based on a system generic communication protocol between the native application and the Web page.
4. The method of claim 3, wherein the service code is determined by:
carrying out abstract syntax tree scanning analysis on the system general communication protocol to generate a syntax tree containing the target configuration parameters;
and traversing the grammar tree through an iterator to generate service codes respectively corresponding to the native application under each operating system mode.
5. The method of claim 4, wherein performing abstract syntax tree scan analysis on the system universal communication protocol to generate a syntax tree comprising the target configuration parameters comprises:
Converting the system general communication protocol into an identifier sequence based on a defined lexical rule by a lexical analyzer, wherein the identifier sequence comprises the target configuration parameters;
converting, by a parser, the identifier sequence into a syntax tree containing the target configuration parameters based on defined syntax rules.
6. The method of claim 4, wherein the performing abstract syntax tree scan analysis on the system wide communication protocol, after generating the syntax tree including the target configuration parameters, further comprises:
and re-editing the grammar tree to obtain a target grammar tree containing the target configuration parameters, wherein the level number of the target grammar tree is smaller than that of the grammar tree.
7. The method of claim 4, wherein the traversing the syntax tree by the iterator to generate the service codes corresponding to the native applications under each operating system respectively comprises:
if the native application runs under a first operating system, traversing the grammar tree through a first iterator supported by the first operating system to generate a service code in a Java code format;
And if the native application runs under a second operating system, traversing the grammar tree through a second iterator supported by the second operating system to generate service codes in an OC code format.
8. The method of any one of claims 4 to 7, wherein after generating the service codes corresponding to the native applications in each operating system according to the syntax tree, the method includes:
and submitting the generated service codes to corresponding information management databases respectively.
9. The method of claim 3, wherein the target configuration parameters include: calling a method, requesting parameters and an interface callback value;
the target configuration parameters defined by the service codes determine function callback results corresponding to the function call information, and return the function callback results to the Web page, including:
and determining the function callback result through the calling method and the request parameter defined by the service code, and returning the function callback result to the Web page through an interface corresponding to the interface callback value.
10. An apparatus for a native application to communicate with a Web page, the apparatus comprising:
The sending unit is used for sending function calling information to the native application when determining that the target function of the native application needs to be called;
the first receiving unit is used for receiving a function callback result returned by the native application, wherein the function callback result is determined and returned by the native application under a corresponding operation system mode through a target configuration parameter defined by a corresponding service code, and the target configuration parameter defined in the service code under any operation system mode is determined based on a system general communication protocol between the native application and the Web page.
11. An apparatus for communicating a native application with a Web page, the apparatus being for a native application running in any operating system format, the apparatus comprising:
the second receiving unit is used for receiving the function call information sent by the Web page;
the return unit is used for determining a function callback result corresponding to the function call information through a target configuration parameter defined by a service code under the current operating system, and returning the function callback result to the Web page; wherein the target configuration parameters defined in the service code are determined based on a system generic communication protocol between the native application and the Web page.
12. An electronic device, comprising: comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor being adapted to execute the computer program for implementing the steps of the method of any one of claims 1-2 or claims 3-9.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1-2 or claims 3-9.
14. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 2 or claims 3 to 9.
CN202210147153.3A 2022-02-17 2022-02-17 Method and related device for communication between native application and Web page Pending CN116662695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210147153.3A CN116662695A (en) 2022-02-17 2022-02-17 Method and related device for communication between native application and Web page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210147153.3A CN116662695A (en) 2022-02-17 2022-02-17 Method and related device for communication between native application and Web page

Publications (1)

Publication Number Publication Date
CN116662695A true CN116662695A (en) 2023-08-29

Family

ID=87724744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210147153.3A Pending CN116662695A (en) 2022-02-17 2022-02-17 Method and related device for communication between native application and Web page

Country Status (1)

Country Link
CN (1) CN116662695A (en)

Similar Documents

Publication Publication Date Title
CN110457144B (en) Method, device, medium and equipment for realizing front-end application
US8549471B2 (en) Method and apparatus for providing API service and making API mash-up, and computer readable recording medium thereof
EP1410171B1 (en) System and method for providing dialog management and arbitration in a multi-modal environment
US8549497B2 (en) High-level hypermedia synthesis for adaptive web
CN111291103B (en) Interface data analysis method and device, electronic equipment and storage medium
US11562010B2 (en) Method and apparatus for outputting information
US9253020B2 (en) Web service interaction in a dynamically extensible business application
CN110377289A (en) A kind of data analysis method, device, medium and electronic equipment
CN111026931A (en) Data query method, device, equipment and medium
CN110727417B (en) Data processing method and device
CN111666218B (en) Code auditing method, device, electronic equipment and medium
CN114117190A (en) Data processing method, data processing device, storage medium and electronic equipment
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
US20200110584A1 (en) Automated code generation for functional testing of software applications
CN116149632A (en) Business logic customizing method and device, computer equipment and storage medium
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
CN116662695A (en) Method and related device for communication between native application and Web page
CN115982204A (en) Query statement conversion method and device, electronic equipment and storage medium
CN112363699B (en) Interaction method and device applied to multi-language development platform
JP2024508412A (en) Generating natural language interfaces from graphical user interfaces
CN114035804A (en) Code conversion method, device, medium and electronic equipment
Honkala Web user interaction: a declarative approach based on XForms
CN112596729A (en) Target application interface generation method and device, readable medium and electronic equipment
US11038765B2 (en) Cloud software defined networking application programming interface converter
WO2024087202A1 (en) Search method and apparatus, model training method and apparatus, 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