CN108833585A - Information interacting method, device and storage medium - Google Patents

Information interacting method, device and storage medium Download PDF

Info

Publication number
CN108833585A
CN108833585A CN201810718218.9A CN201810718218A CN108833585A CN 108833585 A CN108833585 A CN 108833585A CN 201810718218 A CN201810718218 A CN 201810718218A CN 108833585 A CN108833585 A CN 108833585A
Authority
CN
China
Prior art keywords
request
webpage
operating system
target application
application
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.)
Granted
Application number
CN201810718218.9A
Other languages
Chinese (zh)
Other versions
CN108833585B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810718218.9A priority Critical patent/CN108833585B/en
Publication of CN108833585A publication Critical patent/CN108833585A/en
Application granted granted Critical
Publication of CN108833585B publication Critical patent/CN108833585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure is directed to a kind of information interacting method, device and storage mediums, are related to network technique field.This method includes:Operating system receives the request from webpage, it include the application identities and request content of target application in the request, the request content is used to indicate the event that the webpage needs to request to the target application, the operating system forwards the request content to the corresponding target application of the application identities, the operating system obtains the response message that the target application is fed back based on the request content, which is sent to the webpage for the response message.The embodiment of the present disclosure realizes the interaction between webpage and application, has achieved the purpose that call directly application by webpage by information exchange.

Description

