WO2016066124A1 - 一种服务发现方法、相关设备、及系统 - Google Patents

一种服务发现方法、相关设备、及系统 Download PDF

Info

Publication number
WO2016066124A1
WO2016066124A1 PCT/CN2015/093239 CN2015093239W WO2016066124A1 WO 2016066124 A1 WO2016066124 A1 WO 2016066124A1 CN 2015093239 W CN2015093239 W CN 2015093239W WO 2016066124 A1 WO2016066124 A1 WO 2016066124A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
network
same
module
discovery
Prior art date
Application number
PCT/CN2015/093239
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP15854140.9A priority Critical patent/EP3206373B1/en
Publication of WO2016066124A1 publication Critical patent/WO2016066124A1/zh
Priority to US15/581,671 priority patent/US10728344B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a service discovery method, related device, and system.
  • the wireless local area network standard 802.11 developed by the Institute of Electrical and Electronics Engineers (IEEE) defines two types of network communication methods: the first communication method is based on The way the infrastructure is communicated. In the first communication mode, one node is used as an access point (AP, Access Point), and other nodes other than the node are used as stations (STA, Station), wherein the access point provides access services, and other nodes Connect to the access point and access the network through the access point.
  • the second communication method is the independent basic service set (IBSS). In the second communication method, each node is an equal site, and each node establishes a connection between two and two.
  • IBSS independent basic service set
  • the Wi-Fi Alliance (WFA, Wi-Fi Alliance) developed the Wi-Fi Direct standard based on the 802.11 standard. Based on 802.11, the Wi-Fi Direct standard further defines how to discover between two nodes and how to establish a connection. Specifically, the node may randomly send the probe message on the three channels 1, 6, and 11 or listen to the probe message sent by other nodes. If the probe message sent by other nodes is detected and a reply is received, two nodes may be considered. The node completes mutual discovery, and then the two nodes can negotiate the roles of the group owner (GO, Group Owner) and the group member. The node that is usually the group owner is equivalent to the role of the access point, and the node that is the member of the group. Equivalent to the site role. A group member node can apply for an association to the group owner node and then establish a connection.
  • WFA Wi-Fi Alliance
  • Wi-Fi Direct Service WFA has also developed the Wi-Fi Direct Service (WFDS) standard. This standard is based on Wi-Fi Direct, and the interaction of upper-layer services is also standardized so that the upper-layer services of each manufacturer can communicate. For example, for file transfer services, a unified file transfer protocol can be used.
  • WFDS Wi-Fi Direct Service
  • the upper layer application can perform data transmission of the upper layer service based on the Wi-Fi connection.
  • the application session platform (ASP, Application Session Platform) is used as an example.
  • the ASP can establish an ASP session based on a Wi-Fi connection (P2P (Peer to Peer) connection in the prior art) and carry the ASP session through the established ASP session.
  • Upper layer business data transmission is used as an example.
  • FIG. 1 is a flowchart of service discovery by Node A and Node B through P2P at the Wi-Fi level. After service discovery, node A and Node B are established. The P2P network then establishes an ASP session on top of the P2P connection.
  • Figure 2 is a flow chart of the WFDS establishing an ASP session on the P2P connection.
  • node A represents the role of Advertiser in WFDS, which is the provider of the service.
  • Node B represents the role of Seeker in WFDS, that is, the service provider, and
  • P2P represents the P2P module connected at the Wi-Fi level.
  • the service module of the node A sends an AdvertiseService message to the ASP module of the node A, so that the ASP module of the node A can receive the service request of the other node;
  • the service module of the node B sends a SeekService message to the ASP module of the node B, instructing the ASP module of the node B to query the specified service;
  • the ASP module of the Node B sends a query message for querying the specified service by using the P2P module of the Node B.
  • the ASP module of the node A receives the query message through the P2P module of the node A, and determines that the service queried by the node B is a service that the node A can provide;
  • the ASP module of the node A sends a query response message to the P2P module of the node B through the P2P module of the node A.
  • Node B determines that the service provided by Node A is the service that it needs, and can establish a P2P connection between Node A and Device B, and establish an ASP session session based on the established P2P connection, as shown in Figure 2.
  • the process of establishing an ASP session is as follows:
  • the service module of the node B sends an instruction to establish an ASP session to the own ASP module, ConnectSessions.
  • S202 The ASP module of the Node B exchanges a version VERSION message with the ASP module of the node A after receiving the ConnectSessions indication.
  • the ASP module in the node A sends an add session ADDED_SESSION message to the ASP module in the node B, and the representation agrees to establish an ASP session with the node B.
  • the Service module in Node A interacts with the ASP module in Node A to exchange port information used by Node A, and determines the port used.
  • the ASP module in node A sends an allow port ALLOWED PORT message to the ASP module in the node B, and informs the node B that the port has been opened by itself.
  • the ASP module in the Node B sends a port report PortReport message to the Service module in the Node B, and indicates that the port information that the node A has opened the port and interacts with the Service module in the Node B is used to communicate with the Service module, and Determine which port to use.
  • the ASP module in Node B sends an Allow Port ALLOWED PORT message to the ASP module in Node A, informing Node A that it has opened the port.
  • the ASP module in the node A sends a port report PortReport message to the service module in the node A, and the port indicating that the node B is reported to the service module is opened, and the two parties can Communicate.
  • the upper layer service data transmission is based on a P2P connection, and when a P2P connection occurs, for example, after a P2P connection is established between the node A and the node B, the distance between the node A and the node B is higher. The farther away, the signal of the P2P connection becomes worse and worse, so that the connection is interrupted, then the upper layer service based on the P2P connection will interrupt the service.
  • This makes the data transmission of the upper layer service have strong dependence on the underlying P2P connection on which the upper layer service is established, and the flexibility is poor.
  • the embodiments of the present invention provide a service discovery method, a related device, and a system, which are used to solve the problem that the data transmission of the upper layer service in the prior art is highly dependent on the network connection on which the upper layer service is based, resulting in poor flexibility.
  • a service discovery method including:
  • the service requester performs service discovery based on different networks for the same service
  • the identifier information that is provided by the service provider that provides the same service is received by the network that is capable of discovering the same service in the different network, where the identifier information is used to identify the service provider;
  • service data transmission is performed through the at least two networks.
  • the service requesting end performs service discovery based on different networks for the same service, and specifically includes:
  • the service module sends a first service discovery indication to the application session platform ASP module in the service requesting end, and the ASP module sends the first service discovery including the same service by using a preset network according to the first service discovery indication.
  • the first service discovery request carries a service identifier of the same service
  • the preset network includes a network in the different network, and the same service can be found by using the different network
  • Each of the networks, corresponding to the identifier information provided by the service provider that provides the same service specifically includes: the ASP module sends a network that can discover the same service in the preset network, respectively, corresponding to the receiving service provider.
  • the first service discovery response wherein the first service discovery response carries the identification information.
  • the method further includes: the ASP module is configured according to The first service discovery result is reported by the first service discovery result to the service module; wherein the first service discovery result includes network information of each network capable of discovering the same service, and corresponding to being able to discover the same Information of the service provider found by each network of the service; or the first service discovery result includes information of a service provider capable of discovering each network discovery of the same service; the service module indicates the ASP module and the a service provider establishes a first ASP session; wherein the first service provider is determined by the service module from the reported first service discovery result; and the first service provider is discovered through the first network The service module carries the same service discovered by the first network through the established first ASP session Service data transmission.
  • the first service discovery result further includes identifier information received by a network that can discover the same service; Determining, by the service requesting end, that the service information obtained by the service discovery by the at least two networks is the same service provided by the same service provider, the service requesting end includes: the service module Determining, from the identified identification information included in the first service discovery result, that the identifier information received by the first network is matched Identification information; when determining the identification information that matches the identification information received by the first network, determining that the service discovered by the network that receives the matching identification information is the same as the service discovered by the first network The same service provided by the service provider; the service data transmission by the at least two networks in the same service of the same service, specifically: the service module instructs the ASP module and the second service provider Establishing a second ASP session, wherein the second service provider is determined by the service module from a service provider discovered by a network that receives the matching identification information; and the second
  • the service requesting end performs service discovery based on different networks for the same service, respectively, and can be found by using the different network.
  • Each network of the same service corresponding to the identifier information provided by the service provider that provides the same service, the identifier information is used to identify the service provider, and specifically includes: the service module in the service requester to the service
  • the ASP module in the requesting end sends a first service discovery indication, and the ASP module sends, according to the first service discovery indication, a first service discovery request including the same service by using at least one network, where the first service
  • the discovery request carries the service identifier of the same service;
  • the ASP module receives the first service discovery response sent by the network corresponding receiving service provider of the same service in the at least one network;
  • a service discovery response carries identification information; the ASP module will discover response according to the first service
  • the first service discovery result is reported to the service module; wherein the first service discovery result includes network information of a network capable
  • the service module transmits the service data of the same service discovered by the first network through the established first ASP session; the service module sends a second service discovery indication to the ASP module; The ASP module sends, according to the second service discovery indication, a second service discovery request that includes the same service by using at least one network, where the second service discovery request carries the service identifier of the same service; The ASP module is configured to receive, by the at least one network, the second service discovery response that is sent by the network corresponding to the service provider, where the second service discovery response carries the identifier information; the ASP module And reporting the second service discovery result determined according to the second service discovery response to the service module; wherein the second service discovery result includes a network that can discover the network of the same service according to the received second service discovery response.
  • the second service discovery result includes a service discovered by the network capable of discovering the same service according to the received second service discovery response The information of the providing end, and the identification information received by the network capable of discovering the same service.
  • determining service discovery based on the at least two networks includes: determining, by the service module, the identifier information that is included in the second service discovery result that is reported to be matched with the identifier information received by the first network.
  • Identification information when determining the identification information that matches the identification information received by the first network, determining that the service discovered by the network that receives the matching identification information is the same as the service discovered by the first network The same service provided by the service provider; the service data transmission by the at least two networks in the same service of the same service, specifically: the service module instructs the ASP module and the second service provider Establishing a second ASP session, where the second service provider receives matching identification information from the service module The service provider network found is determined And the second provider is discovered by the second network; and the service data carried by the first ASP session is carried on the second ASP session to continue the current service data transmission.
  • the method further includes: the ASP module And reporting, by the first service discovery result, the service module, according to the first service discovery result, where the first service discovery result includes network information of each network that can discover the same service, and corresponding Information of the service provider of each network discovery of the same service, and corresponding identification information received by each network capable of discovering the same service; or, the first service discovery result includes each of the same service capable of being discovered Information of a service provider of a network discovery, and identifier information corresponding to each network that can be discovered by the same service; and when the identification information obtained by the at least two networks matches, determining that the at least two networks are determined based on the at least two networks The services discovered by the service discovery are provided by the same service provider.
  • the service specifically includes: the service module determines matching identification information from the reported identification information; and when determining the matching identification information, determining that the service discovered by the network that receives the matched identification information is the same service providing end Providing the same service; after determining that the service discovered by the network that receives the matching identification information is the same service provided by the same service provider, the method further includes: the service module instructing the ASP module to provide the same service
  • the same service provider establishes an ASP session; and determines a first ASP session from each ASP session established by the ASP module based on a network that discovers the same service provided by the same service provider, and passes the first network based on the first network.
  • the established first ASP session carries service data of the same service provided by the same service provider.
  • the performing the service data transmission by using the at least two networks in the same accessing the same service specifically includes:
  • the service module carries the service data carried by the first ASP session on the second ASP session to continue the current service data transmission, where the second ASP session is established based on the second network, and the second The network provides the same service provider from the discovery A network other than the first network determined in the same service network.
  • the method further includes: the ASP module And reporting, by the first service discovery result, the service module, according to the first service discovery result, where the first service discovery result includes network information of each network that can discover the same service, and corresponding Information of the service provider of each network discovery of the same service, and corresponding identification information received by each network capable of discovering the same service; or, the first service discovery result includes each of the same service capable of being discovered Information of a service provider of a network discovery, and identifier information corresponding to each network that can be discovered by the same service; and when the identification information obtained by the at least two networks matches, determining that the at least two networks are determined based on the at least two networks The services discovered by the service discovery are provided by the same service provider.
  • the service specifically includes: the service module determines matching identification information from the reported identification information; and when determining the matching identification information, determining that the service discovered by the network that receives the matched identification information is the same service providing end Providing the same service; after determining that the service discovered by the network that receives the matching identification information is the same service provided by the same service provider, the method further includes: the service module instructing the ASP module to provide the same service The same service provider establishes an ASP session; and the service data transmission by the at least two networks in the same service of the same service, specifically: carrying the same service by using the established ASP session Provide business data for the same service provided by the end.
  • the service module stops using the first port to perform service data with the service provider.
  • An interaction wherein the first port is a network address corresponding to the first network used by the service session carried by the first ASP session
  • the service data after the service data of the last interaction between the first port and the service provider is used to interact with the service provider through the second port, where the second port is An available port of the network address corresponding to the second network used by the service session carried by the second ASP session.
  • the identification information is generated by the identified service provider based on the MAC address of the service provider.
  • the The network of the same service includes a P2P network; establishing an ASP session based on the P2P network specifically includes: establishing a P2P connection between the service requesting end and the service providing end; and establishing an ASP session based on the established P2P connection.
  • the different networks are at least two different networks of the following different types of networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, an NFC network, an LTE network, and a Powerline network.
  • a data transmission method including:
  • the service provider provides identification information to the service requesting end for each of the at least two networks through which the service requesting party performs service discovery for the same service provided by the service provider, and the identifier information is used for Identify the service provider;
  • each of the at least two networks that the service requester performs when performing service discovery on the same service provided by the service provider is sent to the service requesting end.
  • Providing identification information including: receiving a service request end a service discovery request sent by each of the at least two networks through which the service discovery includes a service discovery performed by the same service provided by the service provider; when the service identifier is carried according to the service discovery request, the service provides When the terminal determines that it can provide the service identified by the service identifier, it sends a service discovery response to the service requesting end, where the service discovery response carries the identifier information.
  • a service request device including:
  • An application session platform ASP module configured to perform service discovery based on different networks for the same service; and each network that can discover the same service in the different network, corresponding to receiving the service provider provided by the service providing the same service Identification information, where the identification information is used to identify a service provider;
  • a service module configured to: when the identification information obtained by the ASP module through the at least two networks is matched, determine that the service discovered by the service discovery based on the at least two networks is the same service provided by the same service provider; In the same access service, the service data transmission is performed through the at least two networks.
  • the service module is further configured to send a first service discovery indication to the ASP module before the ASP module performs service discovery; the ASP module, Specifically, the first service discovery request that includes the same service is sent by using a preset service, according to the first service discovery indication sent by the service module, where the first service discovery request carries the same service a service identifier, the preset network includes a network in the different network, and a network that can discover the same service in the preset network respectively corresponds to a first service discovery response sent by the receiving service provider; The first service discovery response carries identification information.
  • the ASP module is further configured to: when receiving the first service discovery response by using the at least one network, according to the first service And discovering, by the response, the first service discovery result, reporting the service module; wherein the first service discovery result includes a network capable of discovering each network of the same service Network information, and information corresponding to a service provider discovered by each network capable of discovering the same service; or, the first service discovery result includes information of a service provider capable of discovering each network discovery of the same service;
  • the service module is further configured to: instruct the ASP module to establish a first ASP session with the first service provider; and transmit the service data of the same service discovered by the first network by using the established first ASP session;
  • the first service provider is determined by the service module from the reported first service discovery result; and the first service provider is discovered by using the first network.
  • the service module is specifically configured to determine, from the identifier information included in the reported first service discovery result, And determining, by the first network, the identification information that is matched by the identifier information; when determining the identifier information that matches the identifier information received by the first network, determining a service and a gateway found by the network that receives the matched identifier information
  • the service discovered by the first network is the same service provided by the same service provider; and the ASP module is instructed to establish a second ASP session with the second service provider; wherein the second service provider is the service module Determining from a service provider discovered by a network that receives the matching identification information; and the second service provider is found by using the second network; and carrying the service data carried by the first ASP session
  • the current service data transmission is continued on the second ASP session, wherein the first service discovery result further includes, by being able to discover the same service Network identification information is received.
  • the service module is further configured to send a first service discovery indication to the ASP module before the ASP module performs service discovery; the ASP module, Specifically, the first service discovery request that includes the same service is sent by using the at least one network according to the first service discovery indication sent by the service module, where the first service discovery request carries the same service a service identifier; and a first service discovery response sent by the network corresponding receiving service provider in the at least one network, wherein the first service discovery response carries the identification information; The ASP module reports the first service discovery result determined according to the first service discovery response.
  • the first service discovery result includes network information of a network capable of discovering the same service, and information corresponding to a service provider discovered by a network capable of discovering the same service; or the first service
  • the discovery result includes the information of the service provider that can discover the network discovery of the same service; the service module is specifically configured to: after receiving the first service discovery result reported by the ASP module, indicating the ASP module and the first The service provider establishes a first ASP session, where the first service provider is determined by the service module from the reported first service discovery result; and the first service provider is discovered through the first network.
  • the ASP module specifically for Transmitting, by the service module, a second service discovery indication, sending, by using at least one network, a second packet that includes the same service a service discovery request; wherein the second service discovery request carries the service identifier of the same service; and the second service that is sent by the network corresponding to the service provider that can discover the same service in the at least one network a discovery response, wherein the second service discovery response carries the identification information; and the second service discovery result determined according to the second service discovery response is reported to the service module; wherein the second service discovery result includes The received second service discovery response determines network information of the network capable of discovering the same service, and information corresponding to the service provider discovered by the network capable of discovering the same service, and correspondingly through the network capable of discovering the same service The received identification information; or the second service discovery result includes information determined by the service provider that can discover the
  • the service module is specifically used for identifier information included in the second service discovery result reported from the ASP module Determining the identification information that matches the identification information received by the first network; and determining the identification information that matches the identification information received by the first network, determining the network discovered by the network that received the matching identification information Service and service found through the first network And the same service provided by the same service provider; and instructing the ASP module to establish a second ASP session with the second service provider; and carrying the service data carried by the first ASP session in the second The current service data transmission is continued on the ASP session; wherein the second service provider is determined by the service module from a service provider discovered by the network that receives the matching identification information, and the second provider is Found for adoption through the second network.
  • the ASP module is further configured to: when receiving the first service discovery response through the at least two networks, according to the first The first service discovery result determined by the service discovery response is reported to the service module; wherein the first service discovery result includes network information of each network capable of discovering the same service, and correspondingly capable of discovering the same service by Information of the service provider of each network discovery, and corresponding identification information received by each network capable of discovering the same service; or, the first service discovery result includes discovery by each network capable of discovering the same service Information of the service provider, and corresponding to the identification information received by each network that can discover the same service; the service module is specifically configured to determine matching identification information from the identification information reported by the ASP module; When the matching identification information is determined, it is determined that the matching identification information is received by The service discovered by the network is the same service provided by the same service provider; the service module is further configured to: after determining that the service discovered by the network that receives the matching identification information is the same service provided by the same service
  • the service module is configured to carry service data carried by the first ASP session on a second ASP session.
  • the second ASP session is established based on the second network, and the second network is the same from the discovery of the same service provider A network other than the first network determined in the network of services.
  • the ASP module is further configured to: when receiving the first service discovery response through the at least two networks, according to the first The first service discovery result determined by the service discovery response is reported to the service module; wherein the first service discovery result includes network information of each network capable of discovering the same service, and correspondingly capable of discovering the same service by Information of the service provider of each network discovery, and corresponding identification information received by each network capable of discovering the same service; or, the first service discovery result includes discovery by each network capable of discovering the same service Information of the service provider, and corresponding to the identification information received by each network that can discover the same service; the service module is specifically configured to determine matching identification information from the identification information reported by the ASP module; When the matching identification information is determined, it is determined that the matching identification information is received by The service discovered by the network is the same service provided by the same service provider; the service module is further configured to: after determining that the service discovered by the network that receives the matching identification information is the same service provided by the same service provider
  • the service module is configured to stop using the first port to perform service data interaction with the service provider, where the first port is used by the service session carried by the first ASP session, and the first An available port of the network address corresponding to the network; and the service data after the service data of the last interaction between the first port and the service provider is used to interact with the service provider through the second port, where The second port is an available port of the network address corresponding to the second network used by the service session carried by the second ASP session.
  • the identification information is generated by the identified service provider based on the MAC address of the service provider.
  • the ASP module Specifically, when the network capable of discovering the same service includes a P2P network, establishing a P2P connection between the service requesting end and the service providing end; and establishing an ASP session based on the established P2P connection.
  • the different networks are at least two different networks of the following different types of networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, an NFC network, an LTE network, and a Powerline network.
  • a service providing device including:
  • an identifier information providing module configured to provide, to the service requesting end, identification information, where the service requesting end provides, for each of the at least two networks through which the service discovery is performed by the service providing device Used to identify the service provider;
  • a service data transmission module configured to perform service data transmission on the same service by using the at least two networks.
  • the identifier information providing module is specifically configured to receive, by the network, each of the at least two networks that the service requesting end performs service discovery includes providing the service a service discovery request for service discovery by the same service provided by the device; and when the service providing device determines that it can provide the service identified by the service identifier according to the service identifier carried in the service discovery request, requesting the service The terminal sends a service discovery response, where the service discovery response carries the identification information.
  • a fifth aspect provides a service discovery system, comprising: one of the service request devices according to any one of the third aspect or the third aspect, and the fourth aspect or the fourth aspect One of the service providing devices described in the possible implementation manner.
  • a second service request device including:
  • a transceiver configured to perform service discovery based on different networks for the same service; and each of the different networks capable of discovering the same service, corresponding to receiving identifier information provided by a service provider that provides the same service, The identification information is used to identify a service provider;
  • a processor configured to: when the identifier information obtained by the transceiver through the at least two networks matches, determine that the service discovered by the service discovery based on the at least two networks is the same service provided by the same service provider; and in the same In the same access service, the service data transmission is performed through the at least two networks.
  • the processor is further configured to send a first service discovery indication to the transceiver before the transceiver performs service discovery; the transceiver, Specifically, the first service discovery request that includes the same service is sent by using a preset network, according to the first service discovery indication sent by the processor, where the first service discovery request carries the same service a service identifier, the preset network includes a network in the different network, and a network that can discover the same service in the preset network respectively corresponds to a first service discovery response sent by the receiving service provider; The first service discovery response carries identification information.
  • the transceiver is further configured to: when receiving the first service discovery response by using the at least one network, according to the first service The first service discovery result determined by the response is reported to the processor; wherein the first service discovery result includes network information of each network capable of discovering the same service, and correspondingly, each capable of discovering the same service Information of a service provider of a network discovery; or, the first service discovery result includes each capable of discovering the same service Information of the service provider of the network discovery; the processor is further configured to instruct the transceiver to establish a first ASP session with the first service provider; and pass the first network session through the first network session The service data of the same service that is found; wherein the first service provider is determined by the processor from the reported first service discovery result; and the first service provider is discovered through the first network of.
  • the processor is specifically configured to determine, from the identifier information included in the reported first service discovery result, And determining, by the first network, the identification information that is matched by the identifier information; when determining the identifier information that matches the identifier information received by the first network, determining a service and a gateway found by the network that receives the matched identifier information
  • the service discovered by the first network is the same service provided by the same service provider; and the transceiver is instructed to establish a second ASP session with the second service provider; wherein the second service provider is the processor Determining from a service provider discovered by a network that receives the matching identification information; and the second service provider is found by using the second network; and carrying the service data carried by the first ASP session
  • the current service data transmission is continued on the second ASP session, where the first service discovery result further includes a network that can discover the same service. Received identification information.
  • the processor is further configured to send a first service discovery indication to the transceiver before the transceiver performs service discovery; the transceiver, Specifically, the first service discovery request that includes the same service is sent by using the at least one network according to the first service discovery indication sent by the processor, where the first service discovery request carries the same service a service identifier; and a first service discovery response sent by the network corresponding receiving service provider in the at least one network, wherein the first service discovery response carries the identification information;
  • the transceiver reports the first service discovery result determined by the first service discovery response to the processor, where the first service discovery result includes network information of a network capable of discovering the same service, and corresponding Information about the service provider of the network discovery of the same service; or The first service discovery result includes information of a service provider that can discover the network discovery of the same service; the processor is specifically configured to: after receiving the first service discovery result reported by the transceiver, indicating The transceiver establishes a
  • the processor is specifically configured to use the identifier information included in the second service discovery result reported from the transceiver Determining the identification information that matches the identification information received by the first network; and determining the identification information that matches the identification information received by the first network, determining the network discovered by the network that received the matching identification information Serving the same service provided by the same service provider as the service discovered by the first network; and instructing the transceiver to establish a second ASP session with the second service provider; and carrying the first ASP session Business data carried in the office The current service data transmission is continued on the second ASP session, where the second service provider is determined by the processor from a service provider discovered by the network that receives the matching identification information, and the The second provider is discovered through the second network.
  • the transceiver is further configured to: when receiving the first service discovery response by using the at least two networks, The first service discovery result determined by the service discovery response is reported to the processor; wherein the first service discovery result includes network information of each network capable of discovering the same service, and correspondingly capable of discovering the same service by Information of the service provider of each network discovery, and corresponding identification information received by each network capable of discovering the same service; or, the first service discovery result includes discovery by each network capable of discovering the same service Information of the service provider, and corresponding identifier information received by each network capable of discovering the same service; the processor, specifically for determining matching identification information from the identifier information reported by the transceiver; When the matching identification information is determined, the network that receives the matching identification information is determined.
  • the discovered service is the same service provided by the same service provider; the processor is further configured to: after determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider
  • the transceiver establishes an ASP session with the same service provider that provides the same service; and determines the first one from each ASP session established by the transceiver based on a network that discovers the same service provided by the same service provider An ASP session, and carrying the service data of the same service provided by the same service provider by the first ASP session established based on the first network.
  • the processor is configured to carry the service data carried by the first ASP session on the second ASP session.
  • the second ASP session is established based on the second network, and the second network is determined from the network that discovers the same service provided by the same service provider A network outside the network.
  • the transceiver is further configured to: when the first service discovery response is received by the at least two networks, report the first service discovery result determined according to the first service discovery response to the processor; wherein the first service The result of the discovery includes network information of each network capable of discovering the same service, and information corresponding to the service provider discovered by each network capable of discovering the same service, and corresponding to each network capable of discovering the same service The received identification information; or the first service discovery result includes information of a service provider discovered by each network capable of discovering the same service, and corresponding identification information received by each network capable of discovering the same service
  • the processor is specifically configured to determine, from the identifier information reported by the transceiver, matching identifier information; when determining the matched identifier information, determining that the service discovered by the network that receives the matched identifier information is The same service provided by the same service provider; the processor is also used for Determining that the transceiver establishes an ASP session with the same service provider
  • the processor is configured to stop using the first port to perform service data interaction with the service provider, where the first port is used by the service session carried by the first ASP session, and the first An available port of the network address corresponding to the network; and the service data after the service data of the last interaction between the first port and the service provider is used to interact with the service provider through the second port, where The second port is an available port of the network address corresponding to the second network used by the service session carried by the second ASP session.
  • the identifier information is generated by the identified service provider based on the MAC address of the service provider.
  • the transceiver when the network capable of discovering the same service includes a P2P network, establishing a P2P connection between the service requesting end and the service providing end; and establishing an ASP session based on the established P2P connection.
  • the different networks are at least two different networks of the following different types of networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, an NFC network, an LTE network, and a Powerline network.
  • a service providing device provided by the second aspect includes:
  • a transceiver configured to provide, to the service requesting end, identification information for each of the at least two networks through which the service requesting end performs service discovery for the same service provided by the service providing device, where the identifier information is used for Identify the service provider;
  • a processor configured to perform service data transmission on the same service by using the at least two networks.
  • the transceiver is configured to receive, by the service requesting end, each of the at least two networks through which the service requesting is performed, including providing the service providing device a service discovery request for service discovery by the same service; and when the service providing device determines that it can provide the service identified by the service identifier according to the service identifier carried in the service discovery request, sending the service to the service requester A service discovery response; wherein the service discovery response carries identification information.
  • the eighth aspect provides a service discovery system, comprising: a service request device according to any of the possible implementation manners of the sixth aspect or the sixth aspect, and the seventh aspect or A service providing device according to any one of the possible implementation manners of the seventh aspect.
  • the service discovery method, the related device, and the system provided by the embodiment of the present invention include: the service requesting end performs service discovery based on different networks for the same service; and each network that can discover the same service in different networks, correspondingly receives Providing the identification information provided by the service provider of the same service, the identification information is used to identify the service provider; when the identification information obtained through the at least two networks matches, determining that the service discovered by the service discovery based on the at least two networks is the same The same service provided by the service provider; and in the same access to the same service, the service data transmission is performed through the at least two networks.
  • a service discovery method is provided by the embodiment of the present invention.
  • the service requesting end may perform service discovery through different networks for the same service, and determine the same service provided by the same service provider discovered by different networks.
  • After a network performs service data transmission when the first network cannot meet the current service data transmission requirement, since the service found through the first network is found by the other network except the first network, The same service provided is the current service, and the service requesting end can switch the first network to the other network, and continue the current service data transmission through the other network, and the prior art is based on the data transmission of the upper layer service.
  • the underlying connection is interrupted, and the upper layer service data transmission must also be interrupted. Compared with the underlying connection based on the upper layer service, the data transmission of the upper layer service is not strong, and the service data can be continuously transmitted without switching through the underlying network. Interruption increases the flexibility of service delivery.
  • services can be simultaneously transmitted through multiple networks, and services can be switched between multiple network connections.
  • FIG. 1 is a flowchart of service discovery by Node A and Node B through P2P at a Wi-Fi level according to the background art of the present invention
  • FIG. 2 is a WFDS provided by the background of the present invention to establish an ASP session on a P2P connection.
  • FIG. 3 is a flowchart of a service discovery method applied to a service request end according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a service discovery method applied to a service provider according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a service discovery method according to Embodiment 1 of the present invention, which is applied to a service request end;
  • FIG. 6 is a flowchart of a service discovery method according to Embodiment 1 of the present invention, which is applied to a service request end;
  • FIG. 7 is a second flowchart of a service discovery method according to Embodiment 1 of the present invention.
  • FIG. 8 is a flowchart of a service discovery method according to Embodiment 2 of the present invention, which is applied to a service request end;
  • FIG. 9 is a flowchart of a service discovery method according to Embodiment 2 of the present invention, applied to a service request end;
  • FIG. 10 is a flowchart of a service discovery method according to Embodiment 3 of the present invention, which is applied to a service provider;
  • FIG. 11 is a flowchart of a service discovery method according to Embodiment 3 of the present invention, which is applied to a service provider;
  • FIG. 12 is a flowchart of a service discovery method according to Embodiment 4 of the present invention, which is applied to a service provider;
  • FIG. 13 is a schematic structural diagram of a service request device according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a service providing device according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of a second service request device according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram of a second service providing device according to an embodiment of the present invention.
  • the embodiments of the present invention provide a service discovery method, a related device, and a system.
  • the preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention. It is not intended to limit the invention. And in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
  • the embodiment of the present invention provides a service discovery method, which is applied to a service requesting end, as shown in FIG. 3, and includes:
  • the service requesting end performs service discovery based on different networks for the same service.
  • Each network that can discover the same service in the different network that is used by the S301 is configured to receive the identifier information of the service provider that provides the foregoing service, where the identifier information is used to identify the service provider.
  • the embodiment of the present invention further provides a service discovery method, which is applied to a service providing end, as shown in FIG. 4, and includes:
  • the service provider provides, to the service requesting end, identification information, where the service requesting end provides the service requesting end, to the service requesting end, where the service requesting end provides the identification information to the service requesting end.
  • the service provider provides, to the service requesting end, identification information, where the service requesting end provides the service requesting end, to the service requesting end, where the service requesting end provides the identification information to the service requesting end.
  • S402. Perform service data transmission on the same service by using at least two networks in S401.
  • different networks may be any of the following different types of networks: at least two different networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, and a near network.
  • NFC Near Field Communciation
  • LTE Long Term Evolution
  • the infrastructure network can be an AP-based network
  • P2P The network, that is, the end-to-end network, may be a network established based on the Wi-Fi Direct standard, or may be a network recommended by the WFA-based Neighbor Awareness Networking (NAN) standard, or other end-to-end network.
  • NAN Neighbor Awareness Networking
  • the service requesting end may perform service discovery on the same service based on the at least two underlying networks, and respectively receive the obtained identification information for each network that can discover the same service, and determine the discovered service according to the received identification information. Provide the same service for the same service provider over different networks.
  • different upper-layer applications may perform service data transmission based on different networks.
  • the same service provider may be provided by the same service provider.
  • the other networks of the service replace the current network and continue the data transmission of the current service.
  • the upper layer application service data transmission is not dependent on the underlying network. The switching of the underlying network makes the service data transmission not change due to the quality of a certain network connection. Interruption due to poor or interrupt, improving the flexibility of business data transmission.
  • the ASP is used as an example to provide a service discovery method, which is applied to the service requesting end.
  • the first ASP session may be first established based on the first network, and the first ASP session is established. Carrying service data transmission, when the first network cannot meet the service requirement, establishing an ASP session based on the second network that is the same service provided by the first service provider as the service found by the first network, and continuing the current service data through the second ASP session Transmission.
  • a service discovery method provided in Embodiment 1 is applied to a service requesting end, as shown in FIG. 5, and specifically includes the following steps:
  • the service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • the ASP module sends, according to the first service discovery indication received in S501, a first service discovery request that includes the same service by using a preset network.
  • the first service discovery request carries the service identifier of the same service, and the preset network includes the network in different networks.
  • the service requesting end may be connected to multiple different types of networks at the same time (for example: wired network, infrastructure network with AP, P2P network, Bluetooth network, NFC network, LTE network, and Powerline network, etc.)
  • the service that is required to be discovered according to the first service discovery indication may perform service discovery for the same service by using a preset network, where The preset network may be pre-configured.
  • the preset network may be any different network connected to the service requesting end, or may be a part of the network to which the pre-set service requesting end is connected (some networks may be one or more networks) Wait.
  • the service discovery request for the same service may be sent through the preset network, and the same service identifier is carried in each service discovery request to ensure that the service discovered through the preset network is the same service, where the service identifier Can be a service name (ServiceName), or a service hash (ServiceHash) or other identifier that can identify the same service.
  • the service hash value may be a hash value obtained after the service name is hashed.
  • the hash operation may be a commonly used hash function such as Message Digest Algorithm 5 (MD5, Message-Digest Algorithm 5), Security Abstract Algorithm 256 (SHA256), Security Summary Algorithm 512 (SHA512, Secure Hash Algorithm), etc. The result obtained after the operation, or the result obtained after the calculation is performed.
  • the ASP module may determine the network to which the service requester is connected by using a preset discovery rule. For example, the ASP module can periodically query the network to which the service requester is connected, or can query the network to which the service requester is connected when determining that the network on which the current ASP session is based cannot meet the transmission requirement, or the service module periodically sends the network to the ASP module.
  • the query indicates that the ASP module queries the network connected to the service requester according to the received query indication, or the ASP module queries the network connected to the service requester when receiving the first service discovery indication sent by the service module.
  • the first service discovery request may include a service for multiple services. It is found that, then, the first service discovery request sent through the preset network includes service discovery for the same service.
  • the preset network is the two different networks; when the service requesting end device is connected to only one network, the preset network is the one network.
  • the first service discovery request represents a request for service discovery through the network, and any message that can be used for service discovery through the network can be used as the first service discovery request in the embodiment of the present invention.
  • the ASP module correspondingly receives the first service discovery response sent by the service provider by using a network that can discover the same service in the preset network.
  • the first service discovery response carries the identifier information.
  • the ASP module receives the first service discovery response sent by the service provider that provides the same service discovered by the network through the network.
  • the identifier information may identify the service provider that sends the first service discovery response, for example, the device information of the service provider that can send the first service discovery response (eg, device name, device type, device sequence)
  • the device information of the service provider that can send the first service discovery response eg, device name, device type, device sequence
  • the service provider may generate the identification information by using a preset algorithm based on a Media Access Control (MAC) address of the service provider.
  • MAC Media Access Control
  • the identifier information may be directly a MAC address, or a value processed by the MAC address, or a MAC address plus a service identifier, or a value processed by the MAC address plus the service identifier.
  • the ASP module sends the first service discovery request through a network.
  • the network waits to receive a response from the service provider; if the service provider provides the service discovered by the service discovery request through the network, the ASP module can receive the first service discovery response through the network, and the first service discovery response.
  • the service discovery end that receives the first service discovery request sent by the network replies to the service requesting end, and the first service discovery response carries the identification information.
  • the identification information may represent the identification information of the service provider, and may also identify the identification information of the service provider and the service information of the requested service.
  • a central device in the network such as an AP, which previously receives service information and service provider information registered by other service providers, and helps these service providers respond to service discovery requests; when the AP The AP responds to the foregoing service discovery request and sends a service discovery response, and the service discovery response includes information of the service provider that can provide the service, when the information about the service provider that can provide the service included in the service discovery request is included.
  • the AP does not include other information that can provide the service provider of the service included in the service discovery request
  • the AP also sends a service discovery response, but the response does not include the information of the service provider.
  • the identification information represents the identification information of the service provider
  • since the first service discovery request carries the service identifier that represents the same service after the first service discovery request is sent for the same service through different networks, when there are at least two networks
  • the received identification information carried by the first service discovery response for the same service matches, the service that is found by the at least two networks is determined to be the same service provided by the same service provider; and the identifier information represents the identifier of the service provider.
  • the identification information not only represents the service provider providing the service but also represents the provided service, then after the first service discovery request is sent for the specific service through different networks, when there are at least two The network, when the received identification information carried by the first service discovery response for the specific service matches, may determine that the service discovered by the at least two networks is the same service provided by the same service provider.
  • the first service discovery request may be a Probe Request, a Service Discovery Request, or a Probe Request and Service Discovery Request, that is, for each network in the preset network, when the first service discovery request is a Probe Request, the same service identifier (for example, service hash) may be carried in the Probe Request sent through the network.
  • the first service discovery response received by the network may correspond to a probe response (Probe Response) and carry the identifier information in the Probe Response; when the first service discovery request is a Service Discovery Request, the network response may be passed through the network.
  • the Service Discovery Request sent carries the same service identifier (for example, the service name), and the first service discovery response received through the network may correspond to the Service Discovery Response and carry the identifier information in the Service Discovery Response;
  • the discovery request is a Probe Request and a Service Discovery Request
  • Service Discovery Request carries the service identity (e.g.: service name), Service Discovery Response received through the network, and identification information may be carried in a Probe Response and / or Service Discovery Response, the specific implementation can be set according to actual situation.
  • the first service discovery response is used to respond to a request for service discovery through the network (referred to as a first service discovery request in the embodiment of the present invention), where the request for service discovery through the network is performed.
  • the response can be used as the first service discovery response in the embodiment of the present invention.
  • steps S501 to S503 are processes for performing service discovery for the same service.
  • S504 The ASP module reports the first service discovery result determined according to the first service discovery response to the service module.
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to the service provider of the network discovery of each network capable of discovering the same service; or
  • the first service discovery result includes a service discovery for each network discovery that can discover the same service. Information on the provider side.
  • the first service discovery result may be determined according to the first service discovery response.
  • the first service discovery result may include network information of a network that discovers the same service, or may not include the network information.
  • the information of the service provider may be network address information of the service provider, and/or service description information of the service provided by the service provider, etc.; the network information may include property information, type information, etc. of the network describing the discovery service provider, such as a P2P network. , AP network, address information, and/or other information capable of describing the network.
  • the ASP module may report the first service discovery result for service discovery to the same service to the service module (when at least two are received)
  • the first service discovery result reporting service module for the same service discovery may be reported once, or separately reported multiple times), when the first service discovery result includes the network of each network that discovers the same service.
  • the network information corresponding to the network capable of discovering the same service and the communication provider information discovered by the same, and the identification information received through the network may be reported by the same message or different messages. There may also be multiple service providers that can provide the same service through one network.
  • the service module instructs the ASP module to establish a first ASP session with the first service provider.
  • the first service provider is determined by the service module from the reported first service discovery result; and the first service provider is discovered by using the first network.
  • the network is Determined as the first network, the first network One of the discovered service providers is determined to be the first service provider (here, the same service provider may be discovered through the first network, or one of the service providers of the same service discovered from the first network may be selected) And at least two networks that report the service discovery completed by the service of the same service correspond to the information of the discovered service provider, or the network information of at least two networks that complete the service discovery of the same service, and the service provider of the at least two networks corresponding to the discovered service provider.
  • the first network and the first service provider discovered through the first network are determined according to the preset determination rule, and the preset determination rule may be a sequence in which the network completes the service discovery, or may be the network information reported by the ASP module.
  • the upper layer service decides to select one according to the information, or the upper layer service selects one of the plurality of networks and the corresponding service provider according to the previously connected information, and may also be the upper layer.
  • the service judges the service based on other obtained information. Select the end.
  • the first ASP session is established, and the ASP module and the peer ASP module can negotiate service capability information, connection capability information, security information, and the like, and establish a first ASP session based on the negotiated information.
  • the first ASP session established by the service module through the S505 carries the service data of the same service discovered by the first network.
  • the process specifically includes: the service module establishes an upper layer service session based on the established first ASP session, where the upper layer service session is established by using the first network, and data of the upper layer service is transmitted through the first network.
  • the service module determines, from the identifier information included in the reported first service discovery result, identifier information that matches the identifier information received by the first network.
  • the first service discovery result may also include the identifier information carried in the first service discovery response received by the network that can discover the same service, so that the service module can determine whether the service discovered by the different network is based on the identifier information corresponding to the different network.
  • the matching may refer to the reported network that can discover the same service.
  • the identifier information received by the network is the same as the identifier information received by the first network, and may also be that the identifier information received by the reported network that can discover the same service and the identifier information received by the first network satisfy a certain operational relationship, such as two
  • the result of modulo operation on a certain value is the same, or other calculations are performed by the identification information, such as a hash operation, a truncation operation, a shift operation, etc., and the results of the operations are compared.
  • the service module may determine the identifier information that matches the identifier information received by the first network, and may determine the service discovered by the network that receives the matching identifier information and the service found through the first network. The same service provided for the same service provider.
  • the step can be triggered according to the current service transmission requirement, and the current service transmission requirement can be set according to the actual situation. For example, when the first network signal is weak and cannot meet the current service transmission requirement, the step can be triggered. If the service data that needs to be transmitted is insufficient to increase the bandwidth of the first network, and the current service transmission requirement cannot be met, the execution of the step may be triggered; or other service transmission requirements.
  • the identification information of the service provider may be device information (for example: device name, device type, serial number of the device, etc.), or a unique network address, or service identification information related to the device, or the above A variety of combinations, or other information used to describe the service provider.
  • the service module instructs the ASP module to establish a second ASP session with the second service provider.
  • the second service provider is determined by the service module from the service provider discovered by the network that receives the matching identification information; and the second service provider is discovered through the second network.
  • the second service provider is the same service provider as the service provider found by the first network.
  • the upper layer service decides to select one according to the information, or the upper layer service selects from multiple networks and corresponding service providers according to the previously connected information.
  • the upper service determines the choice of the service provider based on other acquired information.
  • the preset determination rule used when determining the first network may be the same as or different from the preset determination rule used when determining the second network.
  • the service discovered through the second network and the service discovered through the second network may be determined.
  • the second service provider is the same service provider as the first service provider in S505.
  • the service data carried by the first ASP session is carried on the second ASP session established in S509, and the current service data transmission is continued.
  • the step specifically includes: the service module establishes an upper layer service session based on the established second ASP session, and transfers the service session on the previous first ASP session to the second ASP service session to continue transmission, that is, the first ASP session.
  • the data transfer on the business session is transferred to the business session on the second ASP session to continue the transfer.
  • this step can be specifically implemented as:
  • Step 1 The service module of the service requesting end stops using the first port to perform service data interaction with the service provider, where the first port is an available port of the network address corresponding to the first network used by the service session carried by the first ASP session; and
  • Step 2 The service data after the service data of the last interaction with the service provider is used to interact with the service provider through the second port, where the second port is used by the service session carried by the second ASP session.
  • different networks may correspond to different network addresses, for example.
  • the P2P network and the infrastructure network respectively have different MAC addresses, and when the upper layer application uses different networks, it also corresponds to different network protocol (IP) addresses, and then the established business session carried by the first ASP session is used.
  • IP network protocol
  • the first port is an available port of the network address corresponding to the first network based on the first ASP session
  • the second port used by the established second ASP session is the second network based on the second ASP session.
  • the available port for the corresponding network address is an available port of the network address corresponding to the first network based on the first ASP session.
  • the second port may be used instead of the first port.
  • Business data transmission although the underlying network is replaced, the upper layer service is not interrupted, but the business data transmission continues, which improves the flexibility of business data transmission.
  • Embodiment 1 The following describes a service discovery method provided in Embodiment 1 by using a specific application scenario:
  • Example 1 Taking the Wi-fi network connected to the service requester (terminal) as an example, suppose the service requester is connected to the P2P network and the infrastructure network (AP-based network), and the service requester needs to pass its own screen content through the service provider.
  • the (television) screen is displayed.
  • the service discovery method is as shown in FIG. 6, and specifically includes the following steps:
  • the service module in the first service provider sends a release service indication to the ASP module in the first service provider, so that when the service requester sends the service discovery request, the service provider can process the service discovery request.
  • ServiceName can be the service name of the service provided by the service provider, for example, the display display service is found.
  • the name may further carry the identification information, that is, the identification information indicating the television device.
  • the service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • the service module in the terminal sends a first service discovery SeekService (service name ServiceName) indication to the ASP module in the terminal, and the ServiceName may be the name of the Display service.
  • service name ServiceName service name
  • the ServiceName may be the name of the Display service.
  • the ASP module in the service requesting end sends the first service discovery request through the P2P network and the infrastructure network according to the first service discovery indication received in S602, and carries the service identifier in the first service discovery request.
  • the ASP module in the terminal separately sends a first service discovery request for discovering the Display service through the P2P network and the infrastructure network, and carries the name of the Display service to the first service discovery request.
  • the P2P network and the infrastructure network may broadcast the first service discovery request, so that the service provider capable of providing the service responds to the first service discovery request.
  • the ASP module of the service provider confirms the service requested in the first service discovery request, and determines that the service can be provided.
  • the first service discovery response is sent to the service requesting end correspondingly through the P2P network and the infrastructure network respectively.
  • the first service discovery response may carry the identifier information, and further, the service name may also be carried.
  • the premise that service discovery can be successful through the infrastructure network is that both the service provider and the service requester establish a connection with the same AP, or connect to different APs but can communicate with the two different APs.
  • steps S603 and S604 may adopt different implementation manners for the P2P network and the infrastructure network:
  • the specific implementation can be:
  • Step 1 The ASP module of the service requesting end sends a Probe Request message carrying the service hash value ServiceHash through the P2P network.
  • Step 2 The service provider receives the Probe Request message through the P2P network, and passes the service.
  • the ASP module of the service provider confirms the ServiceHash carried in the Probe Request message, and sends a Probe Response message to the service requester through the P2P network when it is determined that the service can be provided by the ServiceHash.
  • the Probe Response message can carry the ServiceName corresponding to the ServiceHash.
  • Step 3 After receiving the Probe Response message on the P2P network, the service requesting end sends a Service Discovery Request carrying the ServiceName to the service provider through the P2P network.
  • Step 4 After receiving the Service Discovery Request through the P2P network, the service provider matches the ServiceName carried in the Service Discovery Request through the ASP module of the service provider. When it is determined that the service named ServiceName can be provided, the service requester is sent through the P2P network. Send a Service Discovery Response message carrying a ServiceName.
  • the identifier information of the service provider may be carried by the Probe Response message and/or the Service Discovery Response message, and the network information of the service provider may also be included (the network information of the service provider may be the network address information) Or other information that can describe the network), and may also include service description information of the service provider.
  • the specific implementation of the infrastructure network can be:
  • Step 1 The service requesting end sends a service discovery request Service Discovery Request carrying the ServiceName through the infrastructure network.
  • Step 2 After receiving the Service Discovery Request through the infrastructure network, the service provider matches the ServiceName carried in the Service Discovery Request through the ASP module of the service provider. When determining the service that can represent the ServiceName, the service is provided to the service through the infrastructure network. The requesting end sends a Service Discovery Response message carrying the ServiceName.
  • the service information of the service provider may be included in the Service Discovery Response message, and may further include network information that identifies the service provider.
  • the network information of the service provider may be network address information or other information that can describe the network. ), may also include service description information of the service provider.
  • infrastructure network may also be specifically implemented as the implementation manner of the foregoing P2P network, and details are not described herein again.
  • the ASP module of the service requesting end reports the service discovery module of the service requesting end according to the first service discovery result determined by the first service discovery response received by the P2P network and the infrastructure network.
  • the ASP module can report the network address information corresponding to the P2P network to the service module (or does not include this information), the information of the service provider discovered through the P2P network, and the ServiceID received through the P2P network, and report to the P2P network.
  • the network address information of the infrastructure network discovered by the same service (or does not include this information), the information of the service provider discovered through the infrastructure network, and the ServiceID received through the infrastructure network.
  • the ASP module performs the service discovery result reporting for each network, the network information of the service discovery network and the information of the service provider and the service ID of the received service provider can be reported to the service module through the same message.
  • the network information and the service information of the service provider and the received service ID are reported to the service module by different messages. The order in which the different messages are sent is not limited.
  • the service module of the service requesting end instructs the ASP module of the service requesting end to establish a first ASP session with the first service providing end.
  • the service module determines the first service provider from a service provider discovered through the P2P network and a service provider discovered through the infrastructure network.
  • the first network determined by the service module is a P2P network
  • the service provider discovered by the P2P network is the first service provider, and then steps S607 to S612 are performed; and the first network determined by the service module is an infrastructure network.
  • services discovered through the infrastructure network The provider is the first service provider, and as shown in FIG. 7, steps S6071 to S6111 are subsequently performed.
  • establishing an ASP session based on the P2P network may be performed as: establishing between the service requesting end and the service providing end. P2P connection; establish an ASP session based on the established P2P connection.
  • the ASP module of the service requesting end establishes a first ASP session with the first service provider.
  • the service module of the service requesting end performs service data transmission by using the first ASP session established in S608.
  • the step execution process specifically includes: the service module establishes an upper layer service session based on the established first ASP session, where the upper layer service session is established by using the first network, and data of the upper layer service is transmitted through the first network.
  • the service module of the terminal establishes a display service session of the upper layer based on the first ASP session established by the P2P network based on the first ASP session established by the P2P network, and performs the service data transmission of the Display service through the television.
  • the displayed content is displayed.
  • the service module of the service requesting end determines, according to the current transmission requirement, the identifier information of the service provider received by the infrastructure network for performing service discovery on the same service, and whether the identifier information of the service provider received by the service discovery through the P2P network matches, If they match, it is determined that the service discovered through the infrastructure network and the service discovered through the P2P network are the same service provided by the same service provider.
  • the distance between the service requesting end and the service providing end is gradually increased, and the P2P network signal quality is weakened, and the service requesting end is triggered to use the infrastructure network to replace the P2P network to continue the current service.
  • the service module instructs the ASP module to establish a second ASP session with the second service provider, where the service module of the service requester determines the service provider that is discovered through the infrastructure network to be the second service provider discovered through the second network.
  • step S608 is similar to the step of establishing the second ASP session in this step, the difference being that when the second ASP session is established based on the infrastructure network, the service requester and the service are Requests and responses that provide interaction between the endpoints need to be forwarded through the AP.
  • the ASP module establishes a second ASP session with the second service provider.
  • the service data carried by the first ASP established by the P2P network is carried on the second ASP session, and the current service data transmission is continued. This process ends.
  • the step specifically includes: the service module establishes an upper layer service session based on the established second ASP session, and transfers the service session on the previous first ASP session to the second ASP service session to continue transmission, that is, the first ASP session.
  • the data transfer on the business session is transferred to the business session on the second ASP session to continue the transfer.
  • the terminal is using the Display service provided by the TV through the P2P network, but since the distance between the terminal and the TV becomes larger, the service module in the terminal determines that the signal of the P2P network is weakened, and the Display service found through the infrastructure network is the same TV.
  • the same Display service provided by the machine does not need to interrupt the video number transmission between the terminal and the TV. Instead, it establishes an ASP session based on the infrastructure network and switches the P2P network based on the video data transmitted between the terminal and the TV. Into the infrastructure network, continue the video data transmission between the terminal and the TV.
  • step S606 proceeds to step S606:
  • the ASP module of the service requesting end establishes a first ASP session with the first service provider.
  • S6081 The service module of the service requesting end performs service data transmission by using the first ASP session established in S6071.
  • the step specifically includes: the service module establishes an upper layer service session based on the established first ASP session, and the upper layer service session is established by using the first network, and data of the upper layer service is transmitted through the first network.
  • the service module of the service requesting end determines, according to the current transmission requirement, identification information of the service provider end received by the P2P network for performing service discovery on the same service, and Whether the identification information of the service provider received by the service network for service discovery matches, and if so, determines that the service discovered through the P2P network and the service discovered through the infrastructure network are the same service provided by the same service provider.
  • the service module of the service requesting end instructs the ASP module to establish a second ASP session with the second service provider, wherein the service module of the service requesting end determines the service providing end of the P2P network discovery as the second service providing end of the second network discovery.
  • S6121 The ASP module of the service requesting end establishes a second ASP session with the second service provider.
  • S6131 The service data carried by the first ASP established based on the infrastructure network is carried on the second ASP session, and the current service data transmission is continued. This process ends.
  • the step specifically includes: the service module establishes an upper layer service session based on the established second ASP session, and transfers the service session on the previous first ASP session to the second ASP service session to continue transmission, that is, the first ASP session.
  • the data transfer on the business session is transferred to the business session on the second ASP session to continue the transfer.
  • the ASP is used as an example to provide a service discovery method, which is applied to the service request side.
  • the first ASP session may be first established based on the first network, and the first ASP is adopted.
  • the session carries the service data transmission.
  • the service discovery is performed again, and the ASP is established based on the second network in the second service discovery and the same service provided by the first service provider. Conversation and continue the transfer of current business data through the second ASP session.
  • a service discovery method provided in Embodiment 2 is applied to a service requesting end, as shown in FIG. 8, which specifically includes the following steps:
  • the service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • the ASP module passes at least one according to the first service discovery indication received in S801.
  • the network sends a first service discovery request containing the same service
  • the first service discovery request carries the service identifier of the same service.
  • the first service discovery request including the same service may be sent through one network or multiple different networks.
  • the S803 and the ASP module respectively correspond to the first service discovery response sent by the receiving service provider by the network that can find the same service in the at least one network.
  • the first service discovery response carries the identifier information.
  • the identifier information may identify the service provider that sends the first service discovery response, for example, the device information of the service provider that can send the first service discovery response (eg, device name, device type, device sequence)
  • the device information of the service provider that can send the first service discovery response eg, device name, device type, device sequence
  • a first service discovery request including the same service is sent through a network, and when the same service can be found through the one network, the first service discovery response sent by the one network is received.
  • steps S801 to S803 are processes for performing the first service discovery for the same service.
  • the ASP module reports the first service discovery result determined according to the first service discovery response to the service module.
  • the first service discovery result includes network information of a network capable of discovering the same service, and information corresponding to a service provider discovered by the network capable of discovering the same service; or
  • the first service discovery result includes information of a service provider that can discover the network discovery of the same service described above.
  • the ASP module reports the first service discovery result of the first service discovery to the service module.
  • the first service discovery result may be determined according to the first service discovery response.
  • the first service discovery result may include network information of a network that discovers the same service, or may not include the network information.
  • the information of the service provider may be network address information of the service provider, and/or service description information of the service provided by the service provider, etc.; the network information may include property information, type information, etc. of the network describing the discovery service provider, such as a P2P network. , AP network, address information, and/or other information capable of describing the network.
  • the service module instructs the ASP module to establish a first ASP session with the first service provider.
  • the first service provider is determined by the service module from the reported first service discovery result; and the first service provider is discovered by using the first network.
  • the first ASP session established by the service module through the S805 carries the service data of the same service discovered by the first network.
  • the step specifically includes: the service module establishes an upper layer service session based on the established first ASP session, and the upper layer service session is established by using the first network, and data of the upper layer service is transmitted through the first network.
  • the service module sends a second service discovery indication to the ASP module.
  • the execution may be triggered according to the current service transmission requirement, and the current service transmission requirement may be set according to the actual situation. For example, when the first network signal is weak and cannot meet the current service transmission requirement, the step may be triggered. If the service data that needs to be transmitted is increased, the first network bandwidth is insufficient, and the current service transmission requirement cannot be met.
  • the ASP module reports the first service discovery result of the service discovery for the first time to the service module in step S804, and the first service discovery result includes the service discovered by the network capable of discovering the same service.
  • the service module can extract the service discovered by the first network from the first service discovery
  • the second network is determined in the network for the same service provided by the same service provider, but since the time of using the first ASP session is long, the result of the first service discovery may be reduced in current accuracy, therefore, the implementation In the example, the service module needs to initiate a second service discovery, and the second network is determined from the network of the second service discovery and the same service provided by the first network provider.
  • the ASP module sends a second service discovery request including the same service by using at least one network according to the second service discovery indication in S807.
  • the second service discovery request carries the service identifier of the same service, and the preset network includes the network in different networks.
  • At least one network that passes the first service discovery in the embodiment, and at least one network that passes the second service discovery may be at least one of the following different types of networks: a wired network, an infrastructure. Network, P2P network, Bluetooth network, NFC network, LTE network, and Powerline network. Moreover, the at least one network that passes the first service discovery may be the same as or different from the at least one network that performs the second service discovery.
  • the second service discovery request represents a request for service discovery through the network, and any message that can be used for service discovery through the network can be used as the second service discovery request in the embodiment of the present invention.
  • the ASP module receives the second service discovery response sent by the service provider by using the network that can find the same service in the at least one network.
  • the second service discovery response carries the identifier information.
  • the ASP module receives the second service discovery response sent by the service provider that provides the same service discovered by the network through the network.
  • the identifier information may identify the service provider that sends the second service discovery response, for example, the device information of the service provider that may send the second service discovery response. (eg, device name, device type, serial number of the device, etc.) as the identification information of the service provider, or the unique address of the device at the service provider, or the service identification information related to the device, or a combination of the above (For example, the device address of the service provider plus the service information), or other information that can identify the service provider as the service provider.
  • the device information of the service provider may send the second service discovery response.
  • the second service discovery request may be a Probe Request, or a Service Discovery Request, or a Probe Request and a Service Discovery Request, that is, for each network in the preset network.
  • the same service identifier for example, a service hash value
  • the second service discovery response received through the network may correspond to the probe.
  • Response Probe Response
  • the same service identifier for example, the service name
  • the Service Discovery Request the same service identifier (for example, the service name) may be carried in the Service Discovery Request sent through the network.
  • the second service discovery response received by the network may correspond to a Service Discovery Response and carry the identifier information in the Service Discovery Response.
  • the Probe Requ may be sent first. Est, and carry the service identifier (for example, the service hash value) in the Probe Request, and receive the corresponding Probe Response through the network, and then send the Service Discovery Request, and carry the service identifier (for example, the service name) in the Service Discovery Request.
  • the service discovery response is received by the network, and the identifier information may be carried in the Probe Response and/or the Service Discovery Response, and the specific implementation may be set according to actual conditions.
  • the second service discovery response is used to respond to a request for service discovery through the network (referred to as a second service discovery request in the embodiment of the present invention), where the request for service discovery through the network is performed.
  • the response can be used as the second service discovery response in the embodiment of the present invention.
  • steps S807 to S809 are processes for performing a second service discovery for the same service.
  • the ASP module reports the second service discovery result determined according to the second service discovery response to the service module.
  • the second service discovery result includes network information of each network capable of discovering the same service determined according to the received second service discovery response, and information corresponding to the service provider discovered by each network capable of discovering the same service, and corresponding Identification information received by each network capable of discovering the same service; or,
  • the second service discovery result includes information determined by the service provider that can discover each network of the same service determined according to the received second service discovery response, and corresponding identification information received through each network capable of discovering the same service.
  • the second service discovery result may be determined according to the second service discovery response.
  • the second service discovery result may include network information of a network that discovers the same service, or may not include the network information.
  • the information of the service provider may be network address information of the service provider, and/or service description information of the service provided by the service provider, etc.; the network information may include property information, type information, etc. of the network describing the discovery service provider, such as a P2P network. , AP network, address information, and/or other information capable of describing the network.
  • the ASP module may report the second service discovery result for service discovery to the same service to the service module.
  • the network information corresponding to the network capable of discovering the same service and the communication provider information discovered by the same, and the identification information received through the network may be reported by the same message or different messages. There may also be multiple service providers that can provide the same service through one network.
  • the service module determines, from the identifier information included in the reported second service discovery result, identifier information that matches the identifier information received by the first network.
  • the second service provider is determined by the service module from the service provider discovered by the network that receives the matching identification information, and the second provider is discovered through the second network.
  • the network when only one network in the second service discovery result receives the matching identification information, the network is determined to be the second network, and at least two are present in the second service discovery result.
  • the second network is determined according to the preset determination rule, where the preset determination rule may be the signal quality of the network, or the sequence in which the network completes the service discovery, and the upper layer service determines the information according to the information. One of them is selected, or the upper layer service selects one of the plurality of networks and the corresponding service provider according to the previously connected information, and the upper layer service may determine the selection of the service provider according to other acquired information.
  • the preset determination rule used when determining the first network may be the same as or different from the preset determination rule used when determining the second network.
  • first service provider determined in step S805 and the second service provider determined in this step are the same service provider that provides the same service.
  • the step specifically includes: the service module establishes an upper layer service session based on the established second ASP session, and transfers the service session on the previous first ASP session to the second ASP service session to continue transmission, that is, the first ASP session.
  • the data transfer on the business session is transferred to the business session on the second ASP session to continue the transfer.
  • Example 2 Taking the Wi-fi network connected to the service requester (terminal) as an example, assuming that the service requester is connected to the P2P network and the infrastructure network, the service requester needs to pass its own screen content through the service provider (television) screen. In the example 2, it is assumed that the first service discovery is performed through the P2P network, and the second service discovery is performed through the infrastructure network. Specifically, the service discovery method is as shown in FIG.
  • S901 The service module in the service provider sends a release service indication to the ASP module in the service provider, so that when the service requester sends the service discovery request, the service provider can process the service discovery request.
  • the service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • the ASP module in the service requesting end sends the first service discovery request through the P2P network according to the first service discovery indication received in S902, and carries the service identifier in the first service discovery request.
  • the ASP module in the service requesting end may also send the first service discovery request through the P2P network and the infrastructure network according to the first service discovery indication received in S902, and carry the service identifier in the first service discovery request. .
  • the P2P network in the service provider After receiving the first service discovery request, the P2P network in the service provider confirms the service requested in the first service discovery request by the ASP module of the service provider, and passes the P2P after determining that the requested service can be provided. The network sends a first service discovery response corresponding to the service requesting end.
  • the first service discovery response may carry the identifier information, and further, the service name may also be carried.
  • S905 The ASP module of the service requesting end reports the first service discovery result of the service discovery through the P2P network to the service module of the service requesting end.
  • the ASP module can report the network address letter corresponding to the P2P network to the service module.
  • Information (or not including this information), information of the service provider discovered through the P2P network, and ServiceID received through the P2P network.
  • the service module of the service requesting end indicates that the ASP module of the service requesting end establishes a first ASP session with the first service providing end.
  • the service module determines the service provider that is discovered through the P2P network as the first service provider.
  • the step may be performed as: the service module is from the service provider discovered through the P2P network and the service provider discovered through the infrastructure network. Determine the first service provider.
  • a P2P connection is established between the service requesting end and the first service providing end.
  • the ASP module of the service requesting end establishes a first ASP session with the first service provider.
  • the service module of the service requesting end performs service data transmission by using the first ASP session established in S908.
  • the step execution process specifically includes: the service module establishes an upper layer service session based on the established first ASP session, where the upper layer service session is established by using the first network, and data of the upper layer service is transmitted through the first network.
  • the service module of the service requesting end sends a second service discovery indication to the ASP module of the service requesting end according to the current transmission requirement.
  • the second service discovery indication indicates that the discovered service is the same service as the service indicated by the first service discovery indication.
  • the distance between the service requesting end and the service providing end is gradually increased, and the P2P network signal quality is weakened, and the service requesting end is triggered to use the infrastructure network to replace the P2P network to continue the current service.
  • the ASP module in the service requesting end sends the second service discovery request through the infrastructure network according to the second service discovery indication received in S910, and carries the service identifier in the second service discovery request.
  • the infrastructure network may broadcast a second service discovery request, so that the service provider capable of providing the service responds to the second service discovery request.
  • the infrastructure network in the service provider After receiving the second service discovery request, the infrastructure network in the service provider confirms the service requested in the second service discovery request by the ASP module of the service provider, and after determining that the requested service can be provided, The infrastructure network sends a second service discovery response to the service requester.
  • the second service discovery response may carry the identifier information, and further, the service name may also be carried.
  • S913 The ASP module of the service requesting end reports the second service discovery result of the service discovery through the infrastructure network to the service module of the service requesting end.
  • the ASP module may report the network address information of the infrastructure network (or not including this information) to the service module, the information of the service provider discovered through the infrastructure network, and the ServiceID received through the infrastructure network.
  • the service module determines that the second service discovery identifier information received by the infrastructure network matches the identifier information received by the P2P network in the first service discovery.
  • S915. Determine that the service discovered by the second service discovery through the infrastructure network is the same service provided by the same service provider as the service discovered by the P2P network in the first service discovery.
  • the service module of the service requesting end indicates that the ASP module of the service requesting end establishes a second ASP session with the second service providing end.
  • the service module determines, by the second service discovery, the service provider discovered through the infrastructure network as the second service provider discovered through the second network.
  • S917 The ASP module of the service requesting end establishes a second ASP session with the second service provider.
  • the service module of the service requesting end carries the service data carried by the first ASP session on the second ASP session to continue the current service data transmission.
  • an ASP is used as an example to provide a service discovery method, which is applied to the service request side.
  • each network of the same service provided by the same service provider may be firstly based on the discovered service.
  • the ASP session is established separately, and the first ASP session established based on the first network is used to carry the service data transmission.
  • the current service data transmission is continued through the second ASP session.
  • a service discovery method provided in Embodiment 3 is applied to a service requesting end, as shown in FIG. 10, and specifically includes the following steps:
  • S1001 The service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • S1002 The ASP module sends a first service discovery request that includes the same service by using a preset network according to the first service discovery indication received in S1001.
  • the first service discovery request carries the service identifier of the same service, and the preset network includes the network in different networks.
  • the service requesting end may connect to multiple different networks (for example, at least two different networks in different types of networks: wired network, infrastructure network, P2P network, Bluetooth network, NFC network, The LTE network, and the Powerline network, etc.
  • the ASP module receives the first service discovery indication sent by the service module
  • the service that is required to be discovered according to the first service discovery indication (for example, a print service) uses the preset network for the same
  • the service performs the service discovery, and the explanation of the preset network and the service identifier can be referred to in Embodiment 1 and will not be described again.
  • the preset network is the two different networks.
  • the S1003 and the ASP module respectively correspond to the first service discovery response sent by the receiving service provider by the network that can discover the same service in the preset network.
  • the first service discovery response carries the identifier information.
  • steps S1001 to S1003 are processes for performing service discovery for the same service.
  • the first service discovery result may be determined according to the first service discovery response.
  • the results of the first service discovery include network information of each network capable of discovering the same service, and information of the service provider corresponding to the network discovery through each network capable of discovering the same service, and corresponding to each network capable of discovering the same service Identification information received by the network;
  • the first service discovery result includes information of the service provider discovered through each network capable of discovering the same service, and corresponding identification information received through each network capable of discovering the same service.
  • a service discovery result may include network information of a network that discovers the same service (or may not include the network information).
  • the information of the service provider may be the network address information of the service provider, and/or the service description information of the service provided by the service provider, etc.; the network information may be the nature information and type information of the network describing the discovery service provider, for example, a P2P network, an AP. Network, address information, or other information that describes the network.
  • the first service discovery result may also include the identifier information carried in the service discovery response received by the network that can discover the same service, so that the service module can determine whether the services discovered by different networks are provided by the same service provider according to the identifier information corresponding to different networks. The same service.
  • S1005 The service module of the service requesting end determines the matching identification information in the reported identifier information.
  • the service module of the service requester determines whether the identification information received by the service for different services is matched according to different networks, and determines the service discovered by different networks. Whether it is the same service provided by the same service provider.
  • S1006 When determining the matching identification information, determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider.
  • the service module of the service requesting end determines that the service discovered by the network that the received identification information matches is the same service provided by the same service provider.
  • the service module instructs the ASP module of the service requesting end to establish an ASP session with the same service provider that provides the same service.
  • the ASP module establishes an ASP session based on each network that discovers the same service provided by the same service provider according to the instruction of the service module.
  • S1008 Determine, in each ASP session established by the ASP module based on a network that discovers the same service provided by the same service provider, the first ASP session is provided by the first service session provided by the first service session provided by the first network session. Business data for the same service.
  • the first ASP session may be determined from the established ASP sessions according to the preset usage rule, and the preset usage rule may be used to complete the service discovery sequence of the network, or may be the network included in the reported network information of the ASP module.
  • Other information such as quality information of the connection, the upper layer service decides to select one according to the information, or the upper layer service selects one of the plurality of networks and the corresponding service provider according to the previously connected information, and may also be the upper layer service according to other The information obtained is used to determine the choice of the service provider.
  • the service module carries the service data carried by the first ASP session in S1008 on the second ASP session to continue the current service data transmission.
  • the second ASP session is established based on the second network, and the second network is a network other than the first network determined from a network that discovers the same service provided by the same service provider.
  • this step can be triggered according to the current service transmission requirement.
  • the service requester When the ASP module reports two networks that have completed the service discovery and the service providers that are separately discovered to the service module of the service requesting end, the network other than the first network in the two networks is determined as the second network.
  • the preset usage rule used when determining the first network may be the same as or different from the preset usage rule used when determining the second network.
  • the steps S1008-S1009 may also be replaced by: the service data of the same service provided by the same service provider is carried by each established ASP session.
  • the traffic of the service data transmitted between the service provider and the service provider are equally divided into the same number of copies as the established ASP session, and respectively transmitted through each ASP session, which can be accelerated. Transmission speed, improve transmission efficiency.
  • Example 3 Taking the Wi-fi network connected to the service requester (terminal) as an example, suppose the service requester connects to the P2P network and the infrastructure network, and the service requester needs to display its own screen content through the service provider (television) screen.
  • the service discovery method is as shown in FIG. 11 , and specifically includes the following steps:
  • S1101 The service module in the service provider sends a release service indication to the ASP module in the service provider, so that when the service requester sends the service discovery request, the service provider can process the service discovery request.
  • the service module in the service requesting end sends a first service discovery indication to the ASP module in the service requesting end.
  • S1103 The ASP module in the service requesting end sends the first service discovery request through the P2P network and the infrastructure network according to the first service discovery indication received in S1102, and carries the service identifier in the first service discovery request.
  • the ASP module of the service provider confirms the service requested in the first service discovery request, and determines that the requested service can be provided. After the service, respectively through the P2P network and The infrastructure network sends a first service discovery response corresponding to the service requester.
  • the first service discovery response may carry the identifier information, and further, the service name may also be carried.
  • the premise that the service discovery can be successful through the infrastructure network is that both the service provider and the service requesting end establish a connection with the same AP, or establish a connection with different APs respectively, and the different APs can communicate with each other.
  • S1105 The ASP module of the service requesting end reports the first service discovery result of the service discovery through the P2P network and the infrastructure network to the service module of the service requesting end.
  • the ASP module can report the network address information corresponding to the P2P network to the service module (or does not include this information), the information of the service provider discovered through the P2P network, and the ServiceID received through the P2P network, and report the same service discovery with the P2P network.
  • the network address information of the infrastructure network (or does not include this information), the information of the service provider discovered through the infrastructure network, and the ServiceID received through the infrastructure network.
  • S1106 The service module of the service requesting end determines that the identification information received through the infrastructure network matches the identification information received through the P2P network.
  • the service module of the service requesting end determines that the service discovered through the infrastructure network and the service discovered through the P2P network are the same service provided by the same service provider.
  • the service module of the service requesting end instructs the ASP module of the service requesting end to establish an ASP session with the service providing end.
  • a P2P connection is established between S1109, the service requester, and the service provider.
  • S1110 The ASP module of the service requesting end establishes an ASP session with the service provider based on the P2P network and the infrastructure network according to the received indication.
  • the service module of the terminal indicates that the ASP module of the terminal establishes an ASP session with the television based on the P2P network and based on the infrastructure network.
  • step S1109 and the execution of S1110 are not strictly sequential, as long as the establishment of the P2P connection is completed before the ASP session is established based on the P2P network.
  • the service module of the service requesting end determines the first ASP session from the two established ASP sessions, and carries the service data transmission by using the first ASP session.
  • the first ASP session may be an ASP session established based on an infrastructure network or an ASP session established based on a P2P network.
  • S1112 Carry the service data carried by the first ASP session in S1111 on the second ASP session to continue the current service data transmission according to the current transmission requirement.
  • the second ASP session is an ASP session established based on the P2P network
  • the first ASP session is an ASP session established based on the P2P network
  • the second ASP session is an ASP session established based on the infrastructure network.
  • the embodiment 4 provides a service discovery method, which is applied to the service provider side, as shown in FIG. 12, and includes the following steps:
  • the service provider receives, by each of the at least two networks that the service requesting end performs service discovery, a service discovery request that includes service discovery for the same service provided by the service provider.
  • S1202 When determining, according to the service identifier carried in the service discovery request received in S1201, that the service identified by the service identifier can be provided, sending a service discovery response to the service requesting end,
  • the service discovery response carries the identification information.
  • the service provider may generate the identifier information by using a preset algorithm based on the MAC address of the service provider.
  • the identifier information may be directly a MAC address, or a value processed by the MAC address, or a MAC address plus a service identifier, or It is the value processed by the MAC address plus the service identifier.
  • S1203 Perform service data transmission on the same service by using at least two networks.
  • the service requesting end may perform service discovery to the service provider through a network having different network addresses, and the service provider may be different for the service requested by the same service requester regardless of whether the service requested by the different network is different.
  • Each network in the network provides the services requested by the network and provides identification information for the network.
  • the embodiments of the present invention further provide related devices and systems. Since the principles of the problems solved by the devices and systems are similar to the foregoing service discovery methods, the implementation of the devices and systems can be implemented by referring to the foregoing methods. , the repetition will not be repeated.
  • One of the service requesting devices provided by the embodiment of the present invention includes the following modules:
  • the application session platform ASP module 1301 is configured to perform service discovery based on different networks for the same service respectively; and each service network capable of discovering the same service in the different network, corresponding to receiving the service provider providing the same service Identification information, the identification information is used to identify a service provider;
  • the service module 1302 is configured to: when the identifier information obtained by the ASP module 1301 through the at least two networks matches, determine that the service discovered by the service discovery based on the at least two networks is the same service provided by the same service provider; In the same access to the same service, service data transmission is performed through the at least two networks.
  • the service module 1302 is further configured to send a first service discovery indication to the ASP module 1301 before the ASP module 1301 performs service discovery;
  • the ASP module 1301 is specifically configured to send, according to the first service discovery indication sent by the service module 1302, a first service discovery request that includes the same service by using a preset network, where the first service discovery request is Carrying the service identifier of the same service, the preset network includes a network in the different network, and the network that can discover the same service in the preset network respectively corresponds to the first sent by the receiving service provider Service discovery response; its The first service discovery response carries the identifier information.
  • the ASP module 1301 is further configured to: when the first service discovery response is received by the at least one network, report the first service discovery result determined according to the first service discovery response to the service module 1302;
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service; or the first service discovery result Including information of a service provider capable of discovering each network discovery of the same service;
  • the service module 1302 is further configured to: instruct the ASP module 1301 to establish a first ASP session with the first service provider, and carry the same service discovered by the first network by using the established first ASP session.
  • the service data wherein the first service provider is determined by the service module 1302 from the reported first service discovery result; and the first service provider is discovered by using the first network.
  • the service module 1302 is specifically configured to: determine, from the identifier information included in the first service discovery result that is reported, identifier information that matches the identifier information received by the first network; Determining, when the identifier information matched by the identifier information received by the first network, the same service provided by the network that receives the matched identifier information and the service discovered by the first network is the same service provided by the same service provider; Instructing the ASP module 1301 to establish a second ASP session with the second service provider; wherein the second service provider determines that the service module 1302 is found by the service provider discovered by the network that receives the matching identification information. And the second service provider is discovered by the second network; and the service data carried by the first ASP session is carried on the second ASP session to continue the current service data transmission, where The first service discovery result further includes identification information received by a network capable of discovering the same service.
  • the service module 1302 is further configured to send a first service discovery indication to the ASP module 1301 before the ASP module 1301 performs service discovery;
  • the ASP module 1301 is specifically configured to send the first service according to the service module 1302.
  • the service discovery indicates that the first service discovery request including the same service is sent by the at least one network, wherein the first service discovery request carries the service identifier of the same service; and can be enabled by the at least one network And discovering, by the network that is the same service, the first service discovery response that is sent by the service provider, where the first service discovery response carries the identifier information; and the ASP module 1301 determines the response according to the first service discovery response.
  • the first service discovery result is reported to the service module 1302.
  • the first service discovery result includes network information of a network capable of discovering the same service, and a service provider corresponding to a network discovery through which the same service can be found. Information; or, the first service discovery result includes information of a service provider capable of discovering network discovery of the same service;
  • the service module 1302 is specifically configured to: after receiving the first service discovery result reported by the ASP module 1301, instructing the ASP module 1301 to establish a first ASP session with the first service provider; wherein, the first The service provider is determined by the service module 1302 from the reported first service discovery result; and the first service provider is discovered through the first network; and the first ASP session is carried through the established a service data of the same service discovered by a network; and sending a second service discovery indication to the ASP module 1301;
  • the ASP module 1301 is specifically configured to send, according to the second service discovery indication sent by the service module 1302, a second service discovery request that includes the same service by using at least one network, where the second service discovery request is a service identifier carrying the same service; and a second service discovery response sent by the network corresponding receiving service provider in the at least one network that is capable of discovering the same service; wherein the second service discovery response is carried in Having the identification information; and reporting the second service discovery result determined according to the second service discovery response to the service module 1302; wherein the second service discovery result includes the ability to discover the determined according to the received second service discovery response Network information of a network of the same service, and information corresponding to a service provider discovered by a network capable of discovering the same service, and identifier information corresponding to a network that can be found by the same service; or the second service discovery The result includes a pass determined based on the received second service discovery response You can find the same service network The information of the service provider found by the network, and the identification information received by the network capable of
  • the service module 1302 is specifically configured to determine, from the identifier information included in the second service discovery result reported by the ASP module 1301, identifier information that matches the identifier information received by the first network; When determining the identification information that matches the identification information received by the first network, determining that the service discovered by the network that receives the matched identification information and the service discovered by the first network are provided by the same service provider The same service; and instructing the ASP module 1301 to establish a second ASP session with the second service provider; and carrying the service data carried by the first ASP session on the second ASP session to continue the current service data. Transmission, wherein the second service provider is determined by the service module 1302 from a service provider discovered by a network that receives the matching identification information, and the second provider is found through the second network. .
  • the ASP module 1301 is further configured to: when the first service discovery response is received by the at least two networks, report the first service discovery result determined according to the first service discovery response to the service module 1302, where
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service, and correspondingly capable of discovering the same Identification information received by each network of the service; or, the first service discovery result includes information of a service provider discovered by each network capable of discovering the same service, and correspondingly by being able to discover each of the same services Identification information received by the network;
  • the service module 1302 is specifically configured to determine matching identification information from the identifier information reported by the ASP module 1301, and determine the service discovered by the network that receives the matched identification information when determining the matching identification information.
  • the same service provided for the same service provider;
  • the service module 1302 is further configured to: after determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider, indicating the ASP module 1301 and the providing the same service Establishing an ASP session with the same service provider; and from the The ASP module 1301 determines a first ASP session in each ASP session established by the network that discovers the same service provided by the same service provider, and carries the same service by using the first ASP session established based on the first network. Provide business data for the same service provided by the end.
  • the service module 1302 is specifically configured to: carry the service data carried by the first ASP session on the second ASP session to continue the current service data transmission, where the second ASP session is based on the second Established by the network, the second network is a network other than the first network determined from a network that discovers the same service provided by the same service provider.
  • the ASP module 1301 is further configured to: when the first service discovery response is received by the at least two networks, report the first service discovery result determined according to the first service discovery response to the service module 1302, where
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service, and correspondingly capable of discovering the same Identification information received by each network of the service; or, the first service discovery result includes information of a service provider discovered by each network capable of discovering the same service, and correspondingly by being able to discover each of the same services Identification information received by the network;
  • the service module 1302 is specifically configured to determine matching identification information from the identifier information reported by the ASP module 1301, and determine the service discovered by the network that receives the matched identification information when determining the matching identification information.
  • the same service provided for the same service provider;
  • the service module 1302 is further configured to: after determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider, indicating the ASP module 1301 and the providing the same service Establish an ASP session with the same service provider;
  • the service module 1302 is specifically configured to carry the service data of the same service provided by the same service provider by using the established ASP session.
  • the service module 1302 is specifically configured to stop using the first port to perform service data interaction with the service provider, where the first port is used by the service session carried by the first ASP session.
  • the available port of the network address corresponding to the first network Transmitting, by the second port, the service data after the service data of the last interaction of the first port and the service provider with the service provider, where the second port is the second ASP session An available port of the network address corresponding to the second network used by the carried service session.
  • the identifier information is generated by the identified service provider based on the MAC address of the service provider.
  • the ASP module 1301 is specifically configured to: when the network capable of discovering the same service includes a P2P network, establish a P2P connection between the service requesting end and the service providing end; and establish an established P2P connection. Establish an ASP session.
  • the different networks are at least two different networks of different types of networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, an NFC network, an LTE network, and a Powerline network.
  • One of the service providing devices provided by the embodiment of the present invention includes the following modules:
  • the identifier information providing module 1401 is configured to provide identifier information to the service requesting end for each of the at least two networks through which the service requesting end performs service discovery for the same service provided by the service providing device, where the identifier is provided. Information is used to identify the service provider;
  • the service data transmission module 1402 is configured to perform service data transmission on the same service by using the at least two networks.
  • the identifier information providing module 1401 is specifically configured to receive a service discovery that is sent by each of the at least two networks that the service requesting end performs for service discovery, including performing service discovery on the same service provided by the service providing device. a request to send a service discovery response to the service requesting end when the service providing device determines that the service identified by the service identifier can be provided according to the service identifier carried in the service discovery request; The discovery response carries identification information.
  • One of the service discovery systems provided by the embodiments of the present invention includes: the above-mentioned service request One of the devices, and one of the above-mentioned service providing devices.
  • the embodiments of the present invention further provide related devices and systems. Since the principles of the problems solved by the devices and systems are similar to the foregoing service discovery methods, the implementation of the devices and systems can be implemented by referring to the foregoing methods. , the repetition will not be repeated.
  • the embodiment of the present invention provides a second service requesting device, as shown in FIG. 15, including a processor 1501 (which may be one or more, one of the embodiments of the present invention is taken as an example), a transceiver 1502, and a memory 1503. And a bus system 1504, wherein:
  • the processor 1501 controls the operation of the second of the service requesting devices, and the processor 1501 may also be referred to as a CPU (Central Processing Unit).
  • the processor 1501 may be an integrated circuit chip with signal processing capabilities.
  • the processor 1501 may also be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a Field-Programmable Gate Array (FPGA), or the like. Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 1503 can include read only memory and random access memory and provides instructions and data to the processor 1501. A portion of the memory 1503 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the various components of the service request device are coupled together by a bus system 1504, which may include, in addition to the data bus, a power bus, a control bus, a status signal bus, and the like.
  • the bus system may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus.
  • the bus may be one or more physical lines, and when it is a plurality of physical lines, it may be divided into an address bus, a data bus, a control bus, and the like.
  • the processor 1501, the memory 1503, and the transceiver 1502 may also be directly connected through a communication line.
  • various buses are labeled as bus system 1504 in the figure.
  • the memory 1503 stores the following elements, executable modules or data structures, or they Subsets, or their extension set:
  • Operation instructions include various operation instructions for implementing various operations.
  • Operating system Includes a variety of system programs for implementing various basic services and handling hardware-based tasks.
  • the processor 1501 performs the following operations by calling an operation instruction stored in the memory 1503 (the operation instruction can be stored in the operating system):
  • the transceiver 1502 is configured to perform service discovery based on different networks for the same service respectively, and correspondingly receive the identifier information provided by the service provider that provides the same service by using each network in the different network that can discover the same service.
  • the identification information is used to identify a service provider;
  • the processor 1501 is configured to: when the identifier information obtained by the transceiver 1502 through the at least two networks matches, determine that the service discovered by the service discovery based on the at least two networks is the same service provided by the same service provider; In the same access to the same service, service data transmission is performed through the at least two networks.
  • the processor 1501 is further configured to send a first service discovery indication to the transceiver 1502 before the transceiver 1502 performs service discovery;
  • the transceiver 1502 is specifically configured to send, according to the first service discovery indication sent by the processor 1501, a first service discovery request including the same service by using a preset network, where the first service discovery request is Carrying the service identifier of the same service, the preset network includes a network in the different network, and the network that can discover the same service in the preset network respectively corresponds to the first sent by the receiving service provider
  • the service discovery response wherein the first service discovery response carries the identification information.
  • the transceiver 1502 is further configured to: when the first service discovery response is received by the at least one network, report the first service discovery result determined according to the first service discovery response to the processor 1501;
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service; or the first service discovery result Including ability Discovering information of the service provider of each network discovery of the same service;
  • the processor 1501 is further configured to instruct the transceiver 1502 to establish a first ASP session with the first service provider, and the first ASP session established by the first network to discover the same service discovered by the first network.
  • the service data wherein the first service provider is determined by the processor 1501 from the reported first service discovery result; and the first service provider is discovered by using the first network.
  • the processor 1501 is specifically configured to: determine identifier information that matches the identifier information received by the first network, from the identifier information included in the first service discovery result that is reported; Determining, when the identifier information matched by the identifier information received by the first network, the same service provided by the network that receives the matched identifier information and the service discovered by the first network is the same service provided by the same service provider; Instructing the transceiver 1502 to establish a second ASP session with the second service provider; wherein the second service provider determines that the processor 1501 is found in a service provider discovered by a network that receives the matching identification information. And the second service provider is discovered by the second network; and the service data carried by the first ASP session is carried on the second ASP session to continue the current service data transmission, where The first service discovery result further includes identification information received by a network capable of discovering the same service.
  • the processor 1501 is further configured to send a first service discovery indication to the transceiver 1502 before the transceiver 1502 performs service discovery;
  • the transceiver 1502 is specifically configured to send, according to the first service discovery indication sent by the processor 1501, a first service discovery request including the same service by using at least one network, where the first service discovery request is a service identifier carrying the same service; and a first service discovery response sent by the network corresponding receiving service provider in the at least one network that is capable of discovering the same service; wherein the first service discovery response is carried in And the transceiver 1502 reports the first service discovery result determined according to the first service discovery response to the processor 1501; wherein the first service discovery result includes the ability to discover the same Network information of the served network, and information corresponding to the service provider discovered by the network capable of discovering the same service; or the first service discovery result includes information of a service provider capable of discovering the network discovery of the same service;
  • the processor 1501 is specifically configured to: after receiving the first service discovery result reported by the transceiver 1502, instruct the transceiver 1502 to establish a first ASP session with the first service provider; wherein, the first The service provider is determined by the processor 1501 from the reported first service discovery result; and the first service provider is discovered by using the first network; and the first ASP session is carried through the established a service data of the same service discovered by a network; and transmitting a second service discovery indication to the transceiver 1502;
  • the transceiver 1502 is specifically configured to send, according to the second service discovery indication sent by the processor 1501, a second service discovery request including the same service by using at least one network, where the second service discovery request is a service identifier carrying the same service; and a second service discovery response sent by the network corresponding receiving service provider in the at least one network that is capable of discovering the same service; wherein the second service discovery response is carried in Having the identification information; and reporting the second service discovery result determined according to the second service discovery response to the processor 1501; wherein the second service discovery result includes the ability to discover the determined according to the received second service discovery response Network information of a network of the same service, and information corresponding to a service provider discovered by a network capable of discovering the same service, and identifier information corresponding to a network that can be found by the same service; or the second service discovery The result includes a pass energy determined based on the received second service discovery response Service discovery information of the same side of the service providing network discovery, and by a corresponding network can find the same service identification information received
  • the processor 1501 is specifically configured to determine, from the identifier information included in the second service discovery result reported by the transceiver 1502, identifier information that matches the identifier information received by the first network; When the identification information that matches the identification information received by the first network is determined, the service discovered by the network that receives the matching identification information is determined.
  • the service discovered by the first network is the same service provided by the same service provider; and the transceiver 1502 is instructed to establish a second ASP session with the second service provider; and the service data carried by the first ASP session is Carrying on the second ASP session to continue the current service data transmission, wherein the second service provider is determined by the processor 1501 from the service provider discovered by the network that receives the matching identification information, And the second provider is found through the second network.
  • the transceiver 1502 is further configured to: when the first service discovery response is received by the at least two networks, report the first service discovery result determined according to the first service discovery response to the processor 1501;
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service, and correspondingly capable of discovering the same Identification information received by each network of the service; or, the first service discovery result includes information of a service provider discovered by each network capable of discovering the same service, and correspondingly by being able to discover each of the same services Identification information received by the network;
  • the processor 1501 is specifically configured to determine matching identification information from the identifier information reported by the transceiver 1502, and determine a service discovered by the network that receives the matched identification information when determining the matched identification information.
  • the same service provided for the same service provider;
  • the processor 1501 is further configured to, after determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider, instructing the transceiver 1502 to provide the same service Establishing an ASP session by the same service provider; and determining, by the transceiver 1502, each first ASP session established based on the network that discovers the same service provided by the same service provider, and establishing the first ASP session by using the first network
  • the first ASP session carries service data of the same service provided by the same service provider.
  • the processor 1501 is configured to: carry the service data carried by the first ASP session on the second ASP session to continue the current service data transmission, where the second ASP session is based on the second Established by the network, the second network is the same service from the discovery A network other than the first network determined in a network providing the same service provided by the terminal.
  • the transceiver 1502 is further configured to: when the first service discovery response is received by the at least two networks, report the first service discovery result determined according to the first service discovery response to the processor 1501;
  • the first service discovery result includes network information of each network capable of discovering the same service, and information corresponding to a service provider discovered by each network capable of discovering the same service, and correspondingly capable of discovering the same Identification information received by each network of the service; or, the first service discovery result includes information of a service provider discovered by each network capable of discovering the same service, and correspondingly by being able to discover each of the same services Identification information received by the network;
  • the processor 1501 is specifically configured to determine matching identification information from the identifier information reported by the transceiver 1502, and determine a service discovered by the network that receives the matched identification information when determining the matched identification information.
  • the same service provided for the same service provider;
  • the processor 1501 is further configured to, after determining that the service discovered by the network that receives the matched identification information is the same service provided by the same service provider, instructing the transceiver 1502 to provide the same service Establish an ASP session with the same service provider;
  • the processor 1501 is configured to carry the service data of the same service provided by the same service provider by using the established ASP session.
  • the processor 1501 is specifically configured to stop using the first port to perform service data interaction with the service provider, where the first port is used by the service session carried by the first ASP session.
  • the second port is an available port of the network address corresponding to the second network used by the service session carried by the second ASP session.
  • the identifier information is generated by the identified service provider based on the MAC address of the service provider.
  • the transceiver 1502 is specifically configured to: when the network capable of discovering the same service includes a P2P network, establish a P2P connection between the service requesting end and the service providing end; based on the established P2P connection Establish an ASP session.
  • the different networks are at least two different networks of different types of networks: a wired network, an infrastructure network, a P2P network, a Bluetooth network, an NFC network, an LTE network, and a Powerline network.
  • a second service providing device provided by the embodiment of the present invention, as shown in FIG. 16, includes:
  • the transceiver 1601 is configured to provide, to the service requesting end, identification information for each of the at least two networks through which the service requesting end performs service discovery for the same service provided by the service providing device, where the identifier information is used by the identifier Identifying the service provider;
  • the processor 1602 is configured to perform service data transmission on the same service by using the at least two networks.
  • the transceiver 1601 is specifically configured to receive, by each of the at least two networks that the service requesting end performs service discovery, a service discovery request that includes service discovery for the same service provided by the service providing device; And when the service providing device determines that the service identified by the service identifier can be provided according to the service identifier carried in the service discovery request, sending a service discovery response to the service requesting end; wherein the service discovery response is It carries identification information.
  • a service discovery system provided by the embodiment of the present invention includes: a second service request device, and a service providing device.
  • the service discovery method, the related device, and the system provided by the embodiment of the present invention include: the service requesting end performs service discovery based on different networks for the same service; and each network that can discover the same service in different networks, correspondingly receives The identification information provided by the service provider providing the same service, the identification information is used to identify the service provider; when passing through at least two networks When the obtained identification information matches, determining that the service discovered by the service discovery based on the at least two networks is the same service provided by the same service provider; and in the same access to the same service, performing service data through the at least two networks transmission.
  • a service discovery method is provided by the embodiment of the present invention.
  • the service requesting end may perform service discovery through different networks for the same service, and determine the same service provided by the same service provider discovered by different networks.
  • After a network performs service data transmission when the first network cannot meet the current service data transmission requirement, since the service found through the first network is found by the other network except the first network, The same service provided is the current service, and the service requesting end can switch the first network to the other network, and continue the current service data transmission through the other network, and the prior art is based on the data transmission of the upper layer service.
  • the underlying connection is interrupted, and the upper layer service data transmission must also be interrupted. Compared with the underlying connection based on the upper layer service, the data transmission of the upper layer service is not strong, and the service data can be continuously transmitted without switching through the underlying network. Interruption increases the flexibility of service delivery.
  • services can be simultaneously transmitted through multiple networks, and services can be switched between multiple network connections.
  • the embodiments of the present invention may be implemented by hardware, or may be implemented by means of software plus a necessary general hardware platform.
  • the technical solution of the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.).
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
  • modules in the apparatus in the embodiment may be distributed in the apparatus of the embodiment according to the description of the embodiment, or may be correspondingly changed to be different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例提供了一种服务发现方法、相关设备、及系统,包括:服务请求端针对相同服务分别基于不同网络进行服务发现;并通过不同网络中能够发现相同服务的每一个网络,对应接收提供相同服务的服务提供端提供的标识信息,标识信息用于标识服务提供端;当通过至少两个网络获得的标识信息匹配时,确定基于该至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;并在同一次访问该同一服务中,通过该至少两个网络进行业务数据传输。本发明解决现有技术中上层业务的数据传输对该上层业务所基于的网络连接依赖性强导致灵活性差的问题。本发明涉及通信技术领域。

