WO2016082067A1 - 资源共享的方法和终端 - Google Patents

资源共享的方法和终端 Download PDF

Info

Publication number
WO2016082067A1
WO2016082067A1 PCT/CN2014/092005 CN2014092005W WO2016082067A1 WO 2016082067 A1 WO2016082067 A1 WO 2016082067A1 CN 2014092005 W CN2014092005 W CN 2014092005W WO 2016082067 A1 WO2016082067 A1 WO 2016082067A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
resource
broadcast service
shared resource
service interface
Prior art date
Application number
PCT/CN2014/092005
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 CN201480078510.9A priority Critical patent/CN106464304B/zh
Priority to PCT/CN2014/092005 priority patent/WO2016082067A1/zh
Publication of WO2016082067A1 publication Critical patent/WO2016082067A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and a terminal for resource sharing.
  • Wi-Fi Direct Sharing is a Wi-Fi-based file sharing technology.
  • a terminal creates a Wi-Fi Direct group and passes the key information of the added group through two-dimensional.
  • the code or NFC is transmitted to the terminal receiving the resource, and the receiving terminal automatically starts the file receiving process after parsing the key information from the two-dimensional code or the NFC message.
  • the resource sharing method is only applicable to point-to-point file transmission.
  • a resource needs to be sent to multiple terminals, using this method requires each terminal to establish a connection with the terminal of the resource sharing in sequence, which is complicated and requires resources. Sharing the terminal for a very long time.
  • the embodiments of the present invention provide a method and a terminal for resource sharing, which are used to establish a data broadcast sending network, simplify the process of resource sharing, and save time required for the resource sharing terminal to share resources.
  • a first aspect of the embodiments of the present invention provides a method for resource sharing, including:
  • the first terminal acquires a service interface of the second terminal by using a connection switching extension technology
  • the first terminal When the first terminal determines that the second terminal supports the data broadcast service according to the service interface of the second terminal, the first terminal uploads the shared resource to the second terminal;
  • the first terminal starts a data broadcast service of the second terminal by using a broadcast service interface of the second terminal, so that the second terminal establishes a data broadcast network, and shares the shared resource in the data broadcast network.
  • the first terminal obtains a service interface of the second terminal by using a connection switching extension technology, and specifically includes:
  • the switching request message includes at least one connection mode supported by the first terminal except the NFC;
  • the first terminal parses the handover selection message to obtain a selected connection mode and a service interface of the second terminal, where the selected connection mode is a connection mode supported by the first terminal and the second terminal. ;
  • the method further includes:
  • the first terminal establishes a selected connection with the second terminal by using the selected connection manner.
  • the first terminal uploading the shared resource to the second terminal specifically includes:
  • the first terminal uploads a resource index of the shared resource by using the broadcast service interface on the selected connection, where the resource index includes description information of the shared resource;
  • the first terminal invokes the broadcast service interface to upload the shared resource according to the resource index and the universal resource identifier URI pointing to the shared resource on the selected connection;
  • the starting, by the first terminal, the data broadcast service of the second terminal by using the broadcast service interface specifically includes:
  • the first terminal After the first terminal uploads the shared resource, the first terminal starts the data broadcast service of the second terminal by using the broadcast service interface.
  • a second aspect of the embodiments of the present invention provides a method for resource sharing, including:
  • the second terminal sends the broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology
  • the second terminal When the broadcast service of the second terminal is started by the first terminal by using the broadcast service interface, the second terminal establishes a data broadcast network;
  • the second terminal shares the shared resource in the data broadcast network.
  • the second terminal sends a broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology Specifically include:
  • the second terminal constructs a handover selection message, where the handover selection message includes the selected connection mode, and a broadcast service interface of the second terminal;
  • the method further includes:
  • the second terminal establishes a selected connection with the first terminal by using the selected connection manner.
  • the receiving, by the second terminal, the shared resource that is uploaded by the first terminal includes:
  • the method further includes:
  • the second terminal receives, by using the broadcast service interface, the information of the start data broadcast service sent by the first terminal on the selected connection.
  • the second terminal establishes a data broadcast network.
  • the steps include:
  • the second terminal generates a resource access interface for the shared resource
  • the second terminal further includes:
  • the second terminal generates a broadcast frame, where the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface and the network identifier of the data broadcast network;
  • the second terminal broadcasts the broadcast frame, so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and receives the shared resource through the resource access interface.
  • a third aspect of the embodiments of the present invention provides a terminal, which is used as the first terminal, and includes:
  • An obtaining module configured to acquire a service interface of the second terminal by using a connection switching extension technology
  • a uploading module configured to upload a shared resource to the second terminal when determining that the second terminal supports the data broadcast service according to the service interface of the second terminal acquired by the acquiring module;
  • a startup module configured to start a data broadcast service of the second terminal by using a broadcast service interface of the second terminal acquired by the acquiring module, so that the second terminal establishes a data broadcast network, and the uploading is performed in the data broadcast network Shared resources uploaded by the module.
  • the acquiring module specifically includes:
  • a first sending unit configured to send, by using the NFC, a handover request message to the second terminal, where the handover request message includes at least one connection mode supported by the first terminal except the NFC;
  • a first receiving unit configured to receive, by using an NFC, a handover selection message sent by the second terminal;
  • a parsing unit configured to parse the handover selection message received by the first receiving unit, to obtain a selected connection mode, and a service interface of the second terminal, where the selected connection mode is the first terminal and the first The connection mode supported by the two terminals;
  • the terminal further includes:
  • a first connection establishing module configured to establish a selected connection with the second terminal by using the selected connection manner.
  • the uploading module specifically includes:
  • An index uploading unit configured to use the broadcast on the selected connection established by the first connection establishing module when determining that the second terminal supports the data broadcast service according to the service interface of the second terminal acquired by the acquiring module
  • the service interface uploads a resource index of the shared resource, where the resource index includes description information of the shared resource;
  • a resource uploading unit configured to invoke the broadcast service interface to upload the shared resource according to the resource index uploaded by the index uploading unit and the universal resource identifier URI pointing to the shared resource on the selected connection;
  • the startup module is specifically configured to: after the uploading module uploads the shared resource,
  • the broadcast service interface of the second terminal acquired by the acquiring module starts the data broadcast service of the second terminal, so that the second terminal establishes a data broadcast network, and shares the shared resources uploaded by the upload module in the data broadcast network.
  • a fourth aspect of the present invention provides a terminal, which is used as a second terminal, and includes:
  • a sending module configured to send a broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology
  • a resource receiving module configured to receive a shared resource uploaded by the first terminal
  • a network establishing module configured to establish a data broadcast network when the broadcast service of the second terminal is started by the first terminal by using the broadcast service interface
  • a sharing module configured to share the shared resource received by the resource receiving module in a data broadcast network established by the network establishing module.
  • the sending module specifically includes:
  • a second receiving unit configured to receive, by using the NFC, a handover request message sent by the first terminal, where the handover request message includes at least one connection mode supported by the first terminal except the NFC;
  • a determining unit configured to determine, according to the switching request message received by the second receiving unit and the connection mode supported by the second terminal, the selected connection mode is the first terminal and the first The connection mode supported by the two terminals;
  • a constructing unit configured to construct a handover selection message, where the handover selection message includes a selected connection manner determined by the determining unit, and a broadcast service interface of the second terminal;
  • a second sending unit configured to send the handover selection message to the first terminal by using NFC
  • the terminal further includes:
  • a second connection establishing module configured to establish a selected connection with the first terminal by using the selected connection manner.
  • the resource receiving module is specifically configured to be used in the second connection establishment module.
  • the terminal further includes:
  • the information receiving module is configured to: after the resource receiving module receives the shared resource, receive, by using the broadcast service interface, the information about the start data broadcast service sent by the first terminal on the selected connection.
  • the terminal further includes:
  • An interface generating module configured to generate a resource access interface for the shared resource received by the resource receiving module
  • a broadcast frame generating module configured to generate a broadcast frame, where the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface generated by the interface generating module and the network identifier of the data broadcast network established by the network establishing module;
  • a broadcast module configured to broadcast a broadcast frame generated by the broadcast frame generation module, so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and the resource access interface is used. Receiving the shared resource.
  • a fifth aspect of the embodiment of the present invention provides a terminal, which is used as the first terminal, and includes:
  • Input device output device, processor and memory
  • the processor is configured to perform the following steps by invoking an operation instruction stored by the memory:
  • the data broadcast service of the second terminal is started by the broadcast service interface of the second terminal, so that the second terminal establishes a data broadcast network, and the shared resource is shared in the data broadcast network.
  • the processor is specifically configured to perform the following steps:
  • the selected connection mode is a connection mode supported by the first terminal and the second terminal;
  • the processor is further configured to perform the following steps:
  • a selected connection is established with the second terminal using the selected connection.
  • the processor is specifically configured to perform the following steps:
  • the data broadcast service of the second terminal is started through the broadcast service interface.
  • a sixth aspect of the present invention provides a terminal, which is used as a second terminal, and includes:
  • Input device output device, processor and memory
  • the processor is configured to perform the following steps by invoking an operation instruction stored by the memory:
  • the shared resources are shared in the data broadcast network.
  • the processor is specifically configured to perform the following steps:
  • the selected connection mode determining, according to the switching request message and the connection mode supported by the second terminal, the selected connection mode, where the selected connection mode is a connection mode supported by the first terminal and the second terminal;
  • the processor is further configured to perform the following steps:
  • a selected connection is established with the first terminal using the selected connection.
  • the processor is specifically configured to perform the following steps:
  • the broadcast service interface receives, by the broadcast service interface, the universal resource identifier URI, the resource index of the shared resource, and the shared resource, which are uploaded by the first terminal, on the selected connection, and the resource index includes Descriptive information of the shared resource;
  • the processor is further configured to perform the following steps:
  • the processor is further configured to perform the following step:
  • the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface and the network identifier of the data broadcast network;
  • Broadcasting the broadcast frame so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and receives the shared resource through the resource access interface.
  • the embodiment of the present invention has the following advantages: in the embodiment of the present invention, the first terminal first obtains the service interface of the second terminal by using the connection switching extension technology, and when the first terminal is served according to the second terminal, When the interface determines that the second terminal supports the data broadcast service, uploading the shared resource that needs to be shared to the second terminal, and finally, starting the data broadcast service of the second terminal by using the broadcast service interface, so that the second terminal establishes a data broadcast network. If the shared resource is shared in the data broadcast network, the other terminal can access the shared data in the data broadcast network established by the second terminal, and the connection between the first terminal and the first terminal is no longer needed, which simplifies resource sharing.
  • the process may be performed after the first terminal uploads the resource and starts the data broadcast service of the second terminal, and the other terminal only needs to establish a connection with the second terminal having the broadcast service capability to obtain the resource that the first terminal needs to share. It is no longer necessary to occupy the time of the first terminal sharing resources, and the terminal sharing of resource sharing is saved. Time needed resources.
  • FIG. 1 is a schematic flowchart of a method for resource sharing according to an embodiment of the present invention
  • FIG. 2 is another schematic flowchart of a method for resource sharing in an embodiment of the present invention.
  • FIG. 3 is another schematic flowchart of a method for resource sharing in an embodiment of the present invention.
  • FIG. 4 is another schematic flowchart of a method for resource sharing in an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal used as a first terminal according to an embodiment of the present invention.
  • FIG. 6 is another schematic structural diagram of a terminal used as a first terminal according to an embodiment of the present invention.
  • FIG. 7 is another schematic structural diagram of a terminal used as a first terminal according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a terminal used as a second terminal according to an embodiment of the present invention.
  • FIG. 9 is another schematic structural diagram of a terminal used as a second terminal according to an embodiment of the present invention.
  • FIG. 10 is another schematic structural diagram of a terminal used as a second terminal according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of another terminal in an embodiment of the present invention.
  • first, second, etc. may be used to describe the various terminals in the embodiments of the present invention, the terminals should not be limited to these terms. These terms are only used to distinguish terminals from each other.
  • the first terminal may also be referred to as a second terminal without departing from the scope of the embodiments of the present invention.
  • the second terminal may also be referred to as a first terminal; similarly, the second terminal may also be This is not limited by the embodiment of the present invention.
  • Connection Handover Extension refers to a framework based on connection switching defined by the Near Field Communication Forum (NFC Forum), which carries the service capabilities (such as printing and playing) of the terminal in the connection switching selection message. Audio and video, etc.) and the current network of the terminal Network configuration.
  • NFC Forum Near Field Communication Forum
  • NFC near field communication
  • iBeacon is a Bluetooth Low Energy-based communication technology released by Apple that defines a frame format that includes fields such as UUID, Major, and Minor.
  • the iBeacon device sends a broadcast frame containing the above information, and the receiving device can perform a preset action after receiving the above information.
  • the main function of iBeacon is location awareness. At present, the main application scenarios are indoor positioning and targeted advertising.
  • Data Broadcast is a data transmission technology.
  • the implementation method is to use a single system front end (Head end) to continuously and scroll the edited content through the information transmission network to a wide area.
  • User smart devices that can handle this data, such as PCs, set-top boxes, and mobile terminals.
  • Information content is composed of video, audio, software programs, streaming data or other digital multimedia. Data broadcasting is designed for one-to-many scenarios.
  • the first terminal is configured as a terminal that needs to share a shared resource
  • the second terminal is a terminal that establishes a broadcast network to share the shared resource.
  • an embodiment of a method for resource sharing in an embodiment of the present invention includes:
  • the first terminal acquires a service interface of the second terminal by using a connection switching extension technology.
  • the first terminal acquires the service interface of the second terminal by using the connection switching extension technology, and the service interface of the second terminal may indicate the service capability supported by the second terminal.
  • the first terminal When the first terminal determines that the second terminal supports the data broadcast service according to the service interface of the second terminal, the first terminal uploads the shared resource to the second terminal.
  • the first terminal After the first terminal obtains the service interface of the second terminal, when the second terminal supports the data broadcast service according to the service interface of the second terminal, the first terminal uploads the shared resource to the second terminal, where the shared resource is The first terminal needs a shared resource.
  • the first terminal starts the data of the second terminal by using a broadcast service interface of the second terminal. Broadcasting service, the second terminal establishing a data broadcast network, and sharing the shared resource in the data broadcast network.
  • the second terminal supports the data broadcast service, that is, the service interface of the second terminal includes a broadcast service interface, and the first terminal starts the data broadcast service of the second terminal by using the broadcast service interface of the second terminal, so that the second terminal establishes
  • the data broadcast network shares the shared resources uploaded by the first terminal in the data broadcast network.
  • the first terminal obtains the service interface of the second terminal by using the connection switching extension technology.
  • the uploading needs to be shared. Sharing the resource to the second terminal, and finally, starting the data broadcast service of the second terminal by using the broadcast service interface, so that the second terminal establishes a data broadcast network, and the shared resource is shared in the data broadcast network, and other terminals can be connected.
  • the other terminals After the broadcast service is quit, the other terminals only need to establish a connection with the second terminal with the broadcast service capability to obtain the resources that the first terminal needs to share, and no longer need to occupy the time of the first terminal sharing the resources, thereby saving resource sharing. The time it takes for the terminal to share resources.
  • Another embodiment of the method for resource sharing in the embodiment of the present invention includes:
  • the first terminal sends a handover request message to the second terminal by using the near field communication NFC, where the handover request message includes at least one connection mode supported by the first terminal except the NFC.
  • the first terminal When the first terminal needs to share the resource, the first terminal sends a handover request message to the second terminal by using the NFC, where the handover request message includes at least one connection mode supported by the first terminal except the NFC.
  • the first terminal receives, by using a near field communication NFC, a handover selection message sent by the second terminal.
  • the first terminal After receiving the handover request message to the second terminal, the first terminal receives the handover selection message sent by the second terminal by using the NFC, and the handover selection message is sent by the second terminal according to the handover request message.
  • the first terminal parses the handover selection message to obtain a selected connection manner and the a service interface of the second terminal, where the selected connection mode is a connection mode supported by the first terminal and the second terminal;
  • the first terminal After receiving the handover selection message, the first terminal parses the handover selection message to obtain a selected connection mode and a service interface of the second terminal, where the selected connection mode is a connection supported by the first terminal and the second terminal. the way.
  • the selected connection mode can be determined by the second terminal after receiving the handover request message, or the second terminal can carry the connection mode supported by the second terminal in the handover selection message, which is determined by the first terminal according to the second terminal.
  • the connection mode supported by the second terminal and the connection mode supported by the second terminal determine the selected connection mode, which is not limited herein.
  • connection mode supported by the first terminal or the second terminal may include BitTorrent (BT), Wireless-Fidelity (Wi-Fi), and WiFi peer-to-peer (Wi-Fi P2P) in addition to NFC.
  • BT BitTorrent
  • Wi-Fi Wireless-Fidelity
  • Wi-Fi P2P WiFi peer-to-peer
  • Wi-Fi Simple Settings WSC
  • Bluetooth Bluetooth and other connection methods are not limited here.
  • connection mode when the connection mode is carried, the type of the connection mode and the network configuration can be carried at the same time.
  • the first terminal determines, according to the service interface of the second terminal, whether the second terminal supports a data broadcast service.
  • the service interface of the second terminal includes the broadcast service interface, triggering step 205;
  • step 209 is triggered.
  • the first terminal establishes a selected connection with the second terminal by using the selected connection manner.
  • the first terminal determines that the second terminal supports the data broadcast service according to the service interface of the second terminal, the first terminal establishes a selected connection with the second terminal by using a selected connection manner.
  • the first terminal uploads a resource index of the shared resource by using a broadcast service interface of the second terminal on the selected connection.
  • the first terminal After the first terminal establishes a connection with the second terminal by using the selected connection mode, the first terminal uploads a resource index of the shared resource by using the broadcast service interface of the second terminal on the selected connection, where the resource index includes the share Description of the resource.
  • the first terminal invokes the broadcast service interface to upload the shared resource according to the resource index and a universal resource identifier URI that points to a shared resource on the selected connection.
  • the broadcast service interface is invoked to upload the shared resource according to the resource index and the universal resource identifier that points to the shared resource on the selected connection.
  • the first terminal After the first terminal uploads the shared resource, the first terminal starts a data broadcast service of the second terminal by using the broadcast service interface, so that the second terminal establishes a data broadcast network. Sharing the shared resource in the data broadcast network;
  • step 209 is not executed after step 208 is performed.
  • the first terminal terminates communication with the second terminal.
  • the first terminal may terminate communication with the second terminal.
  • the first terminal first communicates with the second terminal by using the NFC to obtain the service interface of the second terminal, and when the second terminal supports the data broadcast service through the service interface, the selected connection and the first
  • the second terminal establishes a connection, uploads the shared resource to the second terminal on the selected connection, and enables the second terminal to establish a data broadcast network to share the shared resource, and first adopts NFC communication, because the NFC communication connection establishment overhead is small, the speed is fast, and the speed is improved.
  • the rate at which the service interface and the connection mode are exchanged between the first terminal and the second terminal, and the shared resource is uploaded by using the selected connection the bandwidth is larger, the connection is more stable, and the rate and stability of uploading the shared resource are ensured.
  • a method for resource sharing in an embodiment of the present invention includes:
  • the second terminal sends a broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology.
  • the second terminal sends the broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology.
  • the second terminal receives the shared resource uploaded by the first terminal.
  • the second terminal After the second terminal sends the broadcast service interface to the first terminal, the second terminal receives the shared resource uploaded by the first terminal.
  • the second terminal When the broadcast service of the second terminal is started by the first terminal by using the broadcast service interface, the second terminal establishes a data broadcast network.
  • the second terminal After the second terminal sends the broadcast service interface to the first terminal, the first terminal uploads the shared resource, and the broadcast service of the second terminal is started by the broadcast service interface, when the broadcast service of the second terminal is When the first terminal is started through the broadcast service interface, the second terminal establishes a data broadcast network.
  • the second terminal shares the shared resource in the data broadcast network.
  • the second terminal receives the shared resource uploaded by the first terminal, and after establishing the data broadcast network, shares the shared resource in the data broadcast network.
  • the shared resource may be directly broadcasted in the data broadcast network, or the shared resource may be provided in the data broadcast network. There are other ways to download the link, which is not limited here.
  • the second terminal supporting the data broadcast service in the embodiment of the present invention sends the broadcast service interface of the second terminal to the first terminal by using the connection switching extension technology, and receives the shared resource uploaded by the first terminal, when the second terminal broadcasts
  • the second terminal When the service is started by the first terminal through the broadcast service interface, the second terminal establishes a data broadcast network, and the shared resource is shared in the data broadcast network, and the other terminal can access the data broadcast network established by the second terminal to obtain the share.
  • Resources no longer need to establish a connection with the first terminal one by one, which simplifies the process of resource sharing, and the first terminal uploads the resources, starts the data broadcast service of the second terminal, and then exits, and other terminals only need to
  • the second terminal having the broadcast service capability can obtain the resources that the first terminal needs to share, and the time of the first terminal sharing the resources is no longer needed, and the time required for the resource sharing terminal to share the resources is saved.
  • Another embodiment of the method for resource sharing in the embodiment of the present invention includes:
  • the second terminal receives, by using a near field communication NFC, a handover request message sent by the first terminal, where the handover request message includes at least one connection mode supported by the first terminal except the NFC.
  • the second terminal receives the handover request message sent by the first terminal by using the NFC, and the handover request message includes at least one of the first terminal support except the NFC.
  • the handover request message includes at least one of the first terminal support except the NFC.
  • the second terminal determines, according to the handover request message and the connection mode supported by the second terminal, the selected connection mode, where the selected connection mode is supported by the first terminal and the second terminal. Connection method;
  • the second terminal After receiving the handover request message, the second terminal determines the selected connection mode according to the handover request message and the connection mode supported by the second terminal, where the selected connection mode is the first terminal and the second terminal.
  • the connection method supported by the terminal After receiving the handover request message, the second terminal determines the selected connection mode according to the handover request message and the connection mode supported by the second terminal, where the selected connection mode is the first terminal and the second terminal. The connection method supported by the terminal.
  • connection mode supported by the first terminal or the second terminal may include bit torrent (BT), WIreless-Fidelity (Wi-Fi), and peer-to-peer wireless network (Wi-Fi P2P) in addition to NFC.
  • BT bit torrent
  • Wi-Fi WIreless-Fidelity
  • Wi-Fi P2P peer-to-peer wireless network
  • Wi-Fi Simple Settings WSC
  • Bluetooth Bluetooth and other connection methods are not limited here.
  • connection mode when the connection mode is carried, the type of the connection mode and the network configuration can be carried at the same time.
  • the second terminal constructs a handover selection message, where the handover selection message includes the selected connection mode, and a broadcast service interface of the second terminal.
  • the second terminal After receiving the handover request message, the second terminal constructs a handover selection message, where the handover selection message includes a selected connection mode, and a broadcast service interface of the second terminal;
  • connection selection mode supported by the second terminal may be sent to the first terminal, and the first terminal determines the selected connection mode, which is not limited herein.
  • the second terminal supports a data broadcast service, which has at least one broadcast service interface, and the broadcast service interface can be invoked through multiple different IP addresses, and the IP address of the service interface is determined by the network configuration of the selected connection mode. .
  • the second terminal sends the handover selection message to the first terminal by using a near field communication NFC.
  • the handover selection message is sent to the first terminal by using the NFC.
  • the second terminal establishes a connection with the first terminal by using the selected connection manner.
  • the first terminal needs to share the resource.
  • the first terminal receives the handover selection message and determines that the second terminal supports the data broadcast service
  • the first terminal establishes an establishment with the second terminal, and the second terminal adopts the selection.
  • the connection mode establishes a connection with the first terminal.
  • the selected connection such as WIFI, Bluetooth, etc.
  • WIFI Wireless Fidelity
  • Bluetooth Wireless Fidelity
  • the connection is more stable.
  • the second terminal receives, by using the broadcast service interface, the universal resource identifier URI, the resource index of the shared resource, and the shared resource that are uploaded by the first terminal to the shared resource. Descriptive information of the shared resource is included in the resource index;
  • the universal service identifier corresponding to the shared resource uploaded by the first terminal and the resource of the shared resource are received by the broadcast service interface on the selected connection.
  • An index, and the shared resource, the resource index includes description information of the shared resource.
  • the second terminal generates a resource access interface for the shared resource.
  • the second terminal After receiving the shared resource, the second terminal generates a resource access interface for the shared resource.
  • the second terminal may join the shared resource to the resource pool, and join the local resource database to generate a resource access interface.
  • the resource access interface may be a URL that points to a web server on the second terminal, or a multicast address, such as ipdc://239.0.2.10:8000, which is not limited herein.
  • the second terminal After the second terminal receives the shared resource, the second terminal receives the control information of the start data broadcast service sent by the first terminal by using the broadcast service interface on the selected connection. ;
  • the second terminal After the second terminal receives the shared resource, the second terminal receives the control information of the start data broadcast service sent by the first terminal by using the broadcast service interface on the selected connection, according to the start data broadcast service. Control information to start your own data broadcast service.
  • the second terminal can also perform an integrity check on the received shared resource, and if the resource is incomplete, can report an error to the first terminal, but does not refuse to start the broadcast service.
  • the service start confirmation message may also be sent to the first terminal.
  • the second terminal When the broadcast service of the second terminal is started by the first terminal by using the broadcast service interface, the second terminal establishes a data broadcast network.
  • the second terminal When the broadcast service of the second terminal is initiated by the first terminal through the broadcast service interface, the second terminal establishes a data data broadcast network.
  • the second terminal generates a broadcast frame, where the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface and the network identifier of the data broadcast network.
  • the second terminal may generate a broadcast frame, where the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface and the network identifier of the data broadcast network of the second terminal.
  • the broadcast frame can be various, for example, it can be an iBeacon broadcast frame.
  • the frame can be broadcast for the Samsung proximity, and can also be a broadcast frame based on other technologies, which is not limited herein.
  • the second terminal broadcasts the broadcast frame, so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and receives the share through the resource access interface. Resources.
  • the second terminal may broadcast the generated broadcast frame, so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and receives the shared resource through the resource access interface.
  • the second terminal may generate a resource access interface, and generate a broadcast frame, and the other terminal automatically obtains the network identifier of the resource access interface and the data broadcast network through the broadcast frame, and accesses the data broadcast through the network identifier.
  • the network obtains the shared resource through the resource access interface, which simplifies the process for other terminals to acquire shared resources, and improves the efficiency of resource sharing.
  • the first terminal initializes a handover request message, where the handover request message includes a connection mode supported by the first terminal (BT ⁇ Wi-Fi P2P ⁇ WSC), and sends a handover request message to the second terminal by using the NFC;
  • the second terminal having the data broadcast capability receives the handover request message, and constructs a handover selection message, where the handover selection message includes the selected connection mode and the broadcast service interface of the second terminal, and the second terminal sends the handover selection message to the first terminal. ;
  • the first terminal parses the handover selection message, determines that the second terminal supports the data broadcast service, and starts to establish a connection with the second terminal; the first terminal checks that the wired network is not connected, and selects to establish a connection with the second terminal by using the Wi-Fi P2P protocol.
  • a terminal becomes a client of the P2P group;
  • the first terminal uploads a resource index through the foregoing interface, and the index is an xml file, which includes description information of the resource to be shared, and the xml file is uploaded by using the http post method;
  • the first terminal invokes the above interface, and uses the http post method to upload a shared resource or a shared resource compressed package;
  • the first terminal invokes the above interface to start a data broadcast service
  • the first terminal only needs to provide a URI pointing to the resource to be shared, the above three steps Automatic execution;
  • the second terminal receives the resource index file, parses the resource source and the resource list, and further receives the shared resource file and performs an integrity check; the second terminal first adds the shared resource uploaded by the first terminal to the resource pool, and joins the local resource database.
  • a resource access interface specifically, a web URL or a multicast address: ipdc://239.0.2.10:8000
  • the second terminal responds to the remote call of the first terminal to start the data broadcast service; if the shared resource is incomplete, the second terminal reports an error to the first terminal in the Http response message but does not refuse to start the data broadcast service; the second terminal goes to the first The terminal sends a service initiation confirmation message;
  • the second terminal starts a Soft-AP or Wi-Fi P2P group establishment process, and provides a data broadcast network access service
  • the second terminal generates an iBeacon UUID, and binds the UUID, the resource access interface (that is, the multicast address), and the network identifier of the data broadcast network established by the second terminal to the web server in the Internet;
  • the second terminal starts broadcasting the iBeacon frame and starts data multicasting, and the multicasting is performed in the WLAN set up by the second terminal.
  • the second terminal may modify the Major or the iBeacon frame.
  • the Minor value identifies the resource update;
  • the terminal around the second terminal receives the UUID, parses out the resource access interface and the network identifier of the data broadcast network, and then joins the data broadcast network and receives the shared resource.
  • a technical summit will usually arrange a keynote speech.
  • the speaker may leave after completing the speech.
  • the following methods can be used to send keynote materials to the participants:
  • Speaker A opens the sharing program on his own terminal A, selects the keynote material to be shared, and then clicks to share; the program initializes the switching request message, and the switching selection message includes the connection mode supported by terminal A (BT ⁇ Wi-Fi P2P) ⁇ WSC), the application interface prompts the speaker A to use NFC to connect the surrounding devices;
  • a smart router with NFC and Wi-Fi functions was placed in the venue, and a prompt slogan was set up.
  • Speaker A uses NFC to connect this router to his own terminal A and sends it to this router.
  • the switching request message
  • the router with the data broadcast capability receives the handover request message, constructs a handover selection message, the handover selection message includes the selected connection mode and the broadcast service interface, and the router B sends the handover selection message to the terminal A of the speaker A;
  • the terminal A parses the handover selection message, determines that the router B supports the data broadcast service, and the terminal A starts to establish a connection with the router B; the terminal A checks to find that the wired network is not connected, and selects to establish a connection with the router B by using the Wi-Fi P2P protocol, and the terminal A becomes the Client client of the P2P group;
  • the resource sharing control program of the terminal A uploads the resource index through the above interface, and the index is an xml file, which contains description information of the resource to be shared, and the xml file is uploaded by the http post method;
  • Terminal A invokes the above interface, and uses the http post method to upload a resource or a resource compression package
  • Terminal A invokes the above interface to start a data broadcast service.
  • terminal A only needs to provide a URI pointing to the resource to be shared, and the above three steps are automatically executed;
  • the router B receives the resource index file, parses the resource source and the resource list, and can also receive the resource file and perform the integrity check.
  • the router B first adds the resource uploaded by the terminal A to the resource pool, and joins the local resource database to generate the resource access.
  • Interface specifically, can be a web URL or a multicast address: ipdc://239.0.2.10:8000
  • Router B responds to the remote call of terminal A and starts the broadcast service. If the resource is incomplete, terminal B reports an error to A in the Http response message but does not refuse to start the broadcast service; Router B sends a service start confirmation message to terminal A. After receiving the confirmation message, the speaker A completes the resource sharing and can leave the venue;
  • Router B provides Wi-Fi access or initiates a Wi-Fi P2P group establishment process to provide network access services
  • Router B generates an iBeacon UUID, binds the UUID, the resource access interface (that is, the multicast address), and the network ID created by Router B, and uploads it to the web server on the Internet.
  • the resource access interface that is, the multicast address
  • Router B starts broadcasting iBeacon frames and starts data multicasting. Multicast is built on Router B. Performed in the WLAN; when a new resource is added to the resource pool, Router B modifies the Major or Minor value in the iBeacon frame to identify the resource update.
  • the site screen prompts the user to use iBeacon to receive the speech material; the audience in the venue opens the iBeacon receiving function, and then receives the UUID, automatically runs a specific program to parse out the resource access interface and network identifier, and then can join the data broadcast formed by Router B. Network and receive resources.
  • an embodiment of the terminal in the embodiment of the present invention includes:
  • the obtaining module 501 is configured to acquire a service interface of the second terminal by using a connection switching extension technology
  • the uploading module 502 is configured to: when the second terminal supports the data broadcast service according to the service interface of the second terminal acquired by the acquiring module 501, upload the shared resource to the second terminal;
  • the startup module 503 is configured to start a data broadcast service of the second terminal by using the broadcast service interface of the second terminal acquired by the acquiring module 501, so that the second terminal establishes a data broadcast network, and shares the same in the data broadcast network.
  • the shared resource uploaded by the uploading module 502 is described.
  • the obtaining module 501 first obtains the service interface of the second terminal by using the connection switching extension technology.
  • the uploading module 502 uploads.
  • the shared resource is shared to the second terminal.
  • the startup module 503 starts the data broadcast service of the second terminal by using the broadcast service interface, so that the second terminal establishes a data broadcast network, and shares the shared resource in the data broadcast network.
  • the other terminal can access the shared data in the data broadcast network established by the second terminal, and no longer need to establish a connection with the first terminal one by one, which simplifies the process of resource sharing, and the first terminal uploads the resource.
  • the terminal After the data broadcast service of the second terminal is started, the terminal can be logged out, and the other terminal only needs to establish a connection with the second terminal having the broadcast service capability to obtain the resource that the first terminal needs to share, and the first terminal that does not need to occupy the shared resource is no longer needed. Time, saving time spent by resources sharing terminals sharing resources.
  • the acquiring module 501 in the terminal specifically includes:
  • a first sending unit 601 configured to send, by using an NFC, a handover request message to the second terminal, where the handover request message includes at least one connection supported by the first terminal except the NFC the way;
  • a first receiving unit 602 configured to receive, by using an NFC, a handover selection message sent by the second terminal;
  • the parsing unit 603 is configured to parse the handover selection message received by the first receiving unit 602, to obtain a selected connection mode and a service interface of the second terminal, where the selected connection mode is the first terminal and the Describe the connection mode supported by the second terminal;
  • the terminal also includes:
  • the first connection establishing module 604 is configured to establish a selected connection with the second terminal by using the selected connection manner.
  • the first sending unit 601, the first receiving unit 602 exchanges information with the second terminal by using the NFC
  • the parsing unit 603 parses out the selected connection mode and the service interface supported by the second terminal
  • the first connection establishing module 604 adopts The selected connection mode establishes a selected connection with the second terminal. Because the NFC communication connection establishment overhead is small and the speed is fast, the rate of exchange of the service interface and the connection mode between the first terminal and the second terminal is improved, and the selected connection is used for uploading and sharing. Resources, larger bandwidth, and more stable connections ensure the speed and stability of uploading shared resources.
  • the uploading module 502 in the terminal specifically includes:
  • the index uploading unit 701 is configured to use, on the selected connection established by the first connection establishing module 604, when determining, according to the service interface of the second terminal acquired by the acquiring module 501, that the second terminal supports the data broadcast service
  • the broadcast service interface uploads a resource index of the shared resource, where the resource index includes description information of the shared resource;
  • the resource uploading unit 702 is configured to invoke the broadcast service interface to upload the shared resource according to the resource index uploaded by the index uploading unit and the universal resource identifier URI pointing to the shared resource on the selected connection;
  • the startup module 503 is specifically configured to: after the uploading module 502 uploads the shared resource, start a data broadcast service of the second terminal by using the broadcast service interface of the second terminal acquired by the acquiring module 502, so that the The second terminal establishes a data broadcast network, and shares the shared resources uploaded by the upload module in the data broadcast network.
  • the index uploading unit 701 can upload the resource index, and the resource uploading unit 702 uploads the shared resource according to the resource index and the universal resource identifier that points to the shared resource, thereby improving the uploading rate and the accuracy rate of the shared resource.
  • an embodiment of the terminal used as the second terminal in the embodiment of the present invention includes:
  • the sending module 801 is configured to send the broadcast service interface of the second terminal to the first terminal by using a connection switching extension technology
  • the resource receiving module 802 is configured to receive the shared resource uploaded by the first terminal;
  • a network establishing module 803, configured to establish a data broadcast network when the broadcast service of the second terminal is started by the first terminal by using the broadcast service interface;
  • the sharing module 804 is configured to share the shared resource received by the resource receiving module 802 in the data broadcast network established by the network establishing module 803.
  • the sending module 801 sends the broadcast service interface of the second terminal to the first terminal by using the connection switching extension technology
  • the resource receiving module 802 receives the shared resource uploaded by the first terminal, when the broadcast service of the second terminal is
  • the network establishing module 803 establishes a data broadcast network
  • the sharing module 804 shares the shared resource in the data broadcast network
  • the other terminal can access the data broadcast network established by the second terminal to share the
  • the shared resource does not need to be connected to the first terminal one by one, which simplifies the process of resource sharing.
  • the first terminal uploads the resource and starts the data broadcast service of the second terminal, it can exit.
  • Other terminals only need to The connection with the second terminal having the capability of the broadcast service can obtain the resource that the first terminal needs to share, and the time of the first terminal sharing the resource is no longer needed, and the time required for the resource sharing terminal to share the resource is saved.
  • the sending module 801 in the terminal specifically includes:
  • the second receiving unit 901 is configured to receive, by using the NFC, a handover request message sent by the first terminal, where the handover request message includes at least one connection mode supported by the first terminal except the NFC;
  • a determining unit 902 configured to receive, according to the switching request message received by the second receiving unit 901, a connection mode supported by the second terminal, determining a selected connection mode, where the selected connection mode is a connection mode supported by the first terminal and the second terminal;
  • the constructing unit 903 is configured to construct a handover selection message, where the handover selection message includes a selected connection manner determined by the determining unit, and a broadcast service interface of the second terminal;
  • a second sending unit 904 configured to send the handover selection message to the first terminal by using NFC;
  • the terminal further includes:
  • a second connection establishing module 905, configured to establish a selected connection with the first terminal by using the selected connection manner
  • the resource receiving module 802 is specifically configured to: receive, by using the broadcast service interface, the universal resource identifier that is sent by the first terminal and is directed to the shared resource, on the selected connection established by the second connection establishing module 905. a URI, a resource index of the shared resource, and the shared resource, where the resource index includes description information of the shared resource;
  • the terminal can also include:
  • the information receiving module 906 is configured to: after the resource receiving module 802 receives the shared resource, receive the information about the start data broadcast service sent by the first terminal by using the broadcast service interface on the selected connection. .
  • the second receiving unit 901, the second sending unit 904 exchanges information with the first terminal by using the NFC
  • the second connection establishing module 905 establishes a selected connection with the second terminal by using the selected connection manner, and is established by the NFC communication connection.
  • the overhead is small and the speed is fast, and the rate of exchanging service interfaces and connection modes between the first terminal and the second terminal is improved, and the shared resources are received by the selected connection, the bandwidth is larger, the connection is more stable, and the rate of receiving the shared resources is ensured. stability.
  • the terminal used as the second terminal further includes :
  • the interface generating module 1001 is configured to generate a resource access interface for the shared resource received by the resource receiving module 802.
  • the broadcast frame generating module 1002 is configured to generate a broadcast frame, where the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface generated by the interface generating module 1001 and the network construction a network identifier of the data broadcast network established by the vertical module 803;
  • the broadcast module 1003 is configured to broadcast a broadcast frame generated by the broadcast frame generating module, so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and accesses the resource through the resource.
  • the interface receives the shared resource.
  • the interface generating module 1001 may generate a resource access interface
  • the broadcast module 1003 broadcasts a broadcast frame generated by the broadcast frame generating module 1002, and the other terminal automatically acquires the network of the resource access interface and the data broadcast network through the broadcast frame.
  • the identifier is obtained by accessing the data broadcast network through the network identifier
  • the shared resource is obtained through the resource access interface, which simplifies the process for other terminals to acquire the shared resource, and improves the efficiency of resource sharing.
  • the first terminal initiates a handover request message, where the handover request message includes a connection mode supported by the first terminal (BT ⁇ Wi-Fi P2P ⁇ WSC), and the first sending unit 601 in the first terminal sends a handover request message to the first Second terminal
  • the second receiving unit 901 in the second terminal having the data broadcasting capability receives the handover request message, and the constructing unit 903 in the second terminal constructs a handover selection message, where the handover selection message includes the selected connection mode and the broadcast of the second terminal.
  • the second sending unit 904 in the second terminal sends a handover selection message to the first terminal;
  • the first receiving unit 602 in the first terminal receives the handover selection cancellation, the parsing unit 603 in the first terminal parses the handover selection message, determines that the second terminal supports the data broadcast service, and the first connection establishment module 604 in the first terminal starts. Establishing a connection with the second connection establishing module 905 in the second terminal; the first terminal checks that the wired network is not connected, and selects to establish a connection with the second terminal by using the Wi-Fi P2P protocol, where the first terminal becomes the client of the P2P group;
  • the index uploading unit 701 in the first terminal uploads the resource index through the interface, and the index is an xml file, which includes description information of the resource to be shared, and the xml file is uploaded by using the http post method;
  • the resource uploading unit 702 in the first terminal invokes the above interface, using the http post method. Pass a shared resource or a shared resource compressed package;
  • the startup module 503 in the first terminal invokes the foregoing interface to start a data broadcast service.
  • the first terminal only needs to provide a URI pointing to the resource to be shared, and the foregoing three steps are automatically performed;
  • the resource receiving module 802 in the second terminal receives the resource index file, parses the resource source and the resource list, and further receives the shared resource file and performs an integrity check; the interface generating module 1001 in the second terminal first uploads the shared by the first terminal.
  • the resource is added to the resource pool and added to the local resource database to generate a resource access interface. Specifically, it can be a web URL or a multicast address: ipdc://239.0.2.10:8000
  • the information receiving module 906 in the second terminal receives the information of the start data broadcast service sent by the first terminal, and responds to the remote call of the first terminal to start the data broadcast service; if the shared resource is incomplete, the second terminal sends an Http response message to the second terminal.
  • the first terminal reports an error but does not refuse to start the data broadcast service; the second terminal sends a service initiation confirmation message to the first terminal;
  • the network establishing module 803 in the second terminal starts a Soft-AP or Wi-Fi P2P group establishment process, and provides a data broadcast network access service;
  • the broadcast frame generating module 1002 in the second terminal generates an iBeacon UUID, and binds the UUID, the resource access interface (ie, the multicast address), and the network identifier of the data broadcast network built by the second terminal, and uploads the web to the Internet.
  • the server On the server;
  • the broadcast module 1003 in the second terminal starts to broadcast the iBeacon frame, and starts data multicasting.
  • the multicast is performed in the WLAN set up by the second terminal.
  • the second terminal can modify the iBeacon.
  • the Major or Minor value in the frame identifies the resource update;
  • the terminal around the second terminal receives the UUID, parses out the resource access interface and the network identifier of the data broadcast network, and then joins the data broadcast network and receives the shared resource.
  • FIG. 11 is a schematic structural diagram of a terminal 1100 according to an embodiment of the present invention.
  • the terminal 1100 may represent a structure of a terminal used as a first terminal, and may also represent a structure of a terminal used as a second terminal, including:
  • the input device 1101, the output device 1102, the processor 1103, and the memory 1104 (wherein the number of processors 1103 in the terminal 1100 may be one or more, and one processor 1103 is taken as an example in FIG. 11).
  • the input device 1101, the output device 1102, and the processor 1103 And the memory 1104 can be connected by a bus or other means, wherein the connection by the bus is taken as an example in FIG.
  • the processor 1103 is configured to perform the following steps by calling an operation instruction stored in the memory 1104:
  • the processor 1103 is specifically configured to perform the following steps:
  • the processor 1103 is further configured to perform the following steps:
  • the processor 1103 is specifically configured to perform the following steps:
  • the data broadcast service of the second terminal is started through the broadcast service interface.
  • the processor 1103 is configured to perform the following steps by calling an operation instruction stored in the memory 1104:
  • the processor 1103 is specifically configured to perform the following steps:
  • the selected connection mode determining, according to the switching request message and the connection mode supported by the second terminal, the selected connection mode, where the selected connection mode is a connection mode supported by the first terminal and the second terminal;
  • the processor 1103 is further configured to perform the following steps:
  • the processor 1103 is specifically configured to perform the following steps:
  • the broadcast service interface receives, by the broadcast service interface, the universal resource identifier URI, the resource index of the shared resource, and the shared resource, which are uploaded by the first terminal, on the selected connection, and the resource index includes Descriptive information of the shared resource;
  • the processor 1103 is further configured to perform the following steps:
  • the processor 1103 is further configured to perform the following steps:
  • the broadcast frame is used to indicate that the terminal that receives the broadcast frame acquires the resource access interface and the network identifier of the data broadcast network;
  • Broadcasting the broadcast frame so that after receiving the broadcast frame, the other terminal joins the data broadcast network according to the network identifier of the data broadcast network, and receives the shared resource through the resource access interface.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