Information interacting method, device and storage medium
Technical field
The embodiment of the present disclosure is related to network technique field more particularly to a kind of information interacting method, device and storage medium.
Background technique
Currently, the function of webpage carrying is more and more with the fast development of network technology, for example, webpage can be use Family provides browsing content.In addition to this, in correlative technology field, how webpage realizes that more information exchanges become research Hot spot.
Summary of the invention
The embodiment of the present disclosure provides a kind of information interacting method, device and storage medium, may be implemented by webpage come Call the application installed in mobile terminal.
According to the first aspect of the embodiments of the present disclosure, a kind of information interacting method is provided, the method includes:
Operating system receives the request from webpage, includes in the application identities and request of target application in the request Hold, the request content is used to indicate the event that the webpage needs to request to the target application;
The operating system forwards the request content to the corresponding target application of the application identities;
The operating system obtains the response message that the target application is fed back based on the request content;
The response message is sent to the webpage by the operating system.
Optionally, before the operating system forwards the request content to the corresponding target application of the application identities, Further include:
Whether the operating system inquires the corresponding target application of the application identities currently in operating status;
When the target application is currently at operating status, the operating system executes described to the application identities pair The target application answered forwards the operation of the request content;When the target application is not currently in operating status, the behaviour Make system to call and run the target application.
It optionally, further include request mark in the request, the request mark described in unique identification for requesting.
Optionally, the response message includes that the request mark and the target application are executed for the request content Event result.
Optionally, before the operating system receives the request from webpage, further include:
The operating system establish between server it is long connect, the server for realizing the operating system with Communication between the webpage;
Correspondingly, the operating system receives the request from webpage, including:
The operating system receives coming from for the server forwarding by the long connection established between the server The request of the webpage.
Optionally, before the operating system receives the request from webpage, further include:
The operating system obtains the request from webpage from shear plate, and the request is the webpage to described The solicited message for the preset format that the operating system that shear plate is sent can identify, the shear plate is for realizing the operation Communication between system and the webpage.
According to the second aspect of an embodiment of the present disclosure, a kind of information interactive device is provided, described device is configured at operation system In system, described device includes:
Receiving module is configured as receiving the request from webpage, includes the application identities of target application in the request And request content, the request content are used to indicate the event that the webpage needs to request to the target application;
Forwarding module is configured as forwarding the request content to the corresponding target application of the application identities;
Module is obtained, is configured as obtaining the response message that the target application is fed back based on the request content;
Sending module is configured as the response message being sent to the webpage.
Optionally, described device further includes:
Whether enquiry module is configured as inquiring the corresponding target application of the application identities currently in operating status;
The forwarding module is additionally configured to when the target application is currently at operating status, to the application mark Know corresponding target application and forwards the request content;
Calling module is configured as calling when the target application is not currently in operating status and running the mesh Mark application.
It optionally, further include request mark in the request, the request mark described in unique identification for requesting.
Optionally, the response message includes that the request mark and the target application are executed for the request content Event result.
Optionally, described device further includes:
Module is established, the long connection being configured as between foundation and server, the server is for realizing the operation Communication between system and the webpage;
The receiving module is configured as:By the long connection established between the server, the server is received The request from the webpage of forwarding.
Optionally, the receiving module is additionally configured to:
The request from webpage is obtained from shear plate, the request is what the webpage was sent to the shear plate The solicited message for the preset format that the operating system can identify, the shear plate is for realizing the operating system and the net Communication between page.
According to the third aspect of an embodiment of the present disclosure, a kind of information interactive device is provided, described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing information interacting method described in above-mentioned first aspect.
According to a fourth aspect of embodiments of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, is deposited thereon Computer program is contained, the computer program realizes information exchange side described in above-mentioned first aspect when being executed by processor Method.
According to a fifth aspect of the embodiments of the present disclosure, provide a kind of computer program product comprising instruction, when its When being run on computer, so that computer executes information interacting method described in above-mentioned first aspect.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the embodiments of the present disclosure, operating system receives the request from webpage, includes target application in the request Application identities and request content, the target application are that the webpage wants the application called, which is used to indicate the net Page wants the event requested to the target application.The operating system forwards the request content to the target application, and later, obtaining should The response message that target application is fed back based on the request content, and the response message is transmitted to webpage, in this way, being handed over by information Mutually, the interaction between webpage and application is realized, has achieved the purpose that call directly application by webpage.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of schematic diagram of implementation environment shown according to an example embodiments;
Fig. 2 is a kind of flow chart of information interacting method shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of the information interacting method shown according to another exemplary embodiment;
Fig. 4 is a kind of block diagram of information interactive device shown according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of the information interactive device shown according to another exemplary embodiment;
Fig. 6 is a kind of block diagram of the information interactive device shown according to another exemplary embodiment;
Fig. 7 is a kind of block diagram of information interactive device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they are only and the disclosure The consistent device and method of some aspects example.
Before describing in detail to the information interacting method that the embodiment of the present disclosure provides, first the embodiment of the present disclosure is related to And application scenarios and implementation environment simply introduced.
Firstly, simply being introduced the application scenarios that the embodiment of the present disclosure is related to.
Currently, the function that webpage can carry is more and more with the fast development of network technology.For example, webpage needs Information exchange is carried out between application, that is to say, that during web displaying, it may be necessary to which that is installed from mobile terminal answers With middle certain information of acquisition, to carry out the load and display of webpage according to the information of acquisition.Therefore, had studied in this implementation as What calls application by webpage to realize the information exchange between webpage and application.For this purpose, in the embodiments of the present disclosure, providing A kind of information interacting method, the information interacting method may be implemented webpage call application operation, specific implementation refer to as Lower Fig. 2 or embodiment shown in Fig. 3.
Next, simply being introduced the implementation environment that the embodiment of the present disclosure is related to.
Referring to FIG. 1, the Fig. 1 is a kind of schematic diagram of implementation environment shown according to an exemplary embodiment, the implementation It mainly include mobile terminal 110 and server 120 in environment, establishing between the mobile terminal 110 and the server 120 has long company It connects.
Wherein, which is mainly used for realizing the information interacting method that the embodiment of the present disclosure provides, herein, The mobile terminal 110 realizes the information interacting method by operating system, wherein the operating system can include but is not limited to Android operation system, IOS operating system or other operating systems based on Android operation system customized development.Further, The mobile terminal 110 is also equipped at least one application.
Wherein, above-mentioned server 120 is mainly used for establishing logical between the operating system and webpage of the mobile terminal 110 Letter, that is, bi-directional communication channels can be established between the operating system and webpage of the mobile terminal 110 by the server 120, For realizing the communication between operating system and webpage.
For this reason, it may be necessary to establish long connection between the operating system and the server 120 of mobile terminal 110, one kind can In the implementation of energy, the long connection between the server 120 and the operating system of mobile terminal 110 can be mobile terminal The long connection that 110 operating system is established when detecting that webpage brings into operation with server 120.Alternatively, being also possible to move The long connection that the operating system of terminal 110 is established in start completion with server 120.Wherein, length connection can be TCP (Transmission Control Protocol, transmission control protocol) connection.That is, in the operating system of mobile terminal 110 When webpage when starting, or in mobile terminal 110 brings into operation, the operating system of mobile terminal 110 can be to server 120 send connection request.When server 120 receives the connection request, establish with the operating system of the mobile terminal 110 it Between long connection.
Further, there is long connection since the server 120 may be established with the operating system of multiple mobile terminals, because This, for the long connection between Differentiated Services device 120 and the operating system of each mobile terminal, server 120 can be each Long connection distribution connection identifier.That is, when server 120 is established and the long connection between the operating system of the mobile terminal 110 Later, the connection identifier that can be connected for length connection distribution for the unique identification length.Further, when server 120 is After the long connection distribution connection identifier of foundation, in order to which each mobile terminal is mapped with correspondingly long connection, with after an action of the bowels Continue when receiving the request of the mobile terminal 110, server 120 can find the corresponding long connection of the mobile terminal 110.Clothes Business device 120 can determine the MAC of the mobile terminal 110 according to the connection request that the operating system of the mobile terminal 110 is sent (Media Access Control, media access control) address, so by the MAC Address of the mobile terminal 110 and establish The connection identifier correspondence of long connection is stored in mapping relations.Wherein, including the MAC of multiple mobile terminals in the mapping relations Location and corresponding connection identifier.In this way, the server 120 can be based on the mapping relations, realize between operating system and webpage Information exchange.
In some embodiments, which may provide a plurality of types of services simultaneously, therefore, in order to distinguish not The same corresponding different connection of service, long connection of the operating system of mobile terminal 110 between foundation and server 120 Afterwards, service registration request can also be sent to server 120, carry Service name in the service registration request.When server 120 connects After receiving the service registration request, which can be registered based on the service registration request, and by the Service name, the movement The MAC Address of terminal 110 is corresponding with the connection identifier for the long connection established to be stored in mapping relations, at this point, the mapping relations By the mapping relations between Service name, MAC Address and connection identifier.In this way, the server 120 may be based on mapping pass System realizes the information exchange between operating system and webpage.
In some embodiments, typically application server of server 120, for for the application in mobile terminal Service is provided, which can be a server, or the server set that can also be consisted of several servers Group or a cloud computing service center, the embodiment of the present disclosure do not limit this.
The implementation environment that the embodiment of the present disclosure is related to is not limited with a kind of implementation environment shown in figure 1, such as can be with The bi-directional communication channel between operating system and the webpage is established by shear plate.In this embodiment, operating system (or net Page) by that will be preset format by the message coding of shearing version transmitting, when webpage (or operating system) correctly recognizes this When the message of preset format, which is handled.With this, by what is transmitted by shear plate between operating system and webpage Message carries out pre-arranged code, to establish the information exchange between webpage and operation.
But the implementation environment that the embodiment of the present disclosure is related to is with a kind of implementation environment shown in figure 1, and by cutting The bi-directional communication channel that cutting plate is established between operating system and the webpage is limited, and can also include that other can establish webpage and behaviour Make the implementation environment of the interaction channel between system.
After having introduced the application scenarios and implementation environment that the embodiment of the present disclosure is related to, next, will be in conjunction with attached drawing to this The information interacting method that open embodiment provides describes in detail.
Fig. 2 is a kind of flow chart of information interacting method shown according to an exemplary embodiment, as shown in Fig. 2, the letter It ceases exchange method to be applied in above-mentioned implementation environment, which may include following realization step.
In step 201, operating system receives the request from webpage, includes the application identities of target application in the request And request content, the request content are used to indicate the event that the webpage needs to request to the target application.
It optionally, further include request mark in the request, request mark is used for the unique identification request.
In some embodiments, before operating system receives the request from webpage, which establishes and server Between long connection, the server is for realizing the communication between the operating system and the webpage.At this point, the operating system passes through The long connection established between the server, receives the request from the webpage of server forwarding.
In another embodiment, before which receives the request from webpage, this is obtained from shear plate and is come from The request of webpage, the request are the request letter for the preset format that the operating system that the webpage is sent to the shear plate can identify Breath, the shear plate is for realizing the communication between the operating system and the webpage.
In step 202, which forwards the request content to the corresponding target application of the application identities.
In one possible implementation, which forwards the request to the corresponding target application of the application identities Before content, it is currently whether in operating status to inquire the corresponding target application of the application identities.When the target application is currently located When operating status, which executes the operation that the request content is forwarded to the corresponding target application of the application identities, When the target application is not currently in operating status, which calls and runs the target application.
In step 203, which obtains the response message that the target application is fed back based on the request content.
Optionally, which includes request mark and the target application is directed to the event knot that the request content executes Fruit.
In step 204, which is sent to the webpage for the response message.
In the embodiments of the present disclosure, operating system receives the request from webpage, includes target application in the request Application identities and request content, the target application are that the webpage wants the application called, which is used to indicate the net Page wants the event requested to the target application.The operating system forwards the request content to the target application, and later, obtaining should The response message that target application is fed back based on the request content, and the response message is transmitted to webpage, in this way, being handed over by information Mutually, the interaction between webpage and application is realized, has achieved the purpose that call directly application by webpage.
Fig. 3 is a kind of flow chart of information interacting method shown according to an exemplary embodiment, as shown in figure 3, the letter It ceases exchange method to be applied in above-mentioned implementation environment, which may include following realization step.
In step 301, operating system receives the request from webpage, includes the application identities of target application in the request And request content, the request content are used to indicate the event that the webpage needs to request to the target application.
In some embodiments, can according to interact to divide between webpage, the application installed in terminal can be with Be divided into browse application and non-browse application, wherein the browse application include browser or other include browser kernel Using can be used for browsing webpage.In addition, the other application other than browse application is properly termed as non-browse application, mesh Before, it can not generally be interacted between the non-browse application and webpage.In the embodiments of the present disclosure, as it was noted above, due to Bi-directional communication channels are established between webpage and operating system, are also either non-browse applications for browse application, therefore It can be called by webpage.
System knows that webpage will call which of mobile terminal to apply for ease of operation, and webpage adds in the request The application identities of target application to be called.Wherein, which can be used for unique identification one application, and for example, this is answered It can be APP ID with mark.
In addition, knowing the event to be requested of the webpage for the ease of target application, which is also added in the request Request content.For example, which can be Get Account number, i.e. acquisition login account.In some embodiments In, webpage may wish to obtain the recommendation information of certain website, however, the website requests can only just can be carried out after login account Information recommendation, at this point, the webpage just needs to obtain the login account of the website, for this purpose, the webpage can be directly to once passing through Login account logs on to the target application request of the website login account, and therefore, webpage is packaged Get in the request Account number request content.
For another example, in some possible application scenarios, webpage wants to call the camera in mobile terminal to take pictures, this When, which can be packaged Calling Camera request content in the request, which can be used for mobile whole Camera request starting camera in end is taken pictures.
It further, can also include request mark in above-mentioned request.In some embodiments, it may be possible to which there are multiple webpages Request be intended to the case where calling the same target application in the mobile terminal, at this point, the operating system may receive it is more Which webpage a request, each request in order to clearly distinguish in multiple request are from, which can be at this Addition request mark in request, request mark are used for the unique identification request.In this way, the operating system of mobile terminal can root It is identified according to the request, distinguishes the request from different web pages.
Further, it before operating system receives the request from webpage, establishes and the long connection between server, the clothes Device be engaged in for realizing the communication between the operating system and the webpage, at this point, the operating system between the server by building Vertical long connection, receives the request from the webpage of server forwarding.
That is, the operating system can be established between server in order to make webpage call directly application Long connection, in order to realize the interaction between webpage and operating system by the server, to realize that webpage and the movement are whole The interaction between application in end.
During realization, dns address can be configured in the server in advance, webpage is needing to call answering for mobile terminal Used time can obtain the dns address of the server of configuration automatically, and send the request to the server according to the dns address.When When server receives the request, pass through the long operating system connected to mobile terminal between the operating system of mobile terminal Send the request.
Based on described previously, in one possible implementation, when server through the above way with mobile terminal After operating system foundation length connection, if the connection identifier that server connects the MAC Address of the mobile terminal and the length established Correspondence has been stored in mapping relations, then, since Service name being not present in the mapping relations, the webpage of mobile terminal In also would not be configured with Service name, in this way, will not include in the request that the webpage of the mobile terminal is sent to server service Name.In this case, for server when receiving the request, being established due to the server with multiple mobile terminals has long company It connects, therefore, server can be according to length of the request from multiple long connections between determination and the operating system of the mobile terminal Connection, to send the request to the operating system of the mobile terminal by determining long connection.
In alternatively possible implementation, when server is established with the operating system of mobile terminal through the above way After long connection, if the service registration request that server is sent according to the operating system of the mobile terminal received, by Service name, The MAC Address of the mobile terminal is corresponding with the connection identifier for the long connection established to be stored in mapping relations, then, due to this Therefore presence service name in mapping relations can also be configured with Service name, in this way, working as mobile terminal in the webpage of mobile terminal Webpage due to need to carry out information exchange with operating system and sent to server request when, will include the clothes in the request Business name.In this case, server can be determined and be somebody's turn to do from multiple long connections according to the request when receiving the request Long connection between the operating system of mobile terminal, to be sent by determining long connection to the operating system of the mobile terminal The request.
It should be noted that being only to establish to connect the length between server with operating system here, to establish operation system It is illustrated for bi-directional communication channels between system and webpage, in some embodiments, can also be established in other ways Bi-directional communication channels between operating system and webpage.For example, the bi-directional communication channels can also be established by shear plate, this When, webpage can pre-process the request, which is converted to the request for the preset format that operating system can identify, Later, it sends this request on the shear plate of mobile terminal.At this point, the operating system is obtained from shear plate from the webpage Request, which is the solicited message for the preset format that the operating system that sends to the shear plate of the webpage can identify, this Shear plate is for realizing the communication between the operating system and the webpage.
In addition, can also be established between operating system and webpage otherwise other than above-mentioned implementation Bi-directional communication channels.For example, since the softwares such as browser can realize information exchange between webpage, it can be by clear Device assembly is look to establish the bi-directional communication channels, to realize the interaction between webpage and operating system.In some embodiments In, which can send the request to default domain name, which can be configured in advance, and mobile terminal passes through browsing Device assembly receives the webpage when presetting the request that domain name is sent to this, this is preset domain name mapping at specified access address, to refer to Determining access address is that destination address sends the request.When the destination address for detecting request by firewall is specified access address When, request is redirected to local web services, which obtains the request from the local web services.Wherein, local Web service is used to carry out information exchange with terminal operating system.
It is noted that mobile terminal when receiving the request that webpage is sent to default domain name, is incited somebody to action by firewall The destination address of request is redirected to the local web services that can be interacted with terminal operating system, by local web services complete with The interaction of terminal operating system can equally avoid the limitation of browser Yu operating system interactive function, and development cost is low, general Property it is high.
In step 302, whether which inquires the corresponding target application of the application identities currently in operation shape State.
After the operating system receives the request from webpage, which can be parsed, to obtain the request institute Including application identities and request content.Later, the operating system is all from what is installed according to the application identities in the request In, corresponding target application is determined.
In some embodiments, the target application which to be called may be inactive, i.e., the target application is not in Operating status, at this point, cannot achieve the information exchange between webpage and the target application.Therefore, in order to successfully realizing net Information exchange between page and the target application, the operating system obtain application identities included by the request and request content Afterwards, it is currently whether in operating status to need to inquire the corresponding target application of the application identities.
In step 303, when the target application is currently at operating status, the operating system is corresponding to the application identities Target application forward the request content.
When the operating system determines that the target application is currently at operating status, can be asked acquired from request Content is asked to be transmitted to the target application.
Further, when the target application is not currently in operating status, which calls and runs the target Using.
It that is to say, in some embodiments, when the target application is not currently in operating status, in order to guarantee information Normal interaction, which calls the target application, and runs the target application, so that the target application is in operation shape State.Later, the request content which forwards this acquired to the postrun target application.
In step 304, which obtains the response message that the target application is fed back based on the request content.
During realization, after which receives request content, according to request content, corresponding operation is executed, And the response message is generated based on implementing result.For example, if the request content is Get Account number, which is answered The response message is generated based on the acquired login account later with login account is obtained.The operating system obtains the target Using based on request content response message generated.
In some embodiments, which includes that request mark and the target application are executed for the request content Event result.
As it was noted above, in application scenes, it is understood that there may be multiple webpages are wanted to call in the mobile terminal The case where same target application, system knows which target application response message generated is in response to for ease of operation The request of webpage, the target application can add the above-mentioned request mark for unique identification request in the response message, such as This, after which obtains the response message, can identify according to the request in the response message, inquire request mark Corresponding request, so that it is determined which webpage the request comes from, in this way, which net response message response has been determined is Page.
In step 305, which is sent to the webpage for the response message.
After the operating system obtains the response message that the target application is fed back based on request content, which is forwarded Give the webpage.In some embodiments, which passes through the long connection between server pre-established, by the response Information is sent to the webpage.
As it was noted above, in some embodiments, may establish between the operating system and server has long connection, at this In the case of kind, which can be sent to the response message server, after which receives the response message, The response message is relayed into the webpage.In this way, realizing the interaction between webpage and application, pass through net to reach Page can call directly the purpose for the application installed in mobile terminal.
It is noted that it is either directed to browse application or non-browse application, side provided by the embodiment of the present disclosure The interaction between webpage and application may be implemented in method.
In the embodiments of the present disclosure, operating system receives the request from webpage, includes target application in the request Application identities and request content, the target application are that the webpage wants the application called, which is used to indicate the net Page wants the event requested to the target application.The operating system forwards the request content to the target application, and later, obtaining should The response message that target application is fed back based on the request content, and the response message is transmitted to webpage, in this way, being handed over by information Mutually, the interaction between webpage and application is realized, has achieved the purpose that call directly application by webpage.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 4 is a kind of block diagram of information interactive device shown according to an exemplary embodiment.The device, which has, to be realized The exemplary function of method is stated, the function can execute corresponding software realization by hardware or hardware, referring to Fig. 4, the device May include:
Receiving module 410 is configured as receiving the request from webpage, includes the application identities of target application in the request And request content, the request content are used to indicate the event that the webpage needs to request to the target application;
Forwarding module 420 is configured as forwarding the request content to the corresponding target application of the application identities;
Module 430 is obtained, is configured as obtaining the response message that the target application is fed back based on the request content;
Sending module 440 is configured as the response message being sent to the webpage.
Optionally, referring to FIG. 5, the device further includes:
Whether enquiry module 450 is configured as inquiring the corresponding target application of the application identities currently in operating status;
Forwarding module 420 is additionally configured to when the target application is currently at operating status, corresponding to the application identities Target application forward the request content;
Calling module 470 is configured as when the target application is not currently in operating status, is called and is run the target Using.
It optionally, further include request mark in the request, request mark is used for the unique identification request.
Optionally, which includes request mark and the target application is directed to the event knot that the request content executes Fruit.
Optionally, referring to FIG. 6, the device further includes:
Module 480 is established, the long connection being configured as between foundation and server, the server is for realizing the operation system Communication between system and the webpage;
The receiving module 410 is configured as:By the long connection established between the server, server forwarding is received The request from the webpage.
Optionally, which is additionally configured to:
The request from webpage is obtained from shear plate, the request is what the webpage was sent to the shear plate The solicited message for the preset format that the operating system can identify, the shear plate is for realizing the operating system and the net Communication between page.
In the embodiments of the present disclosure, operating system receives the request from webpage, includes target application in the request Application identities and request content, the target application are that the webpage wants the application called, which is used to indicate the net Page wants the event requested to the target application.The operating system forwards the request content to the target application, and later, obtaining should The response message that target application is fed back based on the request content, and the response message is transmitted to webpage, in this way, being handed over by information Mutually, the interaction between webpage and application is realized, has achieved the purpose that call directly application by webpage.
It should be noted is that device provided by the above embodiment is when realizing its function, only with above-mentioned each function The division progress of module, can be according to actual needs and by above-mentioned function distribution by different function for example, in practical application Energy module is completed, i.e., the content structure of equipment is divided into different functional modules, to complete whole described above or portion Divide function.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 7 is a kind of block diagram of the device 700 of information exchange shown according to an exemplary embodiment.For example, device 700 It can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, Body-building equipment, personal digital assistant etc..
Referring to Fig. 7, device 700 may include following one or more components:Processing component 702, memory 704, power supply Component 706, multimedia component 708, audio component 710, the interface 712 of input/output (I/O), sensor module 714, and Communication component 716.
The integrated operation of the usual control device 700 of processing component 702, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 702 may include that one or more processors 720 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 702 may include one or more modules, just Interaction between processing component 702 and other assemblies.For example, processing component 702 may include multi-media module, it is more to facilitate Interaction between media component 708 and processing component 702.
Memory 704 is configured as storing various types of data to support the operation in device 700.These data are shown Example includes the instruction of any application or method for operating on device 700, contact data, and telephone book data disappears Breath, picture, video etc..Memory 704 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 706 provides power supply for the various assemblies of device 700.Power supply module 706 may include power management system System, one or more power supplys and other with for device 700 generate, manage, and distribute the associated component of power supply.
Multimedia component 708 includes the screen of one output interface of offer between described device 700 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 708 includes a front camera and/or rear camera.When device 700 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 710 is configured as output and/or input audio signal.For example, audio component 710 includes a Mike Wind (MIC), when device 700 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 704 or via communication set Part 716 is sent.In some embodiments, audio component 710 further includes a loudspeaker, is used for output audio signal.
I/O interface 712 provides interface between processing component 702 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 714 includes one or more sensors, and the state for providing various aspects for device 700 is commented Estimate.For example, sensor module 714 can detecte the state that opens/closes of device 700, and the relative positioning of component, for example, it is described Component is the display and keypad of device 700, and sensor module 714 can be with 700 1 components of detection device 700 or device Position change, the existence or non-existence that user contacts with device 700,700 orientation of device or acceleration/deceleration and device 700 Temperature change.Sensor module 714 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 714 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 716 is configured to facilitate the communication of wired or wireless way between device 700 and other equipment.Device 700 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 716 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 716 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 700 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, real shown in above-mentioned Fig. 2 or Fig. 3 for executing The method that the information exchange of example offer is provided.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 704 of instruction, above-metioned instruction can be executed by the processor 720 of device 700 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal When device executes, so that the method that mobile terminal is able to carry out the information exchange of above-mentioned Fig. 2 or embodiment illustrated in fig. 3 offer.
A kind of computer program product comprising instruction, when run on a computer, so that computer execution is above-mentioned The method for the information exchange that Fig. 2 or embodiment illustrated in fig. 3 provide.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.