Description

一种服务发现方法、相关设备、及系统
本申请要求于2014年10月31日提交中国专利局、申请号为201410608742.2中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,尤其涉及一种服务发现方法、相关设备、及系统。
背景技术
针对无线保真(Wi-Fi,Wireless Fidelity)通信,国际电子电器工程师协会(IEEE,Institute of Electrical and Electronics Engineers)制订的无线局域网标准802.11定义了两种网络通信方式:第一种通信方式为基于基础设施的通信方式。在第一种通信方式中,将一个节点作为接入点(AP,Access Point),将该节点之外的其他节点作为站点(STA,Station),其中,接入点提供接入服务,其他节点与接入点连接,通过接入点接入网络。第二种通信方式为独立的基础服务集(IBSS,independent basic service set)方式。在第二种通信方式中,每个节点都是平等的站点,各节点两两间建立连接。
在后续的发展过程中,为了进一步便于使用,Wi-Fi联盟(WFA,Wi-Fi Alliance)在802.11标准的基础上制订了Wi-Fi Direct标准。Wi-Fi Direct标准在802.11的基础上,进一步定义了两个节点间如何发现,以及如何建立连接。具体地,可以让节点均在1、6、11这三个信道上随机地发送探测消息或者监听其他节点发送的探测消息,如果监听到其他节点发送的探测消息并进行了回复,可以认为两个节点完成了相互发现,然后该两个节点可以协商群主(GO,Group Owner)以及群成员(Group Client)的角色,通常作为群主的节点相当于接入点的角色,作为群成员的节点相当于站点角色。群成员节点可以向群主节点申请关联,然后建立连接。
但是,Wi-Fi Direct标准仅是实现Wi-Fi层面的发现以及连接问题,对于Wi-Fi层面之上的业务层面并没有统一的标准。为了解决这个问题,WFA又制订了Wi-Fi Direct服务(WFDS,Wi-Fi Direct Service)标准。这个标准是在Wi-Fi Direct的基础上,将上层业务的交互也进行了规范化,以便于各厂家的上层业务能够互通。例如,针对文件传输业务,可以使用统一的文件传输协议。
这样,上层应用可以基于Wi-Fi连接进行上层业务的数据传输。下面以应用会话平台(ASP,Application Session Platform)为例,ASP可以基于Wi-Fi连接(现有技术中为直连(P2P,Peer to Peer)连接)建立ASP会话,并通过建立的ASP会话承载上层业务数据传输。
进一步地,在建立ASP会话之前需要首先进行基于P2P进行服务发现,图1为在Wi-Fi层面节点A和节点B通过P2P进行服务发现的流程图,服务发现之后节点A和节点B之间建立P2P网络,然后在P2P连接之上建立ASP session,图2为WFDS在P2P连接之上建立ASP session的流程图。
如图1所示,节点A表征WFDS中Advertiser的角色,也就是服务的提供方,节点B表征WFDS中Seeker的角色,也就是查找服务方,P2P表征在Wi-Fi层面进行连接的P2P模块,Service表征服务模块,ASP表征ASP模块。通过P2P进行服务发现的流程如下:
S101、节点A的Service模块向节点A的ASP模块发送AdvertiseService消息,使节点A的ASP模块能够接收其他节点的服务请求;
S102、节点B的Service模块向节点B的ASP模块发送SeekService消息,指示节点B的ASP模块对指定服务进行查询;
S103、节点B的ASP模块通过节点B的P2P模块发送用于查询指定服务的查询消息;
S104、节点A的ASP模块通过节点A的P2P模块接收到该查询消息,确定节点B查询的服务即为节点A能够提供的服务;
S105、节点A的ASP模块通过节点A的P2P模块向节点B的P2P模块发送查询响应消息。
在服务发现流程之后,节点B确定节点A提供的服务即为自己需要的服务,可以使节点A和设备B之间建立P2P连接,并基于建立的P2P连接建立ASP会话session,如图2所示,建立ASP session的流程如下:
S201、节点B的Service模块向自身ASP模块发送建立ASP session的指示ConnectSessions。
S202、节点B的ASP模块接收到ConnectSessions指示后,与节点A的ASP模块之间交互版本VERSION消息。
S203、通信双方进行版本确认之后,节点B中的ASP模块向节点A的ASP模块发送REQUEST_SESSION消息表征请求建立ASP session。
S204、节点A中的ASP模块接收到REQUEST_SESSION消息之后,与节点A中的Service模块交互节点B的请求信息,并确定进行会话准备。
S205、节点A中的ASP模块向节点B中的ASP模块发送增加会话ADDED_SESSION消息,表征同意与节点B建立ASP session。
S206、节点A中的Service模块与节点A中的ASP模块交互节点A使用的端口信息,并确定使用的端口。
S207、节点A中的ASP模块向节点B中的ASP模块发送允许端口ALLOWED PORT消息,告知节点B自身已经将端口打开。
S208、节点B中的ASP模块向节点B中的Service模块发送端口报告PortReport消息,表征向Service模块汇报节点A已经将端口打开,并与节点B中的Service模块交互节点B使用的端口信息,并确定使用的端口。
S209、节点B中的ASP模块向节点A中的ASP模块发送允许端口ALLOWED PORT消息,告知节点A自身已经将端口打开。
S210、节点A中的ASP模块向节点A中的Service模块发送端口报告PortReport消息,表征向Service模块汇报节点B的端口已打开,双方可以 进行通信。
此后,节点A和节点B中的Service模块之间可以建立服务连接并传输业务数据。
可见,现有技术中,上层业务数据传输是基于P2P的连接,而当P2P连接发生问题,例如:在节点A和节点B之间建立了P2P连接之后,节点A和节点B之间的距离越来越远,导致该P2P连接的信号越来越差,以至于连接中断,那么,基于该P2P连接的上层业务将中断业务。这就使得上层业务的数据传输对该上层业务建立时所基于的底层P2P连接的依赖强,灵活性差。
发明内容
本发明实施例提供了一种服务发现方法、相关设备、及系统,用以解决现有技术中上层业务的数据传输对该上层业务所基于的网络连接依赖性强导致灵活性差的问题。
第一方面,提供一种服务发现方法,包括:
服务请求端针对相同服务分别基于不同网络进行服务发现;并
通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
所述服务请求端当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;并
在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
结合第一方面,在第一种可能的实现方式中,所述服务请求端针对相同服务分别基于不同网络进行服务发现,具体包括:所述服务请求端中的 服务模块向所述服务请求端中的应用会话平台ASP模块发送第一服务发现指示;所述ASP模块根据所述第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;所述通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,具体包括:所述ASP模块通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,当所述ASP模块通过至少一个网络接收到第一服务发现响应时,还包括:所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的每一个网络发现的服务提供端的信息;所述服务模块指示所述ASP模块与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;所述服务模块通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据传输。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息;所述所述服务请求端当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:所述服务模块从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配 的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:所述服务模块指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输。
结合第一方面的第二种可能的实现方式,在第四种可能的实现方式中,所述服务请求端针对相同服务分别基于不同网络进行服务发现;并通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端,具体包括:所述服务请求端中的服务模块向所述服务请求端中的ASP模块发送第一服务发现指示;所述ASP模块根据所述第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;所述ASP模块通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;所述服务模块指示所述ASP模块与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一 网络发现的;所述服务模块通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据传输;所述服务模块向所述ASP模块发送第二服务发现指示;所述ASP模块根据所述第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;所述ASP模块通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;所述ASP模块将根据第二服务发现响应确定的第二服务发现结果上报所述服务模块;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:所述服务模块从上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:所述服务模块指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定 的,且所述第二提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输。
结合第一方面的第一种可能的实现方式,在第六种可能的实现方式中,当所述ASP模块通过至少两个网络接收到第一服务发现响应时,还包括:所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:所述服务模块从上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,还包括:所述服务模块指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述ASP模块分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:所述服务模块将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供 的同一服务的网络中确定的除所述第一网络之外的网络。
结合第一方面的第一种可能的实现方式,在第八种可能的实现方式中,当所述ASP模块通过至少两个网络接收到第一服务发现响应时,还包括:所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:所述服务模块从上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,还包括:所述服务模块指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第一方面的第三种可能的实现方式,或者结合第一方面的第五种可能的实现方式,或者结合第一方面的第七种可能的实现方式,在第九种可能的实现方式中,将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,具体包括:所述服务模块停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址 的可用端口;并将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
结合第一方面,或者结合第一方面的第一种可能的实现方式至第一方面的第八种可能的实现方式中的任一种可能的实现方式,在第十种可能的实现方式中,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
结合第一方面的第二种可能的实现方式至第一方面的第八种可能的实现方式中的任一种可能的实现方式,在第十一种可能的实现方式中,所述能够发现所述相同服务的网络包括P2P网络;基于所述P2P网络建立ASP会话,具体包括:在所述服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
结合第一方面,或者结合第一方面的第一种可能的实现方式至第一方面的第八种可能的实现方式中的任一种可能的实现方式,在第十二种可能的实现方式中,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
第二方面,提供一种数据传输方法,包括:
服务提供端针对服务请求端对所述服务提供端提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;并
通过所述至少两个网络对所述相同服务进行业务数据传输。
结合第二方面,在第一种可能的实现方式中,针对服务请求端对所述服务提供端提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向服务请求端提供标识信息,具体包括:接收服务请求端进行 服务发现时通过的至少两个网络中的每一个网络发送的包含对所述服务提供端提供的相同服务进行服务发现的服务发现请求;当根据所述服务发现请求中携带的服务标识,服务提供端确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
第三方面,提供一种服务请求设备之一,包括:
应用会话平台ASP模块,用于针对相同服务分别基于不同网络进行服务发现;以及通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
服务模块,用于当所述ASP模块通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;以及在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
结合第三方面,在第一种可能的实现方式中,所述服务模块,还用于在所述ASP模块进行服务发现之前,向所述ASP模块发送第一服务发现指示;所述ASP模块,具体用于根据所述服务模块发送的第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;以及通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息。
结合第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述ASP模块,还用于当通过至少一个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网 络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的每一个网络发现的服务提供端的信息;所述服务模块,还用于指示所述ASP模块与第一服务提供端建立第一ASP会话;通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据传输;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的。
结合第三方面的第二种可能的实现方式,在第三种可能的实现方式中,所述服务模块,具体用于从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息。
结合第三方面,在第四种可能的实现方式中,所述服务模块,还用于在所述ASP模块进行服务发现之前,向所述ASP模块发送第一服务发现指示;所述ASP模块,具体用于根据所述服务模块发送的第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;以及所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述 服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;所述服务模块,具体用于在接收到所述ASP模块上报的第一服务发现结果之后,指示所述ASP模块与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;以及通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据传输;以及向所述ASP模块发送第二服务发现指示;所述ASP模块,具体用于根据所述服务模块发送的第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;以及将根据第二服务发现响应确定的第二服务发现结果上报所述服务模块;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
结合第三方面的第四种可能的实现方式,在第五种可能的实现方式中,所述服务模块,具体用于从所述ASP模块上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服 务为同一服务提供端提供的同一服务;以及指示所述ASP模块与所述第二服务提供端建立第二ASP会话;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的。
结合第三方面的第一种可能的实现方式,在第六种可能的实现方式中,所述ASP模块,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述服务模块,具体用于从所述ASP模块上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;所述服务模块,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述ASP模块分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第三方面的第六种可能的实现方式,在第七种可能的实现方式中,所述服务模块,具体用于将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供的同一 服务的网络中确定的除所述第一网络之外的网络。
结合第三方面的第一种可能的实现方式,在第八种可能的实现方式中,所述ASP模块,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述服务模块,具体用于从所述ASP模块上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;所述服务模块,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;所述服务模块,具体用于通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第三方面的第三种可能的实现方式,或者结合第三方面的第五种可能的实现方式,或者结合第三方面的第七种可能的实现方式,在第九种可能的实现方式中,所述服务模块,具体用于停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
结合第三方面,或者结合第三方面的第一种可能的实现方式至第三方面的第八种可能的实现方式中的任一种可能的实现方式,在第十种可能的实现方式中,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
结合第三方面的第二种可能的实现方式至第三方面的第八种可能的实现方式中的任一种可能的实现方式,在第十一种可能的实现方式中,所述ASP模块,具体用于当所述能够发现所述相同服务的网络包括P2P网络时,在所在服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
结合第三方面,或者结合第三方面的第一种可能的实现方式至第三方面的第八种可能的实现方式中的任一种可能的实现方式,在第十二种可能的实现方式中,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
第四方面,提供一种服务提供设备之一,包括:
标识信息提供模块,用于针对服务请求端对本服务提供设备提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;
业务数据传输模块,用于通过所述至少两个网络对所述相同服务进行业务数据传输。
结合第四方面,在第一种可能的实现方式中,所述标识信息提供模块,具体用于接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对本服务提供设备提供的相同服务进行服务发现的服务发现请求;以及当根据所述服务发现请求中携带的服务标识,本服务提供设备确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
第五方面,提供一种服务发现系统,包括:如第三方面或者第三方面任一种可能的实现方式所述的一种服务请求设备之一,以及第四方面或者第四方面任一种可能的实现方式所述的一种服务提供设备之一。
第六方面,提供一种服务请求设备之二,包括:
收发器,用于针对相同服务分别基于不同网络进行服务发现;以及通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
处理器,用于当所述收发器通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;以及在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
结合第六方面,在第一种可能的实现方式中,所述处理器,还用于在所述收发器进行服务发现之前,向所述收发器发送第一服务发现指示;所述收发器,具体用于根据所述处理器发送的第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;以及通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息。
结合第六方面的第一种可能的实现方式,在第二种可能的实现方式中,所述收发器,还用于当通过至少一个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的每一 个网络发现的服务提供端的信息;所述处理器,还用于指示所述收发器与所述第一服务提供端建立第一ASP会话;通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;其中,所述第一服务提供端为所述处理器从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的。
结合第六面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器,具体用于从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述收发器与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述处理器从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息。
结合第六方面,在第四种可能的实现方式中,所述处理器,还用于在所述收发器进行服务发现之前,向所述收发器发送第一服务发现指示;所述收发器,具体用于根据所述处理器发送的第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;以及所述收发器将根据第一服务发现响应确定的第一服务发现结果上报所述处理器;其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或 者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;所述处理器,具体用于在接收到所述收发器上报的第一服务发现结果之后,指示所述收发器与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述处理器从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;以及通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;以及向所述收发器发送第二服务发现指示;所述收发器,具体用于根据所述处理器发送的第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;以及将根据第二服务发现响应确定的第二服务发现结果上报所述处理器;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
结合第六方面的第四种可能的实现方式,在第五种可能的实现方式中,所述处理器,具体用于从所述收发器上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述收发器与第二服务提供端建立第二ASP会话;并将所述第一ASP会话所承载的业务数据承载在所 述第二ASP会话上继续当前的业务数据传输,其中,所述第二服务提供端为所述处理器从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的。
结合第六方面的第一种可能的实现方式,在第六种可能的实现方式中,所述收发器,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述处理器,具体用于从所述收发器上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;所述处理器,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述收发器与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述收发器分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第六方面的第六种可能的实现方式,在第七种可能的实现方式中,所述处理器,具体用于将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供的同一服务的网络中确定的除所述第一网络之外的网络。
结合第六方面的第一种可能的实现方式,在第八种可能的实现方式中, 所述收发器,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;所述处理器,具体用于从所述收发器上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;所述处理器,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述收发器与提供所述同一服务的所述同一服务提供端建立ASP会话;所述服务模块,具体用于通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
结合第六方面的第三种可能的实现方式,或者结合第六方面的第五种可能的实现方式,或者结合第六方面的第七种可能的实现方式,在第九种可能的实现方式中,所述处理器,具体用于停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
结合第六方面,或者结合第六方面的第一种可能的实现方式至第六方面的第八种可能的实现方式中的任一种可能的实现方式,在第十种可能的 实现方式中,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
结合第六方面的第二种可能的实现方式至第六方面的第八种可能的实现方式中的任一种可能的实现方式,在第十一种可能的实现方式中,所述收发器,具体用于当所述能够发现所述相同服务的网络包括P2P网络时,在所在服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
结合第六方面,或者结合第六方面的第一种可能的实现方式至第六方面的第八种可能的实现方式中的任一种可能的实现方式,在第十二种可能的实现方式中,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
第七方面,提供的一种服务提供设备之二,包括:
收发器,用于针对服务请求端对本服务提供设备提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;
处理器,用于通过所述至少两个网络对所述相同服务进行业务数据传输。
结合第七方面,在第一种可能的实现方式中,所述收发器,具体用于接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对本服务提供设备提供的相同服务进行服务发现的服务发现请求;以及当根据所述服务发现请求中携带的服务标识,本服务提供设备确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
第八方面,提供一种服务发现系统,包括:如第六方面或者第六方面任一种可能的实现方式所述的一种服务请求设备之二,以及第七方面或者 第七方面任一种可能的实现方式所述的一种服务提供设备之二。
本发明实施例的有益效果包括:
本发明实施例提供的一种服务发现方法、相关设备、及系统,包括:服务请求端针对相同服务分别基于不同网络进行服务发现;并通过不同网络中能够发现相同服务的每一个网络,对应接收提供相同服务的服务提供端提供的标识信息,标识信息用于标识服务提供端;当通过至少两个网络获得的标识信息匹配时,确定基于该至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;并在同一次访问该同一服务中,通过该至少两个网络进行业务数据传输。本发明实施例提供的一种服务发现方法,服务请求端可以针对相同服务分别通过不同网络进行服务发现,并确定出通过不同网络所发现的同一服务提供端提供的同一服务,那么,在通过第一网络进行业务数据传输后,当出现第一网络无法满足当前业务数据传输需求时,由于除第一网络之外的、还通过其它网络发现了与通过第一网络所发现服务为同一服务提供端提供的同一服务,即为与当前业务,那么服务请求端可以将第一网络切换到该其他网络,通过该其他网络继续当前业务数据传输,与现有技术中,由于上层业务的数据传输所基于的底层连接中断,而导致上层业务数据传输也必须中断相比,上层业务的数据传输对该上层业务所基于的底层连接依赖性不强,通过底层网络的切换使得业务数据得以继续传输而不会中断,提高了业务传输的灵活性。而且在有的情况下,还可以通过多个网络同时进行业务传输,业务可以在多个网络连接间切换。
附图说明
图1为本发明背景技术提供的在Wi-Fi层面节点A和节点B通过P2P进行服务发现的流程图;
图2为本发明背景技术提供的WFDS在P2P连接之上建立ASP session 的流程图;
图3为本发明实施例提供的一种服务发现方法,应用于服务请求端的流程图;
图4为本发明实施例提供的一种服务发现方法,应用于服务提供端的流程图;
图5为本发明实施例1提供的一种服务发现方法,应用于服务请求端的流程图;
图6为本发明实施例例1提供的一种服务发现方法,应用于服务请求端的流程图之一;
图7为本发明实施例例1提供的一种服务发现方法,应用于服务请求端的流程图之二;
图8为本发明实施例2提供的一种服务发现方法,应用于服务请求端的流程图;
图9为本发明实施例例2提供的一种服务发现方法,应用于服务请求端的流程图;
图10为本发明实施例3提供的一种服务发现方法,应用于服务提供端的流程图;
图11为本发明实施例例3提供的一种服务发现方法,应用于服务提供端的流程图;
图12为本发明实施例4提供的一种服务发现方法,应用于服务提供端的流程图;
图13为本发明实施例提供的一种服务请求设备之一的结构示意图;
图14为本发明实施例提供的一种服务提供设备之一的结构示意图;
图15为本发明实施例提供的一种服务请求设备之二的结构示意图;
图16为本发明实施例提供的一种服务提供设备之二的结构示意图。
具体实施方式
本发明实施例提供了一种服务发现方法、相关设备、及系统,以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
本发明实施例提供一种服务发现方法,应用于服务请求端,如图3所示,包括:
S301、服务请求端针对相同服务分别基于不同网络进行服务发现。
S302、通过S301所述的不同网络中能够发现上述相同服务的每一个网络,对应接收提供上述相同服务的服务提供端的标识信息,该标识信息用于标识服务提供端。
S303、当通过至少两个网络获得的标识信息匹配时,确定基于该至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务。
S304、在同一次访问上述同一服务中,通过该至少两个网络进行业务数据传输。
与上述图3所示方法相应的,本发明实施例还提供一种服务发现方法,应用于服务提供端,如图4所示,包括:
S401、服务提供端针对服务请求端对服务提供端提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向服务请求端提供标识信息,该标识信息用于标识该服务提供端。
S402、通过S401中至少两个网络对该相同服务进行业务数据传输。
进一步地,本发明实施例提供的一种服务发现方法,不同网络可以为以下不同类型的网络中任至少两个不同的网络:有线网络,基础设施(Infrastructure)网络、P2P网络、蓝牙网络、近场通信(NFC,Near Field Communciation)网络、长期演进(LTE,Long Term Evolution)网络、以及电力线(Powerline)网络。其中,基础设施网络可以为基于AP的网络;P2P 网络,即端到端网络,可以是基于Wi-Fi Direct标准建立的网络,也可以是基于WFA制定的临近感知网络(NAN,Neighbor Awareness Networking)标准建议的网络,或者是其他端到端网络。也就是说,服务请求端可以基于上述至少两种底层网络对相同服务进行服务发现,并对应每种能够发现该相同服务的网络分别接收获得的标识信息,根据接收的标识信息,确定所发现服务为同一服务提供端通过不同网络提供的同一服务。
进一步地,不同的上层应用可以基于不同的网络进行业务数据传输,当承载某上层应用业务数据的当前网络无法满足业务传输需求时,可以通过与当前网络所发现服务为同一服务提供端提供的同一服务的其它网络,对当前网络进行替换,继续本次业务数据传输,上层应用业务数据传输对底层网络依赖性不强,通过底层网络的切换使得业务数据传输不会因为某一个网络连接的质量变差或中断而中断,提高了业务数据传输的灵活性。
下面结合附图,用具体实施例对本发明提供的方法及相关设备进行详细描述。
实施例1:
本发明实施例1中,以ASP为例,提供一种服务发现方法,应用于服务请求端,在实施例1中,可以首先基于第一网络建立第一ASP会话,并通过该第一ASP会话承载业务数据传输,当第一网络无法满足业务需求时,基于与第一网络所发现服务为同一服务提供端提供的同一服务的第二网络建立ASP会话,并通过第二ASP会话继续当前业务数据的传输。
实施例1提供的一种服务发现方法应用于服务请求端,如图5所示,具体包括如下步骤:
S501、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
S502、ASP模块根据S501中接收的第一服务发现指示,通过预设网络发送包含相同服务的第一服务发现请求,
其中,第一服务发现请求中携带有相同服务的服务标识,预设网络包括不同网络中的网络。
进一步地,本步骤中,服务请求端可能同时连接到多种不同类型的网络(例如:有线网络、带有AP的基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络等),当ASP模块接收到服务模块发送的第一服务发现指示时,可以根据第一服务发现指示所要求发现的服务(例如:文件传输服务)使用预设网络针对该相同服务进行服务发现,其中,预设网络可以预先进行设置,预设网络可以为服务请求端所连接的所有不同的网络,也可以为预先设置的服务请求端所连接的部分网络(部分网络可以为一个或多个网络)等。具体实现时,可以通过预设网络发送针对相同服务的服务发现请求,并在各服务发现请求中携带相同的服务标识,以保证通过预设网络所发现的服务为相同的服务,其中,服务标识可以为服务名称(ServiceName),或者是服务哈希值(ServiceHash)或者是其它能够标识相同服务的标识。其中,服务哈希值可以为服务名称经过哈希运算后得到的哈希值。哈希运算可以是采用常用的哈希函数如信息摘要算法5(MD5,Message-Digest Algorithm 5),安全摘要算法256(SHA256,Secure Hash Algorithm),安全摘要算法512(SHA512,Secure Hash Algorithm)等经过运算后得到的结果,或者经过运算后再进行截取得到的结果。
进一步地,ASP模块可以通过预设发现规则确定服务请求端所连接的网络。例如:ASP模块可以周期性查询服务请求端所连接的网络,或者可以在确定当前ASP会话所基于的网络无法满足传输需求时查询服务请求端所连接的网络,或者服务模块周期性向ASP模块发送网络查询指示,ASP模块根据接收到的查询指示对服务请求端所连接网络进行查询,或者ASP模块在接收到服务模块发送的第一服务发现指示时对服务请求端所连接的网络进行查询等。
进一步地,本步骤中,第一服务发现请求中可以包括对多种服务的服 务发现,那么,通过预设网络发送的第一服务发现请求中包含对相同服务的服务发现。
进一步地,当服务请求端设备仅连接两个不同的网络时,预设网络为该两个不同的网络;当服务请求端设备仅连接一个网络时,预设网络为该一个网络。
进一步地,本步骤中,第一服务发现请求表征用于通过网络进行服务发现的请求,凡是能够用于通过网络进行服务发现的消息都可以作为本发明实施例中的第一服务发现请求。
S503、ASP模块通过预设网络中能够发现上述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应。
其中,第一服务发现响应中携带有标识信息。
进一步地,本步骤中,针对预设网络中能够发现相同服务的网络,ASP模块通过该网络接收通过该网络发现的提供相同服务的服务提供端发送的第一服务发现响应。
进一步地,本步骤中,标识信息可以标识发送第一服务发现响应的服务提供端,例如:可以将发送第一服务发现响应的服务提供端的设备信息(例如:设备名称,设备类型,设备的序列号等)作为服务提供端的标识信息,或者是服务提供端的设备唯一地址,或者是跟设备相关的业务标识信息,或者是以上中的多种的组合(例如:服务提供端的设备地址加上服务信息),或者是将其他能够标识该服务提供端的信息作为服务提供端的标识信息。
进一步地,服务提供端可以基于该服务提供端的媒体访问控制(MAC,Media Access Control)地址,采用预设算法生成标识信息。例如,该标识信息可以直接就是MAC地址,或者是MAC地址进行处理后的值,或者是MAC地址加服务标识,或者是MAC地址加服务标识一起进行处理后的值。
进一步地,本步骤中,ASP模块通过某网络发送第一服务发现请求之 后,则通过该网络等待接收服务提供端的响应;若有服务提供端通过该网络提供服务发现请求所发现的服务,则ASP模块可以通过该网络接收第一服务发现响应,该第一服务发现响应为接收到通过该网络发送的第一服务发现请求的服务提供端向服务请求端回复的,第一服务发现响应中携带有标识信息。该标识信息可以表征该服务提供端的标识信息,也可以表征该服务提供端的标识信息以及所请求服务的服务信息。
这里,还可能是网络中有一个中心设备,例如AP,AP在之前就接收其它服务提供端注册的服务信息和服务提供端信息,并且帮助这些服务提供端对服务发现请求进行响应;当该AP中包含有其它能够提供服务发现请求中包含的服务的服务提供端的信息时,AP响应上述的服务发现请求并发送服务发现响应,所述服务发现响应中包含能够提供所述服务的服务提供端信息;当AP中不包含有其它能够提供服务发现请求中包含的服务的服务提供端的信息时,AP也发送服务发现响应,但是响应中不包含服务提供端的信息。
当标识信息表征该服务提供端的标识信息时,由于第一服务发现请求中携带有表征相同服务的服务标识,那么通过不同网络针对相同服务发送了第一服务发现请求之后,当存在至少两个网络,接收到的针对相同服务的第一服务发现响应携带的标识信息匹配时,可以确定该至少两个网络所发现的服务为同一服务提供端提供的同一服务;当标识信息表征该服务提供端的标识信息以及所请求服务的服务信息时,标识信息既表征了提供服务的服务提供端又表征了所提供的服务,那么通过不同网络针对特定服务发送了第一服务发现请求之后,当存在通过至少两个网络,接收到的针对特定服务的第一服务发现响应携带的标识信息匹配时,可以确定通过该至少两个网络所发现的服务为同一服务提供端提供的同一服务。
进一步地,具体实施时,第一服务发现请求可以为探测请求(Probe Request),或者为Service Discovery Request,或者为Probe Request以及 Service Discovery Request,也就是说,针对预设网络中的每个网络,当第一服务发现请求为Probe Request时,可以在通过该网络发送的Probe Request中携带相同的服务标识(例如:服务哈希值),那么通过该网络接收的第一服务发现响应可以对应为探测响应(Probe Response),并在Probe Response中携带标识信息;当第一服务发现请求为Service Discovery Request时,可以在通过该网络发送的Service Discovery Request中携带相同的服务标识(例如:服务名称),那么通过该网络接收的第一服务发现响应可以对应为Service Discovery Response,并在Service Discovery Response中携带标识信息;当第一服务发现请求为Probe Request以及Service Discovery Request时,可以首先发送Probe Request,并在Probe Request中携带服务标识(例如:服务哈希值),并通过该网络接收对应的Probe Response,再发送Service Discovery Request,并在Service Discovery Request中携带服务标识(例如:服务名称),通过该网络接收Service Discovery Response,而标识信息可以携带于Probe Response和/或Service Discovery Response中,具体实现可以根据实际情况设置。
进一步地,相应地,第一服务发现响应用于对通过网络进行服务发现的请求(本发明实施例中称为第一服务发现请求)进行响应,凡是用于对通过网络进行服务发现的请求进行的响应都可以作为本发明实施例中的第一服务发现响应。
进一步地,步骤S501~步骤S503为针对相同服务进行服务发现的流程。
S504、ASP模块将根据第一服务发现响应确定的第一服务发现结果上报服务模块。
其中,第一服务发现结果包括能够发现相同服务的每一个网络的网络信息、以及对应通过能够发现相同服务的每一个网络的网络发现的服务提供端的信息;或者,
第一服务发现结果包括能够发现相同服务的每一个网络发现的服务提 供端的信息。
进一步地,第一服务发现结果可以根据第一服务发现响应进行确定。第一服务发现结果中可以包括发现相同服务的网络的网络信息,也可以不包括该网络信息。服务提供端的信息可以是服务提供端的网络地址信息,和/或对服务提供端所提供服务的服务描述信息等;网络信息可以包括描述发现服务提供端的网络的性质信息、类型信息等,例如P2P网络,AP网络、地址信息、和/或其它能够描述该网络的信息。
进一步地,本步骤中,ASP模块接收到至少一个完成服务发现的网络发送的第一服务发现响应之后,可以将针对相同服务进行服务发现的第一服务发现结果上报服务模块(当至少收到两个服务发现响应时,针对相同服务发现的第一服务发现结果上报服务模块可以是一次上报,或者是分开来多次上报),当第一服务发现结果包括发现该相同服务的每一个网络的网络信息、对应通过该网络发现的提供该相同服务的服务提供端的信息时,在服务模块确定出需要采用其提供的服务的服务提供端之后,ASP模块能够确定发现该服务提供端的网络的网络信息,并通过该网络与该服务提供端建立ASP会话。
进一步地,可以通过同一个消息或者不同的消息上报能够发现相同服务的网络对应的网络信息及其发现的通信提供端信息、以及通过该网络接收的标识信息。其中还可能存在通过一个网络发现多个能够提供相同服务的服务提供端。
S505、服务模块指示ASP模块与第一服务提供端建立第一ASP会话;
其中,第一服务提供端为服务模块从上报的第一服务发现结果中确定的;且第一服务提供端为通过第一网络发现的。
进一步地,本步骤中,当ASP模块仅上报了一个完成服务发现的网络所发现的服务提供端的信息,或者完成服务发现的网络的网络信息以及该网络发现的服务提供端的信息时,将该网络确定为第一网络,将第一网络 发现的一个服务提供端确定为第一服务提供端(这里通过第一网络可能是发现了一个相同服务提供端,也可能是从第一网络发现的多个相同服务的服务提供端中选择一个);当上报完成相同服务的服务发现的至少两个网络对应发现的服务提供端的信息,或者完成相同服务的服务发现的至少两个网络的网络信息,以及该至少两个网络对应发现的服务提供端的信息时,根据预设确定规则确定第一网络以及通过第一网络发现的第一服务提供端,预设确定规则可以为网络完成服务发现的先后顺序,还可以是ASP模块在上报的网络信息中包括的网络连接的质量信息等其它信息,上层服务根据这些信息来决策从其中选择一个,或者是上层服务根据之前连接的信息从多个网络和对应的服务提供端中选择一个,还可以是上层服务根据其它获取的信息来判断做出对服务提供端的选择。
进一步地,本步骤中,建立第一ASP会话,可以包括ASP模块与对端的ASP模块协商服务的能力信息,连接能力信息,安全信息等信息,基于协商的信息建立第一ASP会话。
S506、服务模块通过S505建立的第一ASP会话承载通过第一网络发现的该相同服务的业务数据。
进一步地,这个过程具体包括,服务模块基于建立的第一ASP会话,建立上层业务会话,该上层业务会话通过第一网络建立,上层业务的数据通过该第一网络传输。
S507、服务模块从上报的第一服务发现结果中包括的标识信息中,确定与第一网络接收的标识信息匹配的标识信息。
进一步地,第一服务发现结果也可以包括通过能够发现相同服务的网络接收的第一服务发现响应中携带的标识信息,以便服务模块能够根据不同网络对应的标识信息确定不同网络发现的服务是否为同一服务提供端提供的同一服务。
进一步地,本步骤中,匹配可以是指上报的能够发现该相同服务的网 络所接收的标识信息与第一网络接收的标识信息相同,也可以是指上报的能够发现该相同服务的网络所接收的标识信息与第一网络接收的标识信息满足某一运算关系,比如两者对某一数值进行取模运算后的结果相同等,或者是通过标识信息进行其他计算,例如Hash运算,截取运算,移位运算等,对运算的结果进行比较。当比较满足一定的条件时,服务模块可以确定出与通过第一网络接收的标识信息匹配的标识信息,可以确定通过接收该匹配标识信息的网络所发现的服务与通过第一网络所发现的服务为同一服务提供端提供的同一服务。
进一步地,本步骤可以根据当前业务传输需求触发执行,当前业务传输需求可以根据实际情况进行设定,例如,当第一网络信号转弱,无法满足当前业务传输需求时,可以触发本步骤执行,或者当前需要传输的业务数据增加第一网络带宽不足,无法满足当前业务传输需求时,可以触发本步骤执行;或者是其它业务传输需求等。
进一步地,服务提供端的标识信息可以为设备信息(例如:设备名称,设备类型,设备的序列号等),或者是唯一的网络地址,或者是跟设备相关的业务标识信息,或者是以上中的多种的组合,或者是其它用于描述服务提供端的信息。
S508、当确定出与第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过第一网络所发现的服务为同一服务提供端提供的同一服务。
S509、服务模块指示ASP模块与第二服务提供端建立第二ASP会话,
其中,第二服务提供端为服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且第二服务提供端为通过第二网络发现的。
进一步地,该第二服务提供端与第一网络所发现的服务提供端为同一服务提供端。
进一步地,本步骤中,当除第一网络之外仅存在一个网络接收到匹配 的标识信息时,将该网络确定为第二网络,当除第一网络之外存在至少两个网络接收到匹配的标识信息时,根据预设确定规则确定第二网络,其中,预设确定规则可以为网络的信号质量、或者网络完成服务发现的先后顺序等,上层服务根据这些信息来决策从其中选择一个,或者是上层服务根据之前连接的信息从多个网络和对应的服务提供端中选择一个,还可以是上层服务根据其它获取的信息来判断做出对服务提供端的选择。确定第一网络时使用的预设确定规则与确定第二网络时使用的预设确定规则可以相同或者不同。
进一步地,本步骤中,由于通过第二网络接收的标识信息与通过第一网络接收的标识信息为匹配的标识信息,那么,可以确定通过第二网络发现的服务与通过第二网络发现的服务为同一服务提供端提供的同一服务,第二服务提供端与S505中的第一服务提供端为同一服务提供端。
S510、将第一ASP会话所承载的业务数据承载在S509中建立的第二ASP会话上,继续当前的业务数据传输。
进一步地,本步骤具体包括,服务模块基于建立的第二ASP会话,建立上层业务会话,将之前第一ASP会话上的业务会话转到该第二ASP业务会话上继续传输,即第一ASP会话上的业务会话的数据传输转到第二ASP会话上的业务会话上继续传输。
进一步地,本步骤可以具体执行为:
步骤一:服务请求端的服务模块停止使用第一端口与服务提供端进行业务数据交互,其中,第一端口为第一ASP会话承载的业务会话使用的、第一网络对应的网络地址的可用端口;并
步骤二:将使用第一端口与服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与服务提供端进行交互,其中,第二端口为第二ASP会话承载的业务会话使用的、第二网络对应的网络地址的可用端口。
进一步地,在服务请求端中,不同网络可以对应不同的网络地址,例 如:P2P网络和基础设施网络分别具有不同的MAC地址,上层应用使用不同的网络时也会对应不同的网络协议(IP,Internet Protocol)地址,那么建立的第一ASP会话承载的业务会话所使用的第一端口为该第一ASP会话基于的第一网络对应的网络地址的可用端口,建立的第二ASP会话承载的业务会话所使用的第二端口为该第二ASP会话基于的第二网络对应的网络地址的可用端口。由于第一网络和第二网络所发现服务为同一服务提供端提供的同一服务,那么当需要使用第二网络替换第一网络继续本次业务数据传输时,可以使用第二端口代替第一端口进行业务数据传输,尽管底层网络被替换了,但上层业务并没有中断,而是继续进行业务数据传输,提高了业务数据传输的灵活性。
下面以具体的应用场景对实施例1提供的一种服务发现方法进行举例说明:
例1:以服务请求端(终端)连接的Wi-fi网络为例,假设服务请求端连接了P2P网络以及基础设施网络(基于AP的网络),服务请求端需要将自身屏幕内容通过服务提供端(电视机)屏幕进行显示,具体地服务发现方法如图6所示,具体包括如下步骤:
S601、第一服务提供端中的服务模块向第一服务提供端中的ASP模块发送发布服务指示,以便当服务请求端发送服务发现请求时,服务提供端能够处理该服务发现请求。
本步骤中,假设电视机中的服务模块向电视机中的ASP模块发送服务发布AdvertiseService(服务名称ServiceName)消息,其中,ServiceName可以为服务提供端所提供服务的服务名称,例如:发现显示Display服务的名称,进一步地,发布服务指示中也可以携带标识信息,即指示该电视机设备的标识信息。
S602、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
例如:终端中的服务模块向终端中的ASP模块发送第一服务发现SeekService(服务名称ServiceName)指示,ServiceName可以为Display服务的名称。
S603、服务请求端中的ASP模块根据S602中接收的第一服务发现指示,通过P2P网络和基础设施网络发送第一服务发现请求,并将服务标识携带于第一服务发现请求中。
例如:终端中的ASP模块通过P2P网络和基础设施网络分别发送用于发现Display服务的第一服务发现请求,并将Display服务的名称携带于第一服务发现请求。
进一步地,本步骤中,P2P网络和基础设施网络可以广播第一服务发现请求,以便能够提供服务的服务提供端对第一服务发现请求进行响应。
S604、服务提供端通过设备中的P2P网络和基础设施网络分别接收到第一服务发现请求之后,由服务提供端的ASP模块对第一服务发现请求中所请求的服务进行确认,并在确定能够提供所请求服务之后,分别通过P2P网络和基础设施网络向服务请求端对应发送第一服务发现响应。
其中,第一服务发现响应中可以携带标识信息,进一步地,也可以携带服务名称。
进一步地,通过基础设施网络进行服务发现能够成功的前提是服务提供端和服务请求端均与同一个AP建立了连接,或者是连接到不同的AP但是这两个不同的AP之间可以通信。
进一步地,步骤S603和步骤S604对于P2P网络和基础设施网络可以采用不同的实施方式:
对于P2P网络可以具体实施可以为:
步骤一、服务请求端的ASP模块通过P2P网络发送携带有服务哈希值ServiceHash的Probe Request消息。
步骤二、服务提供端通过P2P网络接收到Probe Request消息,通过服 务提供端的ASP模块对Probe Request消息中携带的ServiceHash进行确认,当确定能够提供ServiceHash表征的服务时,通过P2P网络向服务请求端发送Probe Response消息。
本步骤中,Probe Response消息中可以携带与ServiceHash对应的ServiceName。
步骤三、服务请求端通过P2P网络接收到Probe Response消息之后,通过P2P网络向服务提供端发送携带有ServiceName的服务发现请求Service Discovery Request。
步骤四、服务提供端通过P2P网络接收到Service Discovery Request之后,通过服务提供端的ASP模块对Service Discovery Request中携带的ServiceName进行匹配,当确定能够提供ServiceName表征的服务时,通过P2P网络向服务请求端发送携带有ServiceName的Service Discovery Response消息。
进一步地,在步骤二和步骤四中,可以通过Probe Response消息和/或Service Discovery Response消息携带服务提供端的标识信息ServiceID,还可以包括服务提供端的网络信息(服务提供端的网络信息可以是网络地址信息或者是其它可以描述网络的信息),还可以包括服务提供端的服务描述信息。
对于基础设施网络可以具体实施可以为:
步骤一、服务请求端通过基础设施网络发送携带有ServiceName的服务发现请求Service Discovery Request。
步骤二、服务提供端通过基础设施网络接收到Service Discovery Request之后,通过服务提供端的ASP模块对Service Discovery Request中携带的ServiceName进行匹配,当确定能够提供ServiceName表征的服务时,通过基础设施网络向服务请求端发送携带有ServiceName的Service Discovery Response消息。
进一步地,在步骤二中,可以通过Service Discovery Response消息携带服务提供端的标识信息ServiceID,还可以包括标识服务提供端的网络信息(服务提供端的网络信息可以是网络地址信息或者是其它可以描述网络的信息),还可以包括服务提供端的服务描述信息。
进一步地,基础设施网络也可以具体实施为上述P2P网络的实施方式,这里不再赘述。
S605、服务请求端的ASP模块将根据通过P2P网络以及基础设施网络分别接收的第一服务发现响应确定的第一服务发现结果上报服务请求端的服务模块。
本步骤中,ASP模块可以向服务模块上报P2P网络对应的网络地址信息(或者不包括此信息)、通过P2P网络发现的服务提供端的信息、以及通过P2P网络接收的ServiceID,并上报与P2P网络完成相同的服务发现的基础设施网络的网络地址信息(或者不包括此信息)、通过基础设施网络发现的服务提供端的信息、以及通过基础设施网络接收的ServiceID。并且,ASP模块在针对每一个网络进行服务发现结果上报时,可以通过同一个消息将完成服务发现的网络的网络信息及其发现的服务提供端的信息以及接收的服务提供端的ServiceID上报给服务模块,也可以通过不同的消息分别将网络信息及其发现的服务提供端的信息以及接收的ServiceID上报给服务模块,其中,不同的消息的发送顺序不作限定。
S606、服务请求端的服务模块指示服务请求端的ASP模块与第一服务提供端建立第一ASP会话。
服务模块从通过P2P网络发现的服务提供端和通过基础设施网络发现的服务提供端中确定第一服务提供端。
假设服务模块确定出的第一网络为P2P网络,通过P2P网络发现的服务提供端为第一服务提供端,则后续执行步骤S607~步骤S612;假设服务模块确定出的第一网络为基础设施网络,通过基础设施网络发现的服务提 供端为第一服务提供端,则如图7所示,后续执行步骤S6071~S6111。
S607、服务请求端和第一服务提供端之间建立P2P连接。
进一步地,由于P2P网络在进行服务发现之后需要先建立P2P连接再基于建立的P2P连接建立ASP会话,因此,基于P2P网络建立ASP会话,可以执行为:在服务请求端和服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
S608、服务请求端的ASP模块与第一服务提供端建立第一ASP会话。
S609、服务请求端的服务模块通过S608中建立的第一ASP会话进行业务数据传输。
进一步地,本步骤执行过程具体包括,服务模块基于建立的第一ASP会话,建立上层业务会话,该上层业务会话基于通过第一网络建立,上层业务的数据通过该第一网络传输。
例如:本步骤中,终端的服务模块通过基于P2P网络与电视机建立的第一ASP会话,基于第一ASP会话建立上层的Display业务会话,进行Display服务的业务数据传输,通过电视机将终端屏幕显示的内容进行显示。
S610、服务请求端的服务模块,根据当前传输需求,确定通过基础设施网络针对相同服务进行服务发现时接收的服务提供端的标识信息,与通过P2P网络进行服务发现接收的服务提供端的标识信息是否匹配,若匹配,确定通过基础设施网络进行服务发现与通过P2P网络进行服务发现所发现的服务为同一服务提供端提供的同一服务。
本步骤中,可以为当服务请求端和服务提供端之间的距离逐渐增大,P2P网络信号质量减弱,触发服务请求端使用基础设施网络代替P2P网络继续当前业务。
S611、服务模块指示ASP模块与第二服务提供端建立第二ASP会话,其中,服务请求端的服务模块将通过基础设施网络发现的服务提供端确定为通过第二网络发现的第二服务提供端。
进一步地,步骤S608中建立第一ASP会话的步骤与本步骤中建立第二ASP会话的步骤类似,二者的不同之处在于,基于基础设施网络建立第二ASP会话时,服务请求端和服务提供端之间交互的请求和响应均需要通过AP进行转发。
S612、ASP模块与第二服务提供端建立第二ASP会话。
S613、将基于P2P网络建立的第一ASP所承载的业务数据承载在第二ASP会话上,继续当前业务数据的传输。本流程结束。
进一步地,本步骤具体包括,服务模块基于建立的第二ASP会话,建立上层业务会话,将之前第一ASP会话上的业务会话转到该第二ASP业务会话上继续传输,即第一ASP会话上的业务会话的数据传输转到第二ASP会话上的业务会话上继续传输。
例如:终端正在通过P2P网络使用电视机提供的Display服务,但是由于终端与电视机的距离变大,终端中的服务模块确定P2P网络的信号减弱,且通过基础设施网络发现的Display服务为同一电视机提供的同一Display服务,则不需要中断终端和电视机之间的视频数传输,而是基于基础设施网络建立ASP会话,并将终端和电视机之间传输的视频数据所基于的P2P网络切换成基础设施网络,继续终端和电视机之间的视频数据传输。
如图7所示,接续步骤S606:
S6071、服务请求端的ASP模块与第一服务提供端建立第一ASP会话。
S6081、服务请求端的服务模块通过S6071中建立的第一ASP会话进行业务数据传输。
进一步地,本步骤具体包括,服务模块基于建立的第一ASP会话,建立上层业务会话,该上层业务会话基于通过第一网络建立,上层业务的数据通过该第一网络传输。
S6091、服务请求端的服务模块,根据当前传输需求,确定通过P2P网络针对相同服务进行服务发现时接收的服务提供端的标识信息,与通过基 础设施网络进行服务发现接收的服务提供端的标识信息是否匹配,若匹配,确定通过P2P网络进行服务发现与通过基础设施网络进行服务发现所发现的服务为同一服务提供端提供的同一服务。
S6101、服务请求端的服务模块指示ASP模块与第二服务提供端建立第二ASP会话,其中,服务请求端的服务模块将P2P网络发现的服务提供端确定为第二网络发现的第二服务提供端。
S6111、在服务请求端和第二服务提供端之间建立P2P连接。
S6121、服务请求端的ASP模块与第二服务提供端建立第二ASP会话。
S6131、将基于基础设施网络建立的第一ASP所承载的业务数据承载在第二ASP会话上,继续当前业务数据的传输。本流程结束。
进一步地,本步骤具体包括,服务模块基于建立的第二ASP会话,建立上层业务会话,将之前第一ASP会话上的业务会话转到该第二ASP业务会话上继续传输,即第一ASP会话上的业务会话的数据传输转到第二ASP会话上的业务会话上继续传输。
实施例2:
本发明实施例2中,以ASP为例,提供一种服务发现方法,应用于服务请求端侧,在实施例2中,可以首先基于第一网络建立第一ASP会话,并通过该第一ASP会话承载业务数据传输,当第一网络无法满足业务需求时,再次进行服务发现,基于第二次服务发现中与第一网络所发现服务为同一服务提供端提供的同一服务的第二网络建立ASP会话,并通过第二ASP会话继续当前业务数据的传输。
实施例2提供的一种服务发现方法应用于服务请求端,如图8所示,具体包括如下步骤:
S801、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
S802、ASP模块根据S801中接收的第一服务发现指示,通过至少一个 网络发送包含相同服务的第一服务发现请求,
其中,第一服务发现请求中携带有相同服务的服务标识。
进一步地,本步骤中可以通过一个网络或者多个不同的网络发送包含相同服务的第一服务发现请求。
S803、ASP模块通过上述至少一个网络中能够发现上述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应。
其中,第一服务发现响应中携带有标识信息。
进一步地,本步骤中,标识信息可以标识发送第一服务发现响应的服务提供端,例如:可以将发送第一服务发现响应的服务提供端的设备信息(例如:设备名称,设备类型,设备的序列号等)作为服务提供端的标识信息,或者是服务提供端的设备唯一地址,或者是跟设备相关的业务标识信息,或者是以上中的多种的组合(例如:服务提供端的设备地址加上服务信息),或者是将其他能够标识该服务提供端的信息作为服务提供端的标识信息。
进一步地,本步骤中,S802中通过一个网络发送包含相同服务的第一服务发现请求,且能够通过该一个网络发现该相同服务时,接收该一个网络发送的第一服务发现响应。
进一步地,步骤S801~步骤S803为针对相同服务进行第一次服务发现的流程。
S804、ASP模块将根据第一服务发现响应确定的第一服务发现结果上报服务模块。
其中,第一服务发现结果包括能够发现上述相同服务的网络的网络信息、以及对应通过能够发现上述相同服务的网络发现的服务提供端的信息;或者,
第一服务发现结果包括能够发现上述相同服务的网络发现的服务提供端的信息。
进一步地,本步骤中,ASP模块将进行第一次服务发现的第一服务发现结果上报服务模块。
进一步地,第一服务发现结果可以根据第一服务发现响应进行确定。第一服务发现结果中可以包括发现相同服务的网络的网络信息,也可以不包括该网络信息。服务提供端的信息可以是服务提供端的网络地址信息,和/或对服务提供端所提供服务的服务描述信息等;网络信息可以包括描述发现服务提供端的网络的性质信息、类型信息等,例如P2P网络,AP网络、地址信息、和/或其它能够描述该网络的信息。
S805、服务模块指示ASP模块与第一服务提供端建立第一ASP会话,
其中,第一服务提供端为服务模块从上报的第一服务发现结果中确定的;且第一服务提供端为通过第一网络发现的。
S806、服务模块通过S805建立的第一ASP会话承载通过第一网络发现的该相同服务的业务数据。
进一步地,本步骤具体包括,服务模块基于建立的第一ASP会话,建立上层业务会话,该上层业务会话基于通过第一网络建立,上层业务的数据通过该第一网络传输。
S807、服务模块向ASP模块发送第二服务发现指示。
进一步地,本步骤中可以根据当前业务传输需求触发执行,当前业务传输需求可以根据实际情况进行设定,例如,当第一网络信号转弱,无法满足当前业务传输需求时,可以触发本步骤执行,或者当前需要传输的业务数据增加第一网络带宽不足,无法满足当前业务传输需求时,可以触发本步骤执行等。
进一步地,本实施例中,尽管在步骤S804中ASP模块将第一次进行服务发现的第一服务发现结果上报服务模块,并且第一服务发现结果中包括通过能够发现相同服务的网络发现的服务提供端的信息,也就是说,服务模块可以从第一次服务发现中出第一网络之外的、与第一网络发现的服务 为同一服务提供端提供的同一服务的网络中确定第二网络,但是由于使用第一ASP会话的时间较长,第一次服务发现的结果有可能在当前准确性有所降低,因此,本实施例中,服务模块需要发起第二次服务发现,从第二次服务发现中与第一网络发现的服务为同一服务提供端提供的同一服务的网络中确定第二网络。
S808、ASP模块根据S807中的第二服务发现指示,通过至少一个网络发送包含相同服务的第二服务发现请求。
其中,第二服务发现请求中携带有相同服务的服务标识,预设网络包括不同网络中的网络。
进一步地,本实施例中进行第一次业务发现的通过的至少一个网络,和进行第二次业务发现通过的至少一个网络,可以为以下不同类型的网络中至少一个网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。并且,进行第一次业务发现的通过的至少一个网络,和进行第二次业务发现通过的至少一个网络可以相同也可以不同。
进一步地,本步骤中,第二服务发现请求表征用于通过网络进行服务发现的请求,凡是能够用于通过网络进行服务发现的消息都可以作为本发明实施例中的第二服务发现请求。
S809、ASP模块通过上述至少一个网络中能够发现相同服务的网络对应接收服务提供端发送的第二服务发现响应。
其中,第二服务发现响应中携带有标识信息。
进一步地,本步骤中,针对上述至少一个网络中能够发现相同服务的网络,ASP模块通过该网络接收通过该网络发现的提供相同服务的服务提供端发送的第二服务发现响应。
进一步地,本步骤中,标识信息可以标识发送第二服务发现响应的服务提供端,例如:可以将发送第二服务发现响应的服务提供端的设备信息 (例如:设备名称,设备类型,设备的序列号等)作为服务提供端的标识信息,或者是服务提供端的设备唯一地址,或者是跟设备相关的业务标识信息,或者是以上中的多种的组合(例如:服务提供端的设备地址加上服务信息),或者是将其他能够标识该服务提供端的信息作为服务提供端的标识信息。
进一步地,具体实施时,第二服务发现请求可以为探测请求(Probe Request),或者为Service Discovery Request,或者为Probe Request以及Service Discovery Request,也就是说,针对预设网络中的每个网络,当第二服务发现请求为Probe Request时,可以在通过该网络发送的Probe Request中携带相同的服务标识(例如:服务哈希值),那么通过该网络接收的第二服务发现响应可以对应为探测响应(Probe Response),并在Probe Response中携带标识信息;当第二服务发现请求为Service Discovery Request时,可以在通过该网络发送的Service Discovery Request中携带相同的服务标识(例如:服务名称),那么通过该网络接收的第二服务发现响应可以对应为Service Discovery Response,并在Service Discovery Response中携带标识信息;当第二服务发现请求为Probe Request以及Service Discovery Request时,可以首先发送Probe Request,并在Probe Request中携带服务标识(例如:服务哈希值),并通过该网络接收对应的Probe Response,再发送Service Discovery Request,并在Service Discovery Request中携带服务标识(例如:服务名称),通过该网络接收Service Discovery Response,而标识信息可以携带于Probe Response和/或Service Discovery Response中,具体实现可以根据实际情况设置。
进一步地,相应地,第二服务发现响应用于对通过网络进行服务发现的请求(本发明实施例中称为第二服务发现请求)进行响应,凡是用于对通过网络进行服务发现的请求进行的响应都可以作为本发明实施例中的第二服务发现响应。
进一步地,步骤S807~步骤S809为针对相同服务进行第二次服务发现的流程。
S810、ASP模块将根据第二服务发现响应确定的第二服务发现结果上报服务模块。
其中,第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现相同服务的每一个网络的网络信息、以及对应通过能够发现相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现相同服务的每一个网络接收的标识信息;或者,
所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现相同服务的每一个网络接收的标识信息。
进一步地,第二服务发现结果可以根据第二服务发现响应进行确定。第二服务发现结果中可以包括发现相同服务的网络的网络信息,也可以不包括该网络信息。服务提供端的信息可以是服务提供端的网络地址信息,和/或对服务提供端所提供服务的服务描述信息等;网络信息可以包括描述发现服务提供端的网络的性质信息、类型信息等,例如P2P网络,AP网络、地址信息、和/或其它能够描述该网络的信息。
进一步地,本步骤中,ASP模块接收到至少一个完成服务发现的网络发送的第二服务发现响应之后,可以将针对相同服务进行服务发现的第二服务发现结果上报服务模块。
进一步地,可以通过同一个消息或者不同的消息上报能够发现相同服务的网络对应的网络信息及其发现的通信提供端信息、以及通过该网络接收的标识信息。其中还可能存在通过一个网络发现多个能够提供相同服务的服务提供端。
S811、服务模块从上报的第二服务发现结果中包括的标识信息中,确定与第一网络接收的标识信息匹配的标识信息。
S812、当确定出与第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过第一网络所发现的服务为同一服务提供端提供的同一服务。
S813、指示ASP模块与第二服务提供端建立第二ASP会话,
其中,第二服务提供端为服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且第二提供端为通过第二网络发现的。
进一步地,本步骤中,当在第二次服务发现结果中仅存在一个网络接收到匹配的标识信息时,将该网络确定为第二网络,当在第二次服务发现结果中存在至少两个网络接收到匹配的标识信息时,根据预设确定规则确定第二网络,其中,预设确定规则可以为网络的信号质量、或者网络完成服务发现的先后顺序等,上层服务根据这些信息来决策从其中选择一个,或者是上层服务根据之前连接的信息从多个网络和对应的服务提供端中选择一个,还可以是上层服务根据其它获取的信息来判断做出对服务提供端的选择。确定第一网络时使用的预设确定规则与确定第二网络时使用的预设确定规则可以相同或者不同。
进一步地,步骤S805中确定的第一服务提供端与本步骤中确定的第二服务提供端为提供同一服务的同一服务提供端。
S814、将第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输。
进一步地,本步骤具体包括,服务模块基于建立的第二ASP会话,建立上层业务会话,将之前第一ASP会话上的业务会话转到该第二ASP业务会话上继续传输,即第一ASP会话上的业务会话的数据传输转到第二ASP会话上的业务会话上继续传输。
进一步地,实施例2中与实施例1相似步骤的解释可以见实施例1中的对应步骤,这里不再赘述。
下面以具体的应用场景对实施例2提供的一种服务发现方法进行举例 说明:
例2:以服务请求端(终端)连接的Wi-fi网络为例,假设服务请求端连接了P2P网络以及基础设施网络,服务请求端需要将自身屏幕内容通过服务提供端(电视机)屏幕进行显示,并且在例2中假设通过P2P网络进行第一次服务发现,通过基础设施网络进行第二次服务发现,具体地服务发现方法如图9所示,具体包括如下步骤:
S901、服务提供端中的服务模块向服务提供端中的ASP模块发送发布服务指示,以便当服务请求端发送服务发现请求时,服务提供端能够处理该服务发现请求。
S902、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
S903、服务请求端中的ASP模块根据S902中接收的第一服务发现指示,通过P2P网络发送第一服务发现请求,并将服务标识携带于第一服务发现请求中。
本步骤中,服务请求端中的ASP模块也可以根据S902中接收的第一服务发现指示,通过P2P网络和基础设施网络发送第一服务发现请求,并将服务标识携带于第一服务发现请求中。
S904、服务提供端中的P2P网络接收到第一服务发现请求之后,由服务提供端的ASP模块对第一服务发现请求中所请求的服务进行确认,并在确定能够提供所请求服务之后,通过P2P网络向服务请求端对应发送第一服务发现响应。
其中,第一服务发现响应中可以携带标识信息,进一步地,也可以携带服务名称。
S905、服务请求端的ASP模块将通过P2P网络进行服务发现的第一服务发现结果上报服务请求端的服务模块。
本步骤中,ASP模块可以向服务模块上报P2P网络对应的网络地址信 息(或者不包括此信息)、通过P2P网络发现的服务提供端的信息、以及通过P2P网络接收的ServiceID。
S906、服务请求端的服务模块指示服务请求端的ASP模块与第一服务提供端建立第一ASP会话,
其中,服务模块将通过P2P网络发现的服务提供端确定为第一服务提供端。
进一步地,当步骤S903中通过P2P网络和基础设施网络发送第一服务发现请求时,本步骤可以执行为:服务模块从通过P2P网络发现的服务提供端和通过基础设施网络发现的服务提供端中确定第一服务提供端。
S907、服务请求端和第一服务提供端之间建立P2P连接,
S908、服务请求端的ASP模块与第一服务提供端建立第一ASP会话。
S909、服务请求端的服务模块通过S908中建立的第一ASP会话进行业务数据传输。
进一步地,本步骤执行过程具体包括,服务模块基于建立的第一ASP会话,建立上层业务会话,该上层业务会话基于通过第一网络建立,上层业务的数据通过该第一网络传输。
S910、服务请求端的服务模块,根据当前传输需求,向服务请求端的ASP模块发送第二服务发现指示。
进一步地,本步骤中,第二服务发现指示所指示发现的服务与第一服务发现指示所指示发现的服务为相同服务。
本步骤中,可以为当服务请求端和服务提供端之间的距离逐渐增大,P2P网络信号质量减弱,触发服务请求端使用基础设施网络代替P2P网络继续当前业务。
S911、服务请求端中的ASP模块根据S910中接收的第二服务发现指示,通过基础设施网络发送第二服务发现请求,并将服务标识携带于第二服务发现请求中。
进一步地,本步骤中,基础设施网络可以广播第二服务发现请求,以便能够提供服务的服务提供端对第二服务发现请求进行响应。
S912、服务提供端中的基础设施网络接收到第二服务发现请求之后,由服务提供端的ASP模块对第二服务发现请求中所请求的服务进行确认,并在确定能够提供所请求服务之后,通过基础设施网络向服务请求端发送第二服务发现响应。
其中,第二服务发现响应中可以携带标识信息,进一步地,也可以携带服务名称。
进一步地,对于P2P网络和基础设施网络可以采用不同的实施方式进行服务发现,此处不再赘述。
S913、服务请求端的ASP模块将通过基础设施网络进行服务发现的第二服务发现结果上报服务请求端的服务模块。
本步骤中,ASP模块可以向服务模块上报基础设施网络的网络地址信息(或者不包括此信息)、通过基础设施网络发现的服务提供端的信息、以及通过基础设施网络接收的ServiceID。
S914、服务模块确定第二次服务发现通过基础设施网络接收的标识信息中,与第一次服务发现中通过P2P网络接收的标识信息匹配。
S915、确定第二次服务发现通过基础设施网络所发现的服务与第一次服务发现中通过P2P网络所发现的服务为同一服务提供端提供的同一服务。
S916、服务请求端的服务模块指示服务请求端的ASP模块与第二服务提供端建立第二ASP会话,
其中,服务模块将第二次服务发现通过基础设施网络发现的服务提供端确定为通过第二网络发现的第二服务提供端。
S917、服务请求端的ASP模块与第二服务提供端建立第二ASP会话。
S918、服务请求端的服务模块将第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输。
实施例3:
本发明实施例3中,以ASP为例,提供一种服务发现方法,应用于服务请求端侧,在实施例3中,可以首先基于所发现服务为同一服务提供端提供的同一服务的各网络分别建立ASP会话,并使用基于第一网络建立的第一ASP会话承载业务数据传输,当第一网络无法满足业务需求时,通过第二ASP会话继续当前业务数据的传输。
实施例3提供的一种服务发现方法应用于服务请求端,如图10所示,具体包括如下步骤:
S1001、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
S1002、ASP模块根据S1001中接收的第一服务发现指示,通过预设网络发送包含相同服务的第一服务发现请求,
其中,第一服务发现请求中携带有相同服务的服务标识,预设网络包括不同网络中的网络。
进一步地,本步骤中,服务请求端可能连接多个不同的网络(例如:以下不同类型的网络中的至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络等),当ASP模块接收到服务模块发送的第一服务发现指示时,可以根据第一服务发现指示所要求发现的服务(例如:打印服务)使用预设网络针对该相同服务进行服务发现,其中,预设网络、服务标识的解释可以参考实施例1这里不再赘述。
进一步地,当服务请求端设备仅支持两个不同的网络时,预设网络为该两个不同的网络。
S1003、ASP模块通过预设网络中能够发现上述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应,
其中,第一服务发现响应中携带有标识信息。
进一步地,步骤S1001~步骤S1003为针对相同服务进行服务发现的流程。
S1004、ASP模块将根据第一服务发现响应确定的第一服务发现结果上报服务模块,
其中,第一服务发现结果可以根据第一服务发现响应进行确定。第一服务发现的结果包括能够发现相同服务的每一个网络的网络信息、以及对应通过能够发现相同服务的每一个网络的网络发现的服务提供端的信息、以及对应通过能够发现相同服务的每一个网络的网络接收的标识信息;
或者,第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息。
进一步地,本步骤中,ASP模块接收到至少两个完成服务发现的网络发送的第一服务发现响应之后,可以将针对相同服务进行服务发现的第一服务发现结果上报服务模块,进一步地,第一服务发现结果中可以包括发现相同服务的网络的网络信息(也可以不包括该网络信息)。服务提供端的信息可以是服务提供端的网络地址信息,和/或服务提供端提供服务的服务描述信息等;网络信息可以是描述发现服务提供端的网络的性质信息、类型信息等,例如P2P网络,AP网络、地址信息、或者是其它能够描述该网络的信息。第一服务发现结果也可以包括通过能够发现相同服务的网络接收的服务发现响应中携带的标识信息,以便服务模块能够根据不同网络对应的标识信息确定不同网络发现的服务是否为同一服务提供端提供的同一服务。
S1005、服务请求端的服务模块在上报的标识信息中,确定匹配的标识信息。
进一步地,尽管不同的网络针对相同的服务进行服务发现,但是可能有不同的服务提供端提供相同的服务,而通过不同网络接收的第一服务发 现响应中携带有标识信息,可以用于标识提供服务的服务提供端,本步骤中,服务请求端的服务模块根据不同网络针对相同服务进行服务发现接收的标识信息是否匹配,确定不同网络发现的服务是否为同一服务提供端提供的同一服务。
S1006、当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务。
本步骤中,服务请求端的服务模块确定接收到的标识信息相匹配的网络发现的服务为同一服务提供端提供的同一服务。
S1007、服务模块指示服务请求端的ASP模块与提供上述同一服务的同一服务提供端建立ASP会话。
进一步地,本步骤中,ASP模块根据服务模块的指示,基于各发现同一服务提供端提供的同一服务的网络,分别建立ASP会话。
S1008、从ASP模块分别基于发现同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的第一ASP会话承载同一服务提供端提供的同一服务的业务数据。
进一步地,可以根据预设使用规则从建立的各ASP会话中确定第一ASP会话,预设使用规则可以为网络完成服务发现的先后顺序,还可以是ASP模块在上报的网络信息中包括的网络连接的质量信息等其它信息,上层服务根据这些信息来决策从其中选择一个,或者是上层服务根据之前连接的信息从多个网络和对应的服务提供端中选择一个,还可以是上层服务根据其它获取的信息来判断做出对服务提供端的选择。
S1009、服务模块将S1008中第一ASP会话所承载的业务数据的承载在第二ASP会话上继续当前的业务数据传输,
其中,第二ASP会话为基于第二网络建立的,第二网络为从发现同一服务提供端提供的同一服务的网络中确定的除第一网络之外的网络。
进一步地,本步骤可以根据当前业务传输需求触发。当服务请求端的 ASP模块仅向服务请求端的服务模块上报了两个完成了服务发现的网络及其分别发现的服务提供端时,将两个网络中除第一网络之外的网络确定为第二网络。进一步地,确定第一网络时使用的预设使用规则与确定第二网络时使用的预设使用规则可以相同或者不同。
进一步地,步骤S1008~S1009还可以被替换为:通过建立的各ASP会话承载同一服务提供端提供的同一服务的业务数据。例如:根据与服务提供端预先约定的传输规则,将与服务提供端之间传输的业务数据的流量平均分成与建立的ASP会话个数相同的份数,分别通过各ASP会话进行传输,能够加快传输速度,提高传输效率。
下面以具体的应用场景对实施例3提供的一种服务发现方法进行举例说明:
例3:以服务请求端(终端)连接的Wi-fi网络为例,假设服务请求端连接P2P网络以及基础设施网络,服务请求端需要将自身屏幕内容通过服务提供端(电视机)屏幕进行显示,具体地服务发现方法如图11所示,具体包括如下步骤:
S1101、服务提供端中的服务模块向服务提供端中的ASP模块发送发布服务指示,以便当服务请求端发送服务发现请求时,服务提供端能够处理该服务发现请求。
S1102、服务请求端中的服务模块向服务请求端中的ASP模块发送第一服务发现指示。
S1103、服务请求端中的ASP模块根据S1102中接收的第一服务发现指示,通过P2P网络和基础设施网络发送第一服务发现请求,并将服务标识携带于第一服务发现请求中。
S1104、服务提供端中的P2P网络和基础设施网络分别接收到第一服务发现请求之后,由服务提供端的ASP模块对第一服务发现请求中所请求的服务进行确认,并在确定能够提供所请求服务之后,分别通过P2P网络和 基础设施网络向服务请求端对应发送第一服务发现响应。
其中,第一服务发现响应中可以携带标识信息,进一步地,也可以携带服务名称。
进一步地,通过基础设施网络进行服务发现能够成功的前提是服务提供端和服务请求端均与同一个AP建立了连接,或者分别与不同的AP建立连接,该不同的AP之间能够通信。
进一步地,步骤S1103和步骤S1104对于P2P网络和基础设施网络可以采用的实施方式可以参见例1,这里不再赘述。
S1105、服务请求端的ASP模块将通过P2P网络以及基础设施网络进行服务发现的第一服务发现结果上报服务请求端的服务模块。
ASP模块可以向服务模块上报P2P网络对应的网络地址信息(或者不包括此信息)、通过P2P网络发现的服务提供端的信息、以及通过P2P网络接收的ServiceID,并上报与P2P网络完成相同的服务发现的基础设施网络的网络地址信息(或者不包括此信息)、通过基础设施网络发现的服务提供端的信息、以及通过基础设施网络接收的ServiceID。
S1106、服务请求端的服务模块确定通过基础设施网络接收的标识信息与通过P2P网络接收的标识信息匹配。
S1107、服务请求端的服务模块确定通过基础设施网络发现的服务与通过P2P网络发现的服务为同一服务提供端提供的同一服务。
S1108、服务请求端的服务模块指示服务请求端的ASP模块与服务提供端建立ASP会话。
S1109、服务请求端和服务提供端之间建立P2P连接。
S1110、服务请求端的ASP模块根据接收的指示,分别基于P2P网络和基础设施网络与服务提供端建立ASP会话。
例如:终端的服务模块指示终端的ASP模块基于P2P网络以及基于基础设施网络分别与电视机建立ASP会话。
进一步地,步骤S1109的执行与S1110的执行没有严格的先后顺序,只要在基于P2P网络建立ASP会话之前完成P2P连接的建立即可。
S1111、服务请求端的服务模块从建立的两个ASP会话中确定第一ASP会话,并通过第一ASP会话承载业务数据传输。
进一步地,本步骤中,第一ASP会话可以为基于基础设施网络建立的ASP会话或者基于P2P网络建立的ASP会话。
S1112、根据当前传输需求,将S1111中第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输。
进一步地,本步骤中,当第一ASP会话为基于基础设施网络建立的ASP会话时,第二ASP会话为基于P2P网络建立的ASP会话,当第一ASP会话为基于P2P网络建立的ASP会话时,第二ASP会话为基于基础设施网络建立的ASP会话。
实施例4:
与实施例1、实施例2、和实施例3提供的一种服务发现方法相应地,实施例4提供一种服务发现方法,应用于服务提供端侧,如图12所示,包括如下步骤:
S1201、服务提供端接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对服务提供端提供的相同服务进行服务发现的服务发现请求。
S1202、当根据S1201中接收的服务发现请求中携带的服务标识,确定自身能够提供该服务标识所标识的服务时,向服务请求端发送服务发现响应,
其中,服务发现响应中携带有标识信息。
进一步地,本实施例中,服务提供端可以基于该服务提供端的MAC地址,采用预设算法生成标识信息。例如,该标识信息可以直接就是MAC地址,或者是MAC地址进行处理后的值,或者是MAC地址加服务标识,或 者是MAC地址加服务标识一起进行处理后的值。
S1203、通过至少两个网络对上述相同服务进行业务数据传输。
进一步地,服务请求端可以通过具有不同的网络地址的网络向服务提供端进行服务发现,对服务提供端来说不管不同的网络所请求的服务是否为同一服务请求端请求的服务,都会针对不同的网络中每一个网络提供该网络所请求的服务,并且为该网络提供标识信息。
基于同一发明构思,本发明实施例还提供了相关设备、及系统,由于这些设备和系统所解决问题的原理与前述一种服务发现方法相似,因此该设备和系统的实施可以参见前述方法的实施,重复之处不再赘述。
本发明实施例提供的一种服务请求设备之一,如图13所示,包括如下模块:
应用会话平台ASP模块1301,用于针对相同服务分别基于不同网络进行服务发现;以及通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
服务模块1302,用于当所述ASP模块1301通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;以及在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
进一步地,所述服务模块1302,还用于在所述ASP模块1301进行服务发现之前,向所述ASP模块1301发送第一服务发现指示;
所述ASP模块1301,具体用于根据所述服务模块1302发送的第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;以及通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其 中,所述第一服务发现响应中携带有标识信息。
进一步地,所述ASP模块1301,还用于当通过至少一个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块1302;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的每一个网络发现的服务提供端的信息;
所述服务模块1302,还用于指示所述ASP模块1301与所述第一服务提供端建立第一ASP会话;通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;其中,所述第一服务提供端为所述服务模块1302从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的。
进一步地,所述服务模块1302,具体用于从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述ASP模块1301与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块1302从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息。
进一步地,所述服务模块1302,还用于在所述ASP模块1301进行服务发现之前,向所述ASP模块1301发送第一服务发现指示;
所述ASP模块1301,具体用于根据所述服务模块1302发送的第一服 务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;以及所述ASP模块1301将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块1302;其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;
所述服务模块1302,具体用于在接收到所述ASP模块1301上报的第一服务发现结果之后,指示所述ASP模块1301与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块1302从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;以及通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;以及向所述ASP模块1301发送第二服务发现指示;
所述ASP模块1301,具体用于根据所述服务模块1302发送的第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;以及将根据第二服务发现响应确定的第二服务发现结果上报所述服务模块1302;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网 络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
进一步地,所述服务模块1302,具体用于从所述ASP模块1301上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述ASP模块1301与第二服务提供端建立第二ASP会话;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第二服务提供端为所述服务模块1302从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的。
进一步地,所述ASP模块1301,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块1302;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
所述服务模块1302,具体用于从所述ASP模块1301上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
所述服务模块1302,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块1301与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述 ASP模块1301分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
进一步地,所述服务模块1302,具体用于将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供的同一服务的网络中确定的除所述第一网络之外的网络。
进一步地,所述ASP模块1301,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块1302;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
所述服务模块1302,具体用于从所述ASP模块1301上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
所述服务模块1302,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块1301与提供所述同一服务的所述同一服务提供端建立ASP会话;
所述服务模块1302,具体用于通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
进一步地,所述服务模块1302,具体用于停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并将使 用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
进一步地,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
进一步地,所述ASP模块1301,具体用于当所述能够发现所述相同服务的网络包括P2P网络时,在所在服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
进一步地,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
本发明实施例提供的一种服务提供设备之一,如图14所示,包括如下模块:
标识信息提供模块1401,用于针对服务请求端对本服务提供设备提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;
业务数据传输模块1402,用于通过所述至少两个网络对所述相同服务进行业务数据传输。
进一步地,所述标识信息提供模块1401,具体用于接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对本服务提供设备提供的相同服务进行服务发现的服务发现请求;以及当根据所述服务发现请求中携带的服务标识,本服务提供设备确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
本发明实施例提供的一种服务发现系统之一包括:上述的一种服务请 求设备之一,以及上述的一种服务提供设备之一。
基于同一发明构思,本发明实施例还提供了相关设备、及系统,由于这些设备和系统所解决问题的原理与前述一种服务发现方法相似,因此该设备和系统的实施可以参见前述方法的实施,重复之处不再赘述。
本发明实施例提供了一种服务请求设备之二,如图15所示,包括处理器1501(可以为一个或多个,本发明各实施例中以一个为例)、收发器1502、存储器1503以及总线系统1504,其中:
处理器1501控制服务请求设备之二的操作,处理器1501还可以称为CPU(Central Processing Unit,中央处理单元)。处理器1501可能是一种集成电路芯片,具有信号的处理能力。处理器1501还可以是通用处理器、数字信号处理器(DSP,Digital Signal Processing)、专用集成电路(ASIC,Application Specific Integrated Circuit)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器1503可以包括只读存储器和随机存取存储器,并向处理器1501提供指令和数据。存储器1503的一部分还可以包括非易失性随机存取存储器(NVRAM)。
服务请求设备之二的各个组件通过总线系统1504耦合在一起,其中总线系统1504除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。该总线系统可以是ISA(Industry Standard Architecture,工业标准体系结构)总线、PCI(Peripheral Component Interconnect,外部设备互连)总线或EISA(Extended Industry Standard Architecture,扩展工业标准体系结构)总线等。所述总线可以是一条或多条物理线路,当是多条物理线路时可以分为地址总线、数据总线、控制总线等。在本发明的其它一些实施例中,处理器1501、存储器1503以及收发器1502也可以通过通信线路直接连接。但是为了清楚说明起见,在图中将各种总线都标为总线系统1504。
存储器1503存储了如下的元素,可执行模块或者数据结构,或者它们 的子集,或者它们的扩展集:
操作指令:包括各种操作指令,用于实现各种操作。
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。
在本发明实施例中,处理器1501通过调用存储器1503存储的操作指令(该操作指令可存储在操作系统中),执行如下操作:
收发器1502,用于针对相同服务分别基于不同网络进行服务发现;以及通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
处理器1501,用于当所述收发器1502通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;以及在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
进一步地,所述处理器1501,还用于在所述收发器1502进行服务发现之前,向所述收发器1502发送第一服务发现指示;
所述收发器1502,具体用于根据所述处理器1501发送的第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;以及通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息。
进一步地,所述收发器1502,还用于当通过至少一个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器1501;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够 发现所述相同服务的每一个网络发现的服务提供端的信息;
所述处理器1501,还用于指示所述收发器1502与所述第一服务提供端建立第一ASP会话;通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;其中,所述第一服务提供端为所述处理器1501从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的。
进一步地,所述处理器1501,具体用于从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述收发器1502与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述处理器1501从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息。
进一步地,所述处理器1501,还用于在所述收发器1502进行服务发现之前,向所述收发器1502发送第一服务发现指示;
所述收发器1502,具体用于根据所述处理器1501发送的第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;以及所述收发器1502将根据第一服务发现响应确定的第一服务发现结果上报所述处理器1501;其中,所述第一服务发现结果包括能够发现所述相同 服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;
所述处理器1501,具体用于在接收到所述收发器1502上报的第一服务发现结果之后,指示所述收发器1502与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述处理器1501从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;以及通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;以及向所述收发器1502发送第二服务发现指示;
所述收发器1502,具体用于根据所述处理器1501发送的第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;以及将根据第二服务发现响应确定的第二服务发现结果上报所述处理器1501;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
进一步地,所述处理器1501,具体用于从所述收发器1502上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所 述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述收发器1502与第二服务提供端建立第二ASP会话;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第二服务提供端为所述处理器1501从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的。
进一步地,所述收发器1502,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器1501;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
所述处理器1501,具体用于从所述收发器1502上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
所述处理器1501,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述收发器1502与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述收发器1502分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
进一步地,所述处理器1501,具体用于将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务 提供端提供的同一服务的网络中确定的除所述第一网络之外的网络。
进一步地,所述收发器1502,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述处理器1501;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
所述处理器1501,具体用于从所述收发器1502上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
所述处理器1501,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述收发器1502与提供所述同一服务的所述同一服务提供端建立ASP会话;
所述处理器1501,具体用于通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
进一步地,所述处理器1501,具体用于停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
进一步地,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
进一步地,所述收发器1502,具体用于当所述能够发现所述相同服务的网络包括P2P网络时,在所在服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接建立ASP会话。
进一步地,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
本发明实施例提供的一种服务提供设备之二,如图16所示,包括:
收发器1601,用于针对服务请求端对本服务提供设备提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;
处理器1602,用于通过所述至少两个网络对所述相同服务进行业务数据传输。
进一步地,所述收发器1601,具体用于接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对本服务提供设备提供的相同服务进行服务发现的服务发现请求;以及当根据所述服务发现请求中携带的服务标识,本服务提供设备确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
本发明实施例提供的一种服务发现系统之二包括:上述的一种服务请求设备之二,以及上述的一种服务提供设备之二。
上述各单元的功能可对应于图1至图12所示流程中的相应处理步骤,在此不再赘述。
本发明实施例提供的一种服务发现方法、相关设备、及系统,包括:服务请求端针对相同服务分别基于不同网络进行服务发现;并通过不同网络中能够发现相同服务的每一个网络,对应接收提供相同服务的服务提供端提供的标识信息,标识信息用于标识服务提供端;当通过至少两个网络 获得的标识信息匹配时,确定基于该至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;并在同一次访问该同一服务中,通过该至少两个网络进行业务数据传输。本发明实施例提供的一种服务发现方法,服务请求端可以针对相同服务分别通过不同网络进行服务发现,并确定出通过不同网络所发现的同一服务提供端提供的同一服务,那么,在通过第一网络进行业务数据传输后,当出现第一网络无法满足当前业务数据传输需求时,由于除第一网络之外的、还通过其它网络发现了与通过第一网络所发现服务为同一服务提供端提供的同一服务,即为与当前业务,那么服务请求端可以将第一网络切换到该其他网络,通过该其他网络继续当前业务数据传输,与现有技术中,由于上层业务的数据传输所基于的底层连接中断,而导致上层业务数据传输也必须中断相比,上层业务的数据传输对该上层业务所基于的底层连接依赖性不强,通过底层网络的切换使得业务数据得以继续传输而不会中断,提高了业务传输的灵活性。而且在有的情况下,还可以通过多个网络同时进行业务传输,业务可以在多个网络连接间切换。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明实施例可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现。基于这样的理解,本发明实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
本领域技术人员可以理解附图只是一个优选实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。
本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例 的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (31)

  1. 一种服务发现方法,其特征在于,包括:
    服务请求端针对相同服务分别基于不同网络进行服务发现;并
    通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端;
    所述服务请求端当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;并
    在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
  2. 如权利要求1所述的方法,其特征在于,所述服务请求端针对相同服务分别基于不同网络进行服务发现,具体包括:
    所述服务请求端中的服务模块向所述服务请求端中的应用会话平台ASP模块发送第一服务发现指示;
    所述ASP模块根据所述第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,
    其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;
    所述通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,具体包括:
    所述ASP模块通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;
    其中,所述第一服务发现响应中携带有标识信息。
  3. 如权利要求2所述的方法,其特征在于,当所述ASP模块通过至少一个网络接收到第一服务发现响应时,还包括:
    所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;
    其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,
    所述第一服务发现结果包括能够发现所述相同服务的每一个网络发现的服务提供端的信息;
    所述服务模块指示所述ASP模块与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;
    所述服务模块通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据。
  4. 如权利要求3所述的方法,其特征在于,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息;
    所述所述服务请求端当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:
    所述服务模块从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;
    当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;
    所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:
    所述服务模块指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息 的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;
    将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输。
  5. 如权利要求1所述的方法,其特征在于,所述服务请求端针对相同服务分别基于不同网络进行服务发现;并通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息用于标识服务提供端,具体包括:
    所述服务请求端中的服务模块向所述服务请求端中的ASP模块发送第一服务发现指示;
    所述ASP模块根据所述第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;
    所述ASP模块通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;
    所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;
    其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,
    所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;
    所述服务模块指示所述ASP模块与第一服务提供端建立第一ASP会话;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;
    所述服务模块通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;
    所述服务模块向所述ASP模块发送第二服务发现指示;
    所述ASP模块根据所述第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;
    所述ASP模块通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;
    所述ASP模块将根据第二服务发现响应确定的第二服务发现结果上报所述服务模块;
    其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,
    所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
  6. 如权利要求5所述的方法,其特征在于,所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:
    所述服务模块从上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;
    当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;
    所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:
    所述服务模块指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的;并
    将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输。
  7. 如权利要求2所述的方法,其特征在于,当所述ASP模块通过至少两个网络接收到第一服务发现响应时,还包括:
    所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;
    其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,
    所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
    所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:
    所述服务模块从上报的标识信息中,确定匹配的标识信息;
    当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
    在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提 供端提供的同一服务之后,还包括:
    所述服务模块指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;并
    从所述ASP模块分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
  8. 如权利要求7所述的方法,其特征在于,所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:
    所述服务模块将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,
    其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供的同一服务的网络中确定的除所述第一网络之外的网络。
  9. 如权利要求2所述的方法,其特征在于,当所述ASP模块通过至少两个网络接收到第一服务发现响应时,还包括:
    所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;
    其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,
    所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
    所述当通过至少两个网络获得的标识信息匹配时,确定基于所述至少 两个网络进行的服务发现所发现的服务为同一服务提供端提供的同一服务,具体包括:
    所述服务模块从上报的标识信息中,确定匹配的标识信息;
    当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
    在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,还包括:
    所述服务模块指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;
    所述在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输,具体包括:
    通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
  10. 如权利要求4、6、或8中任一项所述的方法,其特征在于,将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,具体包括:
    所述服务模块停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并
    将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
  11. 如权利要求1-9任一项所述的方法,其特征在于,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
  12. 如权利要求3-9任一项所述的方法,其特征在于,所述能够发现所 述相同服务的网络包括P2P网络;
    基于所述P2P网络建立ASP会话,具体包括:
    在所述服务请求端和所述服务提供端之间建立P2P连接;
    基于建立的P2P连接建立ASP会话。
  13. 如权利要求1-9任一项所述的方法,其特征在于,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
  14. 一种服务发现方法,其特征在于,包括:
    服务提供端针对服务请求端对所述服务提供端提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;并
    通过所述至少两个网络对所述相同服务进行业务数据传输。
  15. 如权利要求14所述的方法,其特征在于,针对服务请求端对所述服务提供端提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向服务请求端提供标识信息,具体包括:
    接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对所述服务提供端提供的相同服务进行服务发现的服务发现请求;
    当根据所述服务发现请求中携带的服务标识,服务提供端确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;
    其中,所述服务发现响应中携带有标识信息。
  16. 一种服务请求设备,其特征在于,包括:
    应用会话平台ASP模块,用于针对相同服务分别基于不同网络进行服务发现;以及通过所述不同网络中能够发现所述相同服务的每一个网络,对应接收提供所述相同服务的服务提供端提供的标识信息,所述标识信息 用于标识服务提供端;
    服务模块,用于当所述ASP模块通过至少两个网络获得的标识信息匹配时,确定基于所述至少两个网络进行服务发现所发现的服务为同一服务提供端提供的同一服务;以及在同一次访问所述同一服务中,通过所述至少两个网络进行业务数据传输。
  17. 如权利要求16所述的设备,其特征在于,所述服务模块,还用于在所述ASP模块进行服务发现之前,向所述ASP模块发送第一服务发现指示;
    所述ASP模块,具体用于根据所述服务模块发送的第一服务发现指示,通过预设网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识,所述预设网络包括所述不同网络中的网络;以及通过所述预设网络中能够发现所述相同服务的网络分别对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息。
  18. 如权利要求17所述的设备,其特征在于,所述ASP模块,还用于当通过至少一个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的每一个网络发现的服务提供端的信息;
    所述服务模块,还用于指示所述ASP模块与第一服务提供端建立第一ASP会话;通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;其中,所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的。
  19. 如权利要求18所述的设备,其特征在于,所述服务模块,具体用于从上报的所述第一服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述ASP模块与第二服务提供端建立第二ASP会话;其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的;且所述第二服务提供端为通过第二网络发现的;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第一服务发现结果还包括通过能够发现所述相同服务的网络所接收的标识信息。
  20. 如权利要求16所述的设备,其特征在于,所述服务模块,还用于在所述ASP模块进行服务发现之前,向所述ASP模块发送第一服务发现指示;
    所述ASP模块,具体用于根据所述服务模块发送的第一服务发现指示,通过至少一个网络发送包含所述相同服务的第一服务发现请求,其中,所述第一服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第一服务发现响应;其中,所述第一服务发现响应中携带有标识信息;以及所述ASP模块将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息;或者,所述第一服务发现结果包括能够发现所述相同服务的网络发现的服务提供端的信息;
    所述服务模块,具体用于在接收到所述ASP模块上报的第一服务发现结果之后,指示所述ASP模块与第一服务提供端建立第一ASP会话;其中, 所述第一服务提供端为所述服务模块从上报的第一服务发现结果中确定的;且所述第一服务提供端为通过第一网络发现的;以及通过建立的第一ASP会话承载通过所述第一网络发现的所述相同服务的业务数据;以及向所述ASP模块发送第二服务发现指示;
    所述ASP模块,具体用于根据所述服务模块发送的第二服务发现指示,通过至少一个网络发送包含所述相同服务的第二服务发现请求;其中,所述第二服务发现请求中携带有所述相同服务的服务标识;以及通过所述至少一个网络中能够发现所述相同服务的网络对应接收服务提供端发送的第二服务发现响应;其中,所述第二服务发现响应中携带有标识信息;以及将根据第二服务发现响应确定的第二服务发现结果上报所述服务模块;其中,所述第二服务发现结果包括根据接收的第二服务发现响应确定的能够发现所述相同服务的网络的网络信息、以及对应通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息;或者,所述第二服务发现结果包括根据接收的第二服务发现响应确定的通过能够发现所述相同服务的网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的网络接收的标识信息。
  21. 如权利要求20所述的设备,其特征在于,所述服务模块,具体用于从所述ASP模块上报的所述第二服务发现结果中包括的标识信息中,确定与所述第一网络接收的标识信息匹配的标识信息;当确定出与所述第一网络接收的标识信息匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务与通过所述第一网络所发现的服务为同一服务提供端提供的同一服务;以及指示所述ASP模块与第二服务提供端建立第二ASP会话;并将所述第一ASP会话所承载的业务数据承载在所述第二ASP会话上继续当前的业务数据传输,其中,所述第二服务提供端为所述服务模块从接收到匹配的标识信息的网络所发现的服务提供端中确定的,且所述第二提供端为通过第二网络发现的。
  22. 如权利要求17所述的设备,其特征在于,所述ASP模块,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
    所述服务模块,具体用于从所述ASP模块上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
    所述服务模块,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;并从所述ASP模块分别基于发现所述同一服务提供端提供的同一服务的网络建立的各ASP会话中,确定第一ASP会话,并通过基于第一网络建立的所述第一ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
  23. 如权利要求22所述的设备,其特征在于,所述服务模块,具体用于将所述第一ASP会话所承载的业务数据承载在第二ASP会话上继续当前的业务数据传输,其中,所述第二ASP会话为基于第二网络建立的,所述第二网络为从发现所述同一服务提供端提供的同一服务的网络中确定的除所述第一网络之外的网络。
  24. 如权利要求17所述的设备,其特征在于,所述ASP模块,还用于当通过至少两个网络接收到第一服务发现响应时,将根据第一服务发现响应确定的第一服务发现结果上报所述服务模块;其中,所述第一服务发现 结果包括能够发现所述相同服务的每一个网络的网络信息、以及对应通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;或者,所述第一服务发现结果包括通过能够发现所述相同服务的每一个网络发现的服务提供端的信息、以及对应通过能够发现所述相同服务的每一个网络接收的标识信息;
    所述服务模块,具体用于从所述ASP模块上报的标识信息中,确定匹配的标识信息;当确定出匹配的标识信息时,确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务;
    所述服务模块,还用于在确定通过接收到匹配的标识信息的网络所发现的服务为同一服务提供端提供的同一服务之后,指示所述ASP模块与提供所述同一服务的所述同一服务提供端建立ASP会话;
    所述服务模块,具体用于通过建立的所述各ASP会话承载所述同一服务提供端提供的同一服务的业务数据。
  25. 如权利要求19、21、或23中任一项所述的设备,其特征在于,所述服务模块,具体用于停止使用第一端口与所述服务提供端进行业务数据交互,其中,所述第一端口为所述第一ASP会话承载的业务会话使用的、所述第一网络对应的网络地址的可用端口;并将使用所述第一端口与所述服务提供端最后一次交互的业务数据之后的业务数据,通过第二端口与所述服务提供端进行交互,其中,所述第二端口为所述第二ASP会话承载的业务会话使用的、所述第二网络对应的网络地址的可用端口。
  26. 如权利要求16-24任一项所述的设备,其特征在于,所述标识信息为所标识的服务提供端基于该服务提供端的MAC地址生成的。
  27. 如权利要求18-24任一项所述的设备,其特征在于,所述ASP模块,具体用于当所述能够发现所述相同服务的网络包括P2P网络时,在所在服务请求端和所述服务提供端之间建立P2P连接;基于建立的P2P连接 建立ASP会话。
  28. 如权利要求16-24任一项所述的设备,其特征在于,所述不同网络为以下不同类型的网络中至少两个不同的网络:有线网络、基础设施网络、P2P网络、蓝牙网络、NFC网络、LTE网络、以及Powerline网络。
  29. 一种服务提供设备,其特征在于,包括:
    标识信息提供模块,用于针对服务请求端对本服务提供设备提供的相同服务进行服务发现时所通过的至少两个网络中的每一个网络,向所述服务请求端提供标识信息,所述标识信息用于标识所述服务提供端;
    业务数据传输模块,用于通过所述至少两个网络对所述相同服务进行业务数据传输。
  30. 如权利要求29所述的设备,其特征在于,所述标识信息提供模块,具体用于接收服务请求端进行服务发现时通过的至少两个网络中的每一个网络发送的包含对本服务提供设备提供的相同服务进行服务发现的服务发现请求;以及当根据所述服务发现请求中携带的服务标识,本服务提供设备确定自身能够提供所述服务标识所标识的服务时,向所述服务请求端发送服务发现响应;其中,所述服务发现响应中携带有标识信息。
  31. 一种服务发现系统,其特征在于,包括:如权利要求16~28所述的一种服务请求设备,以及如权利要求29~30所述的一种服务提供设备。