本发明实施例公开了资源共享的方法和终端,用于建立数据广播发送网络,简化资源分享的过程,节省资源分享的终端分享资源所需要的时间。本发明实施例方法包括:第一终端先通过连接切换扩展技术得到第二终端的服务接口,当该第一终端根据该第二终端的服务接口确定该第二终端支持数据广播服务时,上传需要共享的共享资源到该第二终端,最后,通过该广播服务接口启动第二终端的数据广播服务,使该第二终端建立数据广播网络,在该数据广播网络中共享该共享资源。

Description

资源共享的方法和终端 技术领域
本发明涉及通信领域,尤其涉及资源共享的方法和终端。
背景技术
随着网络信息化建设的快速发展,需要与他人分享资源的场景越来越多,相应的,也产生了各种资源共享的方法。
其中,Wi-Fi直连分享(SuperBeam Wi-Fi Direct Share)是一种基于Wi-Fi的文件分享技术,要分享资源的终端创建Wi-Fi Direct组,将加入组的密钥信息通过二维码或NFC传给接收资源的终端,接收终端从二维码或NFC消息中解析出密钥信息后自动开始文件接收流程。
然而,该资源分享方法仅适用于点对点的文件传输,当需要将一个资源发给多个终端时,使用该方法需要每个终端依次与资源分享的终端配对建立连接,过程比较复杂且需要耗费资源分享的终端极长的时间。
发明内容
本发明实施例提供了资源共享的方法和终端,用于建立数据广播发送网络,简化资源分享的过程,节省资源分享的终端分享资源所需要的时间。
本发明实施例第一方面提供了一种资源共享的方法,包括:
第一终端通过连接切换扩展技术,获取第二终端的服务接口;
当所述第一终端根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,所述第一终端上传共享资源到所述第二终端;
所述第一终端通过第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源。
结合本发明实施例的第一方面,本发明实施例第一方面的第一种实现方式中,所述第一终端通过连接切换扩展技术,获取第二终端的服务接口具体包括:
所述第一终端通过近场通信NFC发送切换请求消息到所述第二终端,所 述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
所述第一终端通过NFC接收所述第二终端发送的切换选择消息;
所述第一终端解析所述切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
所述第一终端上传共享资源到所述第二终端的步骤之前还包括:
所述第一终端采用所述选定连接方式与所述第二终端建立选定连接。
结合本发明实施例第一方面的第一种实现方式,本发明实施例第一方面的第二种实现方式中,所述第一终端上传共享资源到所述第二终端具体包括:
所述第一终端在所述选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
所述第一终端在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
所述第一终端通过所述广播服务接口启动所述第二终端的数据广播服务具体包括:
当所述第一终端上传所述共享资源完成后,所述第一终端通过所述广播服务接口启动所述第二终端的数据广播服务。
本发明实施例第二方面提供了一种资源分享的方法,包括:
第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端;
所述第二终端接收所述第一终端上传的共享资源;
当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,所述第二终端建立数据广播网络;
所述第二终端在所述数据广播网络中共享所述共享资源。
结合本发明实施例的第二方面,本发明实施例第二方面的第一种实现方式中,所述第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到所述第一终端具体包括:
所述第二终端通过NFC接收所述第一终端发送的切换请求消息,所述切 换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
所述第二终端根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
所述第二终端构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
所述第二终端通过NFC发送所述切换选择消息到所述第一终端;
所述第二终端接收所述第一终端上传的共享资源的步骤之前还包括:
所述第二终端采用所述选定连接方式与所述第一终端建立选定连接。
结合本发明实施例第二方面的第一种实现方式,本发明实施例第二方面的第二种实现方式中,所述第二终端接收所述第一终端上传的共享资源具体包括:
所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
当所述第二终端接收所述共享资源完成后,所述方法还包括:
所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
结合本发明实施例的第二方面至第二方面的第二种实现方式中任一种实现方式,本发明实施例第二方面的第三种实现方式中,所述第二终端建立数据广播网络的步骤之前还包括:
所述第二终端为所述共享资源生成资源访问接口;
所述第二终端在所述数据广播网络中共享所述共享资源的步骤之后还包括:
所述第二终端生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
所述第二终端广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
本发明实施例第三方面提供了一种终端,作为第一终端使用,包括:
获取模块,用于通过连接切换扩展技术,获取第二终端的服务接口;
上传模块,用于当根据所述获取模块获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
启动模块,用于通过所述获取模块获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块上传的共享资源。
结合本发明实施例的第三方面,本发明实施例第三方面的第一种实现方式中,所述获取模块具体包括:
第一发送单元,用于通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
第一接收单元,用于通过NFC接收所述第二终端发送的切换选择消息;
解析单元,用于解析所述第一接收单元接收到的切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
所述终端还包括:
第一连接建立模块,用于采用所述选定连接方式与所述第二终端建立选定连接。
结合本发明实施例第三方面的第一种实现方式,本发明实施例第三方面的第二种实现方式中,所述上传模块具体包括:
索引上传单元,用于当根据所述获取模块获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,在所述第一连接建立模块建立的选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
资源上传单元,用于在所述选定连接上根据所述索引上传单元上传的资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
所述启动模块具体用于,当所述上传模块上传所述共享资源完成后,通过 所述获取模块获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块上传的共享资源。
本发明实施例第四方面提供了一种终端,作为第二终端使用,包括:
发送模块,用于通过连接切换扩展技术,发送所述第二终端的广播服务接口到第一终端;
资源接收模块,用于接收所述第一终端上传的共享资源;
网络建立模块,用于当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,建立数据广播网络;
共享模块,用于在所述网络建立模块建立的数据广播网络中共享所述资源接收模块接收的共享资源。
结合本发明实施例的第四方面,本发明实施例第四方面的第一种实现方式中,所述发送模块具体包括:
第二接收单元,用于通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
确定单元,用于根据所述第二接收单元接收的切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
构造单元,用于构造切换选择消息,所述切换选择消息中包括所述确定单元确定的选定连接方式,以及所述第二终端的广播服务接口;
第二发送单元,用于通过NFC发送所述切换选择消息到所述第一终端;
所述终端还包括:
第二连接建立模块,用于采用所述选定连接方式与所述第一终端建立选定连接。
结合本发明实施例第四方面的第一种实现方式,本发明实施例第四方面的第二种实现方式中,所述资源接收模块具体用于,在所述第二连接建立模块建立的选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资 源索引中包含所述共享资源的描述信息;
所述终端还包括:
信息接收模块,用于当所述资源接收模块接收所述共享资源完成后,在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
结合本发明实施例的第四方面至第四方面的第二种实现方式中任一种实现方式,本发明实施例第四方面的第三种实现方式中,所述终端还包括:
接口生成模块,用于为所述资源接收模块接收的共享资源生成资源访问接口;
广播帧生成模块,用于生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述接口生成模块生成的资源访问接口以及所述网络建立模块建立的数据广播网络的网络标识;
广播模块,用于广播所述广播帧生成模块生成的广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
本发明实施例第五方面提供了一种终端,作为第一终端使用,包括:
输入装置、输出装置、处理器和存储器;
通过调用所述存储器存储的操作指令,所述处理器用于执行如下步骤:
通过连接切换扩展技术,获取第二终端的服务接口;
当根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
通过第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源。
结合本发明实施例的第五方面,本发明实施例第五方面的第一种实现方式中,所述处理器具体用于执行如下步骤:
通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
通过NFC接收所述第二终端发送的切换选择消息;
解析所述切换选择消息,得到选定连接方式以及所述第二终端的服务接 口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
所述处理器还用于执行如下步骤:
采用所述选定连接方式与所述第二终端建立选定连接。
结合本发明实施例第五方面的第一种实现方式,本发明实施例第五方面的第二种实现方式中,所述处理器具体用于执行如下步骤:
在所述选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
当上传所述共享资源完成后,通过所述广播服务接口启动所述第二终端的数据广播服务。
本发明实施例第六方面提供了一种终端,作为第二终端使用,包括:
输入装置、输出装置、处理器和存储器;
通过调用所述存储器存储的操作指令,所述处理器用于执行如下步骤:
通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端;
接收所述第一终端上传的共享资源;
当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,建立数据广播网络;
在所述数据广播网络中共享所述共享资源。
结合本发明实施例的第六方面,本发明实施例第六方面的第一种实现方式中,所述处理器具体用于执行如下步骤:
通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
通过NFC发送所述切换选择消息到所述第一终端;
所述处理器还用于执行如下步骤:
采用所述选定连接方式与所述第一终端建立选定连接。
结合本发明实施例第六方面的第一种实现方式,本发明实施例第六方面的第二种实现方式中,所述处理器具体用于执行如下步骤:
在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
所述处理器还用于执行如下步骤:
在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
结合本发明实施例的第六方面至第六方面的第二种实现方式中任一种实现方式,本发明实施例第六方面的第三种实现方式中,所述处理器还用于执行如下步骤:
为所述共享资源生成资源访问接口;
生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
从以上技术方案可以看出,本发明实施例具有以下优点:本发明实施例中第一终端先通过连接切换扩展技术得到第二终端的服务接口,当该第一终端根据该第二终端的服务接口确定该第二终端支持数据广播服务时,上传需要共享的共享资源到该第二终端,最后,通过该广播服务接口启动第二终端的数据广播服务,使该第二终端建立数据广播网络,在该数据广播网络中共享该共享资源,则其他终端可以接入第二终端建立的数据广播网络中分享该共享资源,不再需要一个个的依次与第一终端建立连接,简化了资源分享的过程,且第一终端上传完资源,启动第二终端的数据广播服务后即可退出,其他终端都只需要与具有广播服务能力的第二终端建立连接即可得到第一终端需要分享的资源,不再需要占用分享资源的第一终端的时间,节省资源分享的终端分享资源所需要的时间。
附图说明
图1为本发明实施例中资源分享的方法一个流程示意图;
图2为本发明实施例中资源分享的方法另一个流程示意图;
图3为本发明实施例中资源分享的方法另一个流程示意图;
图4为本发明实施例中资源分享的方法另一个流程示意图;
图5为本发明实施例中作为第一终端使用的终端一个结构示意图;
图6为本发明实施例中作为第一终端使用的终端另一个结构示意图;
图7为本发明实施例中作为第一终端使用的终端另一个结构示意图;
图8为本发明实施例中作为第二终端使用的终端一个结构示意图;
图9为本发明实施例中作为第二终端使用的终端另一个结构示意图;
图10为本发明实施例中作为第二终端使用的终端另一个结构示意图;
图11为本发明实施例中终端另一个结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
应当理解,尽管在本发明实施例中可能采用术语第一、第二等来描述各个终端,但终端不应限于这些术语。这些术语仅用来将终端彼此区分开。例如,在不脱离本发明实施例范围的情况下,第一终端也可以被称为第二终端,类似地,第二终端也可以被称为第一终端;同样的,第二终端也可以被称为第三终端等等,本发明实施例对此不做限制。
此处在本发明的描述中使用的术语是用于描述特定实施例的目的并且不旨在作为对本发明的限制。
术语“连接切换扩展技术(Connection Handover Extension)”是指近场通信论坛(NFC Forum)定义的基于连接切换的一种框架,在连接切换选择消息中携带终端具有的服务能力(例如,打印、播放音视频等)以及该终端的当前网 络配置。
术语“近场通信(NFC)”是指NFC Forum系列规范定义的一种通信技术,运行于13.56MHz,通信距离4-20cm。NFC广泛应用于标签(Tag)读写和移动支付等场景。
术语“iBeacon”是苹果公司发布的一项基于蓝牙低功耗(Bluetooth Low Energy)的通信技术,该技术定义了一种帧格式,其中包含UUID、Major和Minor等字段。iBeacon设备发送包含上述信息的广播帧,接收设备收到上述信息后可以执行一个预设的动作。iBeacon的主要功能是位置感知,目前主要应用场景是室内定位、定向推送广告等。
术语“数据广播(Data Broadcast)”是一种数据发送技术,实现方式是使用单一的系统前端(Head end),连续、滚动地将已编辑整理好的内容,经过信息传输网络,传送到地域广泛的、能够处理这些数据的用户智能设备上去,如:PC、机顶盒以及移动终端等。信息内容则是由视频、音频、软件程序、流式数据或者其他数字多媒体组成的。数据广播是为一对多的场景设计的。
本发明实施例中,设定第一终端为需要分享共享资源的终端,第二终端为建立广播网络共享该共享资源的终端。下面分别以这两类终端作为执行主体,对本发明实施例中资源分享的方法进行描述。
一、以第一终端为执行主体,对本发明实施例中资源分享的方法进行描述:
请参阅图1,本发明实施例中资源分享的方法一个实施例包括:
101、第一终端通过连接切换扩展技术,获取第二终端的服务接口;
第一终端需要共享资源时,该第一终端通过连接切换扩展技术,获取第二终端的服务接口,该第二终端的服务接口可以表明该第二终端支持的服务能力。
102、当所述第一终端根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,所述第一终端上传共享资源到所述第二终端;
该第一终端得到第二终端的服务接口后,当根据该第二终端的服务接口确定该第二终端支持数据广播服务时,该第一终端上传共享资源到该第二终端,该共享资源为该第一终端需要共享的资源。
103、所述第一终端通过第二终端的广播服务接口启动第二终端的数据广 播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源。
第二终端支持数据广播服务,即该第二终端的服务接口包括广播服务接口,该第一终端通过该第二终端的广播服务接口启动该第二终端的数据广播服务,使该第二终端建立数据广播网络,在该数据广播网络中共享第一终端上传的共享资源。
本发明实施例中第一终端先通过连接切换扩展技术得到第二终端的服务接口,当该第一终端根据该第二终端的服务接口确定该第二终端支持数据广播服务时,上传需要共享的共享资源到该第二终端,最后,通过该广播服务接口启动第二终端的数据广播服务,使该第二终端建立数据广播网络,在该数据广播网络中共享该共享资源,则其他终端可以接入第二终端建立的数据广播网络中获得该共享资源,不再需要一个个的依次与第一终端建立连接,简化了资源分享的过程,且第一终端上传完资源,启动第二终端的数据广播服务后即可退出,其他终端都只需要与具有广播服务能力的第二终端建立连接即可得到第一终端需要分享的资源,不再需要占用分享资源的第一终端的时间,节省资源分享的终端分享资源所需要的时间。
下面对本发明实施例中资源分享的方法进行具体描述,请参阅图2,本发明实施例中资源分享的方法另一个实施例包括:
201、第一终端通过近场通信NFC发送切换请求消息到第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
第一终端需要共享资源时,该第一终端通过NFC发送切换请求消息到该第二终端,该切换请求消息中包括该第一终端支持的除所述NFC外的至少一种连接方式。
202、所述第一终端通过近场通信NFC接收所述第二终端发送的切换选择消息;
该第一终端发送切换请求消息到第二终端后,通过NFC接收该第二终端发送的切换选择消息,该切换选择消息为该第二终端根据该切换请求消息发出的。
203、所述第一终端解析所述切换选择消息,得到选定连接方式以及所述 第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
该第一终端接收到该切换选择消息后,解析该切换选择消息,得到选定连接方式以及该第二终端的服务接口,该选定连接方式为第一终端与该第二终端都支持的连接方式。
可以理解的是,该选定连接方式可以由该第二终端接收到切换请求消息后确定,也可以由第二终端在切换选择消息中携带该第二终端支持的连接方式,由第一终端根据自身支持的连接方式与该第二终端支持的连接方式,确定该选定连接方式,此处不做限定。
第一终端或第二终端支持的连接方式,除NFC外,还可以包括比特洪流(BitTorrent协议,BT),无线保真(Wireless-Fidelity,Wi-Fi),WiFi点对点(Wi-Fi P2P),Wi-Fi简单设置(WSC),蓝牙等连接方式,此处不作限定。
可以理解的是,携带连接方式时,可以同时携带连接方式的类型以及网络配置。
204、所述第一终端根据所述第二终端的服务接口判断所述第二终端是否支持数据广播服务;
当确定所述第二终端支持数据广播服务时,此时第二终端的服务接口包括广播服务接口,触发步骤205;
当确定所述第二终端不支持数据广播服务时,触发步骤209。
205、所述第一终端采用所述选定连接方式与所述第二终端建立选定连接;
当该第一终端根据该第二终端的服务接口确定该第二终端支持数据广播服务时,该第一终端采用选定连接方式与该第二终端建立选定连接。
206、所述第一终端在所述选定连接上使用第二终端的广播服务接口上传共享资源的资源索引;
该第一终端采用选定连接方式与该第二终端建立连接后,该第一终端在该选定连接上使用第二终端的广播服务接口上传共享资源的资源索引,该资源索引中包含该共享资源的描述信息。
207、所述第一终端在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
该第一终端上传资源索引后,在该选定连接上根据该资源索引以及指向共享资源的通用资源标识符,调用该广播服务接口上传该共享资源。
208、当所述第一终端上传所述共享资源完成后,所述第一终端通过所述广播服务接口启动所述第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源;
需要说明的是,执行步骤208后不再执行步骤209。
209、所述第一终端与所述第二终端终止通信。
当该第一终端通过该第二终端的服务接口,确定该第二终端不支持数据广播服务时,该第一终端可以与该第二终端终止通信。
本发明实施例中,第一终端先通过NFC与第二终端通信,取得第二终端的服务接口,当通过该服务接口确定该第二终端支持数据广播服务时,才采用选定连接与该第二终端建立连接,在该选定连接上上传共享资源给第二终端,使第二终端建立数据广播网络共享该共享资源,先采用NFC通信,由于NFC通信连接建立开销小,速度快,提高了第一终端与第二终端之间交换服务接口与连接方式的速率,采用选定连接上传共享资源,带宽更大,连接更稳定,保证了上传共享资源的速率以及稳定性。
二、以第二终端为执行主体,对本发明实施例中资源分享的方法进行描述:
请参阅图3,本发明实施例中资源分享的方法包括:
301、第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到所述第一终端;
当第一终端需要共享资源,通过NFC连接第二终端时,该第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到该第一终端。
302、所述第二终端接收所述第一终端上传的共享资源;
该第二终端发送广播服务接口到该第一终端后,接收该第一终端上传的共享资源。
303、当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,所述第二终端建立数据广播网络;
第二终端发送广播服务接口到第一终端后,第一终端上传共享资源,且会通过该广播服务接口启动该第二终端的广播服务,当该第二终端的广播服务被 该第一终端通过该广播服务接口启动时,该第二终端建立数据广播网络。
304、所述第二终端在所述数据广播网络中共享所述共享资源。
该第二终端接收到第一终端上传的共享资源,建立数据广播网络后,在该数据广播网络中共享该共享资源。
可以理解的是,在该数据广播网络中共享该共享资源的方式可以有很多,例如可以直接在该数据广播网络中通过广播发送该共享资源,也可以在该数据广播网络中提供该共享资源的下载链接,还可以有其他方式,此处不作限定。
本发明实施例中支持数据广播服务的第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端,且接收该第一终端上传的共享资源,当该第二终端的广播服务被第一终端通过广播服务接口启动时,该第二终端建立数据广播网络,在该数据广播网络中共享该共享资源,则其他终端可以接入第二终端建立的数据广播网络中获得该共享资源,不再需要一个个的依次与第一终端建立连接,简化了资源分享的过程,且第一终端上传完资源,启动第二终端的数据广播服务后即可退出,其他终端都只需要与具有广播服务能力的第二终端建立连接即可得到第一终端需要分享的资源,不再需要占用分享资源的第一终端的时间,节省资源分享的终端分享资源所需要的时间。
下面对本发明实施例中资源分享的方法进行具体描述,请参阅图4,本发明实施例中资源分享的方法另一个实施例包括:
401、第二终端通过近场通信NFC接收第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
当第一终端需要共享资源,通过NFC连接第二终端时,第二终端通过NFC接收该第一终端发送的切换请求消息,该切换请求消息中包括该第一终端支持的除NFC外的至少一种连接方式。
402、所述第二终端根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
该第二终端接收到切换请求消息后,根据该切换请求消息以及该第二终端支持的连接方式,确定选定连接方式,该选定连接方式为该第一终端与第二终 端都支持的连接方式。
第一终端或第二终端支持的连接方式,除NFC外,还可以包括比特洪流(BitTorrent协议,BT),无线保真(WIreless-Fidelity,Wi-Fi),点对点无线网(Wi-Fi P2P),Wi-Fi简单设置(WSC),蓝牙等连接方式,此处不作限定。
可以理解的是,携带连接方式时,可以同时携带连接方式的类型以及网络配置。
403、所述第二终端构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
该第二终端接收到切换请求消息后,构造切换选择消息,该切换选择消息中包括选定连接方式,以及该第二终端的广播服务接口;
可以理解的是,在实际应用中,也可以在该切换选择消息中携带该第二终端支持的连接方式发送给第一终端,由第一终端确定选定连接方式,此处不作限定。
需要说明的是,第二终端支持数据广播服务,其具有至少一个广播服务接口,且该广播服务接口可以通过多种不同的IP地址调用,服务接口的IP地址由选定连接方式的网络配置决定。
404、所述第二终端通过近场通信NFC发送所述切换选择消息到所述第一终端;
该第二终端构造切换选择消息后,通过NFC将该切换选择消息发送到第一终端。
405、所述第二终端采用所述选定连接方式与所述第一终端建立连接。
由于第一终端需要共享资源,当第一终端接收到该切换选择消息,确定第二终端支持数据广播服务时,该第一终端会与第二终端建立建立,则该第二终端采用该选定连接方式与该第一终端建立连接。
可以理解的是,采用选定连接,例如WIFI,蓝牙等,更适合传输数据,比NFC连接带宽更大,连接更加稳定。
406、所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
第二终端与第一终端通过该选定连接方式建立连接后,在该选定连接上通过该广播服务接口,接收该第一终端上传的指向该共享资源的通用资源标识符,共享资源的资源索引,以及该共享资源,该资源索引中包含该共享资源的描述信息。
407、所述第二终端为所述共享资源生成资源访问接口;
该第二终端接收到共享资源后,为该共享资源生成资源访问接口。
具体的,该第二终端可以将该共享资源加入资源池,并加入到本地资源数据库中,生成资源访问接口。该资源访问接口可以是一个指向第二终端上的Web服务器的URL,或者一个多播(multicast)地址,例如ipdc://239.0.2.10:8000等,此处不作限定。
408、当所述第二终端接收所述共享资源完成后,所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的控制信息;
当该第二终端接收完共享资源后,该第二终端在该选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的控制信息,根据该启动数据广播服务的控制信息,启动自身的数据广播服务。
可以理解的是,该第二终端还可以对接收到的共享资源执行完整性检查,如果资源不完整,可以向该第一终端报告错误,但不拒绝启动广播服务。
该第二终端启动广播服务后,还可以向第一终端发送服务启动确认消息。
409、当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,所述第二终端建立数据广播网络;
当该第二终端的广播服务被该第一终端通过该广播服务接口启动时,该第二终端建立数据数据广播网络。
410、所述第二终端生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
该第二终端生成资源访问接口后,可以生成广播帧,该广播帧用于指示接收到广播帧的终端获取该资源访问接口以及该第二终端的数据广播网络的网络标识。
需要说明的是,该广播帧可以有很多种,例如可以为iBeacon广播帧,也 可以为三星proximity广播帧,还可以为基于其他技术的广播帧,此处不作限定。
411、所述第二终端广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
该第二终端可以广播生成的该广播帧,使得其他终端接收到该广播帧后,根据该数据广播网络的网络标识加入该数据广播网络,通过该资源访问接口接收该共享资源。
本发明实施例中,第二终端可以生成资源访问接口,并生成广播帧,通过该广播帧使其他终端自动获取该资源访问接口与数据广播网络的网络标识,通过该网络标识接入该数据广播网络,再通过该资源访问接口获取该共享资源,简化了其他终端获取共享资源的流程,提高了资源共享的效率。
下面以一实施例对本发明实施例中两个执行主体的交互进行描述:
第一终端初始化切换请求消息,切换请求消息中包含第一终端支持的连接方式(BT\Wi-Fi P2P\WSC),使用NFC将切换请求消息发给第二终端;
具有数据广播能力的第二终端收到切换请求消息,构造切换选择消息,切换选择消息中包含选定连接方式和该第二终端的广播服务接口,第二终端将切换选择消息发送给第一终端;
第一终端解析切换选择消息,判定第二终端支持数据广播服务,开始与第二终端建立连接;第一终端检查发现未连接有线网络,选择使用Wi-Fi P2P协议与第二终端建立连接,第一终端成为该P2P组的客户端;
第一终端使用广播服务接口http://192.168.10.10/broadcast/resource=URI调用第二终端提供的广播服务:
1、第一终端通过上述接口上传资源索引,索引是一个xml文件,包含了要分享的资源的描述信息,该xml文件通过http post方法上传;
2、第一终端调用上述接口,使用http post方法上传共享资源或共享资源压缩包;
3、第一终端调用上述接口,启动数据广播服务;
具体的,第一终端只需要提供一个指向要共享的资源的URI,上述三个步 骤自动执行;
第二终端接收资源索引文件,解析资源来源和资源列表;还可接收共享资源文件并执行完整性检查;第二终端首先将第一终端上传的共享资源加入到资源池,并加入到本地资源数据库中,生成资源访问接口,具体的,可以是一个web URL或一个多播(multicast)地址:ipdc://239.0.2.10:8000
第二终端应答第一终端的远程调用,启动数据广播服务;如果共享资源不完整,第二终端在Http response消息中向第一终端报告错误但不拒绝启动数据广播服务;第二终端向第一终端发送服务启动确认消息;
第二终端启动Soft-AP或Wi-Fi P2P group建立流程,提供数据广播网络接入服务;
第二终端生成一个iBeacon UUID,并将UUID、资源访问接口(即多播地址)以及第二终端所建的数据广播网络的网络标识绑定,上传到Internet中的web服务器上;
第二终端开始广播iBeacon帧,同时启动数据多播,多播在第二终端组建的WLAN中进行;当有新的共享资源加入到资源池中时,第二终端可以修改iBeacon帧中的Major或Minor值标识资源更新;
第二终端周围的终端收到UUID,解析出资源访问接口及数据广播网络的网络标识,然后可以加入该数据广播网络并接收该共享资源。
为便于理解,下面以一具体应用场景对本发明实施例中资源分享的方法进行具体描述:
例如在一个技术峰会上,技术型峰会一般会安排主题演讲,演讲者做完演讲可能会离开,使用下述方法可以向与会者发送主题演讲材料:
演讲者A打开自己的终端A上的分享程序,选中要分享的主题演讲材料,然后点击分享;程序初始化切换请求消息,该切换选择消息中包含终端A支持的连接方式(BT\Wi-Fi P2P\WSC),应用界面提示演讲者A使用NFC连接周围的设备;
会场中放置了一台具有NFC和Wi-Fi功能的智能路由器,并设立了提示标语。
演讲者A用自己的终端A采用NFC连接这个路由器,向这个路由器发送 该切换请求消息;
具有数据广播能力的路由器收到切换请求消息,构造切换选择消息,切换选择消息中包含选定连接方式与广播服务接口,路由器B将切换选择消息发送给演讲者A的终端A;
终端A解析切换选择消息,判定路由器B支持数据广播服务,终端A开始与路由器B建立连接;终端A检查发现未连接有线网络,选择使用Wi-Fi P2P协议与路由器B建立连接,终端A成为该P2P组的客户端client;
终端A使用路由器提供的接口http://192.168.10.10/broadcast/resource=URI调用路由器B提供的广播服务:
1、终端A的资源分享控制程序通过上述接口上传资源索引,索引是一个xml文件,包含了要分享的资源的描述信息,该xml文件通过http post方法上传;
2、终端A调用上述接口,使用http post方法上传资源或资源压缩包;
3、终端A调用上述接口,启动数据广播服务;
具体的,终端A只需要提供一个指向要共享的资源的URI,上述三个步骤自动执行;
路由器B接收资源索引文件,解析资源来源和资源列表;还可接收资源文件并执行完整性检查;路由器B首先将终端A上传的资源加入到资源池,并加入到本地资源数据库中,生成资源访问接口,具体的,可以是一个web URL或一个多播(multicast)地址:ipdc://239.0.2.10:8000
路由器B应答终端A的远程调用,启动广播服务;如果资源不完整,终端B在Http response消息中向A报告错误但不拒绝启动广播服务;路由器B向终端A发送服务启动确认消息。收到确认消息后,演讲者A完成资源分享,可以离开会场;
路由器B提供Wi-Fi接入或启动Wi-Fi P2P group建立流程,提供网络接入服务;
路由器B生成一个iBeacon UUID,并将UUID、资源访问接口(即多播地址)以及路由器B所建网络标识绑定,上传到Internet中的web服务器上;
路由器B开始广播iBeacon帧,同时启动数据多播,多播在路由器B建的 WLAN中进行;当有新的资源加入到资源池中时,路由器B修改iBeacon帧中的Major或Minor值标识资源更新
会场屏幕上提示用户可以使用iBeacon接收演讲素材;会场中的听众纷纷打开iBeacon接收功能,接着收到了UUID,自动运行使用特定程序解析出资源访问接口及网络标识,然后可以加入路由器B组建的数据广播网络并接收资源。
下面对本发明实施例中作为第一终端使用的终端进行描述,请参阅图5,本发明实施例中终端一个实施例包括:
获取模块501,用于通过连接切换扩展技术,获取第二终端的服务接口;
上传模块502,用于当根据所述获取模块501获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
启动模块503,用于通过所述获取模块501获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块502上传的共享资源。
本发明实施例中获取模块501先通过连接切换扩展技术得到第二终端的服务接口,当该第一终端根据该第二终端的服务接口确定该第二终端支持数据广播服务时,上传模块502上传需要共享的共享资源到该第二终端,最后,启动模块503通过该广播服务接口启动第二终端的数据广播服务,使该第二终端建立数据广播网络,在该数据广播网络中共享该共享资源,则其他终端可以接入第二终端建立的数据广播网络中分享该共享资源,不再需要一个个的依次与第一终端建立连接,简化了资源分享的过程,且第一终端上传完资源,启动第二终端的数据广播服务后即可退出,其他终端都只需要与具有广播服务能力的第二终端建立连接即可得到第一终端需要分享的资源,不再需要占用分享资源的第一终端的时间,节省资源分享的终端分享资源所需要的时间。
下面对本发明实施例中作为第一终端使用的终端进行具体描述,请参阅图6,作为本发明实施例中作为第一终端使用的终端另一个实施例,上述终端中获取模块501具体包括:
第一发送单元601,用于通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接 方式;
第一接收单元602,用于通过NFC接收所述第二终端发送的切换选择消息;
解析单元603,用于解析所述第一接收单元602接收到的切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
该终端中还包括:
第一连接建立模块604,用于采用所述选定连接方式与所述第二终端建立选定连接。
本实施例中,第一发送单元601,第一接收单元602通过NFC与第二终端交换信息,解析单元603解析出选定连接方式及第二终端支持的服务接口,第一连接建立模块604采用选定连接方式与第二终端建立选定连接,由于NFC通信连接建立开销小,速度快,提高了第一终端与第二终端之间交换服务接口与连接方式的速率,采用选定连接上传共享资源,带宽更大,连接更稳定,保证了上传共享资源的速率以及稳定性。
下面对本发明实施例中作为第一终端使用的终端进行详细描述,请参阅图7,作为本发明实施例中作为第一终端使用的终端另一个实施例,上述终端中上传模块502具体包括:
索引上传单元701,用于当根据所述获取模块501获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,在所述第一连接建立模块604建立的选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
资源上传单元702,用于在所述选定连接上根据所述索引上传单元上传的资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
所述启动模块503具体用于,当所述上传模块502上传所述共享资源完成后,通过所述获取模块502获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块上传的共享资源。
本发明实施例中,索引上传单元701可以上传资源索引,资源上传单元702再根据资源索引及指向共享资源的通用资源标识符,上传共享资源,提高了共享资源上传到速率以及准确率。
下面对本发明实施例中作为第二终端使用的终端进行描述,请参阅图8,本发明实施例中作为第二终端使用的终端一个实施例包括:
发送模块801,用于通过连接切换扩展技术,发送所述第二终端的广播服务接口到第一终端;
资源接收模块802,用于接收所述第一终端上传的共享资源;
网络建立模块803,用于当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,建立数据广播网络;
共享模块804,用于在所述网络建立模块803建立的数据广播网络中共享所述资源接收模块802接收的共享资源。
本发明实施例中发送模块801通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端,资源接收模块802接收该第一终端上传的共享资源,当该第二终端的广播服务被第一终端通过广播服务接口启动时,网络建立模块803建立数据广播网络,共享模块804在该数据广播网络中共享该共享资源,则其他终端可以接入第二终端建立的数据广播网络中分享该共享资源,不再需要一个个的依次与第一终端建立连接,简化了资源分享的过程,且第一终端上传完资源,启动第二终端的数据广播服务后即可退出,其他终端都只需要与具有广播服务能力的第二终端建立连接即可得到第一终端需要分享的资源,不再需要占用分享资源的第一终端的时间,节省资源分享的终端分享资源所需要的时间。
下面对本发明实施例中作为第二终端使用的终端进行具体描述,请参阅图9,作为本发明实施例中作为第二终端使用的终端另一个实施例,上述终端中发送模块801具体包括:
第二接收单元901,用于通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
确定单元902,用于根据所述第二接收单元901接收的切换请求消息以及 所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
构造单元903,用于构造切换选择消息,所述切换选择消息中包括所述确定单元确定的选定连接方式,以及所述第二终端的广播服务接口;
第二发送单元904,用于通过NFC发送所述切换选择消息到所述第一终端;
所述终端还包括:
第二连接建立模块905,用于采用所述选定连接方式与所述第一终端建立选定连接;
具体的,该资源接收模块802具体可以用于,在所述第二连接建立模块905建立的选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
该终端还可以包括:
信息接收模块906,用于当所述资源接收模块802接收所述共享资源完成后,在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
本实施例中,第二接收单元901,第二发送单元904通过NFC与第一终端交换信息,第二连接建立模块905采用选定连接方式与第二终端建立选定连接,由于NFC通信连接建立开销小,速度快,提高了第一终端与第二终端之间交换服务接口与连接方式的速率,采用选定连接接收共享资源,带宽更大,连接更稳定,保证了接收共享资源的速率以及稳定性。
下面对本发明实施例中作为第二终端使用的终端进行详细描述,请参阅图10,作为本发明实施例中作为第二终端使用的终端另一个实施例,上述作为第二终端使用的终端还包括:
接口生成模块1001,用于为所述资源接收模块802接收的共享资源生成资源访问接口;
广播帧生成模块1002,用于生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述接口生成模块1001生成的资源访问接口以及所述网络建 立模块803建立的数据广播网络的网络标识;
广播模块1003,用于广播所述广播帧生成模块生成的广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
本发明实施例中,接口生成模块1001可以生成资源访问接口,广播模块1003广播该广播帧生成模块1002生成的广播帧,通过该广播帧使其他终端自动获取该资源访问接口与数据广播网络的网络标识,通过该网络标识接入该数据广播网络,在通过该资源访问接口获取该共享资源,简化了其他终端获取共享资源的流程,提高了资源共享的效率。
为了便于理解上述实施例,下面以上述作为第一终端使用的终端和作为第二终端使用的终端中各个模块在一个具体应用场景中的交互过程进行说明:
第一终端初始化切换请求消息,切换请求消息中包含第一终端支持的连接方式(BT\Wi-Fi P2P\WSC),第一终端中的第一发送单元601使用NFC将切换请求消息发给第二终端;
具有数据广播能力的第二终端中的第二接收单元901收到切换请求消息,第二终端中的构造单元903构造切换选择消息,切换选择消息中包含选定连接方式和该第二终端的广播服务接口,第二终端中的第二发送单元904将切换选择消息发送给第一终端;
第一终端中的第一接收单元602接收该切换选择消,第一终端中的解析单元603解析切换选择消息,判定第二终端支持数据广播服务,第一终端中的第一连接建立模块604开始与第二终端中的第二连接建立模块905建立连接;第一终端检查发现未连接有线网络,选择使用Wi-Fi P2P协议与第二终端建立连接,第一终端成为该P2P组的客户端;
第一终端使用广播服务接口http://192.168.10.10/broadcast/resource=URI调用第二终端提供的广播服务:
1、第一终端中的索引上传单元701通过上述接口上传资源索引,索引是一个xml文件,包含了要分享的资源的描述信息,该xml文件通过http post方法上传;
2、第一终端中的资源上传单元702调用上述接口,使用http post方法上 传共享资源或共享资源压缩包;
3、第一终端中的启动模块503调用上述接口,启动数据广播服务;
具体的,第一终端只需要提供一个指向要共享的资源的URI,上述三个步骤自动执行;
第二终端中的资源接收模块802接收资源索引文件,解析资源来源和资源列表;还可接收共享资源文件并执行完整性检查;第二终端中的接口生成模块1001首先将第一终端上传的共享资源加入到资源池,并加入到本地资源数据库中,生成资源访问接口,具体的,可以是一个web URL或一个多播(multicast)地址:ipdc://239.0.2.10:8000
第二终端中的信息接收模块906接收第一终端发送的启动数据广播服务的信息,应答第一终端的远程调用,启动数据广播服务;如果共享资源不完整,第二终端在Http response消息中向第一终端报告错误但不拒绝启动数据广播服务;第二终端向第一终端发送服务启动确认消息;
第二终端中的网络建立模块803启动Soft-AP或Wi-Fi P2P group建立流程,提供数据广播网络接入服务;
第二终端中的广播帧生成模块1002生成一个iBeacon UUID,并将UUID、资源访问接口(即多播地址)以及第二终端所建的数据广播网络的网络标识绑定,上传到Internet中的web服务器上;
第二终端中的广播模块1003开始广播iBeacon帧,同时启动数据多播,多播在第二终端组建的WLAN中进行;当有新的共享资源加入到资源池中时,第二终端可以修改iBeacon帧中的Major或Minor值标识资源更新;
第二终端周围的终端收到UUID,解析出资源访问接口及数据广播网络的网络标识,然后可以加入该数据广播网络并接收该共享资源。
请参阅图11,为本发明实施例中终端1100一个结构示意图,该终端1100可以表示作为第一终端使用的终端的结构,也可以表示做诶第二终端使用的终端的结构,包括:
输入装置1101、输出装置1102、处理器1103和存储器1104(其中终端1100中的处理器1103的数量可以一个或多个,图11中以一个处理器1103为例)。在本发明的一些实施例中,输入装置1101、输出装置1102、处理器1103 和存储器1104可通过总线或其它方式连接,其中,图11中以通过总线连接为例。
结合图11所示的终端,当该终端作为第一终端使用时,通过调用所述存储器1104存储的操作指令,所述处理器1103用于执行如下步骤:
通过连接切换扩展技术,获取第二终端的服务接口;
当根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
通过第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源;
在本发明的一些实施例中,该处理器1103具体用于执行如下步骤:
通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
通过NFC接收所述第二终端发送的切换选择消息;
解析所述切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
所述处理器1103还用于执行如下步骤:
采用所述选定连接方式与所述第二终端建立选定连接;
在本发明的一些实施例中,该处理器1103具体用于执行如下步骤:
在所述选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
当上传所述共享资源完成后,通过所述广播服务接口启动所述第二终端的数据广播服务。
结合图11所示的终端,当该终端作为第二终端使用时,通过调用所述存储器1104存储的操作指令,所述处理器1103用于执行如下步骤:
通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端;
接收所述第一终端上传的共享资源;
当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动 时,建立数据广播网络;
在所述数据广播网络中共享所述共享资源;
在本发明的一些实施例中,该处理器1103具体用于执行如下步骤:
通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
通过NFC发送所述切换选择消息到所述第一终端;
所述处理器1103还用于执行如下步骤:
采用所述选定连接方式与所述第一终端建立选定连接;
在本发明的一些实施例中,该处理器1103具体用于执行如下步骤:
在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
所述处理器1103还用于执行如下步骤:
在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息;
在本发明的一些实施例中,该处理器1103还用于执行如下步骤:
为所述共享资源生成资源访问接口;
生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (21)

  1. 一种资源共享的方法,其特征在于,包括:
    第一终端通过连接切换扩展技术,获取第二终端的服务接口;
    当所述第一终端根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,所述第一终端上传共享资源到所述第二终端;
    所述第一终端通过第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源。
  2. 根据权利要求1所述的方法,其特征在于,所述第一终端通过连接切换扩展技术,获取第二终端的服务接口具体包括:
    所述第一终端通过近场通信NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    所述第一终端通过NFC接收所述第二终端发送的切换选择消息;
    所述第一终端解析所述切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    所述第一终端上传共享资源到所述第二终端的步骤之前还包括:
    所述第一终端采用所述选定连接方式与所述第二终端建立选定连接。
  3. 根据权利要求2所述的方法,其特征在于,所述第一终端上传共享资源到所述第二终端具体包括:
    所述第一终端在所述选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
    所述第一终端在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
    所述第一终端通过所述广播服务接口启动所述第二终端的数据广播服务具体包括:
    当所述第一终端上传所述共享资源完成后,所述第一终端通过所述广播服务接口启动所述第二终端的数据广播服务。
  4. 一种资源分享的方法,其特征在于,包括:
    第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端;
    所述第二终端接收所述第一终端上传的共享资源;
    当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,所述第二终端建立数据广播网络;
    所述第二终端在所述数据广播网络中共享所述共享资源。
  5. 根据权利要求4所述的方法,其特征在于,所述第二终端通过连接切换扩展技术,发送第二终端的广播服务接口到所述第一终端具体包括:
    所述第二终端通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    所述第二终端根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    所述第二终端构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
    所述第二终端通过NFC发送所述切换选择消息到所述第一终端;
    所述第二终端接收所述第一终端上传的共享资源的步骤之前还包括:
    所述第二终端采用所述选定连接方式与所述第一终端建立选定连接。
  6. 根据权利要求5所述的方法,其特征在于,所述第二终端接收所述第一终端上传的共享资源具体包括:
    所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
    当所述第二终端接收所述共享资源完成后,所述方法还包括:
    所述第二终端在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
  7. 根据权利要求4至6中任一项所述的方法,其特征在于,所述第二终端建立数据广播网络的步骤之前还包括:
    所述第二终端为所述共享资源生成资源访问接口;
    所述第二终端在所述数据广播网络中共享所述共享资源的步骤之后还包括:
    所述第二终端生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
    所述第二终端广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
  8. 一种终端,作为第一终端使用,其特征在于,包括:
    获取模块,用于通过连接切换扩展技术,获取第二终端的服务接口;
    上传模块,用于当根据所述获取模块获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
    启动模块,用于通过所述获取模块获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块上传的共享资源。
  9. 根据权利要求8所述的终端,其特征在于,所述获取模块具体包括:
    第一发送单元,用于通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    第一接收单元,用于通过NFC接收所述第二终端发送的切换选择消息;
    解析单元,用于解析所述第一接收单元接收到的切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    所述终端还包括:
    第一连接建立模块,用于采用所述选定连接方式与所述第二终端建立选定连接。
  10. 根据权利要求9所述的终端,其特征在于,所述上传模块具体包括:
    索引上传单元,用于当根据所述获取模块获取的第二终端的服务接口确定所述第二终端支持数据广播服务时,在所述第一连接建立模块建立的选定连接 上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
    资源上传单元,用于在所述选定连接上根据所述索引上传单元上传的资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
    所述启动模块具体用于,当所述上传模块上传所述共享资源完成后,通过所述获取模块获取的第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述上传模块上传的共享资源。
  11. 一种终端,作为第二终端使用,其特征在于,包括:
    发送模块,用于通过连接切换扩展技术,发送所述第二终端的广播服务接口到第一终端;
    资源接收模块,用于接收所述第一终端上传的共享资源;
    网络建立模块,用于当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,建立数据广播网络;
    共享模块,用于在所述网络建立模块建立的数据广播网络中共享所述资源接收模块接收的共享资源。
  12. 根据权利要求11所述的终端,其特征在于,所述发送模块具体包括:
    第二接收单元,用于通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    确定单元,用于根据所述第二接收单元接收的切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    构造单元,用于构造切换选择消息,所述切换选择消息中包括所述确定单元确定的选定连接方式,以及所述第二终端的广播服务接口;
    第二发送单元,用于通过NFC发送所述切换选择消息到所述第一终端;
    所述终端还包括:
    第二连接建立模块,用于采用所述选定连接方式与所述第一终端建立选定 连接。
  13. 根据权利要求12所述的终端,其特征在于,所述资源接收模块具体用于,在所述第二连接建立模块建立的选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
    所述终端还包括:
    信息接收模块,用于当所述资源接收模块接收所述共享资源完成后,在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
  14. 根据权利要求11至13中任一项所述的终端,其特征在于,所述终端还包括:
    接口生成模块,用于为所述资源接收模块接收的共享资源生成资源访问接口;
    广播帧生成模块,用于生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述接口生成模块生成的资源访问接口以及所述网络建立模块建立的数据广播网络的网络标识;
    广播模块,用于广播所述广播帧生成模块生成的广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
  15. 一种终端,作为第一终端使用,其特征在于,包括:
    输入装置、输出装置、处理器和存储器;
    通过调用所述存储器存储的操作指令,所述处理器用于执行如下步骤:
    通过连接切换扩展技术,获取第二终端的服务接口;
    当根据所述第二终端的服务接口确定所述第二终端支持数据广播服务时,上传共享资源到所述第二终端;
    通过第二终端的广播服务接口启动第二终端的数据广播服务,使所述第二终端建立数据广播网络,在所述数据广播网络中共享所述共享资源。
  16. 根据权利要求15所述的终端,其特征在于,所述处理器具体用于执行如下步骤:
    通过NFC发送切换请求消息到所述第二终端,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    通过NFC接收所述第二终端发送的切换选择消息;
    解析所述切换选择消息,得到选定连接方式以及所述第二终端的服务接口,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    所述处理器还用于执行如下步骤:
    采用所述选定连接方式与所述第二终端建立选定连接。
  17. 根据权利要求16所述的终端,其特征在于,所述处理器具体用于执行如下步骤:
    在所述选定连接上使用所述广播服务接口上传共享资源的资源索引,所述资源索引中包含所述共享资源的描述信息;
    在所述选定连接上根据所述资源索引以及指向共享资源的通用资源标识符URI,调用所述广播服务接口上传所述共享资源;
    当上传所述共享资源完成后,通过所述广播服务接口启动所述第二终端的数据广播服务。
  18. 一种终端,作为第二终端使用,其特征在于,包括:
    输入装置、输出装置、处理器和存储器;
    通过调用所述存储器存储的操作指令,所述处理器用于执行如下步骤:
    通过连接切换扩展技术,发送第二终端的广播服务接口到第一终端;
    接收所述第一终端上传的共享资源;
    当所述第二终端的广播服务被所述第一终端通过所述广播服务接口启动时,建立数据广播网络;
    在所述数据广播网络中共享所述共享资源。
  19. 根据权利要求18所述的终端,其特征在于,所述处理器具体用于执行如下步骤:
    通过NFC接收所述第一终端发送的切换请求消息,所述切换请求消息中包括所述第一终端支持的除所述NFC外的至少一种连接方式;
    根据所述切换请求消息以及所述第二终端支持的连接方式,确定选定连接方式,所述选定连接方式为所述第一终端与所述第二终端都支持的连接方式;
    构造切换选择消息,所述切换选择消息中包括所述选定连接方式,以及所述第二终端的广播服务接口;
    通过NFC发送所述切换选择消息到所述第一终端;
    所述处理器还用于执行如下步骤:
    采用所述选定连接方式与所述第一终端建立选定连接。
  20. 根据权利要求19所述的终端,其特征在于,所述处理器具体用于执行如下步骤:
    在所述选定连接上通过所述广播服务接口,接收所述第一终端上传的指向共享资源的通用资源标识符URI,共享资源的资源索引,以及所述共享资源,所述资源索引中包含所述共享资源的描述信息;
    所述处理器还用于执行如下步骤:
    在所述选定连接上通过所述广播服务接口,接收所述第一终端发送的启动数据广播服务的信息。
  21. 根据权利要求18至20所述的终端,其特征在于,所述处理器还用于执行如下步骤:
    为所述共享资源生成资源访问接口;
    生成广播帧,所述广播帧用于指示接收到广播帧的终端获取所述资源访问接口以及所述数据广播网络的网络标识;
    广播所述广播帧,使得其他终端接收到所述广播帧后,根据所述数据广播网络的网络标识加入所述数据广播网络,通过所述资源访问接口接收所述共享资源。
