WO2014117706A1 - Method and device for realizing web intent - Google Patents

Method and device for realizing web intent Download PDF

Info

Publication number
WO2014117706A1
WO2014117706A1 PCT/CN2014/071536 CN2014071536W WO2014117706A1 WO 2014117706 A1 WO2014117706 A1 WO 2014117706A1 CN 2014071536 W CN2014071536 W CN 2014071536W WO 2014117706 A1 WO2014117706 A1 WO 2014117706A1
Authority
WO
WIPO (PCT)
Prior art keywords
user agent
agent module
module
network
image
Prior art date
Application number
PCT/CN2014/071536
Other languages
French (fr)
Chinese (zh)
Inventor
郜文美
范姝男
吕小强
王雅辉
井皓
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Publication of WO2014117706A1 publication Critical patent/WO2014117706A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1886Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with traffic restrictions for efficiency improvement, e.g. involving subnets or subdomains

Definitions

  • the present invention relates to network intent technologies, and in particular, to a method and apparatus for implementing network intent. Background technique
  • the Web intent mechanism is a mechanism for Google to integrate web applications in the World Wide Web Consortium (W3C).
  • W3C World Wide Web Consortium
  • the web intent mechanism mainly includes a discovery mechanism of a web service and a lightweight remote procedure call protocol (RPC) communication mechanism between web applications.
  • RPC remote procedure call protocol
  • embodiments of the present invention provide a method and apparatus for implementing network intent to implement the implementation of network intent between two terminal devices installed with user agent modules.
  • an embodiment of the present invention provides a method for implementing a network intent, including: a first user agent module sending a broadcast message, where the broadcast message is used to discover a terminal device that is installed with a user agent module;
  • the first user agent module receives a response message returned by the terminal device that is installed with the user agent module, and the response message is a response message of the broadcast message, where the response message includes a terminal device that returns the response message.
  • User agent module information ;
  • the first user agent module is built according to the user agent module information and the second user agent module Establishing a communication connection to implement network intent; wherein the second user agent module is a user agent module on one of the terminal devices in which the user agent module is installed.
  • an embodiment of the present invention provides a method for implementing a network intent, including: receiving a first broadcast message sent by a first user agent module, where the first broadcast message is used to discover a terminal that is installed with a user agent module.
  • a first response message of the first broadcast message where the first response message includes user agent module information on a terminal device that returns the first response message;
  • an embodiment of the present invention provides an apparatus for implementing a network intent, including: a broadcast module, configured to send a broadcast message, where the broadcast message is used to discover a terminal device that is installed with a user agent module;
  • the response receiving module is configured to receive a response message returned by the terminal device that is installed with the user agent module, where the response message is a response message of the broadcast message, where the response message includes a user of the terminal device that returns the response message Agent module information;
  • connection module configured to establish a communication connection with the second user agent module according to the user agent module information in the response message received by the response receiving module, to implement network intent; wherein the second user agent module is configured to be User agent module on a terminal device in the terminal device of the user agent module.
  • a fourth aspect of the present invention provides an apparatus for implementing a network intent, including: a broadcast receiving module, configured to receive a first broadcast message sent by a first user agent module, where the first broadcast message is used to discover and install a terminal device having a user agent module;
  • a response returning module configured to return a first response message of the first broadcast message to the first user agent module, where the first response message includes a user agent on a terminal device that returns the first response message Module information;
  • the first connection module is configured to establish a communication connection with the first user agent module to implement network intent.
  • the method and apparatus for implementing the network intent discover another terminal device installed with the user agent module through the first user agent module, and directly establish a communication connection with the second user agent module, thereby implementing the network. Intention, the operation of realizing network intent between terminal devices is realized, and the processing efficiency of network intent is improved.
  • FIG. 1 is a flowchart of a method for implementing network intent according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for implementing network intent according to another embodiment of the present invention
  • a signaling flowchart of a terminal device installed with a user agent module is found in a method for implementing network intent provided by an embodiment
  • FIG. 4 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention
  • FIG. 5 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a device for implementing network intent according to another embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention
  • FIG. 1 is a flowchart of a method for implementing network intent according to an embodiment of the present invention.
  • the method shown in this embodiment is a process flow on an upper side of a first terminal device, and the method for implementing network intent includes:
  • the first user agent module sends a broadcast message, and the broadcast message is used to discover a terminal device that installs the user agent module.
  • the first user agent module can be a browser and is installed on the first terminal device.
  • the first terminal device may be a network node device, a Universal Plug and Play (UPnP) device in a home network, or the like.
  • UFP Universal Plug and Play
  • the first user agent module sending the broadcast message may include: the first user agent module sends a broadcast message triggered by the client webpage, where the broadcast message may include a proxy request header field, the proxy The value of the request header field is used to indicate that the terminal device installed with the user agent module returns a response message after receiving the broadcast message.
  • the proxy request header field can be a new header field such as an extension request in a broadcast message
  • Require header field when the value in the Require header field is a browser, it indicates that the broadcast message is used to discover the terminal device with the user agent module installed. Then, if the terminal device that receives the broadcast message installs the user agent module, it can return a response message to inform the first user agent module.
  • Var intent new intent( ⁇ action: htt: ⁇ webintents.org/edit ,
  • the client page first declares an intent object, including the action, type, and data in the instantiated intent object. Then call startActivity() to trigger the intent event, notifying the user of the type of intent (action. type ) that the proxy module needs to handle.
  • the sending, by the first user agent module, the broadcast message may include: the first user agent module sending the broadcast message under the trigger of the client webpage in the process of processing the network intent object by the service webpage.
  • the broadcast message can be specifically seen in the above description.
  • the intent data is sent to the user agent module, and the data structure is as follows:
  • Void postResult any data, optional sequence
  • Void postFailure any data
  • the broadcast message may be an M-SEARCH broadcast message based on the Simple Service Discovery Protocol (SSDP).
  • SSDP Simple Service Discovery Protocol
  • Step 12 The first user agent module receives a response message returned by the terminal device installed with the user agent module, where the response message is a response message of the broadcast message, where the response message includes a user agent module of the terminal device that returns the response message. information.
  • the reply message can also be based on SSDP.
  • a header field may also be set in the response message, which is used to carry information such as a communication address of the user agent module in the terminal device.
  • Step 13 the first user agent module establishes a communication connection with the second user agent module according to the user agent module information to implement network intent; wherein the second user agent module is one of the terminal devices with the user agent module installed above. User agent module on the terminal device.
  • the user agent module establishes a communication connection.
  • the method further includes:
  • the first user agent module sends the to-be-processed network intent object to the second user agent module through the communication connection, so that the second user agent module acquires the corresponding network application according to the network intent object, and obtains the acquired
  • the web application processes the data in the network intent object; wherein the to-be-processed network intent object includes at least an action, a type, and a data.
  • the first user agent module sends the to-be-processed network intent object to the second user agent module by using the foregoing communication connection, which may include:
  • the first user agent module may further include: The first user agent module creates a mirror of the client web page described above.
  • the first user agent module sends the to-be-processed network intent object to the second user agent module by using the foregoing communication connection, including:
  • the first user agent module sends the image of the network intent object to be processed and the image of the client webpage to the second user agent module through the foregoing communication connection, so that the second user agent module loads the image of the client webpage,
  • the data in the network intent object is sent to the obtained web application for processing.
  • the first user agent module further includes:
  • the first user agent module closes the above client webpage.
  • the first user agent module may further include: after the broadcast message is sent by the client webpage, the first user agent module may further include:
  • the first user agent module creates an image for the service webpage
  • the first user agent module sends the created image to the second user agent module through the above communication connection, so that the second user agent module loads the image.
  • the first user agent module may further include:
  • the first user agent module sends an action synchronization request to the second user agent module to bind the image loaded on the second user agent module to the service web page on the first user agent module.
  • the first user agent module realizes the network intention by discovering another terminal device installed with the user agent module, and directly establishes a communication connection with the second user agent module, thereby realizing the realization between the terminal devices.
  • the operation of the network intent improves the processing efficiency of the network intent.
  • FIG. 2 is a flowchart of a method for implementing network intent according to another embodiment of the present invention.
  • the method provided in this embodiment is a process flow on the second terminal device side, and the second terminal is provided.
  • the device can be a network node, a UPnP device in a home network, or the like.
  • the method for implementing network intent includes:
  • Step 21 Receive a first broadcast message sent by the first user agent module, where the first broadcast message is used to discover a terminal device that is installed with a user agent module.
  • the first broadcast message is specifically illustrated in the description of the broadcast message in FIG. 1, and the first user agent module is specifically illustrated in FIG.
  • Step 22 Return a first response message of the first broadcast message to the first user agent module, where The first response message includes user agent module information on the terminal device that returns the first response message.
  • the first response message is detailed in the description of the response message in FIG.
  • Step 23 Establish a communication connection with the first user agent module to implement network intent.
  • the method further includes: receiving, by the foregoing communication connection, a to-be-processed network intent object sent by the first user agent module; wherein the to-be-processed network intent object includes behavior Parameters such as (action), type (type), and data (data);
  • type obtains the corresponding web application
  • the data is sent to an acquired web application to cause the acquired web application to process the data.
  • the second user agent module queries the application store (app store) according to the action, type parameter in the received intent object, and checks if there is an adapted application. For example, the second user agent module can determine the service function that can be provided according to the value of the action and type declared by the web application, so as to provide a selection to the client page loaded on the second user agent module. If the second user agent module checks for a web application as follows:
  • the web application is a web application that can edit images, if it is the service required to process data.
  • the second user agent module generates a list for the user to select from the retrieved web application and the eligible web application that has been registered with the user agent module.
  • the user agent module presents the generated list to the user in the form of a web page.
  • the user selects a web application in the above web page.
  • the second user agent module knows the web application selected by the user, if the application is not registered on the user agent module, the application is first registered on the user agent module, or the second user agent module directly opens the selected one.
  • a web application ie web page
  • the selected web application processes the data transmitted by the second user agent module and transmits the processing result to the client web page loaded on the second user agent module.
  • the obtained web application can be a web application selected by the user from the corresponding web application.
  • receiving, by the foregoing communication connection, the network intent object to be processed sent by the first user agent module may include:
  • the client webpage is a client webpage that triggers the first user proxy module to send the first broadcast message.
  • the method may further include:
  • the client webpage is started on the second user agent module according to the URL, and the second user agent module is a user agent module on the terminal device (ie, the second terminal device) that returns the first response message.
  • the method may further include:
  • the processing result is returned to the first user agent module to cause the first user agent module to present the processing result to the user.
  • receiving, by the foregoing communication connection, the network intent object to be processed sent by the first user agent module may include:
  • the first client webpage is a client webpage that triggers the first user proxy module to send the first broadcast message.
  • the method further includes:
  • the method may further include:
  • the received first broadcast message is a broadcast message sent by the client webpage in the process of processing the network intent object by the first user agent module
  • the received first broadcast message can also include:
  • the method further includes:
  • the loaded image is bound to the service web page on the first user agent module.
  • the present invention is used to implement the network.
  • the intended method may also include:
  • the third user agent module is a terminal in the terminal device that returns the second response message.
  • User agent module on the device ie the third terminal device. That is, in the second terminal device, in the process of processing the data of the service webpage, the user may also select the third terminal device to process the data, and the interaction between the second terminal device and the third terminal device and the first terminal device. Similar to the interaction between the second terminal devices.
  • the method may further include:
  • the method further includes:
  • An action synchronization request is sent to the third user agent module to bind the image of the acquired web application loaded on the third user agent module to the acquired web application.
  • the terminal device installed with the user agent module returns a response message, so that the first user agent module discovers another terminal device with the user agent module installed, and directly establishes a communication connection with the second user agent module.
  • the operation of realizing network intent between terminal devices is realized, and the processing efficiency of network intent is improved.
  • FIG. 3 is a signaling flowchart of discovering a terminal device for installing a user agent module in a method for implementing network intent according to another embodiment of the present invention.
  • the first user agent module is a user agent module on the first terminal device
  • the second user agent module is a user agent module on the second terminal device.
  • the first terminal device and the second terminal device are both Upnp devices and support a network intent mechanism.
  • the process of discovering the terminal device with the user agent module installed includes:
  • Step 31 After the start page is invoked by the client webpage in the first terminal device, the first user agent module that supports the UPnP function sends the M-SEARCH broadcast message based on the Simple Service Discovery Protocol (SSDP):
  • SSDP Simple Service Discovery Protocol
  • Require browser Action: webintent.org.www.webintents.org/edit.
  • the M-SEARCH message is extended, and the value of the ST header field is set to urn:schemas-webintents-org:service:WebIntents: l , indicating that the UA needs UPnP devices that support web intent provide services.
  • the Require header field is extended, and its value is set to the user agent module (browser), indicating that the sender of the message requires a terminal device with the user agent module installed.
  • Step 32 After the first user agent module sends the broadcast message of the M-SEARCH based on the SSDP protocol, the second terminal device that receives the broadcast message returns the response message because the user agent module is installed:
  • the ST header field copies the content of the ST header field in the broadcast message, and copies the Require header field in the broadcast message, and the terminal device (ie, the second terminal device) that returns the response message is installed with the user proxy module.
  • the Location header field "http://192.168.1.1:4500" indicates the IP address of the user agent module communication 192.168.1.1 and port number 4500.
  • the terminal device installed with the user agent module in the home network returns a response message to the first user agent module.
  • the first user agent module discovers all the terminal devices in the home network with the user agent module installed.
  • the first user agent module can present all terminal devices installed with the user agent module to the user, so that the user selects one of them, and then the first user agent module establishes a communication connection with the user agent module in the terminal device selected by the user. To achieve network intent.
  • the response message further provides a network intent service type that the terminal device that returns the response message can provide.
  • a network intent service type that the terminal device that returns the response message can provide.
  • the response message "Action.webintent.org. www. webintents, org/edit”.
  • the first user agent module can also know which network intentions the terminal devices can provide. For the user, it is more convenient for the user to select the terminal device.
  • Another embodiment of the present invention is similar to the embodiment shown in FIG. 3, except that the response message returned by the second terminal device is as follows:
  • the network intent file is the user agent module information file, and its form and content are as follows:
  • the user agent module information is added to the "Intent” tag: User agent module name “chrome”, version "21.0.0”, communication interface (IP + port) "192.168.1.1:4501".
  • FIG. 4 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention.
  • a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device.
  • the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
  • methods for implementing network intent include:
  • Step 41 When the client page in the first user agent module triggers startactivityO, it indicates that the client page needs a web intent service. At this time, the first user agent module senses that the client page calls startactivityO, and then sends a broadcast message-M-SEARCH message.
  • Step 42 The second terminal device returns a response message after receiving the broadcast message because the second user agent module is installed.
  • the response message includes second user agent module information such as a communication address, a port, and the like.
  • Step 43 The first user agent module is configured to obtain a communication address of the user agent module (ie, the second user agent module) on the second terminal device by using the response message. And establishing a communication connection with the second user agent module according to the obtained communication address.
  • the second terminal device starts the second user agent module before and after returning the response message.
  • a communication connection may be established between the first user agent module and the second user agent module based on a network socket (websocket) protocol or an extensible markup language hypertext transfer protocol request (XML Http Request, XHR).
  • XML is Extensible Markup Language
  • HTTP Hypertext Transfer Protocol.
  • Step 44 The first user agent module sends the URL of the network intent object and the client webpage to the second user agent module through a communication connection, and the network intent object includes action, type, and data.
  • Step 45 After receiving the URL of the client webpage sent by the first user proxy module, the second user proxy module loads and starts the client webpage in the background. Then, find the web application that can process the data, generate a list of web applications, and display them to the user so that the user can select a web application to process the data from the list of web applications.
  • the second user agent module can obtain a web application capable of processing data by retrieving its web application store.
  • the second user agent module loads the web application selected by the user and sends the data to the loaded web application.
  • Step 46 The loaded network application processes the data, and the loaded network application becomes a data service application.
  • Step 47 After the processing is completed, the service application calls postresult() or postfailure() to notify the second user agent module of the processing result.
  • Step 48 The second user agent module sends the processing result to the first user agent module by using a communication connection.
  • Step 49 The first user agent module calls a callback function registered in startactivityO, and presents the processing result to the user. Of course, if the second user agent module does not return the processing result, there is no operation of this step.
  • Step 410 The second user agent module closes the client webpage and the service application running in the background. Optionally, this step 410 can be performed at the same time as or after the step 48.
  • FIG. 5 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention.
  • a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device.
  • the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
  • methods for implementing network intent include:
  • Step 51 When the client webpage in the first user agent module triggers startactivityO, it indicates that the client webpage needs a network intent service.
  • Step 52 When the first user agent module senses that the client webpage calls startactivityO, it sends a broadcast message, the M-SEARCH message.
  • Step 53 The second terminal device returns a response message after receiving the broadcast message because the second user agent module is installed.
  • the response message includes second user agent module information such as a communication address, a port, and the like.
  • Step 54 The first user agent module is configured to obtain a communication address of the user agent module (ie, the second user agent module) on the second terminal device by using the response message. And establishing a communication connection with the second user agent module according to the obtained communication address.
  • the second terminal device starts the second user agent module before and after returning the response message. In this embodiment, after the second terminal device returns a response message, the second user agent module is started.
  • Step 55 The first user agent module determines whether it is necessary to transfer the network intent processing flow to the second user agent module. If yes, go to step 56.
  • Step 56 The first user agent module creates a mirror image of the client webpage, and sends the network intent object and the created image to the second user agent module.
  • Step 57 The first user agent module ends the network intent processing flow in the first user agent module.
  • Step 58 The second user agent module loads the image of the client webpage in the background.
  • Step 59 The second user agent module finds a web application that can process the data in the network intent object, and provides the user with a web application list. After the user selects a web application from the web application list, the second user agent module loads the web application, and transmits data (hereinafter referred to as intent data) in the network intent object to the web application. Web application. Refer to the description in the second embodiment for this step.
  • Step 510 After the loaded network application receives the intent data, process the intent data.
  • Step 511 After the processing of the intent data by the loaded network application ends, the postresult() or postfailure() is called, and the processing result is sent to the second user agent module.
  • Step 512 The second user agent module invokes a callback function registered in startactivity (), and presents the processing result of the intent data to the user.
  • the second user agent module may close the client webpage image and the loaded web application.
  • the first user agent module can activate the client web page.
  • FIG. 6 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention.
  • a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device.
  • the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
  • the network application in the first terminal device also processes the intent data.
  • Step 61 The client webpage running on the first user proxy module triggers startactivityO, indicating that the client webpage needs a network intent service.
  • Step 62 The first user agent module provides the user with a web application list for the user to select a web application from the list of network applications to process the client's intent data.
  • Step 63 The first user agent module loads the network application selected by the user.
  • Step 64 The first user agent module sends the network intent object to the loaded web application.
  • the loaded web application receives the network intent object sent by the first user agent module and processes the data in the network intent object. At this point, the loaded web application becomes the service application.
  • Step 65 In the process of processing the intent data by the network application in the first terminal device, if If the user wants to change to the home network device to continue processing (for example, the large screen of the home network device may be more suitable for processing), the first user agent module starts the device discovery process, and then the second with the selected second terminal device. The user agent module establishes a communication connection. The process of establishing a connection between the device discovery process and the first user agent module and the second user agent module in the first embodiment to the third embodiment is not described herein.
  • Step 66 The first user agent module creates an image for the service application.
  • Step 67 The first user agent module sends the created image to the second user agent module by using the established communication connection.
  • Step 68 The second user agent module receives the image sent by the first user agent module, and loads the image.
  • Step 69 The first user agent module sends an action synchronization request, and the operation of the intent data by the user on the second user agent module is reflected in real time to the first user agent module.
  • the method shown in the foregoing embodiment solves the need of the UPnP device in the prior art solution by discovering the user agent module running on the home network device and completing the cooperation between different devices in the home network through the user agent module to implement the web intent mechanism.
  • the problem of additional processing on the home network device is beneficial to the application of the web intent mechanism in the home network.
  • FIG. 7 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention.
  • the apparatus shown in this embodiment is used to implement the method shown in FIG. 1.
  • the apparatus for implementing network intent may be a user.
  • the proxy module (such as the first user proxy module described above), the terminal device, and the like include: a broadcast module 71, a response module 72, and a connection module 73.
  • the broadcast module 71 is configured to transmit a broadcast message for discovering a terminal device on which the user agent module is installed.
  • the response receiving module 72 is configured to receive a response message returned by the terminal device that is installed with the user agent module, where the response message is a response message of the broadcast message, and the response message includes a user of the terminal device that returns the response message. Agent module information.
  • connection module 73 is configured to establish a communication connection with the second user agent module according to the user agent module information in the response message received by the response receiving module, to implement network intent; wherein the second user agent module is configured to be installed User agent module on a terminal device in the terminal device of the user agent module.
  • the broadcast module 71 can include:
  • a first broadcast submodule configured to send a broadcast message, triggered by a client webpage, where the broadcast message includes a proxy request header field, where the value of the proxy request header field is used to indicate that the user proxy module is installed
  • the terminal device returns a response message after receiving the broadcast message.
  • means for implementing the network intent may further include:
  • a data transmission module configured to send, by using the communication connection established by the connection module, a network intent object to be processed, after the connection module establishes a communication connection with the second user agent module according to the user agent module information a second user agent module, so that the second user agent module acquires a corresponding web application according to the network intent object, and causes the acquired web application to process data in the network intent object;
  • the network intent object to be processed includes at least a behavior action, a type type, and the data data.
  • the data transmission module includes:
  • a first transmission submodule configured to send the to-be-processed network intent object and the resource uniform locator URL of the client webpage to the second user agent module by using the communication connection, so that the After the second user agent module starts the client webpage according to the URL, the data in the network intent object is sent to the obtained web application for processing.
  • means for implementing the network intent may further include:
  • a first image creation module configured to create a mirror image of the client webpage before the data transmission module sends the to-be-processed network intent object to the second user agent module by using the communication connection.
  • the data transmission module may include:
  • a second transmission submodule configured to send, by using the communication connection, the image of the network intent to be processed and the image of the client webpage to the second user agent module, so that the second user agent module After loading the image of the client webpage, the data in the network intent object is sent to the obtained web application for processing.
  • means for implementing the network intent may further include:
  • a webpage closing module configured to close the client webpage after the data transmission module sends the to-be-processed network intent object to the second user agent module by using the communication connection.
  • the broadcast module 71 can include:
  • the second broadcast sub-module is configured to send a broadcast message triggered by the client webpage in the process of processing the network intent object by the service webpage.
  • means for implementing the network intent may further include:
  • a second image creating module configured to create a mirror image for the service webpage after the second broadcast submodule sends a broadcast message triggered by the client webpage;
  • a mirroring sending module configured to send, by using the communication connection, the created image to the second user agent module, so that the second user agent module loads the image.
  • means for implementing the network intent may further include:
  • a synchronization requesting module configured to send, after the data transmission module, the created image to the second user agent module by using a communication connection, send an action synchronization request to the second user agent module, to send the second
  • the image loaded on the user agent module is bound to the service web page on the first user agent module.
  • the device for implementing the network intention discovers another terminal device with the user agent module installed through the broadcast module and the response receiving module, and establishes a communication connection directly with the second user agent module through the connection module.
  • the realization of the network intention the operation of realizing the network intent between the terminal devices is realized, and the processing efficiency of the network intention is improved.
  • FIG. 8 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention.
  • the apparatus shown in this embodiment is used to implement the method shown in FIG. 2, where the apparatus may be the foregoing second terminal equipment, including The broadcast receiving module 81, the response returning module 82, and the first connecting module 83.
  • the broadcast receiving module 81 is configured to receive a first broadcast message sent by the first user agent module, where the first broadcast message is used to discover a terminal device that is installed with a user agent module;
  • the response returning module 82 is configured to return a first response message of the first broadcast message to the first user agent module, where the first response message includes a user agent on a terminal device that returns the first response message Module information;
  • the first connection module 83 is configured to establish a communication connection with the first user agent module to implement network intent.
  • the first connection module 83 can be implemented by a user agent module in the terminal device.
  • means for implementing the network intent may further include:
  • a data receiving module configured to receive the first user agent module by using a communication connection established by the first connection module 83 after establishing a communication connection between the first connection module 83 and the first user agent module
  • the sent network intent object to be processed; wherein the to-be-processed network intent object includes a behavior action, a type type, and the data data;
  • An application obtaining module configured to acquire, according to the action, type received by the data receiving module, a corresponding network application
  • a data sending module configured to send the data received by the data receiving module to an acquired network application, so that the obtained network application processes the data.
  • the data receiving module, the application acquiring module, and the data sending module may pass through the terminal device User agent module implementation in .
  • the web application acquired by the application obtaining module may be a web application selected by the user from the corresponding web application.
  • the data receiving module may include:
  • a first receiving submodule configured to receive, by using the communication connection, a resource uniform locator URL of the client webpage sent by the first user proxy module, and the to-be-processed network intent object; the client webpage is triggered
  • the first user agent module sends a client webpage of the first broadcast message.
  • means for implementing the network intent may further include:
  • a webpage startup module configured to: after the first receiving submodule receives the resource uniform locator URL of the client webpage sent by the first user proxy module and the network intention to be processed, according to the communication connection, according to the webpage
  • the URL starts the client webpage on the second user agent module
  • the second user proxy module is a user agent module on the terminal device that returns the first response message.
  • the webpage launching module can be implemented by a user agent module in the terminal device.
  • means for implementing the network intent may further include:
  • a result returning module configured to send the data to an acquired web application in the data sending module, so that the obtained web application processes the data, and returns the processing result to the first a user agent module to cause the first user agent module to present the processing result to the user.
  • the result return module can be a functional module in the acquired web application.
  • the data receiving module may include:
  • a second receiving submodule configured to receive, by using the communication connection established by the first connection module, a mirror image of the first client webpage sent by the first user proxy module and the network intention to be processed;
  • the client webpage is a client webpage that triggers the first user agent module to send the first broadcast message.
  • means for implementing the network intent may further include:
  • a first image loading module configured to: after the second receiving submodule receives the image of the first client webpage sent by the first user proxy module and the to-be-processed network intent through the communication connection, loading A mirror image of the first client webpage.
  • the first image loading module can be implemented by a user agent module in the terminal device.
  • means for implementing the network intent may further include:
  • a result sending module configured to send the data to an acquired network application after the data sending module, so that the obtained network application processes the data, and the processing result is Sending to the second user agent module, so that the second user agent module presents the processing result to the user, and the second user agent module is a user agent module on the terminal device that returns the first response message.
  • the result sending module can be a function module in the web application obtained above, and the obtained web application is used to process data in the intent object.
  • the device when the first broadcast message received by the first receiving module is a broadcast message sent by the client webpage in the process of processing the network intent object by the first user agent module, the device further includes :
  • a mirroring receiving module configured to receive, by using the communication connection established by the first connection module, a mirror image sent by the first user agent module, where the image is an image created by the first user agent module for the service webpage;
  • the second image loading module is configured to load the image.
  • the image receiving module and the second image loading module are implemented by a user agent module in the terminal device.
  • means for implementing the network intent may further include:
  • a request receiving module configured to: after the mirror receiving module receives the image sent by the first user agent module, receive an action synchronization request sent by the first user agent module;
  • a binding module configured to bind the loaded image to the service webpage on the first user agent module according to the action synchronization request received by the request receiving module.
  • the device may further include:
  • a second broadcast module configured to send, by the second client webpage, a second broadcast message, where the acquired network application processes the data, where the second broadcast message is used for discovering and installing a terminal device having a user agent module;
  • a second response receiving module configured to receive a second response message returned by the terminal device that is installed with the user agent module, where the second response message is a response message of the second broadcast message, where the second response message includes Returning user agent module information of the terminal device of the second response message;
  • a second connection module configured to establish a second communication connection with the third user agent module according to the user agent module information in the second response message received by the second response receiving module, to implement network intent; wherein, the third The user agent module is a user agent module on a terminal device in the terminal device that returns the second response message.
  • the second broadcast module, the second response receiving module, and the second connection module may be implemented by a user agent module in the terminal device. Further, the means for implementing the network intent may further include:
  • a mirroring creation module configured to create a mirror image of the acquired network application after the second connection module establishes a second communication connection with the third user agent module according to the user agent module information in the second response message ;
  • a mirroring sending module configured to send, by using the second communication connection established by the second connecting module, an image of the obtained network application to the third user agent module, so that the third user agent module is loaded The image of the obtained web application.
  • the image creation module and the image transmission module can be implemented by a user agent module in the terminal device.
  • means for implementing the network intent may further include:
  • a synchronization requesting module configured to send an action synchronization request to the third user agent module after the image sending module sends the image to the third user agent module by using the second communication connection, to The image of the acquired web application loaded on the third user agent module is bound to the acquired web application.
  • the synchronization request module can be implemented by a user agent module in the terminal device.
  • the apparatus for implementing the network intent returns a response message of the broadcast message received by the broadcast receiving module by the response returning module, so that the first user agent module discovers another terminal device installed with the user agent module, and directly
  • the second user agent module establishes a communication connection, thereby realizing the network intention, and the operation of realizing the network intention between the terminal devices is completed, thereby improving the processing efficiency of the network intention.
  • the embodiment of the present invention further provides a computer program product comprising a computer readable medium, the readable medium comprising a first set of program code for performing the steps in the method of Figure 1 above:
  • the broadcast message is used to discover a terminal device installed with a user agent module; receiving a response message returned by the terminal device installed with the user agent module, the response message is a response message of the broadcast message, and the response message
  • the message includes user agent module information of the terminal device that returns the response message;
  • sending a broadcast message includes: And sending, by the client webpage, a broadcast message, where the broadcast message includes a proxy request header field, where the value of the proxy request header field is used to indicate that the terminal device installed with the user proxy module returns a response message after receiving the broadcast message. .
  • the method further includes:
  • a network intent object to be processed to the second user agent module, so that the second user agent module acquires a corresponding network application according to the network intent object, and makes the acquired network
  • the application processes the data in the network intent object; wherein the to-be-processed network intent object includes at least a behavior action, a type type, and the data data.
  • sending, by the communication connection, the network intent object to be processed to the second user agent module including:
  • the method further includes:
  • sending, by the communication connection, the network intent object to be processed to the second user agent module including:
  • the image of the network intent object to be processed and the image of the client webpage to the second user agent module, so that the second user agent module loads a mirror image of the client webpage Afterwards, the data in the network intent object is sent to the acquired web application for processing.
  • the method further includes:
  • sending a broadcast message includes:
  • the broadcast message is sent under the trigger of the client webpage.
  • the method further includes: Creating an image for the service web page;
  • the created image is sent to the second user agent module via the communication connection to cause the second user agent module to load the image.
  • the method further includes:
  • an embodiment of the present invention further provides another computer program product, the computer program product comprising a computer readable medium, the readable medium comprising a second set of program code, for performing the steps in the method shown in FIG. 2:
  • a first response message of the first broadcast message where the first response message includes user agent module information on a terminal device that returns the first response message;
  • the method further includes: receiving, by the communication connection, a network intent object to be processed sent by the first user agent module; wherein, the to-be-processed
  • the network intent object includes a behavior action, a type type, and the data data;
  • the data is sent to an acquired web application for the obtained web application to process the data.
  • the acquired web application is a web application selected by the user from the corresponding web application.
  • receiving, by the communication connection, the network intent object to be processed sent by the first user agent module including:
  • the client webpage is configured to trigger the first user proxy module to send The client webpage of the first broadcast message.
  • the method further includes: starting the client webpage on the second user agent module according to the URL, where the second user agent module is to return the User agent module on the terminal device of the first response message.
  • the method further includes:
  • the processing result is returned to the first user agent module to cause the first user agent module to present the processing result to the user.
  • receiving, by the communication connection, the network intent object to be processed sent by the first user agent module including:
  • the first client webpage is configured to trigger the first user proxy module to send The client webpage of the first broadcast message.
  • the method further includes:
  • the method further includes:
  • the received first broadcast message is a broadcast message sent by the first user agent module triggered by the client webpage in the process of processing the network intent object by the service webpage, establishing with the first user agent module After the communication connection, it also includes:
  • the method further includes:
  • the party The law also includes:
  • the method further includes:
  • the method further includes:
  • An action synchronization request is sent to the third user agent module to bind the image of the acquired web application loaded on the third user agent module to the acquired web application.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

Provided are a method and device for realizing web intent. A first user proxy module detects another terminal device installed with a user proxy module, and directly establishes a communication connection with a second user proxy module to realize web intent, thus simplifying the web intent realization operation between terminal devices, and improving web intent processing efficiency.

Description

用于实现网络意图的方法及装置 技术领域  Method and apparatus for realizing network intent
本发明涉及网络意图技术, 尤其涉及一种用于实现网络意图的方法及装置。 背景技术  The present invention relates to network intent technologies, and in particular, to a method and apparatus for implementing network intent. Background technique
网络意图( Web intent )机制是谷歌 ( google )在万维网联盟( World Wide Web Consortium, W3C ) 中提出来的一种整合 web应用程序的机制。  The Web intent mechanism is a mechanism for Google to integrate web applications in the World Wide Web Consortium (W3C).
网络意图 (Web intent )机制主要包括网络(web )服务的发现机制和 web 应用程序之间的轻量级远程过程调用协议( Remote Procedure Call Protocol, RPC ) 通信机制。 例如, 想要在分享 web应用程序上给好友分享一个照片之前, 编辑 一下该照片,分享 web应用程序可以在该照片的边上加一个编辑( edit )的按鈕, 当用户点击了 edit 4^¾, 就相当于分享 web应用程序通知了用户代理模块其需 要编辑图片功能, 用户代理模块就会搜索适合处理图片的编辑 web应用程序, 并提供给用户。 经过用户的确认后, 用户代理模块会把需要处理的图片数据传 送给编辑 web应用程序。 编辑 web应用程序处理完图片之后会把处理结果传回 给分享 web应用程序。 分享 web应用程序把编辑好的图片分享给好友。 The web intent mechanism mainly includes a discovery mechanism of a web service and a lightweight remote procedure call protocol (RPC) communication mechanism between web applications. For example, if you want to share a photo with your friends before sharing a web application, edit the photo. The sharing web application can add an edit button to the photo. When the user clicks edit 4^3⁄4 That is, the sharing web application notifies the user agent module that it needs to edit the picture function, and the user agent module searches for an editing web application suitable for processing the picture and provides it to the user. After confirmation by the user, the user agent module will transfer the image data to be processed to the editing web application. After editing the image, the edited web application will pass the processing back to the shared we b application. Share the web app to share the edited picture to your friends.
但是, 现有的家庭网络等局域网络中要实现网络意图, 通用即插即用 ( Universal Plug and Play, UPnP )设备必须支持网络意图机制, 也就是说, 终 端设备必须额外支持网络意图机制。 对于安装了用户代理模块的 UPnP设备来 说, 实现网络意图方法较为繁冗。 发明内容  However, in the existing home network and other local area networks to achieve network intent, Universal Plug and Play (UPnP) devices must support the network intent mechanism, that is, the terminal device must additionally support the network intent mechanism. For UPnP devices with user agent modules installed, the method of implementing network intent is cumbersome. Summary of the invention
有鉴于此, 本发明实施例提供一种用于实现网络意图的方法及装置, 以筒 化两个安装有用户代理模块的终端设备之间的网络意图的实现。  In view of this, embodiments of the present invention provide a method and apparatus for implementing network intent to implement the implementation of network intent between two terminal devices installed with user agent modules.
第一方面, 本发明实施例提供一种用于实现网络意图的方法, 包括: 第一用户代理模块发送广播消息, 所述广播消息用于发现安装有用户代理 模块的终端设备;  In a first aspect, an embodiment of the present invention provides a method for implementing a network intent, including: a first user agent module sending a broadcast message, where the broadcast message is used to discover a terminal device that is installed with a user agent module;
所述第一用户代理模块接收安装有用户代理模块的终端设备返回的应答消 息, 所述应答消息为所述广播消息的应答消息, 所述应答消息中包含有返回所 述应答消息的终端设备的用户代理模块信息;  The first user agent module receives a response message returned by the terminal device that is installed with the user agent module, and the response message is a response message of the broadcast message, where the response message includes a terminal device that returns the response message. User agent module information;
所述第一用户代理模块根据所述用户代理模块信息与第二用户代理模块建 立通信连接, 以实现网络意图; 其中, 所述第二用户代理模块为所述安装有用 户代理模块的终端设备中的一个终端设备上的用户代理模块。 The first user agent module is built according to the user agent module information and the second user agent module Establishing a communication connection to implement network intent; wherein the second user agent module is a user agent module on one of the terminal devices in which the user agent module is installed.
第二方面, 本发明实施例提供一种用于实现网络意图的方法, 包括: 接收第一用户代理模块发送的第一广播消息, 所述第一广播消息用于发现 安装有用户代理模块的终端设备;  In a second aspect, an embodiment of the present invention provides a method for implementing a network intent, including: receiving a first broadcast message sent by a first user agent module, where the first broadcast message is used to discover a terminal that is installed with a user agent module. Equipment
向所述第一用户代理模块返回所述第一广播消息的第一应答消息, 所述第 一应答消息中包含有返回所述第一应答消息的终端设备上的用户代理模块信 息;  Returning, to the first user agent module, a first response message of the first broadcast message, where the first response message includes user agent module information on a terminal device that returns the first response message;
与所述第一用户代理模块之间建立通信连接, 以实现网络意图。  Establishing a communication connection with the first user agent module to implement network intent.
第三方面, 本发明实施例提供一种用于实现网络意图的装置, 包括: 广播模块, 用于发送广播消息, 所述广播消息用于发现安装有用户代理模 块的终端设备;  In a third aspect, an embodiment of the present invention provides an apparatus for implementing a network intent, including: a broadcast module, configured to send a broadcast message, where the broadcast message is used to discover a terminal device that is installed with a user agent module;
应答接收模块, 用于接收安装有用户代理模块的终端设备返回的应答消息, 所述应答消息为所述广播消息的应答消息, 所述应答消息中包含有返回所述应 答消息的终端设备的用户代理模块信息;  The response receiving module is configured to receive a response message returned by the terminal device that is installed with the user agent module, where the response message is a response message of the broadcast message, where the response message includes a user of the terminal device that returns the response message Agent module information;
连接模块, 用于根据所述应答接收模块接收的应答消息中的用户代理模块 信息与第二用户代理模块建立通信连接, 以实现网络意图; 其中, 所述第二用 户代理模块为所述安装有用户代理模块的终端设备中的一个终端设备上的用户 代理模块。  a connection module, configured to establish a communication connection with the second user agent module according to the user agent module information in the response message received by the response receiving module, to implement network intent; wherein the second user agent module is configured to be User agent module on a terminal device in the terminal device of the user agent module.
第四方面, 本发明实施例提供一种用于实现网络意图的装置, 包括: 广播接收模块, 用于接收第一用户代理模块发送的第一广播消息, 所述第 一广播消息用于发现安装有用户代理模块的终端设备;  A fourth aspect of the present invention provides an apparatus for implementing a network intent, including: a broadcast receiving module, configured to receive a first broadcast message sent by a first user agent module, where the first broadcast message is used to discover and install a terminal device having a user agent module;
应答返回模块, 用于向所述第一用户代理模块返回所述第一广播消息的第 一应答消息, 所述第一应答消息中包含有返回所述第一应答消息的终端设备上 的用户代理模块信息;  a response returning module, configured to return a first response message of the first broadcast message to the first user agent module, where the first response message includes a user agent on a terminal device that returns the first response message Module information;
第一连接模块, 用于与所述第一用户代理模块之间建立通信连接, 以实现 网络意图。  The first connection module is configured to establish a communication connection with the first user agent module to implement network intent.
上述实施例中, 用于实现网络意图的方法及装置通过第一用户代理模块发 现另一安装有用户代理模块的终端设备, 并直接与第二用户代理模块之间建立 通信连接, 以此实现网络意图, 筒化了终端设备间实现网络意图的操作, 提高 了网络意图的处理效率。 附图说明 In the above embodiment, the method and apparatus for implementing the network intent discover another terminal device installed with the user agent module through the first user agent module, and directly establish a communication connection with the second user agent module, thereby implementing the network. Intention, the operation of realizing network intent between terminal devices is realized, and the processing efficiency of network intent is improved. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作筒要介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例, 对于本领域的普通技术人员来讲, 在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the description of the embodiments will be described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of these drawings without the inventive labor.
图 1为本发明一个实施例提供的用于实现网络意图的方法的流程图; 图 2为本发明另一个实施例提供的用于实现网络意图的方法的流程图; 图 3为本发明另一实施例提供的用于实现网络意图的方法中发现安装有用 户代理模块的终端设备的信令流程图;  1 is a flowchart of a method for implementing network intent according to an embodiment of the present invention; FIG. 2 is a flowchart of a method for implementing network intent according to another embodiment of the present invention; A signaling flowchart of a terminal device installed with a user agent module is found in a method for implementing network intent provided by an embodiment;
图 4为本发明另一实施例提供的用于实现网络意图的方法的信令流程图; 图 5为本发明另一实施例提供的用于实现网络意图的方法的信令流程图; 图 6为本发明另一实施例提供的用于实现网络意图的方法的信令流程图; 图 7为本发明另一实施例提供的用于实现网络意图的装置的结构示意图; 图 8为本发明另一实施例提供的用于实现网络意图的装置的结构示意图。 具体实施方式  FIG. 4 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention; FIG. 5 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention; FIG. 7 is a schematic structural diagram of a device for implementing network intent according to another embodiment of the present invention; FIG. 8 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention; A schematic structural diagram of an apparatus for implementing network intent provided by an embodiment. detailed description
为了使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发 明作进一步地详细描述, 显然, 所描述的实施例仅仅是本发明一部份实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的范围。  The present invention will be further described in detail with reference to the accompanying drawings, in which FIG. . All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明一个实施例提供的用于实现网络意图的方法的流程图, 本实施 例所示的方法为第一终端设备上侧的处理流程, 该用于实现网络意图的方法包 括:  FIG. 1 is a flowchart of a method for implementing network intent according to an embodiment of the present invention. The method shown in this embodiment is a process flow on an upper side of a first terminal device, and the method for implementing network intent includes:
步骤 11、 第一用户代理模块发送广播消息, 该广播消息用于发现安装有用 户代理模块的终端设备。 其中, 第一用户代理模块可为浏览器, 安装在上述第 一终端设备上。 第一终端设备可以是网络节点设备、 家庭网络中的即插即用 ( Universal Plug and Play, UPnP )设备等。  Step 11. The first user agent module sends a broadcast message, and the broadcast message is used to discover a terminal device that installs the user agent module. The first user agent module can be a browser and is installed on the first terminal device. The first terminal device may be a network node device, a Universal Plug and Play (UPnP) device in a home network, or the like.
进一步, 第一用户代理模块发送广播消息, 可包括: 第一用户代理模块在 客户端网页的触发下发送广播消息, 该广播消息可包括代理请求头域, 该代理 请求头域的值用于指示安装有用户代理模块的终端设备接收到该广播消息后返 回应答消息。 代理请求头域可以是新增的头域如在广播消息中扩展请求Further, the first user agent module sending the broadcast message may include: the first user agent module sends a broadcast message triggered by the client webpage, where the broadcast message may include a proxy request header field, the proxy The value of the request header field is used to indicate that the terminal device installed with the user agent module returns a response message after receiving the broadcast message. The proxy request header field can be a new header field such as an extension request in a broadcast message
( Require )头域, 当 Require头域中的值为浏览器(browser )时, 表示该广播消 息是用来发现安装有用户代理模块的终端设备的。 那么收到该广播消息的终端 设备如果安装有用户代理模块, 可以返回应答消息, 以告知第一用户代理模块。 (Require) header field, when the value in the Require header field is a browser, it indicates that the broadcast message is used to discover the terminal device with the user agent module installed. Then, if the terminal device that receives the broadcast message installs the user agent module, it can return a response message to inform the first user agent module.
1*列^口, Document. getElementByld ( ' edit-photo' ) .addEventListener ( " click" , function() {  1* column ^, Document. getElementByld ( ' edit-photo' ) .addEventListener ( " click" , function() {
Var intent = new intent( {action: htt:〃 webintents.org/edit ,  Var intent = new intent( {action: htt:〃 webintents.org/edit ,
"type ":,, image/jpeg" ,  "type":,, image/jpeg" ,
"data": getlmageDataBlob ")});  "data": getlmageDataBlob ")});
Navigator. startActivity(intent, imageEdited);  Navigator. startActivity(intent, imageEdited);
};  };
Function imageEdited(data) {  Function imageEdited(data) {
Document. getElementByld( ' image ' ).src = data;  Document. getElementByld( ' image ' ).src = data;
}  }
该客户端网页首先声明一个 intent对象, 包括实例化 intent对象中的 action, type, data。 然后调用 startActivity()触发 intent事件, 通知用户代理模块其需要处 理的 intent的类型 ( action. type ) 。 本实施例中, Action= http:〃 webintents.org/edit type=image/jpeg.表示: 需要处理一个编辑图片的功能。  The client page first declares an intent object, including the action, type, and data in the instantiated intent object. Then call startActivity() to trigger the intent event, notifying the user of the type of intent (action. type ) that the proxy module needs to handle. In this embodiment, Action= http:〃 webintents.org/edit type=image/jpeg. means: It needs to process a function of editing pictures.
或者, 进一步, 第一用户代理模块发送广播消息, 可包括: 第一用户代理 模块在服务网页处理网络意图对象的过程中, 在客户端网页触发下发送广播消 息。 该广播消息具体可见上述说明。  Or, further, the sending, by the first user agent module, the broadcast message may include: the first user agent module sending the broadcast message under the trigger of the client webpage in the process of processing the network intent object by the service webpage. The broadcast message can be specifically seen in the above description.
客户端网页在触发用户代理模块发送广播消息后, 会将 intent数据发送到用 户代理模块, 其数据结构如下所示:  After the client web page triggers the user agent module to send a broadcast message, the intent data is sent to the user agent module, and the data structure is as follows:
interface Intent {  Interface Intent {
readonly attribute DOMString action;  Readonly attribute DOMString action;
readonly attribute DOMString type;  Readonly attribute DOMString type;
readonly attribute any data;  Readonly attribute any data;
readonly attribute MessagePort[] ports;  Readonly attribute MessagePort[] ports;
string getExtra (DOMString key);  String getExtra (DOMString key);
void postResult (any data, optional sequence); void postFailure (any data); Void postResult (any data, optional sequence); Void postFailure (any data);
}。  }.
广播消息可以是基于筒单服务发现协议( Simple Service Discovery Protocol, SSDP ) 的 M-SEARCH广播消息。  The broadcast message may be an M-SEARCH broadcast message based on the Simple Service Discovery Protocol (SSDP).
步骤 12、 第一用户代理模块接收安装有用户代理模块的终端设备返回的应 答消息, 该应答消息为上述广播消息的应答消息, 该应答消息中包含有返回上 述应答消息的终端设备的用户代理模块信息。  Step 12: The first user agent module receives a response message returned by the terminal device installed with the user agent module, where the response message is a response message of the broadcast message, where the response message includes a user agent module of the terminal device that returns the response message. information.
应答消息也可以基于 SSDP。 该应答消息中也可设置一个头域, 用来携带本 终端设备中用户代理模块的信息如通信地址等。  The reply message can also be based on SSDP. A header field may also be set in the response message, which is used to carry information such as a communication address of the user agent module in the terminal device.
步骤 13、 第一用户代理模块根据上述用户代理模块信息与第二用户代理模 块建立通信连接, 以实现网络意图; 其中, 该第二用户代理模块为上述安装有 用户代理模块的终端设备中的一个终端设备上的用户代理模块。  Step 13, the first user agent module establishes a communication connection with the second user agent module according to the user agent module information to implement network intent; wherein the second user agent module is one of the terminal devices with the user agent module installed above. User agent module on the terminal device.
返回第一用户代理模块的应答消息可能有多个, 或者说可能有多个终端设 备向第一用户代理模块返回应答消息, 第一用户代理模块会与其中一个返回应 答消息的终端设备上安装的用户代理模块建立通信连接。  There may be multiple response messages returned to the first user agent module, or there may be multiple terminal devices returning a response message to the first user agent module, and the first user agent module may be installed with one of the terminal devices that returned the response message. The user agent module establishes a communication connection.
进一步, 当第一用户代理模块在客户端网页的触发下发送广播消息时, 第 一用户代理模块根据上述用户代理模块信息与第二用户代理模块建立通信连接 之后, 还包括:  Further, when the first user agent module sends a broadcast message triggered by the client webpage, after the first user agent module establishes a communication connection with the second user agent module according to the user agent module information, the method further includes:
第一用户代理模块通过该通信连接, 将待处理的网络意图对象发送给上述 第二用户代理模块, 以使该第二用户代理模块根据该网络意图对象获取相应的 网络应用程序, 并使获取的网络应用程序对该网络意图对象中的数据进行处理; 其中, 该待处理的网络意图对象至少包括行为 ( action ) 、 类型 ( type )和数据 ( data ) 。  The first user agent module sends the to-be-processed network intent object to the second user agent module through the communication connection, so that the second user agent module acquires the corresponding network application according to the network intent object, and obtains the acquired The web application processes the data in the network intent object; wherein the to-be-processed network intent object includes at least an action, a type, and a data.
进一步, 第一用户代理模块通过上述通信连接, 将待处理的网络意图对象 发送给上述第二用户代理模块, 可包括:  Further, the first user agent module sends the to-be-processed network intent object to the second user agent module by using the foregoing communication connection, which may include:
第一用户代理模块通过上述通信连接, 将该待处理的网络意图对象及上述 客户端网页的资源统一定位符( Uniform Resource Locator, URL ) , 发送给上述 第二用户代理模块, 以使上述第二用户代理模块根据该 URL启动上述客户端网 页后, 将该网络意图对象中的数据发送给上述获取的网络应用程序进行处理。  Transmitting, by the foregoing user agent module, the network intent object to be processed and the resource uniform locator (URL) of the client webpage to the second user agent module, so as to enable the second After the user agent module starts the client webpage according to the URL, the data in the network intent object is sent to the acquired web application for processing.
进一步, 第一用户代理模块通过上述通信连接, 将待处理的网络意图对象 发送给上述第二用户代理模块之前, 还可包括: 第一用户代理模块创建上述客户端网页的镜像。 Further, before the first user agent module sends the network intent object to be processed to the second user agent module by using the foregoing communication connection, the first user agent module may further include: The first user agent module creates a mirror of the client web page described above.
进一步, 第一用户代理模块通过上述通信连接, 将待处理的网络意图对象 发送给上述第二用户代理模块, 包括:  Further, the first user agent module sends the to-be-processed network intent object to the second user agent module by using the foregoing communication connection, including:
第一用户代理模块通过上述通信连接, 将待处理的网络意图对象及上述客 户端网页的镜像发送给上述第二用户代理模块, 以使上述第二用户代理模块加 载上述客户端网页的镜像后, 将该网络意图对象中的数据发送给上述获取的网 络应用程序进行处理。  The first user agent module sends the image of the network intent object to be processed and the image of the client webpage to the second user agent module through the foregoing communication connection, so that the second user agent module loads the image of the client webpage, The data in the network intent object is sent to the obtained web application for processing.
进一步, 第一用户代理模块通过所述通信连接, 将待处理的网络意图对象 发送给上述第二用户代理模块之后, 还包括:  Further, after the first user agent module sends the network intent object to be processed to the second user agent module by using the communication connection, the first user agent module further includes:
第一用户代理模块关闭上述客户端网页。  The first user agent module closes the above client webpage.
进一步, 当第一用户代理模块在服务网页处理网络意图对象的过程中, 在 客户端网页触发下发送广播消息时, 在客户端网页触发下发送广播消息之后, 还可包括:  Further, the first user agent module may further include: after the broadcast message is sent by the client webpage, the first user agent module may further include:
第一用户代理模块为该服务网页创建镜像;  The first user agent module creates an image for the service webpage;
第一用户代理模块通过上述通信连接, 将创建的镜像发送到上述第二用户 代理模块, 以使上述第二用户代理模块加载该镜像。  The first user agent module sends the created image to the second user agent module through the above communication connection, so that the second user agent module loads the image.
进一步, 所述第一用户代理模块通过通信连接, 将创建的镜像发送到所述 第二用户代理模块之后, 还可包括:  Further, after the first user agent module sends the created image to the second user agent module by using a communication connection, the first user agent module may further include:
第一用户代理模块向上述第二用户代理模块发送动作同步请求, 以将上述 第二用户代理模块上加载的镜像与第一用户代理模块上的服务网页绑定。  The first user agent module sends an action synchronization request to the second user agent module to bind the image loaded on the second user agent module to the service web page on the first user agent module.
本实施例中, 第一用户代理模块通过发现另一安装有用户代理模块的终端 设备, 并直接与第二用户代理模块之间建立通信连接, 以此实现网络意图, 筒 化了终端设备间实现网络意图的操作, 提高了网络意图的处理效率。  In this embodiment, the first user agent module realizes the network intention by discovering another terminal device installed with the user agent module, and directly establishes a communication connection with the second user agent module, thereby realizing the realization between the terminal devices. The operation of the network intent improves the processing efficiency of the network intent.
图 2为本发明另一个实施例提供的用于实现网络意图的方法的流程图, 与图 1所示方法相对应, 本实施例提供的方法为第二终端设备侧的处理流程, 第二终 端设备可为网络节点、 家庭网络中的 UPnP设备等。 该用于实现网络意图的方法 包括:  FIG. 2 is a flowchart of a method for implementing network intent according to another embodiment of the present invention. The method provided in this embodiment is a process flow on the second terminal device side, and the second terminal is provided. The device can be a network node, a UPnP device in a home network, or the like. The method for implementing network intent includes:
步骤 21、 接收第一用户代理模块发送的第一广播消息, 该第一广播消息用 于发现安装有用户代理模块的终端设备。 其中, 第一广播消息具体详见图 1中的 广播消息的说明, 第一用户代理模块具体详见图 1中的说明。  Step 21: Receive a first broadcast message sent by the first user agent module, where the first broadcast message is used to discover a terminal device that is installed with a user agent module. The first broadcast message is specifically illustrated in the description of the broadcast message in FIG. 1, and the first user agent module is specifically illustrated in FIG.
步骤 22、 向第一用户代理模块返回上述第一广播消息的第一应答消息, 该 第一应答消息中包含有返回该第一应答消息的终端设备上的用户代理模块信 息。 第一应答消息详见图 1中应答消息的说明。 Step 22: Return a first response message of the first broadcast message to the first user agent module, where The first response message includes user agent module information on the terminal device that returns the first response message. The first response message is detailed in the description of the response message in FIG.
步骤 23、 与第一用户代理模块之间建立通信连接, 以实现网络意图。  Step 23. Establish a communication connection with the first user agent module to implement network intent.
进一步, 与第一用户代理模块之间建立通信连接之后, 还可包括: 通过上述通信连接, 接收第一用户代理模块发送的待处理的网络意图对象; 其中, 该待处理的网络意图对象包括行为(action )、 类型(type )和数据(data ) 等参数;  Further, after establishing a communication connection with the first user agent module, the method further includes: receiving, by the foregoing communication connection, a to-be-processed network intent object sent by the first user agent module; wherein the to-be-processed network intent object includes behavior Parameters such as (action), type (type), and data (data);
根据该 action, type获取相应的网络应用程序;  According to the action, type obtains the corresponding web application;
将该 data发送给一个获取的网络应用程序, 以使该获取的网络应用程序对该 data进行处理。  The data is sent to an acquired web application to cause the acquired web application to process the data.
例如, 第二用户代理模块根据收到的 intent对象中的 action, type参数去查询 应用程序存储(app store ) , 检查是否有适配的应用程序。 如第二用户代理模块 可以根据网络应用程序声明的 action和 type的值来确定其能提供的服务功能, 以 便提供给第二用户代理模块上加载的客户端网页 ( client page )进行选择。 若第 二用户代理模块检查到某一网络应用程序如下:  For example, the second user agent module queries the application store (app store) according to the action, type parameter in the received intent object, and checks if there is an adapted application. For example, the second user agent module can determine the service function that can be provided according to the value of the action and type declared by the web application, so as to provide a selection to the client page loaded on the second user agent module. If the second user agent module checks for a web application as follows:
<html>  <html>
<head>  <head>
<title>Image Meme Editor</title>  <title>Image Meme Editor</title>
</head>  </head>
<body>  <body>
<intent action=,, http://webintents.org/edit " type=,, text/uri-list; type=im-age/*, image/*" ></intent>  <intent action=,, http://webintents.org/edit " type=,, text/uri-list; type=im-age/*, image/*" ></intent>
<script>  <script>
Window. addEventlistener( " load" , function(){  Window. addEventlistener( " load" , function(){
If(window. intent) {  If(window. intent) {
setlmageContentURI(window.intent.data);  setlmageContentURI(window.intent.data);
Document. getElementById( ' save -button' ).
Figure imgf000009_0001
Document. getElementById( ' save -button' ).
Figure imgf000009_0001
function() { Function() {
Window. intent.postResult(getImagedataURI(---)) }; Window. intent.postResult(getImagedataURI(---)) };
</script>  </script>
可获知该网络应用程序是一个可以编辑图片的 web应用程序,如果正是处理 data所需要的服务。  It can be known that the web application is a web application that can edit images, if it is the service required to process data.
第二用户代理模块把检索到的网络( web )应用程序和已经在用户代理模块 注册的符合条件的网络(web )应用程序, 生成一个列表, 供用户选择。 用户代 理模块把生成的列表如以网页的形式呈现给用户。 用户在上述网页中选择一个 web应用程序。 第二用户代理模块得知用户选择的 web应用程序之后, 如果该应 用程序在用户代理模块上面没有注册, 先行把该应用程序注册在用户代理模块 上, 或者第二用户代理模块直接打开选定的 web应用程序(即网页) , 并且传送 需要处理的数据 ( intent.data )给选定的 web应用程序。 被选定的 web应用程序处 理第二用户代理模块传送过来的数据, 并把处理结果传送给第二用户代理模块 上加载的客户端网页。  The second user agent module generates a list for the user to select from the retrieved web application and the eligible web application that has been registered with the user agent module. The user agent module presents the generated list to the user in the form of a web page. The user selects a web application in the above web page. After the second user agent module knows the web application selected by the user, if the application is not registered on the user agent module, the application is first registered on the user agent module, or the second user agent module directly opens the selected one. A web application (ie web page) and passing the data to be processed (intent.data) to the selected web application. The selected web application processes the data transmitted by the second user agent module and transmits the processing result to the client web page loaded on the second user agent module.
进一步, 获取的网络应用程序可为用户从所述相应的网络应用程序中选择 的一个网络应用程序。  Further, the obtained web application can be a web application selected by the user from the corresponding web application.
进一步, 通过上述通信连接, 接收第一用户代理模块发送的待处理的网络 意图对象, 可包括:  Further, receiving, by the foregoing communication connection, the network intent object to be processed sent by the first user agent module may include:
通过上述通信连接, 接收第一用户代理模块发送的客户端网页的 URL和待 处理的网络意图对象; 该客户端网页为触发第一用户代理模块发送上述第一广 播消息的客户端网页。  And receiving, by the foregoing communication connection, a URL of the client webpage sent by the first user agent module and a network intent object to be processed; the client webpage is a client webpage that triggers the first user proxy module to send the first broadcast message.
进一步, 通过上述通信连接, 接收第一用户代理模块发送的客户端网页的 URL和上述待处理的网络意图对象之后, 还可包括:  Further, after receiving the URL of the client webpage sent by the first user agent module and the network intent object to be processed by the foregoing communication connection, the method may further include:
根据该 URL在第二用户代理模块上启动上述客户端网页, 该第二用户代理 模块为返回第一应答消息的终端设备(即第二终端设备)上的用户代理模块。  The client webpage is started on the second user agent module according to the URL, and the second user agent module is a user agent module on the terminal device (ie, the second terminal device) that returns the first response message.
进一步, 将上述 data发送给一个获取的网络应用程序, 以使该获取的网络应 用程序对所述 data进行处理之后, 还可包括:  Further, after the data is sent to an acquired network application, so that the obtained network application processes the data, the method may further include:
将处理结果返回给第一用户代理模块, 以使第一用户代理模块将处理结果 呈现给用户。  The processing result is returned to the first user agent module to cause the first user agent module to present the processing result to the user.
进一步, 通过上述通信连接, 接收第一用户代理模块发送的待处理的网络 意图对象, 可包括:  Further, receiving, by the foregoing communication connection, the network intent object to be processed sent by the first user agent module may include:
通过上述通信连接, 接收第一用户代理模块发送的第一客户端网页的镜像 和待处理的网络意图对象; 该第一客户端网页为触发第一用户代理模块发送上 述第一广播消息的客户端网页。 Receiving a mirror image of the first client webpage sent by the first user agent module by using the foregoing communication connection And the network intent object to be processed; the first client webpage is a client webpage that triggers the first user proxy module to send the first broadcast message.
进一步, 通过上述通信连接, 接收第一用户代理模块发送的第一客户端网 页的镜像和上述待处理的网络意图对象之后, 还可包括:  Further, after receiving the image of the first client webpage sent by the first user agent module and the network intent object to be processed, the method further includes:
加载该第一客户端网页的镜像。  Load the image of the first client web page.
进一步, 将 data发送给一个获取的网络应用程序, 以使该获取的网络应用程 序对该 data进行处理之后, 还可包括:  Further, after the data is sent to an acquired network application, so that the obtained network application processes the data, the method may further include:
将处理结果发送给第二用户代理模块, 以使该第二用户代理模块将处理结 果呈现给用户, 该第二用户代理模块为返回所述第一应答消息的终端设备(即 第二终端设备)上的用户代理模块。  Sending the processing result to the second user agent module, so that the second user agent module presents the processing result to the user, where the second user agent module is the terminal device (ie, the second terminal device) that returns the first response message. User agent module on.
进一步, 当接收的第一广播消息为第一用户代理模块在服务网页处理网络 意图对象的过程中由客户端网页触发下发送的广播消息时, 与第一用户代理模 块之间建立通信连接之后, 还可包括:  Further, after the received first broadcast message is a broadcast message sent by the client webpage in the process of processing the network intent object by the first user agent module, after establishing a communication connection with the first user agent module, It can also include:
通过上述通信连接, 接收第一用户代理模块发送的镜像, 该镜像为第一用 户代理模块为服务网页创建的镜像;  Receiving, by the foregoing communication connection, an image sent by the first user agent module, where the image is an image created by the first user agent module for the service webpage;
加载该镜像。  Load the image.
进一步, 接收第一用户代理模块发送的镜像之后, 还可包括:  Further, after receiving the image sent by the first user agent module, the method further includes:
接收第一用户代理模块发送的动作同步请求;  Receiving an action synchronization request sent by the first user agent module;
根据该动作同步请求, 将加载的镜像与第一用户代理模块上的服务网页绑 定。  According to the action synchronization request, the loaded image is bound to the service web page on the first user agent module.
进一步, 第二终端设备安装的第二用户代理模块上, 在用获取的网络应用 程序对 data进行处理的过程 (此时获取的网络应用程序成为 data的服务网页)中, 本发明用于实现网络意图的方法还可包括:  Further, in the second user agent module installed by the second terminal device, in the process of processing the data by the acquired network application (the network application obtained at this time becomes the service webpage of data), the present invention is used to implement the network. The intended method may also include:
在第二客户端网页的触发下发送第二广播消息, 该第二广播消息用于发现 安装有用户代理模块的终端设备;  Transmitting, by the second client webpage, a second broadcast message, where the second broadcast message is used to discover a terminal device installed with a user agent module;
接收安装有用户代理模块的终端设备返回的第二应答消息, 该第二应答消 息为第二广播消息的应答消息, 该第二应答消息中包含有返回该第二应答消息 的终端设备的用户代理模块信息;  Receiving, by the terminal device installed with the user agent module, a second response message, where the second response message is a response message of the second broadcast message, where the second response message includes a user agent of the terminal device that returns the second response message Module information;
根据第二应答消息中的用户代理模块信息与第三用户代理模块建立第二通 信连接, 以实现网络意图; 其中, 所述第三用户代理模块为返回第二应答消息 的终端设备中的一个终端设备(即第三终端设备)上的用户代理模块。 也就是说, 第二终端设备中, 在服务网页处理 data的过程中, 用户也可选择 第三终端设备对 data进行处理,第二终端设备与第三终端设备之间的交互与第一 终端设备与第二终端设备之间的交互类似。 Establishing a second communication connection with the third user agent module according to the user agent module information in the second response message to implement network intent; wherein the third user agent module is a terminal in the terminal device that returns the second response message. User agent module on the device (ie the third terminal device). That is, in the second terminal device, in the process of processing the data of the service webpage, the user may also select the third terminal device to process the data, and the interaction between the second terminal device and the third terminal device and the first terminal device. Similar to the interaction between the second terminal devices.
进一步, 根据第二应答消息中的用户代理模块信息与第三用户代理模块建 立第二通信连接之后, 还可包括:  Further, after the second communication connection is established with the third user agent module according to the user agent module information in the second response message, the method may further include:
为上述获取的网络应用程序的创建镜像;  Create an image of the web application obtained above;
通过第二通信连接, 将上述获取的网络应用程序的镜像发送给第三用户代 理模块, 以使第三用户代理模块加载上述获取的网络应用程序的镜像。  And sending, by the second communication connection, the image of the obtained network application to the third user agent module, so that the third user agent module loads the image of the obtained network application.
进一步, 通过第二通信连接, 将上述镜像发送给第三用户代理模块之后, 还可包括:  Further, after the foregoing image is sent to the third user agent module by using the second communication connection, the method further includes:
向第三用户代理模块发送动作同步请求, 以将第三用户代理模块上加载的 获取的网络应用程序的镜像与上述获取的网络应用程序绑定。  An action synchronization request is sent to the third user agent module to bind the image of the acquired web application loaded on the third user agent module to the acquired web application.
本实施例中, 安装有用户代理模块的终端设备通过返回应答消息, 使得第 一用户代理模块发现了另一安装有用户代理模块的终端设备, 并直接与第二用 户代理模块之间建立通信连接, 以此实现网络意图, 筒化了终端设备间实现网 络意图的操作, 提高了网络意图的处理效率。  In this embodiment, the terminal device installed with the user agent module returns a response message, so that the first user agent module discovers another terminal device with the user agent module installed, and directly establishes a communication connection with the second user agent module. In order to achieve network intent, the operation of realizing network intent between terminal devices is realized, and the processing efficiency of network intent is improved.
图 3为本发明另一实施例提供的用于实现网络意图的方法中发现安装有用 户代理模块的终端设备的信令流程图。  FIG. 3 is a signaling flowchart of discovering a terminal device for installing a user agent module in a method for implementing network intent according to another embodiment of the present invention.
本实施例中, 第一用户代理模块为第一终端设备上的用户代理模块, 第二 用户代理模块为第二终端设备上的用户代理模块。 同样, 第一终端设备、 第二 终端设备均为 Upnp设备, 且支持网络意图机制。  In this embodiment, the first user agent module is a user agent module on the first terminal device, and the second user agent module is a user agent module on the second terminal device. Similarly, the first terminal device and the second terminal device are both Upnp devices and support a network intent mechanism.
参见图 3 , 发现安装有用户代理模块的终端设备的过程包括:  Referring to FIG. 3, the process of discovering the terminal device with the user agent module installed includes:
步骤 31、 当第一终端设备中, 客户端网页调用了 startActivityO之后, 支持 UPnP功能的第一用户代理模块基于筒单服务发现协议( Simple Service Discovery Protocol, SSDP )发送 M-SEARCH广播消息:  Step 31: After the start page is invoked by the client webpage in the first terminal device, the first user agent module that supports the UPnP function sends the M-SEARCH broadcast message based on the Simple Service Discovery Protocol (SSDP):
M-SEARCH *HTTP/1.1  M-SEARCH *HTTP/1.1
Host: 239.255.255.250.1900  Host: 239.255.255.250.1900
ST: urn:schemas-webintents-org:service:WebIntents:l  ST: urn:schemas-webintents-org:service:WebIntents:l
MAN: ssdp: discover  MAN: ssdp: discover
MX: 3  MX: 3
Require: browser Action: webintent.org.www.webintents.org/edit. 其中 , 对 M-SEARCH消 息进行了 扩展, ST头域的值设定为 urn:schemas-webintents-org:service:WebIntents: l , 表示 UA需要支持 web intent的 UPnP设备提供服务。 并且, 扩展了 Require头域, 并设定其值为用户代理模块 ( browser ) , 表明发送消息方需要一个安装有用户代理模块的终端设备。 Require: browser Action: webintent.org.www.webintents.org/edit. Among them, the M-SEARCH message is extended, and the value of the ST header field is set to urn:schemas-webintents-org:service:WebIntents: l , indicating that the UA needs UPnP devices that support web intent provide services. Also, the Require header field is extended, and its value is set to the user agent module (browser), indicating that the sender of the message requires a terminal device with the user agent module installed.
步骤 32、 当第一用户代理模块发送了基于 SSDP协议的 M-SEARCH的广播消 息之后, 收到广播消息的第二终端设备由于安装了用户代理模块, 因此返回应 答消息:  Step 32: After the first user agent module sends the broadcast message of the M-SEARCH based on the SSDP protocol, the second terminal device that receives the broadcast message returns the response message because the user agent module is installed:
HTTP/1.1 200OK  HTTP/1.1 200OK
ST: urn: schem as-web intents- org: service: Weblntents: 1  ST: urn: schem as-web intents- org: service: Weblntents: 1
CACHE-CONTROL:max-age=900  CACHE-CONTROL: max-age=900
Require: browser  Require: browser
SERVER : uuid : 67a89239-6ce9-4c6f-8527-aa457a481798::urn:schem as-webintens-org: service: webintents: 1  SERVER : uuid : 67a89239-6ce9-4c6f-8527-aa457a481798::urn:schem as-webintens-org: service: webintents: 1
Action.webintent.org. www.webintents.org/edit  Action.webintent.org. www.webintents.org/edit
LOCATION: http://192.168.1.1 :4500  LOCATION: http://192.168.1.1 :4500
其中, ST头域复制了广播消息中的 ST头域的内容, 并且复制了广播消息中 的 Require头域, 表示返回应答消息的终端设备(即第二终端设备)安装有用户 代理模块。 Location头域 "http://192.168.1.1 :4500"表明了用户代理模块通信的 IP 地址 192.168.1.1和端口号 4500。  The ST header field copies the content of the ST header field in the broadcast message, and copies the Require header field in the broadcast message, and the terminal device (ie, the second terminal device) that returns the response message is installed with the user proxy module. The Location header field "http://192.168.1.1:4500" indicates the IP address of the user agent module communication 192.168.1.1 and port number 4500.
由于第一用户代理模块发送的是广播消息, 因而, 家庭网络中安装有用户 代理模块的终端设备都会返回应答消息给第一用户代理模块。 这样, 第一用户 代理模块便发现了家庭网络中所有安装有用户代理模块的终端设备。 当然, 第 一用户代理模块可以将所有安装有用户代理模块的终端设备都呈现给用户, 以 便用户从中选择一个, 之后第一用户代理模块便与用户选择的终端设备中的用 户代理模块建立通信连接, 从而实现网络意图。  Since the first user agent module sends a broadcast message, the terminal device installed with the user agent module in the home network returns a response message to the first user agent module. In this way, the first user agent module discovers all the terminal devices in the home network with the user agent module installed. Of course, the first user agent module can present all terminal devices installed with the user agent module to the user, so that the user selects one of them, and then the first user agent module establishes a communication connection with the user agent module in the terminal device selected by the user. To achieve network intent.
可选地, 本实施例中, 应答消息还提供了返回应答消息的终端设备所能提 供的网络意图服务类型。 如, 应答消息中的 " Action.webintent.org. www. webintents, org/edit" 。 这样, 第一用户代理模块除了能够发现所有安装有 用户代理模块的终端设备, 还能够获知这些终端设备能够提供哪些网络意图服 务, 以便提供给用户, 更便于用户选择终端设备。 Optionally, in this embodiment, the response message further provides a network intent service type that the terminal device that returns the response message can provide. For example, in the response message, "Action.webintent.org. www. webintents, org/edit". In this way, in addition to being able to discover all the terminal devices installed with the user agent module, the first user agent module can also know which network intentions the terminal devices can provide. For the user, it is more convenient for the user to select the terminal device.
本发明另一实施例与图 3所示实施例类似, 不同之处在于, 第二终端设备返 回的应答消息如下:  Another embodiment of the present invention is similar to the embodiment shown in FIG. 3, except that the response message returned by the second terminal device is as follows:
HTTP/ 1.1 200OK  HTTP/ 1.1 200OK
ST: urn: schem as-web intents- org: service: Weblntents: 1  ST: urn: schem as-web intents- org: service: Weblntents: 1
CACHE-CONTROL:max-age=900  CACHE-CONTROL: max-age=900
Require: browser  Require: browser
SERVER : uuid : 67a89239-6ce9-4c6f-8527-aa457a481798::urn:schem as-webintens-org: service: webintents: 1  SERVER : uuid : 67a89239-6ce9-4c6f-8527-aa457a481798::urn:schem as-webintens-org: service: webintents: 1
Action.webintent.org. www.webintents.org/edit  Action.webintent.org. www.webintents.org/edit
LOCATION: http://192.168.1.1 :4500  LOCATION: http://192.168.1.1 :4500
Location, webintents. org:/webintents.html  Location, webintents. org:/webintents.html
其中, "LOCATION: http://192.168, 1.1 :4500"提供 7网络意图文件( web intent document ) "Location. webintents. org:/webintents.html" 提供了网络意图文件的 名称及该文件在 http://192.168.1.1 :4500中的路径即存放地址。 其中, 网络意图文 件即用户代理模块信息文件, 其形式和内容如下:  Among them, "LOCATION: http://192.168, 1.1:4500" provides 7 web intent document "Location. webintents. org:/webintents.html" provides the name of the network intent file and the file at http: //192.168.1.1 : The path in 4500 is the address. The network intent file is the user agent module information file, and its form and content are as follows:
<html>  <html>
<head><title></title></head>  <head><title></title></head>
<body>  <body>
<intent  <intent
action:http://www.webintents.org/edit  Action: http://www.webintents.org/edit
type:video/mp4  Type:video/mp4
href:"background- video-control.html"  Href:"background- video-control.html"
title: Living room TV  Title: Living room TV
disposition:"background"/>  Disposition:"background"/>
<browser  <browser
name:chrome  Name:chrome
version:21.0.0  Version: 21.0.0
location://192.168.1.1 :4501/>  Location://192.168.1.1 :4501/>
</body>  </body>
</html> 其中, 在 "Intent" 标签中加入了用户代理模块的信息: 用户代理模块的名 称 "chrome" 、 版本 "21.0.0" 、 通信接口 ( IP + 端口) "192.168.1.1 :4501 " 。 </html> Among them, the user agent module information is added to the "Intent" tag: User agent module name "chrome", version "21.0.0", communication interface (IP + port) "192.168.1.1:4501".
图 4为本发明另一实施例提供的用于实现网络意图的方法的信令流程图, 本 实施例中, 第一用户代理模块为第一终端设备上的用户代理模块, 第二用户代 理模块为第二终端设备上的用户代理模块。 同样, 第一终端设备、 第二终端设 备均为 Upnp设备, 且支持网络意图机制。  FIG. 4 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention. In this embodiment, a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device. Similarly, the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
参见图 4, 用于实现网络意图的方法包括:  Referring to Figure 4, methods for implementing network intent include:
步骤 41、 当第一用户代理模块中的 client page触发了 startactivityO时, 说明该 client page需要 web intent服务。 此时第一用户代理模块感知到 client page调用了 startactivityO , 便发送广播消息 --M-SEARCH消息。  Step 41: When the client page in the first user agent module triggers startactivityO, it indicates that the client page needs a web intent service. At this time, the first user agent module senses that the client page calls startactivityO, and then sends a broadcast message-M-SEARCH message.
步骤 42、 第二终端设备由于安装有第二用户代理模块, 因此, 收到广播消 息之后, 返回一个应答消息。 该应答消息中包含有第二用户代理模块信息如通 信地址、 端口等。  Step 42: The second terminal device returns a response message after receiving the broadcast message because the second user agent module is installed. The response message includes second user agent module information such as a communication address, a port, and the like.
步骤 43、 通过应答消息, 第一用户代理模块能够取得第二终端设备上用户 代理模块(即第二用户代理模块) 的通信地址。 并根据取得的通信地址与第二 用户代理模块建立通信连接。 其中, 第二终端设备在返回应答消息的前后, 启 动第二用户代理模块。 第一用户代理模块与第二用户代理模块之间可以建立基 于网络插座( websocket )协议或可扩展标记语言超文本传输协议请求( XML Http Request, XHR )建立通信连接。其中, XML为可扩展标记语言( Extensible Markup Language ) , HTTP为超文本传输协议( Hypertext Transfer Protocol ) 。  Step 43: The first user agent module is configured to obtain a communication address of the user agent module (ie, the second user agent module) on the second terminal device by using the response message. And establishing a communication connection with the second user agent module according to the obtained communication address. The second terminal device starts the second user agent module before and after returning the response message. A communication connection may be established between the first user agent module and the second user agent module based on a network socket (websocket) protocol or an extensible markup language hypertext transfer protocol request (XML Http Request, XHR). Among them, XML is Extensible Markup Language and HTTP is Hypertext Transfer Protocol.
步骤 44、 第一用户代理模块通过通信连接, 将网络意图对象及客户端网页 的 URL发送给第二用户代理模块网络意图对象包括 action, type, data。  Step 44: The first user agent module sends the URL of the network intent object and the client webpage to the second user agent module through a communication connection, and the network intent object includes action, type, and data.
步骤 45、 第二用户代理模块收到第一用户代理模块发送的客户端网页的 URL后,在后台加载并启动客户端网页。之后,找出能处理 data的网络应用程序, 生成一个网络应用程序列表, 显示给用户, 以使用户从网络应用程序列表中选 择一个网络应用程序对 data进行处理。第二用户代理模块可通过检索其网络应用 程序存储( web application store )得到能处理 data的网络应用程序。  Step 45: After receiving the URL of the client webpage sent by the first user proxy module, the second user proxy module loads and starts the client webpage in the background. Then, find the web application that can process the data, generate a list of web applications, and display them to the user so that the user can select a web application to process the data from the list of web applications. The second user agent module can obtain a web application capable of processing data by retrieving its web application store.
经过用户的选择之后, 第二用户代理模块加载用户选择的网络应用程序, 并把 data发送给上述加载的网络应用程序。  After the user's selection, the second user agent module loads the web application selected by the user and sends the data to the loaded web application.
步骤 46、 加载的网络应用程序对 data进行处理, 该加载的网络应用程序成为 data的服务应用程序。 步骤 47、处理完成之后,上述服务应用程序调用 postresult()或者 postfailure(), 将处理结果通知给第二用户代理模块。 Step 46: The loaded network application processes the data, and the loaded network application becomes a data service application. Step 47: After the processing is completed, the service application calls postresult() or postfailure() to notify the second user agent module of the processing result.
步骤 48、 第二用户代理模块通过通信连接, 将处理结果发送给第一用户代 理模块。  Step 48: The second user agent module sends the processing result to the first user agent module by using a communication connection.
步骤 49、 第一用户代理模块调用 startactivityO中注册的回调函数, 将处理结 果展示给用户。 当然, 如果第二用户代理模块没有返回处理结果, 则无本步骤 的操作。  Step 49: The first user agent module calls a callback function registered in startactivityO, and presents the processing result to the user. Of course, if the second user agent module does not return the processing result, there is no operation of this step.
步骤 410、 第二用户代理模块关闭后台运行的客户端网页和服务应用程序。 可选地, 本步骤 410可提前到步骤 48的同时或之后执行。  Step 410: The second user agent module closes the client webpage and the service application running in the background. Optionally, this step 410 can be performed at the same time as or after the step 48.
图 5为本发明另一实施例提供的用于实现网络意图的方法的信令流程图, 本 实施例中, 第一用户代理模块为第一终端设备上的用户代理模块, 第二用户代 理模块为第二终端设备上的用户代理模块。 同样, 第一终端设备、 第二终端设 备均为 Upnp设备, 且支持网络意图机制。  FIG. 5 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention. In this embodiment, a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device. Similarly, the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
参见图 5 , 用于实现网络意图的方法包括:  Referring to Figure 5, methods for implementing network intent include:
步骤 51、 当第一用户代理模块中的客户端网页触发了 startactivityO时, , 说 明该客户端网页需要网络意图服务。  Step 51: When the client webpage in the first user agent module triggers startactivityO, it indicates that the client webpage needs a network intent service.
步骤 52、 第一用户代理模块感知到客户端网页调用了 startactivityO时, 发送 广播消息 --M-SEARCH消息。  Step 52: When the first user agent module senses that the client webpage calls startactivityO, it sends a broadcast message, the M-SEARCH message.
步骤 53、 第二终端设备由于安装有第二用户代理模块, 因此, 收到广播消 息之后, 返回一个应答消息。 该应答消息中包含有第二用户代理模块信息如通 信地址、 端口等。  Step 53: The second terminal device returns a response message after receiving the broadcast message because the second user agent module is installed. The response message includes second user agent module information such as a communication address, a port, and the like.
步骤 54、 通过应答消息, 第一用户代理模块能够取得第二终端设备上用户 代理模块(即第二用户代理模块) 的通信地址。 并根据取得的通信地址与第二 用户代理模块建立通信连接。 其中, 第二终端设备在返回应答消息的前后, 启 动第二用户代理模块。 本实施例中, 第二终端设备在返回应答消息之后, 启动 第二用户代理模块。  Step 54: The first user agent module is configured to obtain a communication address of the user agent module (ie, the second user agent module) on the second terminal device by using the response message. And establishing a communication connection with the second user agent module according to the obtained communication address. The second terminal device starts the second user agent module before and after returning the response message. In this embodiment, after the second terminal device returns a response message, the second user agent module is started.
步骤 55、 第一用户代理模块判定是否需要把网络意图处理流程转移到第二 用户代理模块上。 如果是, 则执行步骤 56。  Step 55: The first user agent module determines whether it is necessary to transfer the network intent processing flow to the second user agent module. If yes, go to step 56.
步骤 56、 第一用户代理模块创建客户端网页的镜像, 并把网络意图对象及 创建的镜像发送给第二用户代理模块。  Step 56: The first user agent module creates a mirror image of the client webpage, and sends the network intent object and the created image to the second user agent module.
步骤 57、 第一用户代理模块结束第一用户代理模块中的网络意图处理流程。 步骤 58、 第二用户代理模块在后台加载客户端网页的镜像。 Step 57: The first user agent module ends the network intent processing flow in the first user agent module. Step 58: The second user agent module loads the image of the client webpage in the background.
步骤 59、第二用户代理模块查找出能处理网络意图对象中的 data的网络应用 程序, 为用户提供一个网络应用程序列表( web application list )。 当用户从网络 应用程序列表中选择了某个网络应用程序之后, 第二用户代理模块加载该网络 应用程序, 并将网络意图对象中的 data (以下筒称意图数据, 即 intent data )传送 给该网络应用程序。 本步骤可参见实施例二中的说明。  Step 59: The second user agent module finds a web application that can process the data in the network intent object, and provides the user with a web application list. After the user selects a web application from the web application list, the second user agent module loads the web application, and transmits data (hereinafter referred to as intent data) in the network intent object to the web application. Web application. Refer to the description in the second embodiment for this step.
步骤 510、 加载的网络应用程序收到意图数据后, 对意图数据进行处理。 步骤 511、 上述加载的网络应用程序对意图数据的处理结束后, 调用 postresult()或者 postfailure() , 把处理结果发送给第二用户代理模块。  Step 510: After the loaded network application receives the intent data, process the intent data. Step 511: After the processing of the intent data by the loaded network application ends, the postresult() or postfailure() is called, and the processing result is sent to the second user agent module.
步骤 512、 第二用户代理模块调用在 startactivity ()中注册的回调函数, 把对 意图数据的处理结果呈现给用户。  Step 512: The second user agent module invokes a callback function registered in startactivity (), and presents the processing result of the intent data to the user.
可选地, 当加载的网络应用程序将处理结果发送给第二用户代理模块时, 第二用户代理模块可关闭客户端网页镜像和加载的网络应用程序。 第一用户代 理模块可激活客户端网页。  Optionally, when the loaded web application sends the processing result to the second user agent module, the second user agent module may close the client webpage image and the loaded web application. The first user agent module can activate the client web page.
图 6为本发明另一实施例提供的用于实现网络意图的方法的信令流程图, 本 实施例中, 第一用户代理模块为第一终端设备上的用户代理模块, 第二用户代 理模块为第二终端设备上的用户代理模块。 同样, 第一终端设备、 第二终端设 备均为 Upnp设备, 且支持网络意图机制。  FIG. 6 is a signaling flowchart of a method for implementing network intent according to another embodiment of the present invention. In this embodiment, a first user agent module is a user agent module on a first terminal device, and a second user agent module is used. It is a user agent module on the second terminal device. Similarly, the first terminal device and the second terminal device are both Upnp devices, and support the network intent mechanism.
与上述实施例不同的是, 本实施例中, 第一终端设备中的网络应用程序也 对意图数据进行过处理。  Different from the above embodiment, in this embodiment, the network application in the first terminal device also processes the intent data.
参见图 6, 用于实现网络意图的方法包括:  See Figure 6. The methods used to implement the network intent include:
步骤 61、 第一用户代理模块上运行的客户端网页触发了 startactivityO, 说明 该客户端网页需要网络意图服务。  Step 61: The client webpage running on the first user proxy module triggers startactivityO, indicating that the client webpage needs a network intent service.
步骤 62、 第一用户代理模块为用户提供一个网络应用程序列表 (web application list ) ,以供用户从网络应用程序列表中选择一个网络应用程序来处理 客户端的意图数据。  Step 62: The first user agent module provides the user with a web application list for the user to select a web application from the list of network applications to process the client's intent data.
步骤 63、 第一用户代理模块加载用户选的网络应用程序。  Step 63: The first user agent module loads the network application selected by the user.
步骤 64, 第一用户代理模块将网络意图对象发送给加载的网络应用程序。 该加载的网络应用程序接收第一用户代理模块发送的网络意图对象, 并对网络 意图对象中的 data进行处理。 此时, 该加载的网络应用程序成为服务应用程序。  Step 64: The first user agent module sends the network intent object to the loaded web application. The loaded web application receives the network intent object sent by the first user agent module and processes the data in the network intent object. At this point, the loaded web application becomes the service application.
步骤 65、 在第一终端设备中的网络应用程序处理意图数据的过程中, 如果 用户想要更换到家庭网络设备上继续处理(例如, 可能家庭网络设备的大屏幕 更适合处理) , 则第一用户代理模块启动设备发现流程, 之后与所选择的第二 终端设备上的第二用户代理模块建立通信连接。 其中, 设备发现流程同上述实 施例一〜三中第一用户代理模块与第二用户代理模块建立连接的过程, 这里不再 赘述。 Step 65: In the process of processing the intent data by the network application in the first terminal device, if If the user wants to change to the home network device to continue processing (for example, the large screen of the home network device may be more suitable for processing), the first user agent module starts the device discovery process, and then the second with the selected second terminal device. The user agent module establishes a communication connection. The process of establishing a connection between the device discovery process and the first user agent module and the second user agent module in the first embodiment to the third embodiment is not described herein.
步骤 66、 第一用户代理模块为服务应用程序创建一个镜像。  Step 66: The first user agent module creates an image for the service application.
步骤 67、 第一用户代理模块通过上述建立的通信连接, 将创建的镜像发送 给第二用户代理模块。  Step 67: The first user agent module sends the created image to the second user agent module by using the established communication connection.
步骤 68、 第二用户代理模块接收第一用户代理模块发送的镜像, 并加载。 步骤 69、 第一用户代理模块发送动作同步请求, 则用户在第二用户代理模 块上对 intent数据的操作会实时的反应到第一用户代理模块上。  Step 68: The second user agent module receives the image sent by the first user agent module, and loads the image. Step 69: The first user agent module sends an action synchronization request, and the operation of the intent data by the user on the second user agent module is reflected in real time to the first user agent module.
上述实施例所示的方法, 通过发现家庭网络设备上运行的用户代理模块, 并通过用户代理模块完成家庭网络内不同设备间的协作来实现 web intent机制, 解决了现有技术方案中 UPnP设备需要对家庭网络设备做额外的处理的问题, 有 利于 web intent机制在家庭网络内的应用推广。  The method shown in the foregoing embodiment solves the need of the UPnP device in the prior art solution by discovering the user agent module running on the home network device and completing the cooperation between different devices in the home network through the user agent module to implement the web intent mechanism. The problem of additional processing on the home network device is beneficial to the application of the web intent mechanism in the home network.
图 7为本发明另一实施例提供的用于实现网络意图的装置的结构示意图, 本 实施例所示的装置用于实现图 1所示的方法, 该用于实现网络意图的装置可为用 户代理模块(如上述第一用户代理模块) 、 终端设备等, 包括: 广播模块 71、 应^妻收模块 72及连接模块 73。  FIG. 7 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention. The apparatus shown in this embodiment is used to implement the method shown in FIG. 1. The apparatus for implementing network intent may be a user. The proxy module (such as the first user proxy module described above), the terminal device, and the like include: a broadcast module 71, a response module 72, and a connection module 73.
广播模块 71用于发送广播消息, 该广播消息用于发现安装有用户代理模块 的终端设备。  The broadcast module 71 is configured to transmit a broadcast message for discovering a terminal device on which the user agent module is installed.
应答接收模块 72用于接收安装有用户代理模块的终端设备返回的应答消 息, 所述应答消息为所述广播消息的应答消息, 所述应答消息中包含有返回所 述应答消息的终端设备的用户代理模块信息。  The response receiving module 72 is configured to receive a response message returned by the terminal device that is installed with the user agent module, where the response message is a response message of the broadcast message, and the response message includes a user of the terminal device that returns the response message. Agent module information.
连接模块 73用于根据所述应答接收模块接收的应答消息中的用户代理模块 信息与第二用户代理模块建立通信连接, 以实现网络意图; 其中, 所述第二用 户代理模块为所述安装有用户代理模块的终端设备中的一个终端设备上的用户 代理模块。  The connection module 73 is configured to establish a communication connection with the second user agent module according to the user agent module information in the response message received by the response receiving module, to implement network intent; wherein the second user agent module is configured to be installed User agent module on a terminal device in the terminal device of the user agent module.
进一步, 所述广播模块 71可包括:  Further, the broadcast module 71 can include:
第一广播子模块, 用于在客户端网页的触发下发送广播消息, 所述广播消 息包括代理请求头域, 所述代理请求头域的值用于指示安装有用户代理模块的 终端设备接收到所述广播消息后返回应答消息。 a first broadcast submodule, configured to send a broadcast message, triggered by a client webpage, where the broadcast message includes a proxy request header field, where the value of the proxy request header field is used to indicate that the user proxy module is installed The terminal device returns a response message after receiving the broadcast message.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
数据传输模块, 用于在所述连接模块根据所述用户代理模块信息与第二用 户代理模块建立通信连接之后, 通过所述连接模块建立的通信连接, 将待处理 的网络意图对象发送给所述第二用户代理模块, 以使所述第二用户代理模块根 据所述网络意图对象获取相应的网络应用程序, 并使获取的网络应用程序对所 述网络意图对象中的数据进行处理; 其中, 所述待处理的网络意图对象至少包 括行为 action、 类型 type和所述数据 data。  a data transmission module, configured to send, by using the communication connection established by the connection module, a network intent object to be processed, after the connection module establishes a communication connection with the second user agent module according to the user agent module information a second user agent module, so that the second user agent module acquires a corresponding web application according to the network intent object, and causes the acquired web application to process data in the network intent object; The network intent object to be processed includes at least a behavior action, a type type, and the data data.
进一步, 所述数据传输模块包括:  Further, the data transmission module includes:
第一传输子模块, 用于通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的资源统一定位符 URL, 发送给所述第二用户代理模块, 以 使所述第二用户代理模块根据所述 URL启动所述客户端网页后, 将所述网络意 图对象中的数据发送给所述获取的网络应用程序进行处理。  a first transmission submodule, configured to send the to-be-processed network intent object and the resource uniform locator URL of the client webpage to the second user agent module by using the communication connection, so that the After the second user agent module starts the client webpage according to the URL, the data in the network intent object is sent to the obtained web application for processing.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
第一镜像创建模块, 用于在所述数据传输模块通过所述通信连接, 将待处 理的网络意图对象发送给所述第二用户代理模块之前, 创建所述客户端网页的 镜像。  And a first image creation module, configured to create a mirror image of the client webpage before the data transmission module sends the to-be-processed network intent object to the second user agent module by using the communication connection.
进一步, 所述数据传输模块可包括:  Further, the data transmission module may include:
第二传输子模块, 用于通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的镜像发送给所述第二用户代理模块, 以使所述第二用户代 理模块加载所述客户端网页的镜像后, 将所述网络意图对象中的数据发送给所 述获取的网络应用程序进行处理。  a second transmission submodule, configured to send, by using the communication connection, the image of the network intent to be processed and the image of the client webpage to the second user agent module, so that the second user agent module After loading the image of the client webpage, the data in the network intent object is sent to the obtained web application for processing.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
网页关闭模块, 用于在所述数据传输模块通过所述通信连接, 将待处理的 网络意图对象发送给所述第二用户代理模块之后, 关闭所述客户端网页。  And a webpage closing module, configured to close the client webpage after the data transmission module sends the to-be-processed network intent object to the second user agent module by using the communication connection.
进一步, 所述广播模块 71可包括:  Further, the broadcast module 71 can include:
第二广播子模块, 用于在服务网页处理网络意图对象的过程中, 在客户端 网页触发下发送广播消息。  The second broadcast sub-module is configured to send a broadcast message triggered by the client webpage in the process of processing the network intent object by the service webpage.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
第二镜像创建模块, 用于所述第二广播子模块在客户端网页触发下发送广 播消息之后, 为所述服务网页创建镜像; 镜像发送模块, 用于通过所述通信连接, 将创建的镜像发送到所述第二用 户代理模块, 以使所述第二用户代理模块加载所述镜像。 a second image creating module, configured to create a mirror image for the service webpage after the second broadcast submodule sends a broadcast message triggered by the client webpage; And a mirroring sending module, configured to send, by using the communication connection, the created image to the second user agent module, so that the second user agent module loads the image.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
同步请求模块, 用于在所述数据传输模块通过通信连接, 将创建的镜像发 送到所述第二用户代理模块之后, 向所述第二用户代理模块发送动作同步请求, 以将所述第二用户代理模块上加载的镜像与所述第一用户代理模块上的服务网 页绑定。  a synchronization requesting module, configured to send, after the data transmission module, the created image to the second user agent module by using a communication connection, send an action synchronization request to the second user agent module, to send the second The image loaded on the user agent module is bound to the service web page on the first user agent module.
本实施例中, 用于实现网络意图的装置通过广播模块及应答接收模块发现 另一安装有用户代理模块的终端设备, 并通过连接模块直接与第二用户代理模 块之间建立通信连接, 以此实现网络意图, 筒化了终端设备间实现网络意图的 操作, 提高了网络意图的处理效率。  In this embodiment, the device for implementing the network intention discovers another terminal device with the user agent module installed through the broadcast module and the response receiving module, and establishes a communication connection directly with the second user agent module through the connection module. The realization of the network intention, the operation of realizing the network intent between the terminal devices is realized, and the processing efficiency of the network intention is improved.
图 8为本发明另一实施例提供的用于实现网络意图的装置的结构示意图, 本 实施例所示的装置用于实现图 2所示的方法, 该装置可为上述第二终端设备, 包 括: 广播接收模块 81、 应答返回模块 82及第一连接模块 83。  FIG. 8 is a schematic structural diagram of an apparatus for implementing network intent according to another embodiment of the present invention. The apparatus shown in this embodiment is used to implement the method shown in FIG. 2, where the apparatus may be the foregoing second terminal equipment, including The broadcast receiving module 81, the response returning module 82, and the first connecting module 83.
广播接收模块 81用于接收第一用户代理模块发送的第一广播消息, 所述第 一广播消息用于发现安装有用户代理模块的终端设备;  The broadcast receiving module 81 is configured to receive a first broadcast message sent by the first user agent module, where the first broadcast message is used to discover a terminal device that is installed with a user agent module;
应答返回模块 82用于向所述第一用户代理模块返回所述第一广播消息的第 一应答消息, 所述第一应答消息中包含有返回所述第一应答消息的终端设备上 的用户代理模块信息;  The response returning module 82 is configured to return a first response message of the first broadcast message to the first user agent module, where the first response message includes a user agent on a terminal device that returns the first response message Module information;
第一连接模块 83用于与所述第一用户代理模块之间建立通信连接, 以实现 网络意图。 该第一连接模块 83可通过终端设备中的用户代理模块实现。  The first connection module 83 is configured to establish a communication connection with the first user agent module to implement network intent. The first connection module 83 can be implemented by a user agent module in the terminal device.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
数据接收模块, 用于在所述第一连接模块 83与所述第一用户代理模块之间 建立通信连接之后, 通过所述第一连接模块 83建立的通信连接, 接收所述第一 用户代理模块发送的待处理的网络意图对象; 其中, 所述待处理的网络意图对 象包括行为 action、 类型 type和所述数据 data;  a data receiving module, configured to receive the first user agent module by using a communication connection established by the first connection module 83 after establishing a communication connection between the first connection module 83 and the first user agent module The sent network intent object to be processed; wherein the to-be-processed network intent object includes a behavior action, a type type, and the data data;
应用程序获取模块, 用于根据所述数据接收模块接收的 action, type获取相 应的网络应用程序;  An application obtaining module, configured to acquire, according to the action, type received by the data receiving module, a corresponding network application;
数据发送模块,用于将所述数据接收模块接收的 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理。  And a data sending module, configured to send the data received by the data receiving module to an acquired network application, so that the obtained network application processes the data.
其中, 数据接收模块、 应用程序获取模块及数据发送模块可通过终端设备 中的用户代理模块实现。 The data receiving module, the application acquiring module, and the data sending module may pass through the terminal device User agent module implementation in .
进一步, 所述应用程序获取模块获取的网络应用程序可为用户从所述相应 的网络应用程序中选择的一个网络应用程序。  Further, the web application acquired by the application obtaining module may be a web application selected by the user from the corresponding web application.
进一步, 所述数据接收模块可包括:  Further, the data receiving module may include:
第一接收子模块, 用于通过所述通信连接, 接收所述第一用户代理模块发 送的客户端网页的资源统一定位符 URL和所述待处理的网络意图对象; 所述客 户端网页为触发所述第一用户代理模块发送所述第一广播消息的客户端网页。  a first receiving submodule, configured to receive, by using the communication connection, a resource uniform locator URL of the client webpage sent by the first user proxy module, and the to-be-processed network intent object; the client webpage is triggered The first user agent module sends a client webpage of the first broadcast message.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
网页启动模块, 用于在所述第一接收子模块通过所述通信连接, 接收所述 第一用户代理模块发送的客户端网页的资源统一定位符 URL和所述待处理的网 络意图之后, 根据所述 URL在第二用户代理模块上启动所述客户端网页, 所述 第二用户代理模块为返回所述第一应答消息的终端设备上的用户代理模块。 该 网页启动模块可通过终端设备中的用户代理模块实现。  a webpage startup module, configured to: after the first receiving submodule receives the resource uniform locator URL of the client webpage sent by the first user proxy module and the network intention to be processed, according to the communication connection, according to the webpage The URL starts the client webpage on the second user agent module, and the second user proxy module is a user agent module on the terminal device that returns the first response message. The webpage launching module can be implemented by a user agent module in the terminal device.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
结果返回模块,用于在所述数据发送模块将所述 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理之后, 将处理结果 返回给所述第一用户代理模块, 以使所述第一用户代理模块将所述处理结果呈 现给用户。 该结果返回模块可为所述获取的网络应用程序中的一个功能模块。  a result returning module, configured to send the data to an acquired web application in the data sending module, so that the obtained web application processes the data, and returns the processing result to the first a user agent module to cause the first user agent module to present the processing result to the user. The result return module can be a functional module in the acquired web application.
进一步, 所述数据接收模块可包括:  Further, the data receiving module may include:
第二接收子模块, 用于通过所述第一连接模块建立的通信连接, 接收所述 第一用户代理模块发送的第一客户端网页的镜像和所述待处理的网络意图; 所 述第一客户端网页为触发所述第一用户代理模块发送所述第一广播消息的客户 端网页。  a second receiving submodule, configured to receive, by using the communication connection established by the first connection module, a mirror image of the first client webpage sent by the first user proxy module and the network intention to be processed; The client webpage is a client webpage that triggers the first user agent module to send the first broadcast message.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
第一镜像加载模块, 用于在所述第二接收子模块通过所述通信连接, 接收 所述第一用户代理模块发送的第一客户端网页的镜像和所述待处理的网络意图 之后, 加载所述第一客户端网页的镜像。 该第一镜像加载模块可通过终端设备 中的用户代理模块实现。  a first image loading module, configured to: after the second receiving submodule receives the image of the first client webpage sent by the first user proxy module and the to-be-processed network intent through the communication connection, loading A mirror image of the first client webpage. The first image loading module can be implemented by a user agent module in the terminal device.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
结果发送模块,用于在所述数据发送模块将所述 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理之后, 将处理结果 发送给第二用户代理模块, 以使所述第二用户代理模块将所述处理结果呈现给 用户, 所述第二用户代理模块为返回所述第一应答消息的终端设备上的用户代 理模块。 该结果发送模块可为上述获取的网络应用程序中的功能模块, 该获取 的网络应用程序被用来对意图对象中的数据进行处理。 a result sending module, configured to send the data to an acquired network application after the data sending module, so that the obtained network application processes the data, and the processing result is Sending to the second user agent module, so that the second user agent module presents the processing result to the user, and the second user agent module is a user agent module on the terminal device that returns the first response message. The result sending module can be a function module in the web application obtained above, and the obtained web application is used to process data in the intent object.
进一步, 当所述第一接收模块接收的第一广播消息为所述第一用户代理模 块在服务网页处理网络意图对象的过程中由客户端网页触发下发送的广播消息 时, 所述装置还包括:  Further, when the first broadcast message received by the first receiving module is a broadcast message sent by the client webpage in the process of processing the network intent object by the first user agent module, the device further includes :
镜像接收模块, 用于通过所述第一连接模块建立的通信连接, 接收所述第 一用户代理模块发送的镜像, 所述镜像为所述第一用户代理模块为所述服务网 页创建的镜像;  a mirroring receiving module, configured to receive, by using the communication connection established by the first connection module, a mirror image sent by the first user agent module, where the image is an image created by the first user agent module for the service webpage;
第二镜像加载模块, 用于加载所述镜像。  The second image loading module is configured to load the image.
其中, 镜像接收模块、 第二镜像加载模块可通过终端设备中的用户代理模 块实现。  The image receiving module and the second image loading module are implemented by a user agent module in the terminal device.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
请求接收模块, 用于在所述镜像接收模块接收所述第一用户代理模块发送 的镜像之后, 接收所述第一用户代理模块发送的动作同步请求;  a request receiving module, configured to: after the mirror receiving module receives the image sent by the first user agent module, receive an action synchronization request sent by the first user agent module;
绑定模块, 用于根据所述请求接收模块接收的动作同步请求, 将加载的所 述镜像与所述第一用户代理模块上的所述服务网页绑定。  And a binding module, configured to bind the loaded image to the service webpage on the first user agent module according to the action synchronization request received by the request receiving module.
进一步, 所述装置还可包括:  Further, the device may further include:
第二广播模块,用于在所述获取的网络应用程序对所述 data进行处理的过程 中, 在第二客户端网页的触发下发送第二广播消息, 所述第二广播消息用于发 现安装有用户代理模块的终端设备;  a second broadcast module, configured to send, by the second client webpage, a second broadcast message, where the acquired network application processes the data, where the second broadcast message is used for discovering and installing a terminal device having a user agent module;
第二应答接收模块, 用于接收安装有用户代理模块的终端设备返回的第二 应答消息, 所述第二应答消息为所述第二广播消息的应答消息, 所述第二应答 消息中包含有返回所述第二应答消息的终端设备的用户代理模块信息;  a second response receiving module, configured to receive a second response message returned by the terminal device that is installed with the user agent module, where the second response message is a response message of the second broadcast message, where the second response message includes Returning user agent module information of the terminal device of the second response message;
第二连接模块, 用于根据所述第二应答接收模块接收的第二应答消息中的 用户代理模块信息与第三用户代理模块建立第二通信连接, 以实现网络意图; 其中, 所述第三用户代理模块为返回所述第二应答消息的终端设备中的一个终 端设备上的用户代理模块。  a second connection module, configured to establish a second communication connection with the third user agent module according to the user agent module information in the second response message received by the second response receiving module, to implement network intent; wherein, the third The user agent module is a user agent module on a terminal device in the terminal device that returns the second response message.
其中, 第二广播模块、 第二应答接收模块及第二连接模块可通过终端设备 中的用户代理模块实现。 进一步, 用于实现网络意图的装置还可包括: The second broadcast module, the second response receiving module, and the second connection module may be implemented by a user agent module in the terminal device. Further, the means for implementing the network intent may further include:
镜像创建模块, 用于在所述第二连接模块根据所述第二应答消息中的用户 代理模块信息与第三用户代理模块建立第二通信连接之后, 为所述获取的网络 应用程序的创建镜像;  a mirroring creation module, configured to create a mirror image of the acquired network application after the second connection module establishes a second communication connection with the third user agent module according to the user agent module information in the second response message ;
镜像发送模块, 用于通过所述第二连接模块建立的第二通信连接, 将所述 获取的网络应用程序的镜像发送给所述第三用户代理模块, 以使所述第三用户 代理模块加载所述获取的网络应用程序的镜像。  a mirroring sending module, configured to send, by using the second communication connection established by the second connecting module, an image of the obtained network application to the third user agent module, so that the third user agent module is loaded The image of the obtained web application.
其中, 镜像创建模块、 镜像发送模块可通过终端设备中的用户代理模块实 现。  The image creation module and the image transmission module can be implemented by a user agent module in the terminal device.
进一步, 用于实现网络意图的装置还可包括:  Further, the means for implementing the network intent may further include:
同步请求模块, 用于在所述镜像发送模块通过所述第二通信连接, 将所述 镜像发送给所述第三用户代理模块之后, 向所述第三用户代理模块发送动作同 步请求, 以将所述第三用户代理模块上加载的获取的网络应用程序的镜像与所 述获取的网络应用程序绑定。 同步请求模块可通过终端设备中的用户代理模块 实现。  a synchronization requesting module, configured to send an action synchronization request to the third user agent module after the image sending module sends the image to the third user agent module by using the second communication connection, to The image of the acquired web application loaded on the third user agent module is bound to the acquired web application. The synchronization request module can be implemented by a user agent module in the terminal device.
本实施例中, 用于实现网络意图的装置通过应答返回模块返回广播接收模 块接收的广播消息的应答消息, 使得第一用户代理模块发现了另一安装有用户 代理模块的终端设备, 并直接与第二用户代理模块之间建立通信连接, 以此实 现网络意图, 筒化了终端设备间实现网络意图的操作, 提高了网络意图的处理 效率。  In this embodiment, the apparatus for implementing the network intent returns a response message of the broadcast message received by the broadcast receiving module by the response returning module, so that the first user agent module discovers another terminal device installed with the user agent module, and directly The second user agent module establishes a communication connection, thereby realizing the network intention, and the operation of realizing the network intention between the terminal devices is completed, thereby improving the processing efficiency of the network intention.
本发明实施例还给出一种计算机程序产品, 该计算机程序产品包括计算机 可读介质, 该可读介质包括第一组程序代码, 用于执行上述图 1所示方法中的步 骤:  The embodiment of the present invention further provides a computer program product comprising a computer readable medium, the readable medium comprising a first set of program code for performing the steps in the method of Figure 1 above:
发送广播消息, 所述广播消息用于发现安装有用户代理模块的终端设备; 接收安装有用户代理模块的终端设备返回的应答消息, 所述应答消息为所 述广播消息的应答消息, 所述应答消息中包含有返回所述应答消息的终端设备 的用户代理模块信息;  Sending a broadcast message, the broadcast message is used to discover a terminal device installed with a user agent module; receiving a response message returned by the terminal device installed with the user agent module, the response message is a response message of the broadcast message, and the response message The message includes user agent module information of the terminal device that returns the response message;
根据所述用户代理模块信息与第二用户代理模块建立通信连接, 以实现网 络意图; 其中, 所述第二用户代理模块为所述安装有用户代理模块的终端设备 中的一个终端设备上的用户代理模块。  Establishing a communication connection with the second user agent module according to the user agent module information to implement network intent; wherein the second user agent module is a user on one terminal device of the terminal device with the user agent module installed Agent module.
进一步, 发送广播消息, 包括: 在客户端网页的触发下发送广播消息, 所述广播消息包括代理请求头域, 所述代理请求头域的值用于指示安装有用户代理模块的终端设备接收到所述广 播消息后返回应答消息。 Further, sending a broadcast message includes: And sending, by the client webpage, a broadcast message, where the broadcast message includes a proxy request header field, where the value of the proxy request header field is used to indicate that the terminal device installed with the user proxy module returns a response message after receiving the broadcast message. .
进一步, 根据所述用户代理模块信息与第二用户代理模块建立通信连接之 后, 还包括:  Further, after establishing the communication connection with the second user agent module according to the user agent module information, the method further includes:
通过所述通信连接, 将待处理的网络意图对象发送给所述第二用户代理模 块, 以使所述第二用户代理模块根据所述网络意图对象获取相应的网络应用程 序, 并使获取的网络应用程序对所述网络意图对象中的数据进行处理; 其中, 所述待处理的网络意图对象至少包括行为 action, 类型 type和所述数据 data。  Sending, by the communication connection, a network intent object to be processed to the second user agent module, so that the second user agent module acquires a corresponding network application according to the network intent object, and makes the acquired network The application processes the data in the network intent object; wherein the to-be-processed network intent object includes at least a behavior action, a type type, and the data data.
进一步, 通过所述通信连接, 将待处理的网络意图对象发送给所述第二用 户代理模块, 包括:  Further, sending, by the communication connection, the network intent object to be processed to the second user agent module, including:
通过所述通信连接, 将所述待处理的网络意图对象及所述客户端网页的资 源统一定位符 URL, 发送给所述第二用户代理模块, 以使所述第二用户代理模 块根据所述 URL启动所述客户端网页后, 将所述网络意图对象中的数据发送给 所述获取的网络应用程序进行处理。  Sending, by the communication connection, the to-be-processed network intent object and the resource uniform locator URL of the client webpage to the second user agent module, so that the second user agent module is configured according to the After the URL starts the client webpage, the data in the network intent object is sent to the obtained web application for processing.
进一步, 通过所述通信连接, 将待处理的网络意图对象发送给所述第二用 户代理模块之前, 还包括:  Further, before the sending, by the communication connection, the network intent object to be processed to the second user agent module, the method further includes:
创建所述客户端网页的镜像。  Create an image of the client web page.
进一步, 通过所述通信连接, 将待处理的网络意图对象发送给所述第二用 户代理模块, 包括:  Further, sending, by the communication connection, the network intent object to be processed to the second user agent module, including:
通过所述通信连接, 将所述待处理的网络意图对象及所述客户端网页的镜 像发送给所述第二用户代理模块, 以使所述第二用户代理模块加载所述客户端 网页的镜像后, 将所述网络意图对象中的数据发送给所述获取的网络应用程序 进行处理。  Sending, by the communication connection, the image of the network intent object to be processed and the image of the client webpage to the second user agent module, so that the second user agent module loads a mirror image of the client webpage Afterwards, the data in the network intent object is sent to the acquired web application for processing.
进一步, 通过所述通信连接, 将待处理的网络意图对象发送给所述第二用 户代理模块之后, 还包括:  Further, after the network intent object to be processed is sent to the second user agent module by using the communication connection, the method further includes:
关闭所述客户端网页。  Close the client web page.
进一步, 发送广播消息, 包括:  Further, sending a broadcast message includes:
在服务网页处理网络意图对象的过程中, 在客户端网页触发下发送广播消 息。  In the process of processing the web intent object in the service webpage, the broadcast message is sent under the trigger of the client webpage.
进一步, 在客户端网页触发下发送广播消息之后, 还包括: 为所述服务网页创建镜像; Further, after sending the broadcast message triggered by the client webpage, the method further includes: Creating an image for the service web page;
通过所述通信连接, 将创建的镜像发送到所述第二用户代理模块, 以使所 述第二用户代理模块加载所述镜像。  The created image is sent to the second user agent module via the communication connection to cause the second user agent module to load the image.
进一步, 通过通信连接, 将创建的镜像发送到所述第二用户代理模块之后, 还包括:  Further, after the created image is sent to the second user agent module by using a communication connection, the method further includes:
向所述第二用户代理模块发送动作同步请求, 以将所述第二用户代理模块 上加载的镜像与服务网页绑定。  Sending an action synchronization request to the second user agent module to bind the image loaded on the second user agent module to the service web page.
另外, 本发明实施例还给出另一种计算机程序产品, 该计算机程序产品包 括计算机可读介质, 该可读介质包括第二组程序代码, 用于执行上述图 2所示方 法中的步骤:  In addition, an embodiment of the present invention further provides another computer program product, the computer program product comprising a computer readable medium, the readable medium comprising a second set of program code, for performing the steps in the method shown in FIG. 2:
接收第一用户代理模块发送的第一广播消息, 所述第一广播消息用于发现 安装有用户代理模块的终端设备;  Receiving, by the first user agent module, a first broadcast message, where the first broadcast message is used to discover a terminal device that is installed with a user agent module;
向所述第一用户代理模块返回所述第一广播消息的第一应答消息, 所述第 一应答消息中包含有返回所述第一应答消息的终端设备上的用户代理模块信 息;  Returning, to the first user agent module, a first response message of the first broadcast message, where the first response message includes user agent module information on a terminal device that returns the first response message;
与所述第一用户代理模块之间建立通信连接, 以实现网络意图。  Establishing a communication connection with the first user agent module to implement network intent.
进一步, 与所述第一用户代理模块之间建立通信连接之后, 还包括: 通过所述通信连接, 接收所述第一用户代理模块发送的待处理的网络意图 对象; 其中, 所述待处理的网络意图对象包括行为 action, 类型 type和所述数据 data;  Further, after establishing a communication connection with the first user agent module, the method further includes: receiving, by the communication connection, a network intent object to be processed sent by the first user agent module; wherein, the to-be-processed The network intent object includes a behavior action, a type type, and the data data;
根据所述 action, type获取相应的网络应用程序;  Obtaining a corresponding web application according to the action, type;
将所述 data发送给一个获取的网络应用程序,以使所述获取的网络应用程序 对所述 data进行处理。  The data is sent to an acquired web application for the obtained web application to process the data.
进一步, 所述获取的网络应用程序为用户从所述相应的网络应用程序中选 择的一个网络应用程序。  Further, the acquired web application is a web application selected by the user from the corresponding web application.
进一步, 通过所述通信连接, 接收所述第一用户代理模块发送的待处理的 网络意图对象, 包括:  Further, receiving, by the communication connection, the network intent object to be processed sent by the first user agent module, including:
通过所述通信连接, 接收所述第一用户代理模块发送的客户端网页的资源 统一定位符 URL和所述待处理的网络意图对象; 所述客户端网页为触发所述第 一用户代理模块发送所述第一广播消息的客户端网页。  Receiving, by the communication connection, a resource uniform locator URL of the client webpage sent by the first user agent module, and the to-be-processed network intent object; the client webpage is configured to trigger the first user proxy module to send The client webpage of the first broadcast message.
进一步, 通过所述通信连接, 接收所述第一用户代理模块发送的客户端网 页的资源统一定位符 URL和所述待处理的网络意图对象之后, 还包括: 根据所述 URL在第二用户代理模块上启动所述客户端网页, 所述第二用户 代理模块为返回所述第一应答消息的终端设备上的用户代理模块。 Further, receiving, by the communication connection, a client network sent by the first user agent module After the resource uniform locator URL of the page and the to-be-processed network intent object, the method further includes: starting the client webpage on the second user agent module according to the URL, where the second user agent module is to return the User agent module on the terminal device of the first response message.
进一步, 将所述 data发送给一个获取的网络应用程序, 以使所述获取的网络 应用程序对所述 data进行处理之后, 还包括:  Further, after the data is sent to an acquired network application, after the obtained network application processes the data, the method further includes:
将处理结果返回给所述第一用户代理模块, 以使所述第一用户代理模块将 所述处理结果呈现给用户。  The processing result is returned to the first user agent module to cause the first user agent module to present the processing result to the user.
进一步, 通过所述通信连接, 接收所述第一用户代理模块发送的待处理的 网络意图对象, 包括:  Further, receiving, by the communication connection, the network intent object to be processed sent by the first user agent module, including:
通过所述通信连接, 接收所述第一用户代理模块发送的第一客户端网页的 镜像和所述待处理的网络意图对象; 所述第一客户端网页为触发所述第一用户 代理模块发送所述第一广播消息的客户端网页。  Receiving, by the communication connection, a image of the first client webpage sent by the first user agent module and the to-be-processed network intent object; the first client webpage is configured to trigger the first user proxy module to send The client webpage of the first broadcast message.
进一步, 通过所述通信连接, 接收所述第一用户代理模块发送的第一客户 端网页的镜像和所述待处理的网络意图对象之后, 还包括:  Further, after receiving the image of the first client webpage and the to-be-processed network intent object sent by the first user agent module, the method further includes:
加载所述第一客户端网页的镜像。  Loading an image of the first client webpage.
进一步, 将所述 data发送给一个获取的网络应用程序, 以使所述获取的网络 应用程序对所述 data进行处理之后, 还包括:  Further, after the data is sent to an acquired network application, after the obtained network application processes the data, the method further includes:
将处理结果发送给第二用户代理模块, 以使所述第二用户代理模块将所述 处理结果呈现给用户, 所述第二用户代理模块为返回所述第一应答消息的终端 设备上的用户代理模块。  Transmitting the processing result to the second user agent module, so that the second user agent module presents the processing result to the user, where the second user agent module is a user on the terminal device that returns the first response message Agent module.
进一步, 当接收的第一广播消息为所述第一用户代理模块在服务网页处理 网络意图对象的过程中由客户端网页触发下发送的广播消息时, 与所述第一用 户代理模块之间建立通信连接之后, 还包括:  Further, when the received first broadcast message is a broadcast message sent by the first user agent module triggered by the client webpage in the process of processing the network intent object by the service webpage, establishing with the first user agent module After the communication connection, it also includes:
通过所述通信连接, 接收所述第一用户代理模块发送的镜像, 所述镜像为 所述第一用户代理模块为所述服务网页创建的镜像;  Receiving, by the communication connection, the image sent by the first user agent module, where the image is an image created by the first user agent module for the service webpage;
加载所述镜像。  Load the image.
进一步, 接收所述第一用户代理模块发送的镜像之后, 还包括:  Further, after receiving the image sent by the first user agent module, the method further includes:
接收所述第一用户代理模块发送的动作同步请求;  Receiving an action synchronization request sent by the first user agent module;
根据所述动作同步请求, 将加载的所述镜像与所述第一用户代理模块上的 所述服务网页绑定。  And binding the loaded image to the service webpage on the first user agent module according to the action synchronization request.
进一步, 在所述获取的网络应用程序对所述 data进行处理的过程中, 所述方 法还包括: Further, in the process of processing the data by the acquired network application, the party The law also includes:
在第二客户端网页的触发下发送第二广播消息, 所述第二广播消息用于发 现安装有用户代理模块的终端设备;  Transmitting, by the second client webpage, a second broadcast message, where the second broadcast message is used to discover a terminal device installed with a user agent module;
接收安装有用户代理模块的终端设备返回的第二应答消息, 所述第二应答 消息为所述第二广播消息的应答消息, 所述第二应答消息中包含有返回所述第 二应答消息的终端设备的用户代理模块信息;  Receiving, by the terminal device that is installed with the user agent module, a second response message, where the second response message is a response message of the second broadcast message, and the second response message includes returning the second response message. User agent module information of the terminal device;
根据所述第二应答消息中的用户代理模块信息与第三用户代理模块建立第 二通信连接, 以实现网络意图; 其中, 所述第三用户代理模块为返回所述第二 应答消息的终端设备中的一个终端设备上的用户代理模块。  Establishing a second communication connection with the third user agent module according to the user agent module information in the second response message to implement a network intent; wherein the third user agent module is a terminal device that returns the second response message User agent module on one of the terminal devices.
进一步, 根据所述第二应答消息中的用户代理模块信息与第三用户代理模 块建立第二通信连接之后, 还包括:  Further, after establishing the second communication connection with the third user agent module according to the user agent module information in the second response message, the method further includes:
为所述获取的网络应用程序的创建镜像;  Creating a mirror for the obtained web application;
通过所述第二通信连接, 将所述获取的网络应用程序的镜像发送给所述第 三用户代理模块, 以使所述第三用户代理模块加载所述获取的网络应用程序的 镜像。  And transmitting, by the second communication connection, the image of the acquired network application to the third user agent module, so that the third user agent module loads the image of the acquired network application.
进一步, 通过所述第二通信连接, 将所述镜像发送给所述第三用户代理模 块之后, 还包括:  Further, after the image is sent to the third user agent module by using the second communication connection, the method further includes:
向所述第三用户代理模块发送动作同步请求, 以将所述第三用户代理模块 上加载的获取的网络应用程序的镜像与所述获取的网络应用程序绑定。  An action synchronization request is sent to the third user agent module to bind the image of the acquired web application loaded on the third user agent module to the acquired web application.
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算机可读取 存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步骤; 而前述的 存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介质。  It will be understood by those skilled in the art that all or part of the steps of implementing the above method embodiments may be performed by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者 对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并不使相 应技术方案的本质脱离本发明各实施例技术方案的范围。  It should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权 利 要 求 Rights request
1、 一种用于实现网络意图的方法, 其特征在于, 包括: 第一用户代理模块发送广播消息, 所述广播消息用于发现安装有用户代理 模块的终端设备; 所述第一用户代理模块接收安装有用户代理模块的终端设备返回的应答消 息, 所述应答消息为所述广播消息的应答消息, 所述应答消息中包含有返回所 述应答消息的终端设备的用户代理模块信息; 所述第一用户代理模块根据所述用户代理模块信息与第二用户代理模块建 立通信连接, 以实现网络意图; 其中, 所述第二用户代理模块为所述安装有用 户代理模块的终端设备中的一个终端设备上的用户代理模块。 1. A method for realizing network intentions, characterized by comprising: a first user agent module sending a broadcast message, the broadcast message being used to discover a terminal device installed with a user agent module; the first user agent module Receive a response message returned by a terminal device installed with a user agent module, where the response message is a response message to the broadcast message, and the response message contains user agent module information of the terminal device that returns the response message; The first user agent module establishes a communication connection with the second user agent module according to the user agent module information to realize the network intention; wherein the second user agent module is one of the terminal devices in which the user agent module is installed. User agent module on the end device.
2、 根据权利要求 1所述方法, 其特征在于, 第一用户代理模块发送广播消 息, 包括: 所述第一用户代理模块在客户端网页的触发下发送广播消息, 所述广播消 息包括代理请求头域, 所述代理请求头域的值用于指示安装有用户代理模块的 终端设备接收到所述广播消息后返回应答消息。 2. The method according to claim 1, characterized in that the first user agent module sends a broadcast message, including: the first user agent module sends a broadcast message under the trigger of the client web page, and the broadcast message includes a proxy request header field, the value of the proxy request header field is used to indicate that the terminal device installed with the user agent module returns a response message after receiving the broadcast message.
3、 根据权利要求 2所述方法, 其特征在于, 所述第一用户代理模块根据所 述用户代理模块信息与第二用户代理模块建立通信连接之后, 还包括: 所述第一用户代理模块通过所述通信连接, 将待处理的网络意图对象发送 给所述第二用户代理模块, 以使所述第二用户代理模块根据所述网络意图对象 获取相应的网络应用程序, 并使获取的网络应用程序对所述网络意图对象中的 数据进行处理;其中,所述待处理的网络意图对象至少包括行为 action,类型 type 和所述数据 data。 3. The method according to claim 2, characterized in that, after the first user agent module establishes a communication connection with the second user agent module according to the user agent module information, it further includes: the first user agent module passes The communication connection sends the network intent object to be processed to the second user agent module, so that the second user agent module obtains the corresponding network application program according to the network intent object, and makes the obtained network application program The program processes the data in the network intent object; wherein the network intent object to be processed at least includes behavior action, type type and the data data.
4、 根据权利要求 3所述方法, 其特征在于, 所述第一用户代理模块通过所 述通信连接, 将待处理的网络意图对象发送给所述第二用户代理模块, 包括: 所述第一用户代理模块通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的资源统一定位符 URL, 发送给所述第二用户代理模块, 以 使所述第二用户代理模块根据所述 URL启动所述客户端网页后, 将所述网络意 图对象中的数据发送给所述获取的网络应用程序进行处理。 4. The method according to claim 3, characterized in that, the first user agent module sends the network intent object to be processed to the second user agent module through the communication connection, including: the first user agent module sends the network intent object to be processed to the second user agent module. The user agent module sends the network intent object to be processed and the resource unified locator URL of the client web page to the second user agent module through the communication connection, so that the second user agent module After the client web page is launched according to the URL, the data in the network intent object is sent to the obtained network application for processing.
5、 根据权利要求 3所述方法, 其特征在于, 所述第一用户代理模块通过所 述通信连接, 将待处理的网络意图对象发送给所述第二用户代理模块之前, 还 包括: 所述第一用户代理模块创建所述客户端网页的镜像。 5. The method according to claim 3, characterized in that, before sending the network intent object to be processed to the second user agent module through the communication connection, the first user agent module further includes: The first user agent module creates a mirror of the client web page.
6、 根据权利要求 5所述方法, 其特征在于, 所述第一用户代理模块通过所 述通信连接, 将待处理的网络意图对象发送给所述第二用户代理模块, 包括: 所述第一用户代理模块通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的镜像发送给所述第二用户代理模块, 以使所述第二用户代 理模块加载所述客户端网页的镜像后, 将所述网络意图对象中的数据发送给所 述获取的网络应用程序进行处理。 6. The method according to claim 5, characterized in that, the first user agent module sends the network intent object to be processed to the second user agent module through the communication connection, including: the first user agent module sends the network intent object to be processed to the second user agent module. The user agent module sends the network intent object to be processed and the image of the client web page to the second user agent module through the communication connection, so that the second user agent module loads the client After the web page is mirrored, the data in the network intent object is sent to the obtained network application for processing.
7、 根据权利要求 5或 6所述方法, 其特征在于, 所述第一用户代理模块通过 所述通信连接, 将待处理的网络意图对象发送给所述第二用户代理模块之后, 还包括: 所述第一用户代理模块关闭所述客户端网页。 7. The method according to claim 5 or 6, characterized in that, after the first user agent module sends the network intent object to be processed to the second user agent module through the communication connection, it further includes: The first user agent module closes the client web page.
8、 根据权利要求 1所述方法, 其特征在于, 第一用户代理模块发送广播消 息, 包括: 所述第一用户代理模块在服务网页处理网络意图对象的过程中, 在客户端 网页触发下发送广播消息。 8. The method according to claim 1, characterized in that the first user agent module sends a broadcast message, including: the first user agent module sends the broadcast message when triggered by the client web page during the process of processing the network intent object by the service web page. Broadcast message.
9、 根据权利要求 8所述方法, 其特征在于, 在客户端网页触发下发送广播 消息之后, 还包括: 所述第一用户代理模块为所述服务网页创建镜像; 所述第一用户代理模块通过所述通信连接, 将创建的镜像发送到所述第二 用户代理模块, 以使所述第二用户代理模块加载所述镜像。 9. The method according to claim 8, characterized in that, after sending the broadcast message triggered by the client web page, it further includes: the first user agent module creates a mirror for the service web page; the first user agent module The created image is sent to the second user agent module through the communication connection, so that the second user agent module loads the image.
10、 根据权利要求 9所述方法, 其特征在于, 所述第一用户代理模块通过通 信连接, 将创建的镜像发送到所述第二用户代理模块之后, 还包括: 所述第一用户代理模块向所述第二用户代理模块发送动作同步请求, 以将 所述第二用户代理模块上加载的镜像与所述第一用户代理模块上的服务网页绑 定。 10. The method according to claim 9, characterized in that, after the first user agent module sends the created image to the second user agent module through a communication connection, the method further includes: the first user agent module Send an action synchronization request to the second user agent module to bind the image loaded on the second user agent module to the service web page on the first user agent module. Certainly.
11、 一种用于实现网络意图的方法, 其特征在于, 包括: 接收第一用户代理模块发送的第一广播消息, 所述第一广播消息用于发现 安装有用户代理模块的终端设备; 11. A method for realizing network intent, characterized in that it includes: receiving a first broadcast message sent by a first user agent module, the first broadcast message being used to discover a terminal device in which the user agent module is installed;
向所述第一用户代理模块返回所述第一广播消息的第一应答消息, 所述第 一应答消息中包含有返回所述第一应答消息的终端设备上的用户代理模块信 息; Return a first response message of the first broadcast message to the first user agent module, where the first response message contains information about the user agent module on the terminal device that returned the first response message;
与所述第一用户代理模块之间建立通信连接, 以实现网络意图。 Establish a communication connection with the first user agent module to realize network intentions.
12、 根据权利要求 11所述方法, 其特征在于, 与所述第一用户代理模块之 间建立通信连接之后, 还包括: 12. The method according to claim 11, characterized in that, after establishing a communication connection with the first user agent module, further comprising:
通过所述通信连接, 接收所述第一用户代理模块发送的待处理的网络意图 对象; 其中, 所述待处理的网络意图对象包括行为 action, 类型 type和所述数据 data; Through the communication connection, receive the network intent object to be processed sent by the first user agent module; wherein the network intent object to be processed includes behavior action, type type and the data data;
根据所述 action, type获取相应的网络应用程序; Get the corresponding network application according to the action and type;
将所述 data发送给一个获取的网络应用程序, 以使所述获取的网络应用程序 对所述 data进行处理。 The data is sent to an acquired network application, so that the acquired network application processes the data.
13、 根据权利要求 12所述方法, 其特征在于, 所述获取的网络应用程序为 用户从所述相应的网络应用程序中选择的一个网络应用程序。 13. The method according to claim 12, wherein the obtained network application is a network application selected by the user from the corresponding network applications.
14、 根据权利要求 12或 13所述方法, 其特征在于, 通过所述通信连接, 接 收所述第一用户代理模块发送的待处理的网络意图对象, 包括: 14. The method according to claim 12 or 13, characterized in that, receiving the network intent object to be processed sent by the first user agent module through the communication connection includes:
通过所述通信连接, 接收所述第一用户代理模块发送的客户端网页的资源 统一定位符 URL和所述待处理的网络意图对象; 所述客户端网页为触发所述第 一用户代理模块发送所述第一广播消息的客户端网页。 Through the communication connection, receive the resource unified locator URL of the client web page and the network intent object to be processed sent by the first user agent module; the client web page is to trigger the first user agent module to send The client web page of the first broadcast message.
15、 根据权利要求 14所述方法, 其特征在于, 通过所述通信连接, 接收所 述第一用户代理模块发送的客户端网页的资源统一定位符 URL和所述待处理的 网络意图对象之后, 还包括: 15. The method according to claim 14, characterized in that, after receiving the resource unified locator URL of the client web page and the network intent object to be processed sent by the first user agent module through the communication connection, Also includes:
根据所述 URL在第二用户代理模块上启动所述客户端网页, 所述第二用户 代理模块为返回所述第一应答消息的终端设备上的用户代理模块。 The client web page is launched on a second user agent module according to the URL. The second user agent module is a user agent module on the terminal device that returns the first response message.
16、 根据权利要求 14所述方法, 其特征在于, 将所述 data发送给一个获取的 网络应用程序,以使所述获取的网络应用程序对所述 data进行处理之后,还包括: 将处理结果返回给所述第一用户代理模块, 以使所述第一用户代理模块将 所述处理结果呈现给用户。 16. The method according to claim 14, characterized in that after sending the data to an acquired network application so that the acquired network application processes the data, it further includes: Return the processing result to the first user agent module, so that the first user agent module presents the processing result to the user.
17、 根据权利要求 12或 13所述方法, 其特征在于, 通过所述通信连接, 接 收所述第一用户代理模块发送的待处理的网络意图对象, 包括: 17. The method according to claim 12 or 13, characterized in that, receiving the network intent object to be processed sent by the first user agent module through the communication connection includes:
通过所述通信连接, 接收所述第一用户代理模块发送的第一客户端网页的 镜像和所述待处理的网络意图对象; 所述第一客户端网页为触发所述第一用户 代理模块发送所述第一广播消息的客户端网页。 Through the communication connection, receive the image of the first client web page and the network intent object to be processed sent by the first user agent module; the first client web page triggers the first user agent module to send The client web page of the first broadcast message.
18、 根据权利要求 17所述方法, 其特征在于, 通过所述通信连接, 接收所 述第一用户代理模块发送的第一客户端网页的镜像和所述待处理的网络意图对 象之后, 还包括: 18. The method according to claim 17, characterized in that, after receiving the image of the first client web page and the network intent object to be processed sent by the first user agent module through the communication connection, further comprising: :
加载所述第一客户端网页的镜像。 Load the image of the first client web page.
19、 根据权利要求 17所述方法, 其特征在于, 将所述 data发送给一个获取的 网络应用程序,以使所述获取的网络应用程序对所述 data进行处理之后,还包括: 将处理结果发送给第二用户代理模块, 以使所述第二用户代理模块将所述 处理结果呈现给用户, 所述第二用户代理模块为返回所述第一应答消息的终端 设备上的用户代理模块。 19. The method according to claim 17, characterized in that, after sending the data to an acquired network application so that the acquired network application processes the data, it further includes: sending the processing result Sent to the second user agent module, so that the second user agent module presents the processing result to the user, and the second user agent module is the user agent module on the terminal device that returns the first response message.
20、 根据权利要求 11所述方法, 其特征在于, 当接收的第一广播消息为所 述第一用户代理模块在服务网页处理网络意图对象的过程中由客户端网页触发 下发送的广播消息时, 与所述第一用户代理模块之间建立通信连接之后, 还包 括: 20. The method according to claim 11, characterized in that, when the received first broadcast message is a broadcast message sent by the first user agent module triggered by the client web page during the process of processing the network intent object by the service web page, , after establishing a communication connection with the first user agent module, it also includes:
通过所述通信连接, 接收所述第一用户代理模块发送的镜像, 所述镜像为 所述第一用户代理模块为所述服务网页创建的镜像; Through the communication connection, receive the image sent by the first user agent module, where the image is the image created by the first user agent module for the service web page;
加载所述镜像。 Load the image.
21、 根据权利要求 20所述方法, 其特征在于, 接收所述第一用户代理模块 发送的镜像之后, 还包括: 21. The method according to claim 20, characterized in that, after receiving the image sent by the first user agent module, it further includes:
接收所述第一用户代理模块发送的动作同步请求; Receive an action synchronization request sent by the first user agent module;
根据所述动作同步请求, 将加载的所述镜像与所述第一用户代理模块上的 所述服务网页绑定。 According to the action synchronization request, the loaded image is bound to the service web page on the first user agent module.
22、 根据权利要求 12或 13所述方法, 其特征在于, 在所述获取的网络应用 程序对所述 data进行处理的过程中, 所述方法还包括: 22. The method according to claim 12 or 13, characterized in that, during the process of the obtained network application processing the data, the method further includes:
在第二客户端网页的触发下发送第二广播消息, 所述第二广播消息用于发 现安装有用户代理模块的终端设备; The second broadcast message is sent when triggered by the second client web page, and the second broadcast message is used to send Terminal equipment with user agent module installed;
接收安装有用户代理模块的终端设备返回的第二应答消息, 所述第二应答 消息为所述第二广播消息的应答消息, 所述第二应答消息中包含有返回所述第 二应答消息的终端设备的用户代理模块信息; Receive a second response message returned by a terminal device installed with a user agent module, where the second response message is a response message to the second broadcast message, and the second response message includes a link to return the second response message. User agent module information of the terminal device;
根据所述第二应答消息中的用户代理模块信息与第三用户代理模块建立第 二通信连接, 以实现网络意图; 其中, 所述第三用户代理模块为返回所述第二 应答消息的终端设备中的一个终端设备上的用户代理模块。 Establish a second communication connection with the third user agent module according to the user agent module information in the second response message to realize the network intention; wherein the third user agent module is the terminal device that returns the second response message A user agent module on an end device.
23、 根据权利要求 22所述方法, 其特征在于, 根据所述第二应答消息中的 用户代理模块信息与第三用户代理模块建立第二通信连接之后, 还包括: 23. The method according to claim 22, characterized in that, after establishing a second communication connection with the third user agent module according to the user agent module information in the second response message, it further includes:
为所述获取的网络应用程序的创建镜像; Create an image of the obtained network application;
通过所述第二通信连接, 将所述获取的网络应用程序的镜像发送给所述第 三用户代理模块, 以使所述第三用户代理模块加载所述获取的网络应用程序的 镜像。 Through the second communication connection, the obtained image of the network application program is sent to the third user agent module, so that the third user agent module loads the obtained image of the network application program.
24、 根据权利要求 23所述方法, 其特征在于, 通过所述第二通信连接, 将 所述镜像发送给所述第三用户代理模块之后, 还包括: 24. The method according to claim 23, characterized in that, after sending the image to the third user agent module through the second communication connection, it further includes:
向所述第三用户代理模块发送动作同步请求, 以将所述第三用户代理模块 上加载的获取的网络应用程序的镜像与所述获取的网络应用程序绑定。 Send an action synchronization request to the third user agent module to bind the image of the obtained network application loaded on the third user agent module with the obtained network application.
25、 一种用于实现网络意图的装置, 其特征在于, 包括: 广播模块, 用于发送广播消息, 所述广播消息用于发现安装有用户代理模 块的终端设备; 应答接收模块, 用于接收安装有用户代理模块的终端设备返回的应答消息, 所述应答消息为所述广播消息的应答消息, 所述应答消息中包含有返回所述应 答消息的终端设备的用户代理模块信息; 连接模块, 用于根据所述应答接收模块接收的应答消息中的用户代理模块 信息与第二用户代理模块建立通信连接, 以实现网络意图; 其中, 所述第二用 户代理模块为所述安装有用户代理模块的终端设备中的一个终端设备上的用户 代理模块。 25. A device for realizing network intentions, characterized in that it includes: a broadcast module, used to send a broadcast message, the broadcast message is used to discover a terminal device installed with a user agent module; a response receiving module, used to receive The response message returned by the terminal device installed with the user agent module, the response message is the response message of the broadcast message, the response message contains the user agent module information of the terminal device that returns the response message; the connection module, Used to establish a communication connection with the second user agent module according to the user agent module information in the response message received by the response receiving module to realize the network intention; wherein, the second user agent module is the installed user agent module A user agent module on one of the end devices.
26、 根据权利要求 25所述装置, 其特征在于, 所述广播模块包括: 第一广播子模块, 用于在客户端网页的触发下发送广播消息, 所述广播消 息包括代理请求头域, 所述代理请求头域的值用于指示安装有用户代理模块的 终端设备接收到所述广播消息后返回应答消息。 26. The device according to claim 25, characterized in that, the broadcast module includes: a first broadcast sub-module, configured to send a broadcast message when triggered by a client web page, the broadcast message The information includes a proxy request header field, and the value of the proxy request header field is used to indicate that the terminal device installed with the user agent module returns a response message after receiving the broadcast message.
27、 根据权利要求 26所述装置, 其特征在于, 还包括: 数据传输模块, 用于在所述连接模块根据所述用户代理模块信息与第二用 户代理模块建立通信连接之后, 通过所述连接模块建立的通信连接, 将待处理 的网络意图对象发送给所述第二用户代理模块, 以使所述第二用户代理模块根 据所述网络意图对象获取相应的网络应用程序, 并使获取的网络应用程序对所 述网络意图对象中的数据进行处理; 其中, 所述待处理的网络意图对象至少包 括行为 action、 类型 type和所述数据 data。 27. The device according to claim 26, further comprising: a data transmission module, configured to: after the connection module establishes a communication connection with the second user agent module according to the user agent module information, through the connection The communication connection established by the module sends the network intent object to be processed to the second user agent module, so that the second user agent module obtains the corresponding network application program according to the network intent object, and makes the obtained network The application processes the data in the network intent object; wherein the network intent object to be processed at least includes a behavior action, a type, and the data data.
28、 根据权利要求 27所述装置, 其特征在于, 所述数据传输模块包括: 第一传输子模块, 用于通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的资源统一定位符 URL, 发送给所述第二用户代理模块, 以 使所述第二用户代理模块根据所述 URL启动所述客户端网页后, 将所述网络意 图对象中的数据发送给所述获取的网络应用程序进行处理。 28. The device according to claim 27, characterized in that the data transmission module includes: a first transmission sub-module, configured to transfer the network intent object to be processed and the client web page through the communication connection. The resource unified locator URL is sent to the second user agent module, so that after the second user agent module starts the client web page according to the URL, the data in the network intent object is sent to the The web application obtained above is processed.
29、 根据权利要求 27所述装置, 其特征在于, 还包括: 第一镜像创建模块, 用于在所述数据传输模块通过所述通信连接, 将待处 理的网络意图对象发送给所述第二用户代理模块之前, 创建所述客户端网页的 镜像。 29. The device according to claim 27, further comprising: a first image creation module, configured to send the network intent object to be processed to the second image through the communication connection in the data transmission module. Before the user agent module, create a mirror of the client web page.
30、 根据权利要求 29所述装置, 其特征在于, 所述数据传输模块包括: 第二传输子模块, 用于通过所述通信连接, 将所述待处理的网络意图对象 及所述客户端网页的镜像发送给所述第二用户代理模块, 以使所述第二用户代 理模块加载所述客户端网页的镜像后, 将所述网络意图对象中的数据发送给所 述获取的网络应用程序进行处理。 30. The device according to claim 29, characterized in that the data transmission module includes: a second transmission sub-module, configured to transfer the network intent object to be processed and the client web page through the communication connection. The image is sent to the second user agent module, so that after the second user agent module loads the image of the client web page, the data in the network intent object is sent to the obtained network application program for processing. deal with.
31、 根据权利要求 29或 30所述装置, 其特征在于, 还包括: 网页关闭模块, 用于在所述数据传输模块通过所述通信连接, 将待处理的 网络意图对象发送给所述第二用户代理模块之后, 关闭所述客户端网页。 31. The device according to claim 29 or 30, further comprising: a webpage closing module, configured to send the network intent object to be processed to the second network through the communication connection in the data transmission module. After the user agent module, close the client web page.
32、 根据权利要求 25所述装置, 其特征在于, 所述广播模块包括: 第二广播子模块, 用于在服务网页处理网络意图对象的过程中, 在客户端 网页触发下发送广播消息。 32. The device according to claim 25, characterized in that, the broadcast module includes: The second broadcast submodule is used to send broadcast messages when triggered by the client web page during the process of processing the network intent object by the service web page.
33、 根据权利要求 32所述装置, 其特征在于, 还包括: 第二镜像创建模块, 用于所述第二广播子模块在客户端网页触发下发送广 播消息之后, 为所述服务网页创建镜像; 镜像发送模块, 用于通过所述通信连接, 将创建的镜像发送到所述第二用 户代理模块, 以使所述第二用户代理模块加载所述镜像。 33. The device according to claim 32, further comprising: a second image creation module, configured to create a mirror image for the service web page after the second broadcast sub-module sends a broadcast message when triggered by the client web page. ; An image sending module, configured to send the created image to the second user agent module through the communication connection, so that the second user agent module loads the image.
34、 根据权利要求 33所述装置, 其特征在于, 还包括: 同步请求模块, 用于在所述数据传输模块通过通信连接, 将创建的镜像发 送到所述第二用户代理模块之后, 向所述第二用户代理模块发送动作同步请求, 以将所述第二用户代理模块上加载的镜像与所述第一用户代理模块上的服务网 页绑定。 34. The device according to claim 33, further comprising: a synchronization request module, configured to send the created image to the second user agent module after the data transmission module sends the created image to the second user agent module through a communication connection. The second user agent module sends an action synchronization request to bind the image loaded on the second user agent module to the service web page on the first user agent module.
35、 一种用于实现网络意图的装置, 其特征在于, 包括: 广播接收模块, 用于接收第一用户代理模块发送的第一广播消息, 所述第 一广播消息用于发现安装有用户代理模块的终端设备; 35. A device for realizing network intentions, characterized in that it includes: a broadcast receiving module, configured to receive a first broadcast message sent by a first user agent module, the first broadcast message being used to discover that a user agent is installed Module terminal equipment;
应答返回模块, 用于向所述第一用户代理模块返回所述第一广播消息的第 一应答消息, 所述第一应答消息中包含有返回所述第一应答消息的终端设备上 的用户代理模块信息; A response return module, configured to return a first response message of the first broadcast message to the first user agent module, where the first response message includes the user agent on the terminal device that returns the first response message. module information;
第一连接模块, 用于与所述第一用户代理模块之间建立通信连接, 以实现 网络意图。 The first connection module is used to establish a communication connection with the first user agent module to realize network intentions.
36、 根据权利要求 35所述装置, 其特征在于, 还包括: 36. The device according to claim 35, further comprising:
数据接收模块, 用于在所述第一连接模块与所述第一用户代理模块之间建 立通信连接之后, 通过所述第一连接模块建立的通信连接, 接收所述第一用户 代理模块发送的待处理的网络意图对象; 其中, 所述待处理的网络意图对象包 括行为 action, 类型 type和所述数据 data; A data receiving module configured to, after establishing a communication connection between the first connection module and the first user agent module, receive the data sent by the first user agent module through the communication connection established by the first connection module. The network intent object to be processed; wherein, the network intent object to be processed includes behavior action, type type and the data data;
应用程序获取模块, 用于根据所述数据接收模块接收的 action, type获取相 应的网络应用程序; The application acquisition module is used to obtain the corresponding network application according to the action and type received by the data receiving module;
数据发送模块,用于将所述数据接收模块接收的 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理。 A data sending module is used to send the data received by the data receiving module to an acquired network application program, so that the acquired network application program processes the data.
37、 根据权利要求 36所述装置, 其特征在于, 所述应用程序获取模块获取 的网络应用程序为用户从所述相应的网络应用程序中选择的一个网络应用程 序。 37. The device according to claim 36, wherein the network application obtained by the application acquisition module is a network application selected by the user from the corresponding network applications.
38、 根据权利要求 36或 37所述装置, 其特征在于, 所述数据接收模块包括: 第一接收子模块, 用于通过所述通信连接, 接收所述第一用户代理模块发 送的客户端网页的资源统一定位符 URL和所述待处理的网络意图对象; 所述客 户端网页为触发所述第一用户代理模块发送所述第一广播消息的客户端网页。 38. The device according to claim 36 or 37, characterized in that, the data receiving module includes: a first receiving sub-module, configured to receive the client web page sent by the first user agent module through the communication connection. The resource unified locator URL and the network intent object to be processed; the client web page is a client web page that triggers the first user agent module to send the first broadcast message.
39、 根据权利要求 38所述装置, 其特征在于, 还包括: 39. The device according to claim 38, further comprising:
网页启动模块, 用于在所述第一接收子模块通过所述通信连接, 接收所述 第一用户代理模块发送的客户端网页的资源统一定位符 URL和所述待处理的网 络意图之后, 根据所述 URL在第二用户代理模块上启动所述客户端网页, 所述 第二用户代理模块为返回所述第一应答消息的终端设备上的用户代理模块。 The web page startup module is configured to, after the first receiving sub-module receives the resource unified locator URL of the client web page and the network intent to be processed sent by the first user agent module through the communication connection, according to The URL launches the client web page on a second user agent module, and the second user agent module is a user agent module on the terminal device that returns the first response message.
40、 根据权利要求 38所述装置, 其特征在于, 还包括: 40. The device according to claim 38, further comprising:
结果返回模块,用于在所述数据发送模块将所述 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理之后, 将处理结果 返回给所述第一用户代理模块, 以使所述第一用户代理模块将所述处理结果呈 现给用户。 A result return module is configured to return the processing result to the first after the data sending module sends the data to an obtained network application program so that the obtained network application program processes the data. A user agent module, so that the first user agent module presents the processing result to the user.
41、 根据权利要求 36或 37所述装置, 其特征在于, 所述数据接收模块包括: 第二接收子模块, 用于通过所述第一连接模块建立的通信连接, 接收所述 第一用户代理模块发送的第一客户端网页的镜像和所述待处理的网络意图; 所 述第一客户端网页为触发所述第一用户代理模块发送所述第一广播消息的客户 端网页。 41. The device according to claim 36 or 37, characterized in that, the data receiving module includes: a second receiving sub-module, used to receive the first user agent through the communication connection established by the first connection module. The image of the first client web page sent by the module and the network intent to be processed; the first client web page is the client web page that triggers the first user agent module to send the first broadcast message.
42、 根据权利要求 41所述装置, 其特征在于, 还包括: 42. The device according to claim 41, further comprising:
第一镜像加载模块, 用于在所述第二接收子模块通过所述通信连接, 接收 所述第一用户代理模块发送的第一客户端网页的镜像和所述待处理的网络意图 之后, 加载所述第一客户端网页的镜像。 The first image loading module is configured to load the image of the first client web page and the network intent to be processed after the second receiving sub-module receives the image of the first client web page sent by the first user agent module through the communication connection. The image of the first client web page.
43、 根据权利要求 41所述装置, 其特征在于, 还包括: 43. The device according to claim 41, further comprising:
结果发送模块,用于在所述数据发送模块将所述 data发送给一个获取的网络 应用程序, 以使所述获取的网络应用程序对所述 data进行处理之后, 将处理结果 发送给第二用户代理模块, 以使所述第二用户代理模块将所述处理结果呈现给 用户, 所述第二用户代理模块为返回所述第一应答消息的终端设备上的用户代 理模块。 A result sending module, configured to send the processing result to the second user after the data sending module sends the data to an obtained network application program so that the obtained network application program processes the data. The agent module is so that the second user agent module presents the processing result to the user. The second user agent module is the user agent on the terminal device that returns the first response message. management module.
44、 根据权利要求 35所述装置, 其特征在于, 当所述第一接收模块接收的 第一广播消息为所述第一用户代理模块在服务网页处理网络意图对象的过程中 由客户端网页触发下发送的广播消息时, 所述装置还包括: 44. The device according to claim 35, characterized in that, when the first broadcast message received by the first receiving module is triggered by the client web page during the process of the first user agent module processing the network intent object in the service web page When sending a broadcast message, the device further includes:
镜像接收模块, 用于通过所述第一连接模块建立的通信连接, 接收所述第 一用户代理模块发送的镜像, 所述镜像为所述第一用户代理模块为所述服务网 页创建的镜像; An image receiving module, configured to receive the image sent by the first user agent module through the communication connection established by the first connection module, where the image is the image created by the first user agent module for the service web page;
第二镜像加载模块, 用于加载所述镜像。 The second image loading module is used to load the image.
45、 根据权利要求 44所述装置, 其特征在于, 还包括: 45. The device according to claim 44, further comprising:
请求接收模块, 用于在所述镜像接收模块接收所述第一用户代理模块发送 的镜像之后, 接收所述第一用户代理模块发送的动作同步请求; A request receiving module, configured to receive an action synchronization request sent by the first user agent module after the image receiving module receives the image sent by the first user agent module;
绑定模块, 用于根据所述请求接收模块接收的动作同步请求, 将加载的所 述镜像与所述第一用户代理模块上的所述服务网页绑定。 A binding module, configured to bind the loaded image to the service web page on the first user agent module according to the action synchronization request received by the request receiving module.
46、 根据权利要求 36或 37所述装置, 其特征在于, 所述装置还包括: 第二广播模块,用于在所述获取的网络应用程序对所述 data进行处理的过程 中, 在第二客户端网页的触发下发送第二广播消息, 所述第二广播消息用于发 现安装有用户代理模块的终端设备; 46. The device according to claim 36 or 37, characterized in that, the device further includes: a second broadcast module, configured to: during the process of the obtained network application processing the data, in the second The second broadcast message is sent when triggered by the client web page, and the second broadcast message is used to discover the terminal device with the user agent module installed;
第二应答接收模块, 用于接收安装有用户代理模块的终端设备返回的第二 应答消息, 所述第二应答消息为所述第二广播消息的应答消息, 所述第二应答 消息中包含有返回所述第二应答消息的终端设备的用户代理模块信息; The second response receiving module is used to receive the second response message returned by the terminal device installed with the user agent module. The second response message is the response message of the second broadcast message. The second response message contains Return the user agent module information of the terminal device of the second response message;
第二连接模块, 用于根据所述第二应答接收模块接收的第二应答消息中的 用户代理模块信息与第三用户代理模块建立第二通信连接, 以实现网络意图; 其中, 所述第三用户代理模块为返回所述第二应答消息的终端设备中的一个终 端设备上的用户代理模块。 The second connection module is configured to establish a second communication connection with the third user agent module according to the user agent module information in the second response message received by the second response receiving module to realize the network intention; wherein, the third The user agent module is a user agent module on one of the terminal devices that returns the second response message.
47、 根据权利要求 46所述装置, 其特征在于, 还包括: 47. The device according to claim 46, further comprising:
镜像创建模块, 用于在所述第二连接模块根据所述第二应答消息中的用户 代理模块信息与第三用户代理模块建立第二通信连接之后, 为所述获取的网络 应用程序的创建镜像; A mirror creation module, configured to create a mirror for the obtained network application after the second connection module establishes a second communication connection with the third user agent module according to the user agent module information in the second response message. ;
镜像发送模块, 用于通过所述第二连接模块建立的第二通信连接, 将所述 获取的网络应用程序的镜像发送给所述第三用户代理模块, 以使所述第三用户 代理模块加载所述获取的网络应用程序的镜像。 An image sending module, configured to send the obtained image of the network application program to the third user agent module through the second communication connection established by the second connection module, so that the third user agent module can be loaded. The image of the obtained network application.
48、 根据权利要求 47所述装置, 其特征在于, 还包括: 48. The device according to claim 47, further comprising:
同步请求模块, 用于在所述镜像发送模块通过所述第二通信连接, 将所述 镜像发送给所述第三用户代理模块之后, 向所述第三用户代理模块发送动作同 步请求, 以将所述第三用户代理模块上加载的获取的网络应用程序的镜像与所 述获取的网络应用程序绑定。 A synchronization request module, configured to send an action synchronization request to the third user agent module after the image sending module sends the image to the third user agent module through the second communication connection, so as to The image of the obtained network application loaded on the third user agent module is bound to the obtained network application.
PCT/CN2014/071536 2013-01-30 2014-01-27 Method and device for realizing web intent WO2014117706A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310035458.6A CN103973460B (en) 2013-01-30 2013-01-30 For realizing the method and device that network is intended to
CN201310035458.6 2013-01-30

Publications (1)

Publication Number Publication Date
WO2014117706A1 true WO2014117706A1 (en) 2014-08-07

Family

ID=51242530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/071536 WO2014117706A1 (en) 2013-01-30 2014-01-27 Method and device for realizing web intent

Country Status (2)

Country Link
CN (1) CN103973460B (en)
WO (1) WO2014117706A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301672B (en) * 2021-04-01 2022-09-06 浙江大华技术股份有限公司 Network connection method, network node equipment and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1601999A (en) * 2003-09-22 2005-03-30 三星电子株式会社 Service search system for wireless ad hoc network, and service searching method thereof
US20050235053A1 (en) * 2002-08-28 2005-10-20 Akira Sano Network system, provider, management site, requester, and program
CN101083581A (en) * 2006-05-30 2007-12-05 明基电通(上海)有限公司 Method and apparatus for controlling multicasting in self-organizing peer-to-peer network
US20110153634A1 (en) * 2009-12-17 2011-06-23 Chu Thomas P Method and apparatus for locating services within peer-to-peer networks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309189B (en) * 2008-06-26 2011-10-12 宇龙计算机通信科技(深圳)有限公司 Data processing method, system for mobile terminal and computer, and mobile terminal thereof
CN102572692A (en) * 2012-01-10 2012-07-11 周良文 Spatial data matched network communication system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235053A1 (en) * 2002-08-28 2005-10-20 Akira Sano Network system, provider, management site, requester, and program
CN1601999A (en) * 2003-09-22 2005-03-30 三星电子株式会社 Service search system for wireless ad hoc network, and service searching method thereof
CN101083581A (en) * 2006-05-30 2007-12-05 明基电通(上海)有限公司 Method and apparatus for controlling multicasting in self-organizing peer-to-peer network
US20110153634A1 (en) * 2009-12-17 2011-06-23 Chu Thomas P Method and apparatus for locating services within peer-to-peer networks

Also Published As

Publication number Publication date
CN103973460A (en) 2014-08-06
CN103973460B (en) 2017-06-27

Similar Documents

Publication Publication Date Title
US9094369B2 (en) Method and apparatus for storing and restoring state information of remote user interface
CN105409183B (en) For realizing the system and equipment of any network function client or server in HTML5 is applied
US7640329B2 (en) Scaling and extending UPnP v1.0 device discovery using peer groups
US7647394B2 (en) Scaling UPnP v1.0 device eventing using peer groups
CA2655832C (en) Mapping universal plug and play discovered items to an smb location
EP2254302B1 (en) Method and apparatus for restoring state information of remote user interface
US9762643B2 (en) Providing hosted virtual desktop infrastructure services
KR101616580B1 (en) Method for managing state information of remote user interface
JP2002055896A (en) Communication system and its device
JP2002073310A (en) Communication system and its method, and storage medium
US7421494B2 (en) Method and apparatus for facilitating data transfers between arbitrary components
EP2107723B1 (en) Remote control of a device by a terminal
KR100823269B1 (en) Method and Apparatus for managing a State Information of Remote User Interface
WO2014117706A1 (en) Method and device for realizing web intent
US8301781B1 (en) Methods and systems for browser file transfer
WO2016166605A1 (en) Methods, devices and system for obtaining http message statuses
US7937441B2 (en) Data-control device and method of controlling same
JP2011510529A (en) Device and method for invoking a sequence of web services using a single request-based message
JP2011129962A (en) Service trigger control system, server, method, and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14746020

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14746020

Country of ref document: EP

Kind code of ref document: A1