PCT/CN2015/093239 2014-10-31 2015-10-29 一种服务发现方法、相关设备、及系统 WO2016066124A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15854140.9A EP3206373B1 (en) 2014-10-31 2015-10-29 Service discovery method, related equipment and system
US15/581,671 US10728344B2 (en) 2014-10-31 2017-04-28 Service discovery method, related device, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410608742.2 2014-10-31
CN201410608742.2A CN105577732B (zh) 2014-10-31 2014-10-31 一种服务发现方法、相关设备、及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/581,671 Continuation US10728344B2 (en) 2014-10-31 2017-04-28 Service discovery method, related device, and system

Publications (1)

Publication Number Publication Date
WO2016066124A1 true WO2016066124A1 (zh) 2016-05-06

Family

ID=55856629

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093239 WO2016066124A1 (zh) 2014-10-31 2015-10-29 一种服务发现方法、相关设备、及系统

Country Status (4)

Country Link
US (1) US10728344B2 (zh)
EP (1) EP3206373B1 (zh)
CN (1) CN105577732B (zh)
WO (1) WO2016066124A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10172178B2 (en) * 2015-01-29 2019-01-01 Lg Electronics Inc. Wireless LAN station having platform capable of changing wireless LAN connection technique
US20180077738A1 (en) * 2015-03-19 2018-03-15 Lg Electronics Inc. Method and apparatus for establishing application service platform session in wireless communication system
US10721622B2 (en) * 2015-12-31 2020-07-21 Koninklijke Philips N.V. Wireless communication system with multiple security levels
US10299310B2 (en) * 2016-02-02 2019-05-21 Lg Electronics Inc. Wireless device including first platform for local area and second platform for remote area and method for wireless device
CN108399101B (zh) * 2017-02-06 2021-03-16 腾讯科技(深圳)有限公司 资源调度的方法、装置和系统
CN111886900B (zh) * 2018-02-06 2022-07-29 瑞典爱立信有限公司 用于在基于服务的体系结构中消息代理的唯一服务标识符
CN108429794A (zh) * 2018-02-12 2018-08-21 上海玄彩美科网络科技有限公司 基于蓝牙服务协议的ar服务发现方法和装置
CN112019363B (zh) * 2019-05-30 2021-12-14 华为技术有限公司 确定业务传输需求的方法、设备及系统
CN111447213B (zh) * 2020-03-24 2022-07-05 杭州海康威视数字技术股份有限公司 用于发现服务的验证码确定方法、装置及设备发现系统
CN115914347A (zh) * 2021-08-11 2023-04-04 惠州Tcl云创科技有限公司 服务发现方法及电子设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014116719A1 (en) * 2013-01-23 2014-07-31 Qualcomm Incorporated Method and access point for selectively responding to a service query from a wireless device
CN104041136A (zh) * 2012-01-19 2014-09-10 英特尔公司 用于服务发现的系统及方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895444B1 (en) * 2000-09-15 2005-05-17 Motorola, Inc. Service framework with local proxy for representing remote services
WO2008082346A1 (en) * 2006-12-28 2008-07-10 Telefonaktiebolaget Lm Ericsson (Publ) A method and apparatus for service discovery
US8744356B2 (en) 2008-03-27 2014-06-03 Mediatek Inc. Apparatuses and methods for coordination between plurality of co-located wireless communication modules via one wire
US9455897B2 (en) * 2010-04-06 2016-09-27 Qualcomm Incorporated Cooperative bandwidth aggregation using multipath transport
US9137621B2 (en) * 2012-07-13 2015-09-15 Blackberry Limited Wireless network service transaction protocol
EP2696643B1 (en) * 2012-08-08 2020-09-30 Samsung Electronics Co., Ltd Apparatus and method of connecting service, according to user intention
CA2890323C (en) * 2012-11-05 2018-12-04 Lg Electronics Inc. Method for searching for or advertising service in direct communication system and device for same
US9538561B2 (en) * 2013-05-22 2017-01-03 Intel IP Corporation Systems and methods for enabling service interoperability functionality for WiFi Direct devices connected to a network via a wireless access point
US20160050551A1 (en) * 2014-08-15 2016-02-18 Emily Qi Methods, systems, and devices for enabling multiple radio assited discovery
KR20160041444A (ko) * 2014-10-07 2016-04-18 주식회사 케이티 이종망 동시전송 환경에서 서버 푸시 서비스 제공을 위한 전송 경로 제어 방법 및 장치

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104041136A (zh) * 2012-01-19 2014-09-10 英特尔公司 用于服务发现的系统及方法
WO2014116719A1 (en) * 2013-01-23 2014-07-31 Qualcomm Incorporated Method and access point for selectively responding to a service query from a wireless device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3206373A4 *