Claims (14)

1. a kind of information interacting method, which is characterized in that the method includes:
Operating system receives the request from webpage, includes the application identities and request content of target application, institute in the request It states request content and is used to indicate the event that the webpage needs to request to the target application;
The operating system forwards the request content to the corresponding target application of the application identities;
The operating system obtains the response message that the target application is fed back based on the request content;
The response message is sent to the webpage by the operating system.
2. the method as described in claim 1, which is characterized in that the operating system is answered to the corresponding target of the application identities With before forwarding the request content, further include:
Whether the operating system inquires the corresponding target application of the application identities currently in operating status;
When the target application is currently at operating status, the operating system executes described corresponding to the application identities Target application forwards the operation of the request content;When the target application is not currently in operating status, the operation system System calls and runs the target application.
3. the method as described in claim 1, which is characterized in that it further include request mark in the request, the request mark For being requested described in unique identification.
4. method as claimed in claim 3, which is characterized in that the response message includes the request mark and the target Using the event result executed for the request content.
5. such as the described in any item methods of Claims 1-4, which is characterized in that the operating system receives asking from webpage Before asking, further include:
The operating system establish between server it is long connect, the server for realizing the operating system with it is described Communication between webpage;
Correspondingly, the operating system receives the request from webpage, including:
It is described to receive coming from for the server forwarding by the long connection established between the server for the operating system The request of webpage.
6. such as the described in any item methods of Claims 1-4, which is characterized in that the operating system receives asking from webpage Before asking, further include:
The operating system obtains the request from webpage from shear plate, and the request is the webpage to the shearing The solicited message for the preset format that the operating system that plate is sent can identify, the shear plate is for realizing the operating system With the communication between the webpage.
7. a kind of information interactive device, described device are configured in operating system, which is characterized in that described device includes:
Receiving module is configured as receiving the request from webpage, includes the application identities of target application in the request and asks Content is sought, the request content is used to indicate the event that the webpage needs to request to the target application;
Forwarding module is configured as forwarding the request content to the corresponding target application of the application identities;
Module is obtained, is configured as obtaining the response message that the target application is fed back based on the request content;
Sending module is configured as the response message being sent to the webpage.
8. device as claimed in claim 7, which is characterized in that described device further includes:
Whether enquiry module is configured as inquiring the corresponding target application of the application identities currently in operating status;
The forwarding module is additionally configured to when the target application is currently at operating status, to the application identities pair The target application answered forwards the request content;
Calling module is configured as when the target application is not currently in operating status, is called and is run the target and answers With.
9. device as claimed in claim 7, which is characterized in that it further include request mark in the request, the request mark For being requested described in unique identification.
10. device as claimed in claim 9, which is characterized in that the response message includes the request mark and the mesh The event result that mark application is executed for the request content.
11. such as the described in any item devices of claim 7 to 10, which is characterized in that described device further includes:
Module is established, the long connection being configured as between foundation and server, the server is for realizing the operating system With the communication between the webpage;
The receiving module is configured as:By the long connection established between the server, the server forwarding is received The request from the webpage.
12. such as the described in any item devices of claim 7 to 10, which is characterized in that the receiving module is additionally configured to:
The request from webpage is obtained from shear plate, the request is the webpage to described in shear plate transmission The solicited message for the preset format that operating system can identify, the shear plate for realizing the operating system and the webpage it Between communication.
13. a kind of information interactive device, which is characterized in that described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to the step of perform claim requires any one method described in 1-6.
14. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the meter The step of any one method described in claim 1-6 is realized when calculation machine program is executed by processor.
CN201810718218.9A 2018-07-03 2018-07-03 Information interaction method and device and storage medium Active CN108833585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810718218.9A CN108833585B (en) 2018-07-03 2018-07-03 Information interaction method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810718218.9A CN108833585B (en) 2018-07-03 2018-07-03 Information interaction method and device and storage medium