PCT/CN2014/092005 2014-11-24 2014-11-24 资源共享的方法和终端 WO2016082067A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480078510.9A CN106464304B (zh) 2014-11-24 2014-11-24 资源共享的方法和终端
PCT/CN2014/092005 WO2016082067A1 (zh) 2014-11-24 2014-11-24 资源共享的方法和终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/092005 WO2016082067A1 (zh) 2014-11-24 2014-11-24 资源共享的方法和终端

Publications (1)

Publication Number Publication Date
WO2016082067A1 true WO2016082067A1 (zh) 2016-06-02

Family

ID=56073279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092005 WO2016082067A1 (zh) 2014-11-24 2014-11-24 资源共享的方法和终端

Country Status (2)

Country Link
CN (1) CN106464304B (zh)
WO (1) WO2016082067A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499256A (zh) * 2022-07-27 2022-12-20 深圳市酷开网络科技股份有限公司 资源联动显示方法及装置、系统、存储介质、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102171996A (zh) * 2008-09-30 2011-08-31 苹果公司 用于简化的资源共享的系统与方法
CN103457643A (zh) * 2012-05-29 2013-12-18 宏碁股份有限公司 近场通信设备的文件分享系统及其方法
CN103581598A (zh) * 2013-11-13 2014-02-12 惠州Tcl移动通信有限公司 一种互联互通、多屏互动的设备、系统及实现方法
US20140087654A1 (en) * 2012-09-24 2014-03-27 Yevgeniy Kiveisha Location aware file sharing between near field communication enabled devices
US20140199943A1 (en) * 2013-01-15 2014-07-17 Samsung Electronics Co., Ltd. Method and apparatus for transferring content between portable electronic devices

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209248B (zh) * 2012-01-11 2014-12-10 三星电子(中国)研发中心 共享多媒体内容的手机终端和方法
KR102001215B1 (ko) * 2012-07-20 2019-07-17 삼성전자주식회사 컨텐트 공유 방법 및 시스템, 그 기기 및 기록 매체
CN103002015A (zh) * 2012-11-13 2013-03-27 广东欧珀移动通信有限公司 近距离音乐共享方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102171996A (zh) * 2008-09-30 2011-08-31 苹果公司 用于简化的资源共享的系统与方法
CN103457643A (zh) * 2012-05-29 2013-12-18 宏碁股份有限公司 近场通信设备的文件分享系统及其方法
US20140087654A1 (en) * 2012-09-24 2014-03-27 Yevgeniy Kiveisha Location aware file sharing between near field communication enabled devices
US20140199943A1 (en) * 2013-01-15 2014-07-17 Samsung Electronics Co., Ltd. Method and apparatus for transferring content between portable electronic devices
CN103581598A (zh) * 2013-11-13 2014-02-12 惠州Tcl移动通信有限公司 一种互联互通、多屏互动的设备、系统及实现方法