Also Published As

Publication number Publication date
US20170237818A1 (en) 2017-08-17
EP3206373A4 (en) 2017-08-16
US10728344B2 (en) 2020-07-28
CN105577732A (zh) 2016-05-11
EP3206373B1 (en) 2019-12-18
EP3206373A1 (en) 2017-08-16
CN105577732B (zh) 2019-04-26

Similar Documents

Publication Publication Date Title
WO2016066124A1 (zh) 一种服务发现方法、相关设备、及系统
EP3000214B1 (en) Method for establishing device-to-device communication
US9654907B2 (en) System, method and apparatus for wireless network connection using near field communication
US9641996B2 (en) Method and apparatus for generating P2P group for Wi-Fi direct service
US20130311692A1 (en) Apparatus and method for direct pairing in a wireless docking system
CN109479226A (zh) 一种无线连接切换方法及终端
JP2019506049A (ja) 複数のセキュリティレベルを備える無線通信システム
JP7389225B2 (ja) セキュリティ保護モードを決定するための方法および装置
WO2014161449A1 (zh) 一种邻近通信业务的实现方法及装置
US20210204202A1 (en) Network access technology indication
JP2018515013A (ja) サービスルーティングのためのデバイスマネージャ
WO2016098275A1 (ja) 通信方法
WO2022016558A1 (zh) 一种业务连续性事件的通知方法及装置
US11064003B2 (en) Method and apparatus for receiving streaming via transport protocol in wireless communication system
US9326301B2 (en) Group provisioning of wireless stations of a wireless local area network (WLAN)
US11075881B2 (en) Proxy between wireless local area network infrastructures
CN111050368A (zh) 网络传输控制方法、装置、终端设备以及存储介质
EP3989522A1 (en) Payload compression
WO2021132498A1 (ja) 端末装置、通信方法および通信システム
WO2016029820A1 (zh) 一种业务处理方法及系统、设备
JP2008306415A (ja) 音声通信システム及び音声通信方法

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: 15854140

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015854140

Country of ref document: EP