Publications (2)

Publication Number Publication Date
CN108833585A true CN108833585A (en) 2018-11-16
CN108833585B CN108833585B (en) 2021-06-29

Family

ID=64135371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810718218.9A Active CN108833585B (en) 2018-07-03 2018-07-03 Information interaction method and device and storage medium

Country Status (1)

Country Link
CN (1) CN108833585B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714425A (en) * 2018-12-29 2019-05-03 北京小米移动软件有限公司 Communication means and device
CN109739662A (en) * 2018-12-29 2019-05-10 北京小米移动软件有限公司 Communication means and device
CN109815030A (en) * 2019-01-10 2019-05-28 北京小米移动软件有限公司 Communication means and device
CN110007982A (en) * 2019-03-05 2019-07-12 北京小米移动软件有限公司 Communication means and device
CN110602171A (en) * 2019-08-20 2019-12-20 网宿科技股份有限公司 Interaction method and device
CN110602172A (en) * 2019-08-20 2019-12-20 网宿科技股份有限公司 Link identification generation method and device
CN112417355A (en) * 2020-11-27 2021-02-26 深圳市和讯华谷信息技术有限公司 Data interaction method, device and equipment based on long-connection single channel and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170004020A1 (en) * 2015-06-30 2017-01-05 Coursera, Inc. Automated batch application programming interfaces
CN106503134A (en) * 2016-10-19 2017-03-15 广东欧珀移动通信有限公司 Browser jumps to the method for data synchronization and device of application program
CN108156221A (en) * 2017-12-04 2018-06-12 北京小米移动软件有限公司 Communication means, device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170004020A1 (en) * 2015-06-30 2017-01-05 Coursera, Inc. Automated batch application programming interfaces
CN106503134A (en) * 2016-10-19 2017-03-15 广东欧珀移动通信有限公司 Browser jumps to the method for data synchronization and device of application program
CN108156221A (en) * 2017-12-04 2018-06-12 北京小米移动软件有限公司 Communication means, device and electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714425A (en) * 2018-12-29 2019-05-03 北京小米移动软件有限公司 Communication means and device
CN109739662A (en) * 2018-12-29 2019-05-10 北京小米移动软件有限公司 Communication means and device
CN109815030A (en) * 2019-01-10 2019-05-28 北京小米移动软件有限公司 Communication means and device
CN110007982A (en) * 2019-03-05 2019-07-12 北京小米移动软件有限公司 Communication means and device
CN110007982B (en) * 2019-03-05 2022-09-30 北京小米移动软件有限公司 Communication method and device
CN110602171A (en) * 2019-08-20 2019-12-20 网宿科技股份有限公司 Interaction method and device
CN110602172A (en) * 2019-08-20 2019-12-20 网宿科技股份有限公司 Link identification generation method and device
CN110602172B (en) * 2019-08-20 2022-09-30 网宿科技股份有限公司 Link identification generation method and device
CN110602171B (en) * 2019-08-20 2022-09-30 网宿科技股份有限公司 Interaction method and device
CN112417355A (en) * 2020-11-27 2021-02-26 深圳市和讯华谷信息技术有限公司 Data interaction method, device and equipment based on long-connection single channel and storage medium
CN112417355B (en) * 2020-11-27 2023-09-05 深圳市和讯华谷信息技术有限公司 Data interaction method, device, equipment and storage medium based on long connection single channel