Also Published As

Publication number Publication date
CN106464304A (zh) 2017-02-22
CN106464304B (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
US9282448B2 (en) Method, system and apparatus for providing streaming media service
TWI669957B (zh) Media projection method, media projection device, control terminal, and cloud server
WO2019090902A1 (zh) 屏幕共享的方法、装置、电子设备及存储介质
EP2933982B1 (en) Media stream transfer method and user equipment
WO2015032277A1 (zh) 视频会议中媒体流的传输方法与装置
WO2014169581A1 (zh) 远程无线屏幕共享方法、装置及系统
CN105682182B (zh) 一种设备发现与设备连接方法、设备及系统
US20170048590A1 (en) Method, device, and system for switching at a mobile terminal of a smart television and acquiring information at a television terminal
EP2712126A2 (en) Networking method, server end device, client end device and network system
CN111427527A (zh) 投屏方法、装置、设备及计算机可读存储介质
CN104661191A (zh) 局域网通信方法、系统、终端及信息分享装置
EP3163805B1 (en) Method and device for processing information
KR101292487B1 (ko) 컨텐츠 공유 단말기
CN111092898B (zh) 报文传输方法及相关设备
CN112684995B (zh) 跨屏输入方法及装置
WO2013127163A1 (zh) 呼叫终端入会的方法和装置
WO2014187295A1 (zh) 一种通信方法、终端及通信系统
CN103648056A (zh) 一种智能电视的点对点传输方法和装置
WO2016197955A1 (zh) 多媒体流组播方法和装置
JP2014131143A (ja) 送信装置、送信方法、及びプログラム
WO2015089974A1 (zh) 即时消息处理方法、装置及系统
CN110996039B (zh) 电子白板共享方法、系统和计算机可读存储介质
WO2016082067A1 (zh) 资源共享的方法和终端
CN112187486A (zh) 智能设备之间的交互方法及智能设备
JP2019503088A (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: 14906899

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14906899

Country of ref document: EP

Kind code of ref document: A1