CN109743359B - Hybrid communication processing method and device, computer equipment and storage medium - Google Patents

Hybrid communication processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN109743359B
CN109743359B CN201811527542.9A CN201811527542A CN109743359B CN 109743359 B CN109743359 B CN 109743359B CN 201811527542 A CN201811527542 A CN 201811527542A CN 109743359 B CN109743359 B CN 109743359B
Authority
CN
China
Prior art keywords
native application
html5
application program
preset
webpage container
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.)
Active
Application number
CN201811527542.9A
Other languages
Chinese (zh)
Other versions
CN109743359A (en
Inventor
林泽全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811527542.9A priority Critical patent/CN109743359B/en
Publication of CN109743359A publication Critical patent/CN109743359A/en
Application granted granted Critical
Publication of CN109743359B publication Critical patent/CN109743359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a Hybrid communication processing method, a Hybrid communication processing device, computer equipment and a storage medium. The method and the device for achieving the webpage loading are based on operation and maintenance optimization, when the webpage container is initialized, after HTML5 is loaded, before HTML5 calls a method of the native application program, the native application program knows that HTML5 is loaded in a first preset mode, and if the method of the native application program is injected into the webpage container and is completed, the native application program prompts the HTML5 to inject the method of the native application program to the webpage container in a second preset mode to complete the interactive calling between the HTML5 and the native application program. After the Hybird interaction is ensured to be ready for the HTML5 page and the native application program, the condition that the HTML5 page and the native application program cannot be normally called in Hybird communication is avoided.

Description

Hybrid communication processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a Hybrid communication processing method and apparatus, a computer device, and a computer-readable storage medium.
Background
Hybrid communication refers to interaction between HTML5 and a native application program, that is, a method for calling the native application program (IOS system or Android system) by JavaScript, or a method for calling back JavaScript by the native application program. The method in the prior art is that when a native application initializes a webpage container and loads an HTML5 page, a method of the native application is injected into the webpage container, so that the HTML5 page running in the webpage container can call the method of the native application injected into the webpage container. However, due to differences of different system versions and the like, the method for calling the native application program by the HTML5 cannot be normally called, so that the system is abnormal.
Disclosure of Invention
The embodiment of the application provides a Hybrid communication processing method, a Hybrid communication processing device, computer equipment and a computer readable storage medium, and can solve the problem that a method for calling a native application program by using HTML5 in the prior art cannot be normally called to cause system exception.
In a first aspect, an embodiment of the present application provides a Hybrid communication processing method, where the method includes: a native application program receives an initialization instruction of a webpage container, loads HTML5 from a server to the webpage container, and injects a method of the native application program contained in the native application program into the webpage container; if the native application program learns that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container to be completed, the native application program prompts the HTML5 through a second preset mode that the method of the native application program is injected into the webpage container to be completed; and if the HTML5 knows that the method of the native application program is injected into the webpage container to be completed, carrying out interactive calling between the HTML5 and the native application program.
In a second aspect, an embodiment of the present application further provides a Hybrid communication processing apparatus, including:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for a native application program to receive an initialization instruction of a webpage container, load HTML5 from a server to the webpage container and inject a method of the native application program contained in the native application program into the webpage container;
the prompting unit is used for prompting the HTML5 of the native application program to be injected into the webpage container to be completed through a second preset mode if the native application program is informed that the HTML5 is completely loaded through a first preset mode and the method of the native application program is injected into the webpage container to be completed; and
and the communication unit is used for carrying out interactive calling between the HTML5 and the native application program if the HTML5 knows that the method of the native application program is injected into the webpage container to be completed.
In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the Hybrid communication processing method when executing the computer program.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the Hybrid communication processing method.
The embodiment of the application provides a Hybrid communication processing method, a Hybrid communication processing device, computer equipment and a computer readable storage medium. The method comprises the following steps: a native application program receives an initialization instruction of a webpage container, loads HTML5 from a server to the webpage container, and injects a method of the native application program contained in the native application program into the webpage container; if the native application program knows that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container to be completed, the native application program prompts the HTML5 through a second preset mode that the method of the native application program is injected into the webpage container to be completed; and if the HTML5 knows that the method of the native application program is injected into the webpage container to be completed, carrying out interactive calling between the HTML5 and the native application program. According to the method, after the HTML5 page is loaded on the webpage container, before the method for calling the native application program on the HTML5 page is carried out, the native application program obtains the HTML5 page loaded on the webpage container in a first preset mode and is finished, if the method for calling the native application program is judged to be injected into the webpage container and is finished, the native application program prompts the HTML5 in a second preset mode, the method for injecting the native application program into the native application program is finished in the webpage container, then interactive calling between the HTML5 and the native application program is carried out, a single communication mode for directly calling between the HTML5 and the native application program is changed, when the method for calling the native application program is carried out by the HTML5, the method for calling the native application program is determined to be finished by being injected into the webpage container, and the safe hybrid communication mode is confirmed, so that all Hybird interaction can be carried out after conditions and running environments of the HTML5 page and the native application program are prepared, and the situation that a system cannot be normally called due to the HTML5 page and the native application program in the communication is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a Hybrid communication processing method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a Hybrid communication processing method according to an embodiment of the present application;
fig. 3 is a schematic sub-flow diagram of a Hybrid communication processing method according to an embodiment of the present application;
fig. 4 is another schematic sub-flow diagram of the Hybrid communication processing method provided in the embodiment of fig. 3;
fig. 5 is a third sub-flow diagram of a Hybrid communication processing method according to the embodiment of the present application;
fig. 6 is a schematic block diagram of a Hybrid communication processing apparatus according to an embodiment of the present disclosure; and
fig. 7 is a schematic block diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of the Hybrid communication processing method according to the embodiment of the present application. The application scene comprises the following steps:
(1) And (4) a terminal. The terminal shown in fig. 1 is installed with a Hybrid APP, which is a native application client and includes a web page container, a web page developed by HTML5 can be displayed through the web page container, and an HTML5 page loaded from a server is displayed through the web page container. And the terminal carries out data interaction with the server by accessing the server and loads an HTML5 page from the server. The terminal can be an electronic device such as a smart phone, a smart watch, a notebook computer, a tablet computer or a desktop computer, and the terminal accesses the server through a wired network or a wireless network.
(2) And a server. The server is used for providing backend services of the Hybrid APP, such as providing HTML5 pages. The computer device can be a single server or a server cluster, can also be a cloud server, receives access of an external terminal, and is connected with the terminal through a wired network or a wireless network.
The operation of each main body in fig. 1 is as follows: the method comprises the steps that a user uses a Hybrid APP installed on a terminal, the Hybrid APP is a native application program client side and comprises a webpage container, a webpage developed through HTML5 can be displayed through the webpage container, an instruction for initializing the webpage container is received, the native application program initializes the webpage container, an HTML5 page is loaded from a server to the webpage container, and a native application program method is injected into the webpage container, so that the HTML5 page running in the webpage container can call the native application program method injected into the webpage container. When the native application program initializes the webpage container to load the HTML5 page, the terminal accesses the server through a wired network or a wireless network, performs data interaction with the server, and loads the HTML5 page from the server. If the method for injecting the native application program into the native application program is completed in the webpage container, the native application program knows whether the webpage container finishes loading the HTML5 page or not through a first preset mode; if the webpage container finishes loading the HTML5 page, the native application program prompts the HTML5 in a second preset mode that the method for injecting the native application program into the native application program is finished until the webpage container finishes loading the HTML5 page; and if the HTML5 receives a prompt that the method of the native application program injected into the native application program is completed by the webpage container, carrying out interactive calling between the HTML5 and the native application program, and carrying out safe Hybrid communication.
It should be noted that fig. 1 only illustrates a smart phone as a terminal, in an actual operation process, there may be a plurality of terminals connected to a server, and the types of the terminals may also not be limited to those illustrated in fig. 1, the terminal may also be an electronic device such as a smart watch, a notebook computer, or a tablet computer, and the server may also be a server cluster or a cloud service desk, and an application scenario of the Hybrid communication processing method is only used to illustrate the technical solution of the present application, and is not used to limit the technical solution of the present application.
Fig. 2 is a schematic flow chart of a Hybrid communication processing method provided in the embodiment of the present application. The Hybrid communication processing method is applied to the terminal in fig. 1 to complete all or part of functions of the Hybrid communication processing method.
Fig. 2 is a schematic flow chart of a Hybrid communication processing method provided in the embodiment of the present application. As shown in fig. 2, the method comprises the following steps S210-S230:
s210, the native application program receives an initialization instruction of the webpage container, loads HTML5 from the server to the webpage container, and injects a method of the native application program contained in the native application program into the webpage container.
The Hybrid communication refers to interaction between the HTML5 and the native application program, and is applied to the Hybrid App.
The Hybrid App is called mixed-mode mobile application, is an App between a Web-App and a native application program, and has the advantages of good user interaction experience of the native application program and the advantages of cross-platform development of the Web App. The APP, english is short for Application, and refers to a third-party Application program of the smart device.
The Web-App is an abbreviation of Web Application, is an App running in a browser, is displayed on a mobile terminal by using a webpage technology based on a system and an Application of the browser, comprises characters, media files and the like, and is generally developed by using HTML (HyperText Markup Language) which is English and is HyperText Markup Language (HTML 5.0) which is a fifth major modification of HTML, and HTML5 is an abbreviation of HTML 5.0. WebApp generally refers to App written in HTML5 language, and does not need to be downloaded and installed. Further, HTML5, actually refers to a combination of technologies including HTML, CSS, and JavaScript. The JS is a page script, and can operate a page and elements on the page by executing a program script fragment, so that a specific function and effect are realized. For some content, it is not implemented in a high-level programming language, but is easily implemented with JS, for example, displaying the current system time, etc. HTML5 is the latest version of HTML, a kind of page technology, and is mainly used to implement web pages. In the embodiment of the present application, HTML5 refers to HTML5 page, which may also be referred to as HTML5 web page.
The Native application program is a Native App, generally depends on an operating system, has strong interaction, is a complete App, has strong expandability, and needs to be downloaded, installed and used by a user, is developed for a preset operating system, such as IOS (operating system), android, blackberry and other systems, and operates on respective mobile equipment, and the Native App comprises the Native application program, is a third-party application program which is based on a local operating system of a smart phone, such as an IOS (operating system) or an Android system and operates by using a Native program, also called a local App, and generally uses development languages of JAVA, C + +, objective-C and the like.
Hybrid APP refers to semi-native semi-Web Hybrid class App. Download installation is required, looking like Native App, but only a few UIWeb views, the content accessed is the Web. The hybrid application allows developers to embed HTML5 applications into a thin native container, integrating the advantages (and disadvantages) of native applications and HTML5 applications. Because the Hybrid application is a combination of the native application and the Web application, and a part of the native application and a part of the Web application are adopted, interaction between the Web application developed by the HTML5 and the native application program, namely interaction between the HTML5 and the native application program, namely Hybrid communication, namely a method for calling the native application program (IOS system or Android system) by JavaScript in the HTML5, or a method for calling back the JavaScript by the native application program, is required.
In the Hybrid App, the Native application refers to a client of the Hybrid App installed on a terminal, and includes a Native application method, which is also called a Native method or a Native method. The Native application method is a Native keyword modification method, which is also called a local method, and the local method is different from other methods and related to a platform, so that the client using the Native application has low portability, and a data area of the Native application method when the Native application method runs in a JVM (Java Virtual Machine) is different from other methods, and the Native application method has a special local method stack, and is mainly used for loading files and dynamic link libraries, and because Java language cannot access underlying information of an operating system, for example: the bottom hardware equipment, etc. needs to be completed by means of C language. Native modified methods can be rewritten by C language.
The webpage container is a WebView control, can be called a webpage, a network view and a webpage view, and is a Webkit engine-based control for displaying a Web page.
Specifically, when a user uses Hybrid APP installed on a terminal, for example, opens an APP page, or updates an APP page, the native application of the Hybrid APP receives an initialization instruction of a web page container, initializes the web page container, loads an HTML5 page from a server to the web page container, and injects a method of the native application included in the native application into the web page container, so that the HTML5 page running in the web page container can call the method of the native application injected into the web page container by the native application, perform interactive call between the HTML5 and the native application, and implement Hybrid communication.
S220, if the native application program knows that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container completely, the native application program prompts the HTML5 through a second preset mode that the method of the native application program is injected into the webpage container completely.
The first preset mode refers to a preset mode in which the native application learns whether the HTML5 page is loaded completely, and the first preset mode may be that the native application is actively notified of the completion of the HTML5 page loading, or that the native application actively acquires the loading result of the HTML5 page. The first preset mode comprises the following two modes:
(1) The first preset mode is that after the webpage container finishes loading the HTML5 page, the HTML5 page initiates a preset pseudo protocol to the native application program through the webpage container, the native application program receives the preset pseudo protocol, and the native application program learns that the webpage container finishes loading the HTML5 page.
(2) The first preset mode may further be that a variable is set in the HTML5 page, if the HTML5 page is loaded, the variable is set to a preset threshold, and if the native application detects that the assignment of the variable is the preset threshold, the native application learns that the HTML5 page loading of the webpage container is completed.
The second preset mode is a preset mode in which the native application prompts the HTML5 that the native application injects into the native application to complete the webpage container, and may be a mode in which the HTML5 actively acquires the native application through the webpage container and injects into the webpage container, or a mode in which the native application actively prompts the HTML5 that the native application injects into the webpage container through the webpage container. The second preset mode includes the following three modes:
(1) The first is the implantation method. Specifically, after the HTML5 page is loaded, before a method of a native application is called, the HTML5 page injects a preset method into a global variable of the web page container, if the HTML5 page injects the preset method into the global variable of the web page container, the HTML5 page initiates a preset pseudo protocol, and the preset pseudo protocol notifies the native application that the injection of the preset method into the web page container is completed currently through the web page container. When the native application receives the preset pseudo protocol request and the native application injects the method of the native application into the webpage container until the webpage container is completed, the native application triggers the execution of the preset method. After receiving the preset method, the HTML5 indicates that the webpage container has injected the method for completing the native application program, and at the moment, the safe Hybrid communication is completed, and the subsequent interactive calling of the Hybrid can be normally performed.
(2) The second way is by registering events. And if the HTML5 page is loaded completely and before a method of a native application program is called, injecting a preset registration event into the webpage container by the HTML5 page, and if the HTML5 page is injected with the preset registration event and is completed by the webpage container, initiating a preset pseudo protocol by the HTML5 page to inform the native application program that the injection of the preset registration event into the webpage container is completed currently. The native application receives the pre-set pseudo protocol request and injects the native application method into the native application until the web page container is completed, the native application triggering the pre-set registration event. After the HTML5 receives the preset registration event, the method that the native application program is injected into the webpage container is indicated, at the moment, safe Hybrid communication is completed, and subsequent interactive calling of the Hybrid can be normally carried out.
(3) The third way is by presetting the variables. And setting a second preset variable in the webpage container. After the webpage container finishes loading the HTML5 page, the HTML5 page informs the native application program in a first preset mode, the native application program receives that the HTML5 page is completely loaded by the webpage container, if the native application program finishes injecting the native application program into the webpage container, the native application program triggers the webpage container to assign the second preset variable to a second preset threshold value, and if the HTML5 detects that the value of the second preset variable in the webpage container is the second preset threshold value, the HTML5 learns that the method of the native application program finishes injecting the second preset variable into the webpage container.
Specifically, if the HTML5 page is completely loaded by the webpage container, the native application learns the completion result of the HTML5 page loading by the webpage container through a first preset manner, and if the native application determines that the method for injecting the native application is completed in the webpage container, the native application notifies the HTML5 page that the method for injecting the native application is completed in the webpage container through a second preset manner, the webpage container prepares the condition for the HTML5 to call the method of the native application, the HTML5 page may call the method of the native application, and if the HTML5 does not learn that the method for injecting the native application is completed in the webpage container, the HTML5 does not call the method of the native application, so as to avoid the problem that the HTML5 page and the native application cannot normally call the method of the native application, which results in system exception between the HTML5 page and the native application in Hybird communication.
And S230, if the HTML5 knows that the method of the native application program is injected into the webpage container, performing interactive calling between the HTML5 and the native application program.
Specifically, if the HTML5 is loaded in the web page container, the method for injecting the native application program into the web page container is completed, and if the HTML5 receives a prompt that the method for injecting the native application program into the web page container is completed, the HTML5 may call the method for injecting the native application program, so as to perform an interactive call between the HTML5 and the native application program, that is, the JavaScript may call the method for normally injecting the native application program (IOS system or Android system), or call back the JavaScript, so that a secure interaction may be implemented between the HTML5 and the native application program.
According to the method, after the HTML5 page is loaded on the webpage container, before the method for calling the native application program on the HTML5 page is carried out, the native application program learns that the HTML5 page is loaded on the webpage container in a first preset mode and judges that the method of the native application program is injected into the webpage container to be completed, the native application program prompts the HTML5 in a second preset mode, the method for injecting the native application program into the native application program is completed in the webpage container, then the HTML5 and the native application program are interactively called, a single communication mode for direct calling between the HTML5 and the native application program is changed, when the method for calling the native application program is carried out by the HTML5, the method for determining the native application program is already injected into the webpage container to be completed, the confirmation that the injection is completed is carried out between the HTML5 and the native application program in advance in the Hybrid communication mode can be ensured, all the Hybrid interaction is carried out after conditions and running environments of the HTML5 page and the native application program are ready, safe Hybrid communication can be realized, and abnormal calling between the HTML5 page and the native application program can be avoided, and the native application program can not be normally caused by abnormal communication.
Referring to fig. 3 and fig. 4, fig. 3 is a sub-flow schematic diagram of a Hybrid communication processing method according to an embodiment of the present application, and fig. 4 is another sub-flow schematic diagram of the Hybrid communication processing method according to the embodiment shown in fig. 3. In this embodiment, the step of knowing, by the native application program through a first preset manner, that the HTML5 is loaded completely includes:
s2201, if the HTML5 is loaded completely, before the HTML5 calls the method of the native application program, injecting a preset method into the webpage container by the HTML5, wherein the method for transferring the native application program between the HTML5 and the native application program by executing the preset method is injected into the webpage container;
s2202, if the HTML5 finishes injecting the preset method into the webpage container, the HTML5 initiates a first preset pseudo protocol to the native application program to prompt the native application program that the HTML5 finishes injecting the preset method into the webpage container;
the step of the native application program prompting the HTML5 that the method of the native application program is injected into the webpage container in a second preset mode comprises the following steps:
s2301, if the native application program receives the first preset pseudo protocol and the method for injecting the native application program is completed by the webpage container, triggering to execute the preset method;
s2302, if the HTML5 receives the preset method, knowing that the method of the native application program is injected into the webpage container to be completed.
The injection refers to injecting a program into another program, and the injected program can be directly executed in the other program. For example, injecting JS code into a webpage container in Android can be achieved by webview.
The preset method related in the embodiment of the application refers to a method in Javascript programming, and Javascript is also referred to as JS for short. The method in the JS is used for processing one event, and the essence of the method is a function, such as a method show (), wherein the method show () can be called when a single-click event is triggered, and can also be called when a double-click event is carried out. For example, in the embodiment of the present application, the preset method may be set as methodA. A method methodA is a member that performs a computation or action that can be performed by an object or class. The method has a list of formal parameters (which may be empty), a return value (or void), and may be static or non-static. Static methods are to be accessed by classes. Non-static methods, also called instance methods, are accessed through instances of classes, object-oriented language calling methods, procedural language calling functions. The method methodA may or may not include substantial operating logic. If the method does not contain substantial operating logic, i.e., the method is empty. Method methodA can be replaced with an event. An event refers to a call that a class may cause, and any class can register with a class that has an event for the monitoring of the event, and when the event occurs, the class is notified of the event and responds.
Method Injection, in English, method Injection, refers to injecting the Method of JS into another component. For example, a method that requires another B-component to be invoked in an a-component typically adds a field and then injects an instance of the B-component onto the field of component a using dependent injection.
The pseudo protocol is used for transmitting data packets between computers, compared with a 'true protocol', such as an http protocol and an ftp protocol, and the pseudo protocol is a non-standardized protocol and enables a user to call the JS function through a link.
Specifically, if the HTML5 page is loaded by the web page container, before the method for calling the native application program by the HTML5 page is completed, the HTML5 page injects a preset method into the web page container, the preset method is used to transmit the method for calling the native application program between the HTML5 page and the native application program through execution of the preset method, if the HTML5 page injects the preset method into the web page container, the HTML5 page initiates a first preset dummy protocol to the native application program, the first preset dummy protocol is used to prompt the native application program that the HTML5 page injects the preset method into the web page container, if the native application program receives the first preset dummy protocol and injects the method for calling the native application program into the web page container, the preset method is triggered to be executed, if the HTML5 page receives the preset method triggered to be executed by the native application program, the method for calling the native application program is injected into the web page container, and the method for calling the native application program can be called by the HTML5. For example, after the HTML5 page is loaded from the server, before calling the method of the native application, the HTML5 page injects a method metadata into the Windows global object of the web page container, where the method metadata is a self-defined function. If the method methodA is injected into the webpage container completely, the HTML5 initiates a preset pseudo protocol ph-native application program// shakehand, and informs the native application program that the current methodA method is injected into the webpage container completely. Since the method methodA is in a Windows global object, the native application can call the method methodA. The native application receives the preset pseudo protocol request and judges that the method of the native application is completed by injecting the webpage container, the native application can automatically judge whether the method of the native application is completed by injecting the webpage container, the native application calls the method metalA, the HTML5 which executes the method metalA is triggered after receiving the method metalA, namely the method of the native application is completed by injecting the webpage container, at the moment, the preparation condition of safe Hybrid communication is completed, and the subsequent Hybrid interactive call can be normally performed. Therefore, a single Hybrid communication mode is changed, and the method of the native application program is ensured to be injected into the webpage container when the HTML5 calls the method of the native application program.
Further, before the step of injecting the preset method into the webpage container by the HTML5, the method further includes:
and setting the preset method in the HTML5.
Specifically, the preset method is manually set in the HTML5 page in the server background, so that after the HTML5 page is recorded from the server, the HTML5 page injects the preset method into the webpage container, and further injects the native application into the webpage container through the execution of the preset method, so as to complete the transfer of the native application between the HTML5 page and the native application.
In one embodiment, the step of injecting the preset method into the webpage container by the HTML5 page includes:
and the HTML5 is injected into the global variables of the webpage container by the preset method.
The Global variable, called Global Variables in english, is also called a Global object, and refers to a variable defined outside a function, and has different definition forms according to different high-level program languages. For example, in a Java program, a global variable cannot be defined outside all classes, and only one global variable can be implemented by defining a common and static variable in one class. The global object means "definition in one place, available everywhere", after definition in one place, all the properties can be used directly in other places, and all the properties can be accessed anywhere in the program, i.e. global variables. Furthermore, because the web page container contains a Windows global object, the global variable is a Windows global object, and the HTML5 page injects the preset method into the global variable of the web page container, that is, the HTML5 page injects the preset method into the Windows global object of the web page container, the preset method can be directly called by the native application program. The Window object represents a Window opened in a browser, and is a Windows global object, and in JavaScript, window is a global object.
Referring to fig. 5, fig. 5 is a third sub-flow diagram of a Hybrid communication processing method according to an embodiment of the present disclosure. As shown in fig. 5, in this embodiment, the step of knowing, by the native application program through a first preset manner, that the HTML5 is loaded completely includes:
s2205, the native application program detects whether a first preset variable in the HTML5 is a first preset threshold value;
s2206, if a first preset variable in the HTML5 is a first preset threshold, determining that the HTML5 is loaded completely;
s2207, if the first preset variable in the HTML5 is not the first preset threshold, determining that the HTML5 is not loaded completely; the first preset variable is a variable preset in the HTML5, and if the HTML5 is loaded, the HTML5 sets the first preset variable as the first preset threshold.
Where variables are the amount by which the value is allowed to change during program execution.
Specifically, a first preset variable is set in the HTML5 page, the first preset variable is a variable preset in the HTML5, whether loading of the HTML5 page by the webpage container is completed is judged according to the value of the first preset variable, if loading of the HTML5 by the webpage container is completed, the HTML5 assigns the first preset variable as the first preset threshold, and otherwise, the first preset variable is not assigned as the first preset threshold. If the HTML5 page is loaded completely, the HTML5 assigns the first preset variable to be a first preset threshold, if the native application program detects that the first preset variable in the HTML5 is the first preset threshold, the HTML5 page is judged to be loaded completely by the webpage container, and if not, the HTML5 page is judged to be loaded incompletely by the webpage container. For example, a first preset variable a is set in the HTML5 page, and it is determined whether loading of the HTML5 page by the webpage container is completed according to the value of a, for example, if "a =0" it is determined that loading of the HTML5 page is not completed, and if "a =1" it is determined that loading of the HTML5 page is completed. And initially assigning the value of A to be 'A = 0', and if the webpage container finishes loading the HTML5, assigning the value of A to be the first preset threshold value by the HTML5. If the HTML5 page is completely loaded, the HTML5 assigns the first preset variable to "a =1", if the native application detects "a =1" in the HTML5, it is determined that the HTML5 page is completely loaded by the webpage container, otherwise, if the native application detects "a =0" in the HTML5, it is determined that the HTML5 page is not completely loaded by the webpage container.
In one embodiment, the step of prompting, by the native application program through a second preset manner, the HTML5 that the native application program is injected into the webpage container includes:
if the native application program knows that the HTML5 loading is finished and the method of the native application program is injected into the webpage container, triggering a second preset variable to be set as a second preset threshold value, wherein the second preset variable refers to a variable preset in the webpage container, and if the method of the native application program is injected into the webpage container, triggering the native application program to set the second preset variable as the second preset threshold value;
if the HTML5 detects that the second preset variable in the webpage container is the second preset threshold, the completion of the injection of the method of the native application program into the webpage container is known, and if not, the incompletion of the injection of the method of the native application program into the webpage container is known;
or the step that the native application program prompts the HTML5 that the method of the native application program is injected into the webpage container through a second preset mode comprises the following steps:
if the native application program learns that the HTML5 page is loaded completely and the method of the native application program is injected into the webpage container completely, triggering and executing a preset event in the webpage container, wherein the preset event is an event registered in the webpage container in advance, and the native application program is transmitted between the HTML5 page and the native application program through the execution of the preset event and is injected into the webpage container completely;
and if the HTML5 receives the preset event triggered and executed by the native application program, the completion of the method of the native application program injected into the webpage container is known.
Specifically, if the native application learns that the HTML5 page is loaded in the webpage container and the method of the native application is injected into the webpage container, the native application prompts the HTML5 method of the native application to the completion of the method of the native application in a second preset manner, and the HTML5 may call the method of the native application to perform an interactive call between the HTML5 and the native application. Taking a first predetermined manner to send a first predetermined protocol to the native application for the HTML5 as an example, there may be two situations:
(1) If the webpage container finishes loading the HTML5 page, the HTML5 page initiates a first preset pseudo protocol to the native application program, and the first preset pseudo protocol is used for prompting the native application program that the webpage container finishes loading the HTML5 page.
If the native application program receives the first preset pseudo protocol and the method for injecting the native application program into the webpage container is completed, the assignment of the second preset variable is triggered to be the second preset threshold value, wherein the second preset variable can be injected into a global variable of the webpage container, such as a Windows global object, in an injection manner, and the native application program can call the global variable of the webpage container.
If the HTML5 detects that a second preset variable in the webpage container is a second preset threshold value, judging that the method for injecting the native application program into the native application program is completed until the webpage container is completed, otherwise, judging that the method for injecting the native application program into the native application program is not completed until the webpage container is completed, wherein the second preset variable refers to a variable preset in the webpage container, judging whether the method for injecting the native application program into the native application program is completed or not until the webpage container is completed according to the value of the variable, and if the method for injecting the native application program into the webpage container is completed, triggering the native application program to set the second preset variable as the second preset threshold value.
(2) If the webpage container finishes loading the HTML5 page, the HTML5 page initiates a first preset pseudo protocol to the native application program, and the first preset pseudo protocol is used for prompting the native application program that the webpage container finishes loading the HTML5 page.
If the native application receives the first preset pseudo protocol and the method for injecting the native application is completed in the webpage container, triggering a preset event in the webpage container, where the preset event is an event registered in the webpage container in advance, and the preset event is injected into the webpage container by a method for transferring the native application between the HTML5 and the native application through execution of the preset event, where the preset event may be registered and set in the webpage container in an injection manner, for example, the preset event is injected into a global variable of the webpage container, such as a Windows global object, and the native application may call the preset event in the global object of the webpage container.
If the HTML5 receives the preset event triggered and executed by the native application program, the fact that the method for injecting the native application program into the native application program is completed to the webpage container is known, otherwise, the method for injecting the native application program into the webpage container is not completed, the HTML5 does not call the method of the native application program, and therefore system abnormity caused by the fact that normal calling cannot be conducted between an HTML5 page and the native application program in Hybird communication is avoided.
It should be noted that, in the Hybrid communication processing method described in each of the above embodiments, the technical features included in different embodiments may be recombined as needed to obtain a combined implementation, but all of the embodiments are within the protection scope claimed in the present application.
Referring to fig. 6, fig. 6 is a schematic block diagram of a Hybrid communication processing apparatus according to an embodiment of the present disclosure. Corresponding to the Hybrid communication processing method, an embodiment of the present application further provides a Hybrid communication processing apparatus. Referring to fig. 6, the Hybrid communication processing apparatus includes a unit for executing the Hybrid communication processing method, and the apparatus may be configured in a smart terminal such as a smart phone. Specifically, referring to fig. 6, the traffic allocating apparatus 600 includes a receiving unit 601, a prompting unit 602, and a communication unit 603.
The receiving unit 601 is used for a native application program to receive an initialization instruction of a webpage container, load HTML5 from a server to the webpage container, and inject a method of a native application program contained in the native application program into the webpage container;
a prompting unit 602, configured to, if the native application learns that the HTML5 is loaded in a first preset manner and the native application method is injected into the web page container, prompt the native application program to inject the native application method of the HTML5 into the web page container in a second preset manner;
the communication unit 603 is configured to perform an interactive call between the HTML5 and the native application program if the HTML5 knows that the method of the native application program is completely injected into the webpage container.
In one embodiment, the prompt unit 602 includes:
an injection subunit, configured to, if the HTML5 is completely loaded, inject a preset method into the web page container before the HTML5 invokes the method of the native application, where the method for transferring the native application between the HTML5 and the native application through execution of the preset method is injected into the web page container;
the initiating subunit is configured to, if the HTML5 completes injecting the preset method into the web page container, initiate a first preset pseudo protocol to the native application program by the HTML5 to prompt the native application program that the HTML5 completes injecting the preset method into the web page container;
the triggering subunit is configured to trigger execution of the preset method if the native application receives the first preset pseudo protocol and the method of injecting the native application is completed in the web page container;
and the learning subunit is configured to learn that the method of the native application is completed when the HTML5 receives the preset method.
In one embodiment, the apparatus 600 further comprises:
and the setting unit is used for setting the preset method in the HTML5.
In one embodiment, the injection subunit is configured to inject the preset method into a global variable of the web page container by the HTML5.
In one embodiment, the global variable in the injection subunit is a Windows global object.
In one embodiment, the prompt unit includes:
the detection subunit is used for detecting whether a first preset variable in the HTML5 is a first preset threshold value or not by the native application program;
a first determining unit, configured to determine that the HTML5 is loaded completely if a first preset variable in the HTML5 is a first preset threshold;
a second determining unit, configured to determine that the HTML5 is not loaded completely if a first preset variable in the HTML5 is not a first preset threshold; the first preset variable refers to a variable preset in the HTML5, and if the HTML5 is loaded, the HTML5 sets the first preset variable as the first preset threshold. .
In an embodiment, the prompting unit is configured to trigger the second preset variable to be set to a second preset threshold if the native application learns that the HTML5 is loaded completely and the method of the native application is injected into the web page container completely, where the second preset variable is a variable preset in the web page container, and the native application triggers the second preset variable to be set to the second preset threshold if the method of the native application is injected into the web page container completely; if the HTML5 detects that the second preset variable in the webpage container is the second preset threshold, the completion of the injection of the method of the native application program into the webpage container is known, and if not, the incompletion of the injection of the method of the native application program into the webpage container is known.
In an embodiment, the prompting unit is configured to trigger execution of a preset event in the web page container if the native application learns that the HTML5 page is completely loaded and the method of the native application is completely injected into the web page container, where the preset event is an event registered in the web page container in advance, and the method of transferring the native application between the HTML5 page and the native application through execution of the preset event is completed by injecting the preset event into the web page container; and if the HTML5 receives the preset event triggered and executed by the native application program, the method for learning the native application program is injected into the webpage container to be completed.
It should be noted that, as can be clearly understood by those skilled in the art, the detailed implementation process of the flow allocating device and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
Meanwhile, the division and connection manner of each unit in the Hybrid communication processing device are only used for illustration, in other embodiments, the Hybrid communication processing device may be divided into different units as required, or each unit in the Hybrid communication processing device may adopt different connection sequences and manners to complete all or part of the functions of the Hybrid communication processing device.
The Hybrid communication processing apparatus may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 7.
Referring to fig. 7, fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 700 may be an intelligent terminal such as a smart phone or a tablet computer, or may be a component or part in other devices.
Referring to fig. 7, the computer device 700 includes a processor 702, memory, and a network interface 705 coupled via a system bus 701, where the memory may include a non-volatile storage medium 703 and an internal memory 704.
The non-volatile storage medium 703 may store an operating system 7031 and computer programs 7032. The computer program 7032, when executed, causes the processor 702 to perform a Hybrid communication processing method as described above.
The processor 702 is configured to provide computing and control capabilities to support the operation of the overall computer device 700.
The internal memory 704 provides an environment for the operation of the computer program 7032 in the non-volatile storage medium 703, and when the computer program 7032 is executed by the processor 702, the processor 702 may be enabled to execute a Hybrid communication processing method as described above.
The network interface 705 is used for network communication with other devices. It will be appreciated by those skilled in the art that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the scope of the computer device 700 to which the present application may be applied, as a particular computer device 700 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 7, and are not described herein again.
Wherein the processor 702 is configured to run a computer program 7032 stored in the memory to perform the steps of: a native application program receives an initialization instruction of a webpage container, loads HTML5 from a server to the webpage container, and injects a method of the native application program contained in the native application program into the webpage container; if the native application program learns that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container to be completed, the native application program prompts the HTML5 through a second preset mode that the method of the native application program is injected into the webpage container to be completed; and if the HTML5 knows that the method of the native application program is injected into the webpage container to be completed, carrying out interactive calling between the HTML5 and the native application program.
In an embodiment, when the processor 702 implements the foregoing steps, the step of knowing, by the native application program through a first preset manner, that the HTML5 is loaded completely includes:
if the HTML5 is loaded completely, before the HTML5 calls the method of the native application program, the HTML5 injects a preset method into the webpage container, wherein the method for transferring the native application program between the HTML5 and the native application program through the execution of the preset method is injected into the webpage container;
if the HTML5 finishes injecting the preset method into the webpage container, the HTML5 initiates a first preset pseudo protocol to the native application program to prompt the native application program that the HTML5 finishes injecting the preset method into the webpage container;
the step that the native application program prompts the HTML5 that the method of the native application program is injected into the webpage container through a second preset mode comprises the following steps:
if the native application program receives the first preset pseudo protocol and the method of injecting the native application program is completed in the webpage container, triggering to execute the preset method;
and if the HTML5 receives the preset method, acquiring that the method of the native application program is injected into the webpage container to be completed.
In an embodiment, when the processor 702 implements the foregoing steps, before the step of injecting the preset method into the webpage container by the HTML5, the method further includes:
and setting the preset method in the HTML5.
In an embodiment, when the processor 702 implements the above steps, the step of injecting the preset method into the webpage container by the HTML5 includes:
and the HTML5 is injected into the global variables of the webpage container by the preset method.
In an embodiment, when the processor 702 implements the above steps, the global variable is a Windows global object.
In an embodiment, when the processor 702 implements the foregoing steps, the step of knowing, by the native application program through a first preset manner, that the HTML5 is loaded completely includes:
the native application program detects whether a first preset variable in the HTML5 is a first preset threshold value or not;
if a first preset variable in the HTML5 is a first preset threshold value, determining that the HTML5 is completely loaded;
if the first preset variable in the HTML5 is not the first preset threshold, determining that the HTML5 is not loaded completely; the first preset variable refers to a variable preset in the HTML5, and if the HTML5 is loaded, the HTML5 sets the first preset variable as the first preset threshold.
In an embodiment, when the processor 702 implements the above steps, the step of prompting, by the native application program in a second preset manner, that the native application program is injected into the webpage container by the method of the HTML5 includes:
if the native application program knows that the HTML5 loading is finished and the method of the native application program is injected into the webpage container, triggering a second preset variable to be set as a second preset threshold value, wherein the second preset variable refers to a variable preset in the webpage container, and if the method of the native application program is injected into the webpage container, triggering the native application program to set the second preset variable as the second preset threshold value;
if the HTML5 detects that the second preset variable in the webpage container is the second preset threshold, the fact that the method of the native application program is injected into the webpage container is completed is known, and if not, the fact that the method of the native application program is not injected into the webpage container is known;
or the step of the native application program prompting the HTML5 that the method of the native application program is injected into the webpage container through a second preset mode includes:
if the native application program knows that the HTML5 page is completely loaded and the native application program method is completely injected into the webpage container, triggering and executing a preset event in the webpage container, wherein the preset event is an event registered in the webpage container in advance, and the native application program is completely injected into the webpage container by transferring the native application program between the HTML5 page and the native application program through the execution of the preset event;
and if the HTML5 receives the preset event triggered and executed by the native application program, the completion of the method of the native application program injected into the webpage container is known.
It should be understood that, in the embodiment of the present Application, the Processor 702 may be a Central Processing Unit (CPU), and the Processor 702 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiments may be implemented by a computer program, and the computer program may be stored in a computer readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium. The storage medium may be a non-transitory computer readable storage medium, the storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of:
a computer program product which, when run on a computer, causes the computer to perform the steps of the Hybrid communication processing method described in the embodiments above.
The storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device. The storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the device. Further, the storage medium may also include both an internal storage unit and an external storage device of the apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated in another system or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing an electronic device (which may be a personal computer, a terminal, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A Hybrid communication processing method is characterized by comprising the following steps:
a native application program receives an initialization instruction of a webpage container, loads HTML5 from a server to the webpage container, and injects a method of the native application program contained in the native application program into the webpage container;
if the native application program learns that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container to be completed, the native application program prompts the HTML5 through a second preset mode that the method of the native application program is injected into the webpage container to be completed; and
and if the HTML5 knows that the method of the native application program is injected into the webpage container and is completed, carrying out interactive calling between the HTML5 and the native application program.
2. The Hybrid communication processing method of claim 1, wherein the step of the native application program knowing that the HTML5 loading is completed through a first preset manner comprises:
if the HTML5 is loaded completely, before the HTML5 calls the method of the native application program, the HTML5 injects a preset method into the webpage container, wherein the method of transferring the native application program between the HTML5 and the native application program through the execution of the preset method is injected into the webpage container;
if the HTML5 finishes injecting the preset method into the webpage container, the HTML5 initiates a first preset pseudo protocol to the native application program to prompt the native application program that the HTML5 finishes injecting the preset method into the webpage container;
the step of the native application program prompting the HTML5 that the method of the native application program is injected into the webpage container in a second preset mode comprises the following steps:
if the native application program receives the first preset pseudo protocol and the method of injecting the native application program is completed in the webpage container, triggering to execute the preset method;
and if the HTML5 receives the preset method, acquiring that the method of the native application program is injected into the webpage container to be completed.
3. The Hybrid communication processing method of claim 2, wherein the step of injecting the HTML5 default method into the webpage container further comprises:
and setting the preset method in the HTML5.
4. The Hybrid communication processing method of claim 2, wherein the step of injecting the HTML5 default method into the webpage container comprises:
and the HTML5 is injected into the global variables of the webpage container by the preset method.
5. The Hybrid communication processing method as claimed in claim 4,
the global variable is a Windows global object.
6. The Hybrid communication processing method of claim 1, wherein the step of the native application program knowing that the HTML5 loading is completed through a first preset manner comprises:
the native application program detects whether a first preset variable in the HTML5 is a first preset threshold value or not;
if a first preset variable in the HTML5 is a first preset threshold value, determining that the HTML5 is completely loaded;
if the first preset variable in the HTML5 is not the first preset threshold, determining that the HTML5 is not loaded completely; the first preset variable refers to a variable preset in the HTML5, and if the HTML5 is loaded, the HTML5 sets the first preset variable as the first preset threshold.
7. The Hybrid communication processing method of claim 1, wherein the step of prompting, by the native application program in a second preset manner, that the HTML5 the native application program is injected into the webpage container includes:
if the native application program knows that the HTML5 loading is finished and the method of the native application program is injected into the webpage container, triggering a second preset variable to be set as a second preset threshold value, wherein the second preset variable refers to a variable preset in the webpage container, and if the method of the native application program is injected into the webpage container, triggering the native application program to set the second preset variable as the second preset threshold value;
if the HTML5 detects that the second preset variable in the webpage container is the second preset threshold, the completion of the injection of the method of the native application program into the webpage container is known, and if not, the incompletion of the injection of the method of the native application program into the webpage container is known;
or the step of the native application program prompting the HTML5 that the method of the native application program is injected into the webpage container through a second preset mode includes:
if the native application program knows that the HTML5 page is completely loaded and the native application program method is completely injected into the webpage container, triggering and executing a preset event in the webpage container, wherein the preset event is an event registered in the webpage container in advance, and the native application program is completely injected into the webpage container by transferring the native application program between the HTML5 page and the native application program through the execution of the preset event;
and if the HTML5 receives the preset event triggered and executed by the native application program, the method for learning the native application program is injected into the webpage container to be completed.
8. A Hybrid communication processing device, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for a native application program to receive an initialization instruction of a webpage container, load HTML5 from a server to the webpage container and inject a method of the native application program contained in the native application program into the webpage container;
the prompting unit is used for prompting the native application program to be injected into the webpage container to be completed through a second preset mode if the native application program learns that the HTML5 is loaded completely through a first preset mode and the method of the native application program is injected into the webpage container to be completed; and
and the communication unit is used for carrying out interactive calling between the HTML5 and the native application program if the HTML5 knows that the method of the native application program is injected into the webpage container to be completed.
9. A computer device, comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor is configured to run a computer program stored in the memory to perform the steps of the Hybrid communication processing method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the steps of the Hybrid communication processing method according to any one of claims 1 to 7.
CN201811527542.9A 2018-12-13 2018-12-13 Hybrid communication processing method and device, computer equipment and storage medium Active CN109743359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811527542.9A CN109743359B (en) 2018-12-13 2018-12-13 Hybrid communication processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811527542.9A CN109743359B (en) 2018-12-13 2018-12-13 Hybrid communication processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109743359A CN109743359A (en) 2019-05-10
CN109743359B true CN109743359B (en) 2022-10-25

Family

ID=66358956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811527542.9A Active CN109743359B (en) 2018-12-13 2018-12-13 Hybrid communication processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109743359B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502708B (en) * 2019-08-27 2020-10-30 北京达佳互联信息技术有限公司 Method, device and storage medium for communication based on JSbridge
CN112394953A (en) * 2020-11-16 2021-02-23 北京五八信息技术有限公司 Application program loading method and device, electronic equipment and storage medium
CN112559928B (en) * 2020-12-24 2023-09-26 成都新希望金融信息有限公司 Page processing method and device based on hybrid development, electronic equipment and storage medium
CN113778566A (en) * 2021-01-29 2021-12-10 北京京东拓先科技有限公司 Native application calling method and device, electronic equipment and computer readable medium
CN113609417A (en) * 2021-07-26 2021-11-05 珠海格力电器股份有限公司 Method, device, equipment and medium for processing mobile terminal page
CN113704659B (en) * 2021-09-08 2023-07-11 杭州默安科技有限公司 Equipment terminal access marking method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461491A (en) * 2013-09-24 2015-03-25 阿里巴巴集团控股有限公司 Running method and system of Hybrid components
CN107368560A (en) * 2017-07-07 2017-11-21 腾讯科技(深圳)有限公司 Method for implementing page and device, the computer-readable recording medium of Mobile solution
CN107608801A (en) * 2017-09-05 2018-01-19 北京京东尚科信息技术有限公司 The primary page and HTML5 page communication methods, device, medium and equipment
CN108959864A (en) * 2017-05-25 2018-12-07 阿里巴巴集团控股有限公司 Funcall authentication, the method and apparatus of calling function and authority information method for building up

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461491A (en) * 2013-09-24 2015-03-25 阿里巴巴集团控股有限公司 Running method and system of Hybrid components
CN108959864A (en) * 2017-05-25 2018-12-07 阿里巴巴集团控股有限公司 Funcall authentication, the method and apparatus of calling function and authority information method for building up
CN107368560A (en) * 2017-07-07 2017-11-21 腾讯科技(深圳)有限公司 Method for implementing page and device, the computer-readable recording medium of Mobile solution
CN107608801A (en) * 2017-09-05 2018-01-19 北京京东尚科信息技术有限公司 The primary page and HTML5 page communication methods, device, medium and equipment

Also Published As

Publication number Publication date
CN109743359A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109743359B (en) Hybrid communication processing method and device, computer equipment and storage medium
CN109766124B (en) Service development method, device, computer equipment and storage medium
CN111159614B (en) Webpage resource acquisition method and device
CN105786538B (en) software upgrading method and device based on android system
CA2885114C (en) Video acquisition method and device
CN108108219B (en) Application program running method and device, computer equipment and storage medium
GB2589658A (en) Method and apparatus for running an applet
CN111008132B (en) Application debugging method and device for Android system, computer equipment and storage medium
CN111427622B (en) Execution method and device of script codes in application program
CN111427596B (en) Software upgrading method and device and terminal equipment
CN109271213B (en) HTML5 page loading method and device, computer equipment and storage medium
CN104809045B (en) Running method and device of monitoring script
CN108334779B (en) Application processing method, device and computing storage medium
CN113765740B (en) Method and device for monitoring Dio network request
CN113110963A (en) Service processing method, service processing device, electronic equipment and readable storage medium
CN108958785B (en) Application program upgrading method and device
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN107918587B (en) Debugging method and system for application program
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN113609417A (en) Method, device, equipment and medium for processing mobile terminal page
CN110968358A (en) Method and device for loading script module based on browser plug-in
CN113296799B (en) Application program installation method and device, electronic equipment and storage medium
CN113641987B (en) Interception method and device for silent installation of application and computer equipment
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN113282363A (en) Method and device for optimizing hybrid APP

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
GR01 Patent grant
GR01 Patent grant