Also Published As

Publication number Publication date
CN108833585B (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN108833585A (en) Information interacting method, device and storage medium
KR101698094B1 (en) Apparatus and method for providing service corresponding to a service zone
CN108390944B (en) Information interaction method and device
EP3068115A1 (en) Method and device for incoming call reminder
CN106126685B (en) Page loading method and device
JP2017513161A (en) Transfer processing method and apparatus
US8494123B2 (en) On-hold visual menu from a user's communications device
CN106713418B (en) Reset result confirmation method, device, server and mobile terminal
CN113783774B (en) Cross-cluster network configuration method and device, communication equipment and storage medium
CN109005096B (en) Application interaction method and device
CN108965413B (en) Information interaction method and device and storage medium
CN105208176B (en) Contact person record processing method and processing device
JP2016530818A (en) CALL METHOD, CALL DEVICE, CALL SYSTEM, PROGRAM, AND RECORDING MEDIUM
CN109525652B (en) Information sharing method, device, equipment and storage medium
CN108600529A (en) Information interacting method, device and computer readable storage medium
CN106454998A (en) Wireless local area network access method and apparatus, and terminal
CN105763601A (en) File sharing method and device
CN108924820B (en) Method, device, equipment and storage medium for realizing sharing of SIM card
CN109792786A (en) The method and device of user equipment pairing
KR20180078104A (en) Interface display method and apparatus
US10924529B2 (en) System and method of transmitting data by using widget window
CN105306567B (en) Method and device for terminal connection
CN105100523B (en) Voice channel method for building up, apparatus and system
CN105100209B (en) Realize the method and device of cross-domain access
CN106535194B (en) Screen content sharing method, apparatus and system

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