CN106919413A - A kind of method and apparatus that application APP is called by webpage - Google Patents
A kind of method and apparatus that application APP is called by webpage Download PDFInfo
- Publication number
- CN106919413A CN106919413A CN201510999582.3A CN201510999582A CN106919413A CN 106919413 A CN106919413 A CN 106919413A CN 201510999582 A CN201510999582 A CN 201510999582A CN 106919413 A CN106919413 A CN 106919413A
- Authority
- CN
- China
- Prior art keywords
- app
- webpage
- terminal
- program
- request
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44584—Portable applications, i.e. making applications self-contained, e.g. U3 standard
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A kind of method and apparatus that APP is called by webpage are the embodiment of the invention provides, method therein includes:Webpage in terminal sends the Program execution requests generated according to preset format to the APP in the terminal;The program that webpage in the terminal receives the APP returns performs response.By scheme provided in an embodiment of the present invention, user can directly call corresponding APP in web page browsing by webpage, realize that third-party application is coupled and communication with the direct of webpage, such that it is able to provide the user various services by webpage, greatly improve Consumer's Experience.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of method that APP is called by webpage
And device.
Background technology
With developing rapidly for Internet technology, by various terminals, e.g., PC PC, flat board
Computer PAD, smart mobile phone have become part indispensable during people live to surf the Net.
Terminal user can realize various internet behaviors by terminal, e.g., game, social, net
Purchase, web page browsing, information acquisition, file download etc..Exactly diversified internet behavior is to user
Daily life bring great convenience.
At present, terminal user is most of the time that various internet behaviors are carried out by accessing webpage, is used
The operation behavior during using terminal of family is varied, and problems with can usually occur:
First, while user browses webpage, it is desirable to perform certain certain operations, e.g., terminal device is entered
When row detection or antivirus, directly can not but be performed by webpage.
2nd, various internet behaviors, the information of acquisition is varied, and the webpage species of access is various,
Many unsafe factors are produced, for example, when user is by page download software, software is not can determine that but
Security, in this case, user can not directly perform some operations to avoid these uneasy by webpage
Total factor.
The appearance of these problems is all the security limitation due to webpage in itself so that at this stage on webpage
Some authorities high, the business of high security in execution system are unable to, and this is just realized to user by webpage
Internet behavior bring many inconvenience in itself.When both the above situation occurs, user often has to
Interrupt webpage to browse, and the application APP of corresponding service is can perform in opening a terminal and perform phase
The operation answered.It will be apparent that this mode is cumbersome, it is impossible to the Consumer's Experience for bringing.
The content of the invention
Can not directly on webpage in order to the security solved in the prior art due to webpage in itself is limited
Some authorities high, the problem of high security business in execution system, the embodiment of the present invention are expected to provide a kind of
The method and apparatus that APP is called by webpage.
A kind of method that APP is called by webpage is the embodiment of the invention provides, including:
Webpage in terminal sends the program generated according to preset format to the APP in the terminal and performs
Request;
The program that webpage in the terminal receives the APP returns performs response.
Preferably, the terminal is sent to the APP in the terminal by webpage and is given birth to according to preset format
Into Program execution requests, including:
Webpage in the terminal sends what is generated according to preset format by presetting port to the APP
Program execution requests;
The program that webpage in the terminal receives the APP returns in the terminal performs response, including:
Webpage in the terminal receives the journey that the APP in the terminal is returned by the default port
Sequence performs response.
Preferably, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Preferably, it is HTTP request that described program performs request.
Preferably, described program performs response for the APP performs the journey after described program performs request
Sequence result indicates to ask the instruction message of failure.
A kind of method that application APP is called by webpage is the embodiment of the invention provides, including:
APP in terminal receives the program generated according to preset format that the webpage in the terminal sends
Perform request;
The APP judges whether that performing described program performs request;
When the APP determines that performing described program performs request, respective handling is performed, generate program
Result;
The APP sends described program result to the webpage in the terminal.
Preferably, the program that the webpage in the APP reception terminals in the terminal sends is performed please
Ask, including:
APP in the terminal is by the webpage transmission in the default port reception terminal according to pre-
If the Program execution requests of form generation;
The APP sends described program result to the webpage in the terminal, including:
The APP sends described program and processes knot by the default port to the webpage in the terminal
Really.
Preferably, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Preferably, methods described also includes:
When the APP determines that not performing described program performs request, generation indicates the finger of request failure
Show message;
The instruction message is sent to the webpage in the terminal.
The embodiment of the invention provides a kind of device for calling APP by webpage, the net in terminal
Page end includes:First generation module, the first sending module and the first receiver module;Wherein,
First generation module, for generating program execute instruction according to preset format;
First sending module, the program for sending the generation to the APP in the terminal is held
Row request;
First receiver module, response is performed for receiving the program that the APP is returned.
Preferably, first sending module, in the following manner to the APP in the terminal
Send the program execute instruction of the generation:
First sending module is sent according to default lattice by presetting port to the APP in the terminal
The Program execution requests of formula generation;
First receiver module, performs for receiving the program that the APP is returned in the following manner
Response:
The program that the APP returns in the terminal are received by the default port performs response.
Preferably, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Preferably, it is HTTP request that described program performs request.
Preferably, described program performs response for the APP performs the journey after described program performs request
Sequence result indicates to ask the instruction message of failure.
The embodiment of the present invention provides a kind of device for calling application APP by webpage, positioned at terminal
On application APP end, including:Second receiver module, judge module, performing module, second
Sending module and the second generation module;Wherein,
Second receiver module, for receiving being given birth to according to preset format for the transmission of the webpage in the terminal
Into Program execution requests;
The judge module, for judging whether that performing described program performs request;
The performing module, for when the judge module determines that performing described program performs request, holding
Row respective handling;
Second generation module, for generating program result;
Second sending module, for sending described program result to the webpage in the terminal.
Preferably, second receiver module, sends for the webpage in receiving terminal in the following manner
Program execution requests:
The program generated according to preset format that the webpage in the terminal sends is received by presetting port
Perform request;
Second sending module is used to send the journey to the webpage in the terminal in the following manner
Sequence result:
Described program result is sent to the webpage in the terminal by the default port.
Preferably, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Preferably, second generation module, is additionally operable to determine not performing the journey when the judge module
When sequence performs request, generation indicates the instruction message of request failure;
Second sending module, for the webpage being sent to the instruction message in the terminal.
The embodiment of the present invention at least possesses advantages below:
A kind of method and apparatus that APP is called by webpage that the embodiment of the present invention is provided, terminal is led to
Cross webpage and the Program execution requests generated according to preset format are sent to APP, the terminal passes through webpage
The program for receiving the APP returns performs response, and so, user directly can lead in web page browsing
Cross webpage to call corresponding APP, realize that third-party application (that is, described APP) is direct with webpage
It is coupled and communicates, such that it is able to provides the user various services by webpage, it is to avoid use in the prior art
Family needs the complex operations process of manually opened corresponding APP, greatly improves Consumer's Experience.
Brief description of the drawings
Fig. 1 shows a kind of step of method for calling APP by webpage that the embodiment of the present invention one is provided
Rapid flow chart one;
What Fig. 2 showed that the embodiment of the present invention two provides a kind of calls the method for APP real by webpage
Flow chart of steps two;
Fig. 3 shows a kind of the basic of device for calling APP by webpage provided in an embodiment of the present invention
Structured flowchart one;
Fig. 4 shows a kind of the basic of device for calling APP by webpage provided in an embodiment of the present invention
Structured flowchart two.
Specific embodiment
To enable the above objects, features and advantages of the present invention more obvious understandable, with reference to attached
The present invention is further detailed explanation with specific embodiment for figure.
Embodiment of the method one
Reference picture 1, is shown of the invention a kind of the step of the embodiment of the method for APP is called by webpage
Flow chart, can specifically include:
Webpage in step 101, terminal sends what is generated according to preset format to the APP in the terminal
Program execution requests;
The step in, webpage in the terminal is sent out by presetting port to the APP in the terminal
Send the Program execution requests generated according to preset format;
Here, it is necessary to predefine the network port that good webpage and APP are communicated, and by this port
It is set to default port.So, webpage can be performed by the default port to APP transmission programs
Request, and APP then can obtain described program execute instruction by monitoring the default port.
It should be noted that webpage referred herein refers to the browsing device net page in terminal, APP refers to same
One or more APP for being installed in one terminal or one that is integrated in the browsing device net page
Or more than one APP.For example, when user wishes to perform the performance detection to terminal system, Ke Yitong
Cross webpage and initiate request to the systematic function inspection software in terminal, can thus call installed in terminal
On systematic function inspection software perform the detection to terminal capabilities;Pass through page download software in user
Application scenarios in, webpage can call the software being integrated in webpage, e.g., software download software and hard
Part inspection software completes the download of software, so, can be soft by hardware detection before software download
Part judges whether software to be downloaded matches with terminal, soft by software download if matched
Part downloads corresponding software.
Specifically, the preset format refers to:Uniform resource position mark URL+command parameter;Wherein,
The URL includes the port numbers of the default port;Here preset format be pre-set,
The form that webpage and APP can be recognized and correctly performed.It is, terminal passes through webpage to APP
Send the program execute instruction generated according to above-mentioned form.
One exemplary program execute instruction is as follows:
http://127.0.0.1:8359/qhapiClient=gameunion&command=alive&callback=j
sonp1;
Wherein, http://127.0.0.1:8359/qhapi is URL, and visit is needed comprising terminal in the URL
The default port numbers asked:8359;Client=gameunion&command=alive&callback=jsonp1
It is command parameter, in the example, three parameters is included in the command parameter:client、command
And callback, wherein, client represents the mark of exectorial APP, specific to example A PP
It is designated gameunion, command and represents the order to be performed, specific to the example life to be performed
Order is that alive, callback represent Java script (JS) call back function after performing order, specific to this
Example JS call back functions are jsonp1, and connector is used between parameters:& is connected.In the example,
Symbol "" it is connector between URL and command parameter.
Although it will be appreciated to those of skill in the art that only giving order ginseng in examples presented above
Included in number in three situations of parameter, but actual realization, command parameter can be set as needed
Put, then the number and content of parameter can be arranged as required in command parameter, the present invention is not limited.
In actual realization, there can be various ways to trigger webpage and APP is called, for example, user's point
When hitting certain particular control in webpage, webpage then sends order and performs by default port to corresponding APP
Request, so as to realize calling corresponding APP;Or, user, should by performing certain specific operation
Directly triggering webpage is called to specific APP for operation, therefore, it can pre-set user's operation and APP
Corresponding relation.
In a preferred embodiment of the present invention, terminal is sent according to preset format by webpage to APP
Before the Program execution requests of generation, webpage can provide multiple executable corresponding programs and perform request
APP is identified and selected for user, APP marks here can be specifically APP representative icon and
Or APP titles;After the selected APP of user, webpage performs request to corresponding APP transmission programs,
In such manner, it is possible to the use habit and needs of user are preferably matched, so as to improve Consumer's Experience.
In step 101, described program execute instruction can be HTTP request.
The program that webpage in step 102, the terminal receives the APP returns performs response.
The step in, the webpage in the terminal receives the APP and returns by the default port
The program returned performs response.In implementing, terminal constantly monitors the described default port on the webpage,
The program returned so as to receive the APP performs response.
Described program performs response, including:The APP performs the program after described program performs request
Result indicates to ask the instruction message of failure.
In actual realization, when the APP agrees to that performing described program execution asks and run succeeded,
Program result is then returned to the webpage by default port;Accordingly, the webpage receives journey
After sequence result, information and/or program that instruction program runs succeeded can be shown to user by webpage
The information for needing user to check after execution;
Asked or described when the APP disagrees execution described program execution due to a variety of causes
When APP agrees to that performing described program performs request but failure occurs to perform in the process of implementation, then by pre-
If port to the webpage return indicate request failure instruction message, at this moment, the webpage can to
The instruction message of family displaying request failure, it is also possible to the reason for asking failure to user's displaying, from
And user can judge whether to initiate Program execution requests again according to reason, or terminate transmission program
Perform request.
Specifically, APP returns to program by JS functions to webpage performs response.
In such scheme, terminal sends the program generated according to preset format and performs by webpage to APP
Request, the terminal performs response, so, user by the program that webpage receives the APP returns
Corresponding APP can be directly called by webpage in web page browsing, realizes third-party application (i.e.,
The APP) it is coupled with the direct of webpage, such that it is able to provide the user various services by webpage, keep away
Having exempted from user in the prior art needs the complex operations process of manually opened corresponding APP, greatly improves use
Experience at family.
Embodiment of the method two
Reference picture 2, is shown of the invention a kind of the step of the embodiment of the method for APP is called by webpage
Flow chart, can specifically include:
What the webpage that the APP in step 201, terminal receives in the terminal sent gives birth to according to preset format
Into Program execution requests;
Specifically, the APP in the terminal is sent by presetting the webpage in the port reception terminal
According to preset format generate Program execution requests;Accordingly, it would be desirable to the good webpage of offered and APP
Between COM1, webpage and APP are realized in that is, the default port by the default port
Between communication.That is, webpage performs request by the default port to APP transmission programs;And APP
The Program execution requests of webpage transmission are obtained by monitoring the default port.
It should be noted that webpage referred herein refers to the browsing device net page in terminal, APP refers to same
One or more APP for being installed in one terminal or one that is integrated in the browsing device net page
Or more than one APP.
Specifically, the preset format is:Uniform resource position mark URL+command parameter;Wherein, institute
Stating URL includes the port numbers of the default port.Here preset format be pre-set, net
The form that page and APP can be recognized and correctly performed.
One exemplary program execute instruction is as follows:
http://127.0.0.1:8359/qhapiClient=gameunion&command=alive&callback=j
sonp1;
Wherein, http://127.0.0.1:8359/qhapi is URL, and visit is needed comprising terminal in the URL
The default port numbers asked:8359;Client=gameunion&command=alive&callback=jsonp1
It is command parameter, in the example, three parameters is included in the command parameter:client、command
And callback, wherein, client represents the mark of exectorial APP, specific to example A PP
It is designated gameunion, command and represents the order to be performed, specific to the example life to be performed
Order is that alive, callback represent Java script (JS) call back function after performing order, specific to this
Example JS call back functions are jsonp1, and connector is used between parameters:& is connected.In the example,
Symbol "" it is connector between URL and command parameter.
Although it will be appreciated to those of skill in the art that only giving order ginseng in examples presented above
Included in number in three situations of parameter, but actual realization, command parameter can be set as needed
Put, then the number and content of parameter can be arranged as required in command parameter, the present invention is not limited.
Step 202, the APP judge whether that performing described program performs request;
The step in, the APP be properly received described program perform request after judge whether perform institute
State Program execution requests;Specifically, in practical implementations, the APP is performed by described program
The correctness and legitimacy of request are judged to judge whether that performing described program performs request;Here
Correctness refer to described program perform request form and parameter it is whether correct etc.;Legitimacy refers to judge
Whether the user for sending the webpage that described program performs request is to use the validated user of the APP, i.e.
Need to verify the identity of user.
Step 203, when the APP determine perform described program perform request when, perform respective handling,
Generation program result;
Specifically, when determining that performing described program performs request in step 202, the APP performs institute
The treatment that Program execution requests ask to perform is stated, and generates program result.
Step 204, the APP send described program result to the webpage in the terminal.
Specifically, the APP is sent at described program by the default port to the webpage in terminal
Reason result.
In another alternative embodiment of the invention, methods described also includes:
When the APP determines that not performing described program performs request, generation indicates the finger of request failure
Show message;The instruction message is sent to the webpage in the terminal.Here determination does not perform described
Program execution requests include:Described program performs request and is unsatisfactory for correctness and/or legitimacy requirement.
In such scheme, the webpage that APP in terminal receives in the terminal send according to default lattice
The Program execution requests of formula generation, afterwards, the APP judges whether that performing described program performs request,
When the APP determines that performing described program performs request, respective handling, generation program treatment are performed
As a result, afterwards, the APP sends described program result to the webpage in the terminal.The party
Case realizes webpage and APP is called there is provided a kind of simple, easy method, so as to facilitate user
The irrealizable function of webpage institute is realized during webpage is browsed, the diversity of user's request is met,
And the tedious steps that user directly performs respective handling in APP manually are avoided, greatly improve user
Experience.
Device embodiment one
Reference picture 3, shows a kind of structural frames of the device embodiment for calling APP by webpage of the present invention
Figure, described device is located at the page end in terminal, including:First generation module 31, the first sending module
32 and first receiver module 33;Wherein,
First generation module 31, for generating program execute instruction according to preset format;
First sending module 32, the program for sending the generation to the APP in the terminal
Perform request;
First receiver module 33, response is performed for receiving the program that the APP is returned.
Specifically, first sending module 32, in the following manner to the APP in the terminal
Send the program execute instruction of the generation:
First sending module 32 is sent according to default by presetting port to the APP in the terminal
The Program execution requests of form generation;
First receiver module 33, holds for receiving the program that the APP is returned in the following manner
Row response:
The program that the APP returns in the terminal are received by the default port performs response.
Specifically, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Specifically, it is HTTP request that described program performs request.
Specifically, described program performs response for the APP performs the journey after described program performs request
Sequence result indicates to ask the instruction message of failure.
In specific implementation process, above-mentioned first generation module 31, the first sending module 32 and first connect
Receive module 33 can by the central processing unit (CPU, Central Processing Unit) in terminal,
Microprocessor (MPU, Micro Processing Unit), digital signal processor (DSP, Digital
Signal Processor) or programmable logic array (FPGA, Field-Programmable Gate
Array) realize.
Device embodiment two
Reference picture 4, shows a kind of structural frames of the device embodiment for calling APP by webpage of the present invention
Figure, described device is located at the application APP end in terminal, including:Second receiver module 41, sentence
Disconnected module 42, performing module 43, the second generation module 44 and the second sending module 45;Wherein,
Second receiver module 41, for receive the webpage in the terminal transmission according to preset format
The Program execution requests of generation;
The judge module 42, for judging whether that performing described program performs request;
The performing module 43, for when the judge module determine perform described program perform request when,
Perform respective handling;
Second generation module 44, for generating program result;
Second sending module 45, for sending described program treatment knot to the webpage in the terminal
Really.
Specifically, second receiver module 41, for the webpage hair in receiving terminal in the following manner
The Program execution requests for sending:
The program generated according to preset format that the webpage in the terminal sends is received by presetting port
Perform request;
Second sending module 45, for sending described to the webpage in the terminal in the following manner
Program result:
Described program result is sent to the webpage in the terminal by the default port.
Specifically, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
Specifically, second generation module 44, be additionally operable to when the judge module determine not perform it is described
During Program execution requests, generation indicates the instruction message of request failure;
Second sending module 45, for the webpage being sent to the instruction message in the terminal.
In specific implementation process, above-mentioned second receiver module 41, judge module 42, performing module 43,
Two generation modules 44 and the second sending module 45 can be by the CPU in terminal, MPU, numeral DSP
Or FPGA is realized.
For device implements embodiment, because it is substantially similar to embodiment of the method, so description
It is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Each embodiment in this specification is described by the way of progressive, and each embodiment is stressed
Be all difference with other embodiment, between each embodiment identical similar part mutually referring to
.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, dress
Put or computer program product.Therefore, the embodiment of the present invention can using complete hardware embodiment, completely
The form of the embodiment in terms of software implementation or combination software and hardware.And, the embodiment of the present invention
Can use can be situated between in one or more computers for wherein including computer usable program code with storage
The computer journey implemented in matter (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of sequence product.
The embodiment of the present invention is with reference to method according to embodiments of the present invention, terminal device (system) and meter
The flow chart and/or block diagram of calculation machine program product is described.It should be understood that can be by computer program instructions
Realize each flow and/or square frame and flow chart and/or the square frame in flow chart and/or block diagram
The combination of flow and/or square frame in figure.Can provide these computer program instructions to all-purpose computer,
The processor of special-purpose computer, Embedded Processor or other programmable data processing terminal equipments is producing
One machine so that by the computing device of computer or other programmable data processing terminal equipments
Instruction produce for realizing in one flow of flow chart or multiple one square frame of flow and/or block diagram or
The device of the function of being specified in multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable datas to process
In the computer-readable memory that terminal device works in a specific way so that storage is in the computer-readable
Instruction in memory is produced and includes the manufacture of command device, and command device realization is in flow chart one
The function of being specified in flow or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can also be loaded into computer or other programmable data processing terminals set
It is standby upper so that execution series of operation steps is in terms of producing on computer or other programmable terminal equipments
The treatment that calculation machine is realized, so as to the instruction performed on computer or other programmable terminal equipments provides use
In realization in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames
The step of function of specifying.
Although having been described for the preferred embodiment of the embodiment of the present invention, those skilled in the art are once
Basic creative concept is known, then other change and modification can be made to these embodiments.So,
Appended claims are intended to be construed to include preferred embodiment and fall into the institute of range of embodiment of the invention
Have altered and change.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relation art
Language is used merely to make a distinction an entity or operation with another entity or operation, and not necessarily
It is required that or implying between these entities or operation there is any this actual relation or order.And
And, term " including ", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, from
And cause that the process, method, article or the terminal device that include a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, side
Method, article or the intrinsic key element of terminal device.In the absence of more restrictions, by sentence
The key element that "including a ..." is limited, it is not excluded that in the process including the key element, method, thing
Also there is other identical element in product or terminal device.
Above to a kind of method and apparatus that APP is called by webpage provided by the present invention, carry out
It is discussed in detail, specific case used herein is explained principle of the invention and implementation method
State, the explanation of above example is only intended to help and understands the method for the present invention and its core concept;Together
When, for those of ordinary skill in the art, thought of the invention, in specific embodiment and
Be will change in range of application, in sum, this specification content should not be construed as to this hair
Bright limitation.
The invention discloses A1, a kind of method that application APP is called by webpage, methods described
Including:
Webpage in terminal sends the program generated according to preset format to the APP in the terminal and performs
Request;
The program that webpage in the terminal receives the APP returns performs response.
A2, the method as described in A1, the terminal are sent by webpage to the APP in the terminal
According to the Program execution requests that preset format is generated, including:
Webpage in the terminal sends what is generated according to preset format by presetting port to the APP
Program execution requests;
The program that webpage in the terminal receives the APP returns in the terminal performs response, including:
Webpage in the terminal receives the journey that the APP in the terminal is returned by the default port
Sequence performs response.
A3, the method as described in A2, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
A4, the method as described in A1 to A3 any of which, it is hypertext that described program performs request
Host-host protocol HTTP request.
A5, the method as described in A4, described program perform response for the APP performs described program
Perform the program result after request or indicate the instruction message of request failure.
The invention discloses B6, a kind of method that application APP is called by webpage, methods described
Including:
APP in terminal receives the program generated according to preset format that the webpage in the terminal sends
Perform request;
The APP judges whether that performing described program performs request;
When the APP determines that performing described program performs request, respective handling is performed, generate program
Result;
The APP sends described program result to the webpage in the terminal.
B7, the method as described in B6, the webpage that the APP in the terminal is received in the terminal send
Program execution requests, including:
APP in the terminal is by the webpage transmission in the default port reception terminal according to pre-
If the Program execution requests of form generation;
The APP sends described program result to the webpage in the terminal, including:
The APP sends described program and processes knot by the default port to the webpage in the terminal
Really.
B8, the method as described in B7, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
B9, the method as described in B6 to B8 any of which, methods described also include:
When the APP determines that not performing described program performs request, generation indicates the finger of request failure
Show message;
The instruction message is sent to the webpage in the terminal.
The invention discloses C10, a kind of device for calling application APP by webpage, positioned at end
Page end on end, described device includes:First generation module, the first sending module and first receive mould
Block;Wherein,
First generation module, for generating program execute instruction according to preset format;
First sending module, the program for sending the generation to the APP in the terminal is held
Row request;
First receiver module, response is performed for receiving the program that the APP is returned.
C11, the device as described in C10, first sending module, in the following manner to institute
State the program execute instruction that the APP in terminal sends the generation:
First sending module is sent according to default lattice by presetting port to the APP in the terminal
The Program execution requests of formula generation;
First receiver module, performs for receiving the program that the APP is returned in the following manner
Response:
The program that the APP returns in the terminal are received by the default port performs response.
C12, the device as described in C11, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
C13, the device as described in C10 to C12 any of which, it is super literary that described program performs request
This host-host protocol HTTP request.
C14, the device as described in C13, described program perform response for the APP performs described program
Perform the program result after request or indicate the instruction message of request failure.
The invention discloses D15, a kind of device for calling application APP by webpage, positioned at end
Application APP end on end, described device includes:Second receiver module, judge module, execution
Module, the second sending module and the second generation module;Wherein,
Second receiver module, for receiving being given birth to according to preset format for the transmission of the webpage in the terminal
Into Program execution requests;
The judge module, for judging whether that performing described program performs request;
The performing module, for when the judge module determines that performing described program performs request, holding
Row respective handling;
Second generation module, for generating program result;
Second sending module, for sending described program result to the webpage in the terminal.
D16, the device as described in D15, second receiver module, for receiving in the following manner
The Program execution requests that webpage in terminal sends:
The program generated according to preset format that the webpage in the terminal sends is received by presetting port
Perform request;
Second sending module is used to send the journey to the webpage in the terminal in the following manner
Sequence result:
Described program result is sent to the webpage in the terminal by the default port.
D17, the device as described in D16, the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
D18, the device as described in D15 to D17 any of which, second generation module are also used
In when the judge module determines that not performing described program performs request, generation indicates the finger of request failure
Show message;
Second sending module, for the webpage being sent to the instruction message in the terminal.
Claims (10)
1. a kind of method that application APP is called by webpage, it is characterised in that methods described bag
Include:
Webpage in terminal sends the program generated according to preset format to the APP in the terminal and performs
Request;
The program that webpage in the terminal receives the APP returns performs response.
2. method according to claim 1, it is characterised in that the terminal is by webpage to institute
State the APP in terminal and send the Program execution requests generated according to preset format, including:
Webpage in the terminal sends what is generated according to preset format by presetting port to the APP
Program execution requests;
The program that webpage in the terminal receives the APP returns in the terminal performs response, including:
Webpage in the terminal receives the journey that the APP in the terminal is returned by the default port
Sequence performs response.
3. method according to claim 2, it is characterised in that the preset format is:
Uniform resource position mark URL+command parameter;
Wherein, the URL includes the port numbers of the default port.
4. according to the method described in claims 1 to 3 any of which, it is characterised in that the journey
It is HTTP request that sequence performs request.
5. method according to claim 4, it is characterised in that it is institute that described program performs response
State APP and perform the instruction that described program performs the program result after request or instruction request failure
Message.
6. a kind of method that application APP is called by webpage, it is characterised in that methods described bag
Include:
APP in terminal receives the program generated according to preset format that the webpage in the terminal sends
Perform request;
The APP judges whether that performing described program performs request;
When the APP determines that performing described program performs request, respective handling is performed, generate program
Result;
The APP sends described program result to the webpage in the terminal.
7. a kind of device for calling application APP by webpage, the page end in terminal, its
It is characterised by, described device includes:First generation module, the first sending module and the first receiver module;
Wherein,
First generation module, for generating program execute instruction according to preset format;
First sending module, the program for sending the generation to the APP in the terminal is held
Row request;
First receiver module, response is performed for receiving the program that the APP is returned.
8. device according to claim 7, it is characterised in that first sending module, uses
In the program execute instruction for sending the generation to the APP in the terminal in the following manner:
First sending module is sent according to default lattice by presetting port to the APP in the terminal
The Program execution requests of formula generation;
First receiver module, performs for receiving the program that the APP is returned in the following manner
Response:
The program that the APP returns in the terminal are received by the default port performs response.
9. a kind of device for calling application APP by webpage, the application program in terminal
APP ends, it is characterised in that described device includes:Second receiver module, judge module, performing module,
Second sending module and the second generation module;Wherein,
Second receiver module, for receiving being given birth to according to preset format for the transmission of the webpage in the terminal
Into Program execution requests;
The judge module, for judging whether that performing described program performs request;
The performing module, for when the judge module determines that performing described program performs request, holding
Row respective handling;
Second generation module, for generating program result;
Second sending module, for sending described program result to the webpage in the terminal.
10. device according to claim 9, it is characterised in that second receiver module, uses
In the Program execution requests that the webpage in receiving terminal in the following manner sends:
The program generated according to preset format that the webpage in the terminal sends is received by presetting port
Perform request;
Second sending module is used to send the journey to the webpage in the terminal in the following manner
Sequence result:
Described program result is sent to the webpage in the terminal by the default port.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510999582.3A CN106919413A (en) | 2015-12-25 | 2015-12-25 | A kind of method and apparatus that application APP is called by webpage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510999582.3A CN106919413A (en) | 2015-12-25 | 2015-12-25 | A kind of method and apparatus that application APP is called by webpage |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106919413A true CN106919413A (en) | 2017-07-04 |
Family
ID=59455022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510999582.3A Pending CN106919413A (en) | 2015-12-25 | 2015-12-25 | A kind of method and apparatus that application APP is called by webpage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106919413A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729482A (en) * | 2017-10-17 | 2018-02-23 | 北京京东尚科信息技术有限公司 | The method and apparatus of collector journal |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102393857A (en) * | 2011-11-01 | 2012-03-28 | 中兴通讯股份有限公司 | Method and system for local call based on web page |
CN102880514A (en) * | 2012-10-26 | 2013-01-16 | 北京小米科技有限责任公司 | Method and device for calling application program |
CN103095783A (en) * | 2011-11-08 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Method and device for web application debugging |
CN103106102A (en) * | 2013-01-14 | 2013-05-15 | 百度在线网络技术(北京)有限公司 | Running method of Web application program and mobile terminal |
CN103279706A (en) * | 2013-06-07 | 2013-09-04 | 北京奇虎科技有限公司 | Method and device for intercepting installation of Android application program in mobile terminal |
CN103853540A (en) * | 2012-12-04 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Method and system for accessing third-party application on operating system desktop |
CN103970760A (en) * | 2013-01-28 | 2014-08-06 | 腾讯科技(深圳)有限公司 | Webpage request handling method and device |
CN104301443A (en) * | 2014-10-09 | 2015-01-21 | 百度在线网络技术(北京)有限公司 | Method and system for calling end capacity ports on web page |
CN104364762A (en) * | 2012-04-10 | 2015-02-18 | 斯波帝范公司 | Systems and methods for controlling a local application through a web page |
CN104375831A (en) * | 2014-11-06 | 2015-02-25 | 北京奇虎科技有限公司 | Method, device and system realizing communication between webpage and applications on terminal equipment |
CN104954404A (en) * | 2014-03-27 | 2015-09-30 | 毛新华 | Web browser mobile phone information synchronization principle and applications |
CN104978176A (en) * | 2014-04-10 | 2015-10-14 | 腾讯科技(北京)有限公司 | Application program interface calling method and device |
-
2015
- 2015-12-25 CN CN201510999582.3A patent/CN106919413A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102393857A (en) * | 2011-11-01 | 2012-03-28 | 中兴通讯股份有限公司 | Method and system for local call based on web page |
CN103095783A (en) * | 2011-11-08 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Method and device for web application debugging |
CN104364762A (en) * | 2012-04-10 | 2015-02-18 | 斯波帝范公司 | Systems and methods for controlling a local application through a web page |
CN102880514A (en) * | 2012-10-26 | 2013-01-16 | 北京小米科技有限责任公司 | Method and device for calling application program |
CN103853540A (en) * | 2012-12-04 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Method and system for accessing third-party application on operating system desktop |
CN103106102A (en) * | 2013-01-14 | 2013-05-15 | 百度在线网络技术(北京)有限公司 | Running method of Web application program and mobile terminal |
CN103970760A (en) * | 2013-01-28 | 2014-08-06 | 腾讯科技(深圳)有限公司 | Webpage request handling method and device |
CN103279706A (en) * | 2013-06-07 | 2013-09-04 | 北京奇虎科技有限公司 | Method and device for intercepting installation of Android application program in mobile terminal |
CN104954404A (en) * | 2014-03-27 | 2015-09-30 | 毛新华 | Web browser mobile phone information synchronization principle and applications |
CN104978176A (en) * | 2014-04-10 | 2015-10-14 | 腾讯科技(北京)有限公司 | Application program interface calling method and device |
CN104301443A (en) * | 2014-10-09 | 2015-01-21 | 百度在线网络技术(北京)有限公司 | Method and system for calling end capacity ports on web page |
CN104375831A (en) * | 2014-11-06 | 2015-02-25 | 北京奇虎科技有限公司 | Method, device and system realizing communication between webpage and applications on terminal equipment |
WO2016070690A1 (en) * | 2014-11-06 | 2016-05-12 | 北京奇虎科技有限公司 | Method, device and system for realizing communication between application and webpage on terminal device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729482A (en) * | 2017-10-17 | 2018-02-23 | 北京京东尚科信息技术有限公司 | The method and apparatus of collector journal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102220127B1 (en) | Method and apparatus for customized software development kit (sdk) generation | |
CN110708346B (en) | Information processing system and method | |
US20170272551A1 (en) | Mechanism for determining whether to redirect a request originally destined for a server based on a uniform resource locator | |
US9110738B2 (en) | Method and apparatus for calling back a program | |
CN110020367B (en) | Page rendering method and device | |
US20150379030A1 (en) | Platform integrating method and system for adapting third-party web page in application | |
US9565148B2 (en) | Method and apparatus for processing micro web log messages | |
CA2992249C (en) | Visual interactive voice response system | |
WO2014153970A1 (en) | Method and apparatus for text input protection | |
CN103577180B (en) | Data processing method and device | |
CN108255936A (en) | A kind of edit methods of webpage, system and editing machine | |
EP2959402B1 (en) | Architecture for remote access to content state | |
CN105701198B (en) | Page verification method and device | |
JP2015018537A (en) | Method and system for downloading application | |
CN104378428A (en) | Method and device for downloading files | |
CN107517188A (en) | A kind of data processing method and device based on Android system | |
CN108509228B (en) | Page loading method, terminal equipment and computer readable storage medium | |
EP3125541A1 (en) | Data acquisition and interaction method, set top box, server and multimedia system | |
CN112015383A (en) | Login method and device | |
CN112818270B (en) | Data cross-domain transfer method and device and computer equipment | |
CN109597912A (en) | Method for handling picture | |
CN106919413A (en) | A kind of method and apparatus that application APP is called by webpage | |
CN112130842A (en) | Page generation method and device | |
US9916391B2 (en) | Method, apparatus and terminal for webpage content browsing | |
CN111756916A (en) | Application processing method and device, electronic equipment and computer 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170704 |
|
RJ01 | Rejection of invention patent application after publication |