WO2017045276A1 - 终端互联方法、装置和存储介质 - Google Patents

终端互联方法、装置和存储介质 Download PDF

Info

Publication number
WO2017045276A1
WO2017045276A1 PCT/CN2015/096523 CN2015096523W WO2017045276A1 WO 2017045276 A1 WO2017045276 A1 WO 2017045276A1 CN 2015096523 W CN2015096523 W CN 2015096523W WO 2017045276 A1 WO2017045276 A1 WO 2017045276A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
connection
socket port
data
port
Prior art date
Application number
PCT/CN2015/096523
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 EP15903963.5A priority Critical patent/EP3337130A4/en
Priority to JP2018513639A priority patent/JP6611921B2/ja
Priority to US15/760,159 priority patent/US20180253396A1/en
Priority to KR1020187010463A priority patent/KR102110698B1/ko
Publication of WO2017045276A1 publication Critical patent/WO2017045276A1/zh

Links

Images

Classifications

    • 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/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3814Wireless link with a computer system port
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/40Bus coupling
    • G06F2213/4002Universal serial bus hub with a single upstream port
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/323Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the physical layer [OSI layer 1]

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a terminal interconnection method, apparatus, and storage medium.
  • Mobile phone and car interconnection as the cross-border mobile internet technology that has only emerged in the past two years, has become the darling of the automotive electronics industry with the increasing use and personalization of smart phone applications.
  • the technology can establish a connection between the mobile phone and the vehicle, and carry out data mutual transmission, thereby realizing resource sharing between the vehicle and the mobile phone.
  • the car machine can make full use of the Internet access function of the mobile phone and instantly transform into a high-speed intelligent mobile terminal.
  • users can directly use the various services provided by the mobile phone in real-time through the large-screen car, such as stock market inquiry, business mail check, information search, entertainment and so on.
  • the embodiment of the invention provides a terminal interconnection method, device and storage medium, so that one terminal can implement interconnection with another terminal based on one of multiple connection modes by using the same system.
  • an embodiment of the present invention provides a terminal interconnection method, including:
  • the first terminal acquires a connection request initiated by the user to the second terminal;
  • the first terminal establishes a wireless fidelity connection or a universal serial bus connection with the second terminal;
  • the first terminal performs data communication with the second terminal based on the established connection to implement data transmission between the first socket port and the second socket port;
  • the first socket port is a communication port corresponding to the first message center on the first terminal
  • the second socket port is a communication port corresponding to the second message center on the second terminal.
  • the embodiment of the present invention further provides a terminal interconnection device, which is applied to a first terminal, where the device includes:
  • connection request obtaining unit configured to acquire a connection request to the second terminal triggered by the user
  • connection establishing unit configured to establish a wireless fidelity connection or a universal serial bus connection with the second terminal
  • a data transmission unit configured to perform data communication with the second terminal based on the established connection, to implement data transmission between the first socket port and the second socket port;
  • the first socket port is a communication port corresponding to the first message center on the first terminal
  • the second socket port is a communication port corresponding to the second message center on the second terminal.
  • an embodiment of the present invention provides a non-volatile computer storage medium, where the computer storage medium stores one or more modules, when the one or more modules are executed by a device that performs a terminal interconnection method.
  • the device is caused to perform the following operations:
  • the first terminal acquires a connection request initiated by the user to the second terminal;
  • the first terminal establishes a wireless fidelity connection or a universal serial bus connection with the second terminal;
  • the first terminal performs data communication with the second terminal based on the established connection to implement data transmission between the first socket port and the second socket port;
  • the first socket port is a communication port corresponding to the first message center on the first terminal
  • the second socket port is a communication port corresponding to the second message center on the second terminal.
  • the first terminal can be based on the established set of operating systems, and the first terminal can be implemented based on the established wireless fidelity connection or universal serial bus connection.
  • the transmission and sharing of data between the message center and the second message center on the second terminal reduces the cost and complexity of the interconnection.
  • FIG. 1 is a schematic flowchart of a terminal interconnection method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of a communication layer of a vehicle and a smart phone provided by Embodiment 2 of the present invention
  • FIG. 3 is a schematic diagram of data interaction of a method for interconnecting a vehicle and a smart phone according to Embodiment 2 of the present invention
  • FIG. 4 is a schematic structural diagram of a terminal interconnection apparatus according to Embodiment 3 of the present invention.
  • FIG. 1 is a schematic flowchart of a terminal interconnection method according to Embodiment 1 of the present invention.
  • This embodiment is applicable to the case where the first terminal establishes a connection with the second terminal and performs data transmission.
  • the method can be performed by the first terminal.
  • the first terminal may be an electronic device with a universal serial bus connection function and/or a wireless fidelity function that is actively initiated.
  • the second terminal may be connected, has a universal serial bus connection function, and/or wireless. Fidelity-enabled electronic devices.
  • this embodiment is particularly applicable to The interconnection of the vehicle (first terminal) and the smartphone (second terminal).
  • the terminal interconnection method provided in this embodiment specifically includes the following operations:
  • Operation 110 The first terminal acquires a connection request initiated by the user to the second terminal.
  • the first terminal establishes a wireless fidelity connection or a universal serial bus connection with the second terminal.
  • the first terminal can enable the wireless fidelity (Wi-Fi) function, and establish a wireless connection with the second terminal by using radio waves, so that a physical path is established between the first terminal and the second terminal.
  • Wi-Fi wireless fidelity
  • the first terminal user or the second terminal user actively uses the universal serial bus to connect the first terminal and the second terminal together to establish a physical path between the two.
  • the specific wireless fidelity connection process may be: the first terminal is used as an access point to perform Wi-Fi hotspot scanning, and the second terminal is scanned to the Wi-Fi hotspot of the second terminal by using a UDP (User Datagram Protocol) protocol. An address, and then initiating a wireless fidelity connection request to the second terminal according to the IP address, to instruct the second terminal to establish a wireless fidelity connection with the first terminal according to the request.
  • UDP User Datagram Protocol
  • the wireless connection process may also be: the first terminal broadcasts its own IP address by using the UDP protocol; and receives the second terminal, which is initiated by the access point according to the IP address.
  • a fidelity connection request; a wireless fidelity connection with the first terminal is established based on the request.
  • the operation 120 may specifically include: the first terminal listening whether the first universal serial bus port is in an on state;
  • the first terminal establishes a universal serial bus connection with the second terminal
  • the first terminal establishes a wireless fidelity connection with the second terminal.
  • the operation 120 may specifically include: establishing, by the first terminal, a wireless fidelity connection or a universal serial bus connection with the second terminal, including:
  • the first terminal establishes a wireless fidelity connection with the second terminal and a universal serial bus connection in a parallel manner;
  • the first terminal will first establish a successful connection as a connection for subsequent data communication with the second terminal.
  • Operation 130 The first terminal performs data communication with the second terminal based on the established connection to implement data transmission between the first socket port and the second socket port.
  • the first socket port is a communication port of the first message center on the first terminal, and the second socket is connected.
  • the word port is the communication port of the second message center on the second terminal.
  • the so-called socket is also Socket.
  • the message center is responsible for: writing the sent data to the corresponding socket port, reading the received data in the corresponding socket port, and disassembling the received data and distributing it to other application modules.
  • the first terminal performs data communication with the second terminal based on the established wireless fidelity connection to implement data transmission between the first socket port and the second socket port, including:
  • the first terminal uses the transmission control/Internet Protocol (TCP/IP protocol) according to the address of the second socket port, and sends the transmission data in the first socket port to the wireless fidelity connection to Second socket port;
  • TCP/IP protocol transmission control/Internet Protocol
  • the first terminal receives the second terminal according to the address of the first socket port, and uses the transmission control/Internet interconnection protocol to transmit data in the second socket port sent based on the wireless fidelity connection.
  • the data sending sub-operation may be specifically: the first terminal encapsulates the sending data in the first socket port by using the TCP/IP protocol for the first time to obtain the first data packet, and needs to add the first data packet in the packaging process.
  • the address of the second socket port which is obtained according to the IP address of the second terminal acquired during the wireless fidelity connection and the second socket port number pre-stored locally;
  • a data packet is further encapsulated based on a communication protocol used by the Wi-Fi technology to obtain a second data packet; and, in turn, the second data packet obtained by re-encapsulation is sent to the second terminal based on the Wi-Fi connection.
  • the second terminal After receiving the second data packet, the second terminal parses the data packet layer by layer according to the reverse encapsulation step with the first terminal, and sequentially extracts the first data packet and the sending data, and obtains the sent data. Transfer to the second socket port, and thus complete one transmission of data between the first socket port and the second socket port.
  • the second message center on the second terminal extracts the transmission data after monitoring the second socket port to receive the transmission data.
  • the process is similar to the data transmission sub-operation described above, and belongs to the same technical concept;
  • the data receiving sub-operation performed by the first terminal is similar to the operation of disassembling the data by the second terminal, and belongs to the same technical concept. This embodiment is not described here.
  • Wi-Fi Due to the communication protocol adopted by TCP/IP protocol and Wi-Fi, it is compatible with all operating systems, and the communication method based on Wi-Fi connection itself adopts C/S (Client/Server, client/server).
  • C/S Client/Server, client/server.
  • the structure allows the first terminal to use a set of operating systems to share the respective message center data with the second terminal of any operating system.
  • the first terminal can also implement the USB communication data communication mode based on the same operating system that implements the wireless fidelity connection communication mode.
  • the transmission of data between the first socket port and the second socket port, the process may be implemented by a process (served as the first process) created by the first terminal based on its own operating system.
  • the second terminal should also create a USB connection-based data communication that can be performed in cooperation with the first process.
  • Process considered as the second process. If the second terminal does not create the second process, the first terminal may not perform the data communication with the second terminal. In this manner, the method provided in this embodiment may perform data according to the wireless fidelity connection and the second terminal. Communication to achieve data transfer between the first socket port and the second socket port.
  • the data communication is implemented by using an Android Debug Bridge (ADB) technology
  • the first process is an ADB process
  • the second process is an ADB daemon.
  • the first process is adapted to the second process, and the first terminal performs data communication with the second terminal based on the established universal serial bus connection to implement data between the first socket port and the second socket port.
  • Transmission including:
  • the first terminal adopts a transmission control/Internet interconnection protocol, and sends the transmission data in the first socket port to the second socket port based on the universal serial bus connection; and the first terminal receives the second terminal and adopts the transmission control / Internet Interconnection Protocol, based on a universal serial bus connection, sends data in the second socket port.
  • the first terminal uses a transmission control/Internet interconnection protocol, and sends the sending data in the first socket port to the second socket port based on the universal serial bus connection, which may include:
  • the first terminal transmits the data in the first socket port by using the TCP/IP protocol for the first time to obtain the first data packet; and transmits the first data packet to the first universal serial bus port;
  • the universal serial bus port uses the universal serial bus protocol to package the first data packet again to obtain a second data packet and transmit it to the second universal serial bus port of the second terminal through the universal serial bus.
  • First The second terminal will parse the second data packet received by the second universal serial bus port by using a universal serial bus protocol to extract the first data packet, and then parse the first data packet using the TCP/IP protocol.
  • the transmission data is extracted, and the obtained transmission data is transmitted to the second socket port, and thus one transmission of data between the first socket port and the second socket port is completed.
  • the second message center on the second terminal extracts the transmission data after monitoring the second socket port to receive the transmission data.
  • the technical solution provided in this embodiment enables the first terminal to implement the Wi-Fi connection or the USB connection based on the established Wi-Fi connection or the USB connection, so that the first message center and the second message center on the second terminal are implemented.
  • the transmission and sharing of data reduces the cost and complexity of the interconnection.
  • the present embodiment provides a smart phone (referred to as a mobile phone) and a car machine (both referred to as mobile phones) that are compatible with both Android (Android) and IOS (Apple) systems by using a USB or Wi-Fi connection.
  • a smart phone referred to as a mobile phone
  • a car machine both referred to as mobile phones
  • Android Android
  • IOS IOS
  • the car machine interconnection method.
  • the forwarding of the socket port is also based on socket communication in the upper layer.
  • the vehicle 201 can establish a connection on the physical path with the mobile phone 202 via USB, Wi-Fi; of course, the connection can be established with the mobile phone 202 via Bluetooth.
  • the network layer uses the TCP/IP protocol.
  • the data transmitted between the socket ports based on the USB and Wi-Fi connection mainly includes three types of data: a command, a video stream, and an audio stream.
  • the data transmitted based on the Bluetooth connection is mainly call voice data.
  • FIG. 3 is a schematic diagram of data interaction of a method for interconnecting a vehicle and a smart phone according to Embodiment 2 of the present invention. See Figure 3:
  • the car and the smartphone are connected based on the USB connection.
  • the interconnection method based on the USB connection can be implemented based on ADB, which is suitable for communication with the vehicle by the Android mobile phone (that is, the mobile phone of the Android operating system).
  • ADB is suitable for communication with the vehicle by the Android mobile phone (that is, the mobile phone of the Android operating system).
  • the Android mobile phone that is, the mobile phone of the Android operating system.
  • the non-Android operating system you need to transplant the ADB.
  • USB connection-based interconnection function according to the ADB protocol at the vehicle end, and ensure that it can interact with the ADBD process (ADB guard) in the Android operating system mobile phone to perform data communication with the Android mobile phone based on the USB connection to realize the first The transmission of data between a socket port and a second socket port.
  • ADB guard ADBD process
  • the vehicle monitors that the first USB port is in an on state, and performs a handshake connection with the mobile phone based on the USB cable connected to the first USB port to establish a USB connection; after the connection is successfully established, the vehicle is responsible for the first USB port and Encapsulating and forwarding data between the first Socket ports, and transmitting data of the first USB port to the mobile phone based on the established USB connection, and/or receiving data sent by the mobile phone to the first USB port.
  • the first message center on the one hand, it is responsible for encapsulating the message that needs to be sent, and writing the message to the corresponding first Socket port as a data stream; on the other hand, responsible for reading the data from the first Socket port.
  • the stream is distributed to other modules after disassembly.
  • the mobile phone performs a handshake connection with the vehicle based on the USB cable connected to the second USB port to establish a USB connection; after the connection is successfully established, the mobile phone is responsible for encapsulating and forwarding data between the second USB port and the second Socket port. And transmitting data of the second USB port to the vehicle based on the established USB connection, and/or receiving data sent by the vehicle to the second USB port.
  • the second message center on one hand, it is responsible for encapsulating the message that needs to be sent, and writing the message to the corresponding second Socket port as a data stream; on the other hand, responsible for reading the data from the second Socket port.
  • the stream is distributed to other modules after disassembly.
  • the data flow direction sent by the vehicle to the mobile phone is: 1->2->3->4->5; the data flow of the mobile phone sending the message to the vehicle is in turn It is: 5->4->3->2->1.
  • the car and the smartphone are connected based on the Wi-Fi connection.
  • the car machine serves as an access point for Wi-Fi hotspot scanning, scans the IP address of the Wi-Fi hotspot broadcasted by the UDP protocol, and then initiates a Wi-Fi connection request to the mobile phone according to the IP address to instruct the mobile phone to respond to the request. Establish a Wi-Fi connection to the car. Moreover, the vehicle combines the IP address of the mobile phone broadcast with the pre-stored second Socket port number to obtain the second Socket port address.
  • the vehicle is responsible for transmitting data of the first Socket port to the mobile phone based on the established Wi-Fi connection, and/or receiving data sent by the mobile phone to the first Socket port.
  • the first message center on the one hand, it is responsible for encapsulating the message that needs to be sent, and writing the message to the corresponding first Socket port as a data stream; on the other hand, responsible for reading the data from the first Socket port.
  • the stream is distributed to other modules after disassembly.
  • the mobile phone broadcasts its own IP address as a Wi-Fi hotspot with the UDP protocol, and then receives the Wi-Fi connection request initiated by the access point of the vehicle to the mobile phone according to the IP address, and establishes Wi- with the vehicle according to the request. Fi connection.
  • the mobile phone is responsible for transmitting data of the second Socket port to the vehicle based on the established Wi-Fi connection, and/or receiving data transmitted by the vehicle to the second Socket port.
  • the second message center on one hand, it is responsible for encapsulating the message that needs to be sent, and writing the message to the corresponding second Socket port as a data stream; on the other hand, responsible for reading the data from the second Socket port.
  • the stream is distributed to other modules after disassembly.
  • the data flow direction of the car machine to send the message to the mobile phone is: 1->5; the data flow direction of the mobile phone sending the message to the car machine is: 5->1.
  • the technical solution provided by this embodiment on the one hand, for the message center of the connected mobile phone, does not need to care about the connection manner based on the USB connection or the Wi-Fi connection interconnection mode, and only needs to monitor the corresponding Socket port.
  • the implementation of the mobile phone is similar, so that the adaptation workload of the interconnected application can be greatly reduced; on the other hand, if the connected vehicle is connected, the USB connection can be directly operated.
  • the system comes with ADB to achieve, or just need to increase the call of ADB related instructions, the other logic is similar to the Wi-Fi connection interconnection, TCP/IP communication is realized by USB, which greatly reduces the adaptation workload of the vehicle end to different connection modes.
  • the embodiment provides a mechanism for simultaneously connecting USB and Wi-Fi connection modes to realize communication between the automobile and the mobile phone, and supports both the Android and Apple operating systems and the same mobile phone.
  • the communication between the car and the car environment greatly reduces the workload of the mobile phone that adapts to the Android and Apple operating systems when the car is connected to the mobile phone, facilitating the user to freely switch between multiple mobile phones or two connection modes, saving users. Increase the user experience by switching operating costs.
  • FIG. 4 is a schematic structural diagram of a terminal interconnection apparatus according to Embodiment 3 of the present invention.
  • the device can be integrated on the first terminal. Referring to Figure 4, the specific structure of the device is as follows:
  • a connection request obtaining unit 410 configured to acquire a connection request to the second terminal triggered by the user
  • connection establishing unit 420 configured to establish a wireless fidelity connection or a universal serial bus connection with the second terminal
  • a data transmission unit 430 configured to perform data communication with the second terminal based on the established connection, to implement data transmission between the first socket port and the second socket port;
  • the first socket port is a communication port corresponding to the first message center on the first terminal
  • the second socket port is a communication port corresponding to the second message center on the second terminal.
  • the data transmission unit 430 includes a first transmission unit 4301 for:
  • the data transmission unit 430 includes a second transmission unit 4302, configured to:
  • the data communication corresponding to the second transmission unit is implemented by using the Android debug bridge technology.
  • connection establishing unit 420 is specifically configured to:
  • connection establishing unit 420 is specifically configured to:
  • connection that is successfully established first is used as a connection for subsequent data communication with the second terminal.
  • the above product can perform the method performed by the first terminal provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the embodiment provides a non-volatile computer storage medium storing one or more modules, when the one or more modules are executed by a device performing a terminal interconnection method, causing the device Do the following:
  • the first terminal acquires a connection request initiated by the user to the second terminal;
  • the first terminal establishes a wireless fidelity connection or a universal serial bus connection with the second terminal;
  • the first terminal performs data communication with the second terminal based on the established connection to implement data transmission between the first socket port and the second socket port;
  • the first socket port is a communication port corresponding to the first message center on the first terminal
  • the second socket port is a communication port corresponding to the second message center on the second terminal.
  • the first terminal When the module stored in the storage medium is executed by the device, the first terminal performs data communication with the second terminal according to the established wireless fidelity connection to implement the first socket port and the second socket.
  • the transmission of data between word ports may include:
  • the first terminal When the module stored in the storage medium is executed by the device, the first terminal performs data communication with the second terminal according to the established universal serial bus connection to implement the first socket port and the second set.
  • the transmission of data between the connection ports may include:
  • the first terminal uses a transmission control/Internet interconnection protocol to transmit transmission data in the first socket port to the second socket port based on the universal serial bus connection; and, the first terminal receives
  • the second terminal employs a transmission control/Internet interconnection protocol to transmit data in the second socket port that is transmitted based on the universal serial bus connection.
  • the data communication may be implemented by using an Android debug bridge technology.
  • the wireless security connection or the universal serial bus connection with the second terminal is established according to the first terminal, and the method may include:
  • the first terminal monitors whether the first universal serial bus port is in an on state
  • the first terminal establishes a universal serial bus connection with the second terminal
  • the first terminal establishes a wireless fidelity connection with the second terminal.
  • the wireless terminal connection or the universal serial bus connection with the second terminal is established according to the first terminal, and may further include:
  • the first terminal establishes a wireless fidelity connection with the second terminal and a universal serial bus connection in a parallel manner;
  • the first terminal will first establish a successful connection as a connection for subsequent data communication with the second terminal.

Abstract

本发明实施例公开了一种终端互联方法、装置和存储介质。其中,所述方法包括:第一终端获取到用户触发的对第二终端的连接请求;第一终端建立起与第二终端的无线保真连接或通用串行总线连接;第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。本发明实施例提供的技术方案,可以使得一个终端采用同一套系统便可基于多种连接方式中的一种实现与另一个终端的互联,降低互联的成本和复杂度。

Description

终端互联方法、装置和存储介质
本专利申请要求于2015年9月14日提交的、申请号为201510583738.X、申请人为百度在线网络技术(北京)有限公司、发明名称为“终端互联方法及装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本发明实施例涉及通信技术领域,尤其涉及终端互联方法、装置和存储介质。
背景技术
手机车机互联,作为近两年才兴起的跨界移动互联技术,随着智能手机应用越来越丰富和个性化,逐渐成为汽车电子产业的宠儿。利用该技术能够为手机与车机建立连接,进行数据互传,进而实现车机与手机的资源共享。例如,车机能够充分利用手机的上网功能,即刻变身为一台高速行驶的智能移动终端。在自驾游或长途行驶中,用户可直接通过大屏幕的车机实时使用手机所提供的各种服务,例如股票行情查询、业务邮件查收、信息搜索、娱乐等。
然而,在现有技术中,对于同一套操作系统的车机而言,其只能够与安装有某种特定类型的操作系统的手机,基于一种连接方式(USB连接)进行互联,以实现诸如视频、音频等数据流的传输。虽然一些开发人员尝试为车机开发多套操作系统,以使车机可同时支持与多种操作系统的手机的USB方式的互联,但是该方案需要在车机端进行不同的适配,增加了互联的成本和复杂度。
发明内容
本发明实施例提供一种终端互联方法、装置和存储介质,以使得一个终端采用同一套系统便可基于多种连接方式中的一种实现与另一个终端的互联,降 低互联的成本和复杂度。
第一方面,本发明实施例提供了一种终端互联方法,包括:
第一终端获取到用户触发的对第二终端的连接请求;
第一终端建立起与第二终端的无线保真连接或通用串行总线连接;
第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
第二方面,本发明实施例还提供了一种终端互联装置,应用于第一终端,该装置包括:
连接请求获取单元,用于获取到用户触发的对第二终端的连接请求;
连接建立单元,用于建立起与第二终端的无线保真连接或通用串行总线连接;
数据传输单元,用于基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
第三方面,本发明实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个模块,当所述一个或者多个模块被一个执行终端互联方法的设备执行时,使得所述设备执行如下操作:
第一终端获取到用户触发的对第二终端的连接请求;
第一终端建立起与第二终端的无线保真连接或通用串行总线连接;
第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
本发明实施例提供的技术方案,能够使得第一终端仅基于同一套操作系统,便可基于所建立起的无线保真连接或通用串行总线连接,实现第一终端上第一 消息中心与第二终端上第二消息中心间数据的传输与共享,降低了互联的成本和复杂度。同时,也能够方便第二终端在两种连接方式上的自由切换。
附图说明
图1是本发明实施例一提供的一种终端互联方法的流程示意图;
图2是本发明实施例二提供的车机与智能手机互联层框架示意图;
图3是本发明实施例二提供的一种车机与智能手机互联方法的数据交互示意图;
图4是本发明实施例三提供的一种终端互联装置的结构示意图。
具体实施方式
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
实施例一
图1是本发明实施例一提供的一种终端互联方法的流程示意图。本实施例可适用于第一终端与第二终端建立连接并进行数据传输的情况。该方法可以由第一终端执行。其中,第一终端可以是主动发起连接的、具有通用串行总线连接功能和/或无线保真功能的电子设备;第二终端可以是被连接的、具有通用串行总线连接功能和/或无线保真功能的电子设备。特别的,本实施例尤为适用于 车机(第一终端)与智能手机(第二终端)的互联。参见图1,本实施例提供的终端互联方法具体包括如下操作:
操作110、第一终端获取到用户触发的对第二终端的连接请求。
操作120、第一终端建立起与第二终端的无线保真连接或通用串行总线连接。
在本实施例中,可第一终端启用无线保真(Wireless Fidelity,Wi-Fi)功能,与第二终端通过无线电波建立无线连接,这样第一终端与第二终端间会建立起一条物理通路。或者,由第一终端用户或者第二终端用户主动使用通用串行总线,将第一终端和第二终端连接在一起,以建立二者间的物理通路。
具体的无线保真连接过程可以是:第一终端作为接入点进行Wi-Fi热点扫描,扫描到第二终端这一Wi-Fi热点以UDP(User Datagram Protocol,用户数据报)协议广播的IP地址,之后根据所述IP地址向第二终端发起无线保真连接请求,以指示第二终端根据该请求建立起与第一终端的无线保真连接。当然,如果第一终端也可作为Wi-Fi热点,则无线连接过程还可以是:第一终端以UDP协议广播自己的IP地址;接收第二终端这一接入点根据该IP地址发起的无线保真连接请求;根据该请求建立起与第一终端的无线保真连接。
作为一种具体实施方式,操作120可具体包括:第一终端监听第一通用串行总线端口是否处于接通状态;
如果是,第一终端建立与第二终端的通用串行总线连接;
否则,第一终端建立与第二终端的无线保真连接。
作为本实施例的另一种具体实施方式,操作120可具体包括:第一终端建立起与第二终端的无线保真连接或通用串行总线连接,包括:
第一终端以并行方式,建立与第二终端的无线保真连接和通用串行总线连接;
第一终端将最先建立成功的连接,作为后续与第二终端进行数据通信所采用的连接。
操作130、第一终端基于所建立起的连接与第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输。
其中,第一套接字端口为第一终端上第一消息中心的通信端口,第二套接 字端口为第二终端上第二消息中心的通信端口。所谓套接字也即Socket。消息中心负责:将发送数据写入至对应的套接字端口中,读取对应的套接字端口中的接收数据,并将接收数据拆解以后分发到其他各个应用模块。
示例性的,第一终端基于所建立起的无线保真连接与第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,包括:
数据发送子操作、第一终端按照第二套接字端口的地址,采用传输控制/因特网互联协议(TCP/IP协议),基于无线保真连接将第一套接字端口中的发送数据发送至第二套接字端口;
数据接收子操作、第一终端接收第二终端按照第一套接字端口的地址,采用传输控制/因特网互联协议,基于无线保真连接发送的第二套接字端口中的发送数据。
其中,数据发送子操作可具体为:第一终端将第一套接字端口中的发送数据使用TCP/IP协议进行第一次封装,以得到第一数据包,在该封装过程中需要添加第二套接字端口的地址,该地址可根据在进行无线保真连接过程中获取到的第二终端的IP地址与本地预先存储的第二套接字端口号得到;之后,将封装得到的第一数据包基于Wi-Fi技术所采用的通信协议再次进行封装,以得到第二数据包;进而,将再次封装得到的第二数据包基于Wi-Fi连接发送给第二终端。第二终端在接收到第二数据包之后,会按照与第一终端的逆封装步骤,逐层解析数据包,依次提取得到所述第一数据包和所述发送数据,并将得到的发送数据传输给第二套接字端口,至此完成第一套接字端口与第二套接字端口间数据的一次传输。第二终端上第二消息中心在监听到第二套接字端口接收到所述发送数据后,取出该发送数据。
需要说明的是,如果第二终端想要基于无线保真连接将第二套接字端口中的数据发送至第一套接字端口,其过程与上述数据发送子操作类似,属于同一技术构思;相应的,第一终端执行的数据接收子操作,与上述第二终端拆解数据的操作也类似,属于同一技术构思。本实施例在此不再赘述。
由于TCP/IP协议和Wi-Fi所采用的通信协议,兼容于所有的操作系统,且基于Wi-Fi连接的通信方式本身是采用C/S(Client/Server,客户端/服务器) 结构的,所以使得第一终端可以采用一套操作系统,便可实现与任意操作系统的第二终端间各自消息中心数据的共享。
另外,为保证本发明实施例提供的方法还具备USB连接通信方式,为此还可使得第一终端基于实现上述无线保真连接通信方式的同一套操作系统,采用USB连接的数据通信方式,实现第一套接字端口与第二套接字端口间数据的传输,该过程可由第一终端基于自身的操作系统创建的一个进程(视为第一进程)实现。
由于USB连接方式依赖于操作系统,所以要想基于USB连接实现两终端间的所述数据通信,第二终端也应创建有一个可以与所述第一进程配合执行的基于USB连接的数据通信的进程(视为第二进程)。如果第二终端未创建有所述第二进程,则第一终端便会无法与第二终端进行所述数据通信,此时本实施例提供的方法可基于无线保真连接与第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输。优选的,所述数据通信采用安卓调试桥(Android Debug Bridge,ADB)技术实现,第一进程为ADB进程,第二进程为ADB守护进程。
第一进程和第二进程相适配,第一终端基于所建立起的通用串行总线连接与第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,包括:
第一终端采用传输控制/因特网互联协议,基于通用串行总线连接,将第一套接字端口中的发送数据发送至第二套接字端口;以及,第一终端接收第二终端采用传输控制/因特网互联协议,基于通用串行总线连接,发送的第二套接字端口中的发送数据。
具体的,第一终端采用传输控制/因特网互联协议,基于通用串行总线连接,将第一套接字端口中的发送数据发送至第二套接字端口,可包括:
第一终端将第一套接字端口中的发送数据,使用TCP/IP协议进行第一次封装,以得到第一数据包;将第一数据包传输给第一通用串行总线端口;第一通用串行总线端口使用通用串行总线协议将第一数据包再次进行封装,以得到第二数据包,并通过通用串行总线传输给第二终端的第二通用串行总线端口。第 二终端会将第二通用串行总线端口接收到的第二数据包,采用通用串行总线协议传进行解析以提取出第一数据包,之后再使用TCP/IP协议将第一数据包进行解析以提取出所述发送数据,并将得到的发送数据传输给第二套接字端口,至此完成第一套接字端口与第二套接字端口间数据的一次传输。第二终端上第二消息中心在监听到第二套接字端口接收到所述发送数据后,取出该发送数据。
本实施例提供的技术方案,能够使得第一终端仅基于同一套操作系统,便可基于所建立起的Wi-Fi连接或USB连接,实现第一消息中心与第二终端上第二消息中心间数据的传输与共享,降低了互联的成本和复杂度。同时,也能够方便第二终端在两种连接方式上的自由切换。
实施例二
本实施例以上述实施例一为基础,提供了一种利用USB或者Wi-Fi连接同时兼容支持Android(安卓)和IOS(苹果)两种类型系统的智能手机(简称手机)与汽车车机(简称车机)的互联方法。在本实施例中实现手机和车机互联有两种主要连接方式:USB连接和Wi-Fi连接,对于Wi-Fi连接通过socket来通信,对于USB连接主要通过ADB来实现车机和手机之间socket端口的转发,在上层也是基于socket通信。
图2是本发明实施例二提供的车机与智能手机互联层框架示意图。参见图2,车机201可通过USB、Wi-Fi与手机202建立物理通路上的连接;当然也可通过蓝牙与手机202建立连接。网络层采用TCP/IP协议。基于USB、Wi-Fi连接实现的socket端口间传输的数据主要包含三种类型的数据:指令(Command)、视频流(Video)以及音频流(Audio)。基于蓝牙连接传输的数据主要为通话语音数据。
图3是本发明实施例二提供的一种车机与智能手机互联方法的数据交互示意图。参见图3:
1、车机与智能手机基于USB连接进行互联
基于USB连接的互联方式可基于ADB来实现,该方式适用于安卓手机(也即安卓操作系统的手机)与车机进行通信。对于车机为安卓操作系统的车机, 可以直接使用安卓操作系统自带的ADB,基于USB连接与安卓手机进行数据通信,以实现第一socket端口与第二socket端口间数据的传输;对于非安卓操作系统的车机,则需要移植ADB或者在车机端根据ADB协议实现基于USB连接的互联功能,并保证能够和安卓操作系统的手机中的ADBD进程(ADB守护)进行交互,以基于USB连接与安卓手机进行数据通信,以实现第一socket端口与第二socket端口间数据的传输。下面详细阐述基于USB连接的互联过程。
1)车机端
车机监听到第一USB端口处于接通状态,基于与第一USB端口连接的USB线与手机进行握手连接,以建立起USB连接;在该连接建立成功后,车机负责第一USB端口和第一Socket端口之间数据的封装和转发,并基于建立起的USB连接将第一USB端口的数据发送到手机,和/或,接收手机发送到第一USB端口的数据。
对于第一消息中心而言,一方面负责封装需要发送的消息,并将消息以数据流的方式写入到对应的第一Socket端口中;另一方面负责从第一Socket端口中读取的数据流在进行拆解以后分发到其他模块。
2)手机端
手机基于与第二USB端口连接的USB线与车机进行握手连接,以建立起USB连接;在该连接建立成功后,手机负责第二USB端口和第二Socket端口之间数据的封装和转发,并基于建立起的USB连接将第二USB端口的数据发送到车机,和/或,接收车机发送到第二USB端口的数据。
对于第二消息中心而言,一方面负责封装需要发送的消息,并将消息以数据流的方式写入到对应的第二Socket端口中;另一方面负责从第二Socket端口中读取的数据流在进行拆解以后分发到其他模块。
3)数据流向
如图3所示,基于USB连接的互联方式下:车机发送消息到手机的数据流向依次为:①->②->③->④->⑤;手机发送消息到车机的数据流向依次为:⑤->④->③->②->①。
2、车机与智能手机基于Wi-Fi连接进行互联
1)车机端
车机作为接入点进行Wi-Fi热点扫描,扫描到手机这一Wi-Fi热点以UDP协议广播的IP地址,之后根据该IP地址向手机发起Wi-Fi连接请求,以指示手机根据该请求建立起与车机的Wi-Fi连接。并且,车机将手机广播的IP地址与预先存储的第二Socket端口号结合在一起,得到第二Socket端口地址。
车机负责基于建立起的Wi-Fi连接,将第一Socket端口的数据发送到手机,和/或,接收手机发送到第一Socket端口的数据。
对于第一消息中心而言,一方面负责封装需要发送的消息,并将消息以数据流的方式写入到对应的第一Socket端口中;另一方面负责从第一Socket端口中读取的数据流在进行拆解以后分发到其他模块。
2)手机端
手机作为Wi-Fi热点以UDP协议广播自己的IP地址,之后接收车机这一接入点根据该IP地址向手机发起的Wi-Fi连接请求,并根据该请求建立起与车机的Wi-Fi连接。
手机负责基于建立起的Wi-Fi连接,将第二Socket端口的数据发送到车机,和/或,接收车机发送到第二Socket端口的数据。
对于第二消息中心而言,一方面负责封装需要发送的消息,并将消息以数据流的方式写入到对应的第二Socket端口中;另一方面负责从第二Socket端口中读取的数据流在进行拆解以后分发到其他模块。
3)数据流向
如图3所示,基于Wi-Fi连接的互联方式下:车机发送消息到手机的数据流向依次为:①->⑤;手机发送消息到车机的数据流向依次为:⑤->①。
本实施例提供的技术方案,一方面,对于被连接的手机的消息中心而言,其不需要关心连接的方式是基于USB连接还是Wi-Fi连接的互联方式,只需要监听对应的Socket端口即可,因此不管是何种操作系统的手机的实现类似,从而可以大大减少互联应用的适配工作量;另一方面,对于发起连接的车机,如果是USB连接的互联方式,可直接通过操作系统自带的ADB来实现,或者仅仅只需要增加ADB相关指令的调用,其他逻辑和采用Wi-Fi连接的互联方式类似, 通过USB来实现TCP/IP通信,大大减少了车机端对不同连接方式的适配工作量。
综上,本实施例提供了一种同时兼容USB和Wi-Fi两种连接方式来实现汽车车机和手机之间通信的机制,并且同时支持安卓和苹果两种类型操作系统的手机和同一个汽车车机环境进行通信,大大减少了汽车车机连接手机时适配安卓和苹果两种类型操作系统的手机的工作量,方便用户在多个手机或两种连接方式上的自由切换,节约用户切换手机时的操作成本,提高用户体验。
实施例三
图4是本发明实施例三提供的一种终端互联装置的结构示意图。该装置可集成于第一终端上。参见图4,该装置的具体结构如下:
连接请求获取单元410,用于获取到用户触发的对第二终端的连接请求;
连接建立单元420,用于建立起与第二终端的无线保真连接或通用串行总线连接;
数据传输单元430,用于基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
示例性的,所述数据传输单元430,包括第一传输单元4301,用于:
按照所述第二套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,接收第二终端按照所述第一套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接发送的所述第二套接字端口中的发送数据。
示例性的,所述数据传输单元430,包括第二传输单元4302,用于:
采用传输控制/因特网互联协议,基于所述通用串行总线连接,将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,接收第二终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,发送的所述第二套接字端口中的发送数据。
示例性的,第二传输单元对应的数据通信采用安卓调试桥技术实现。
作为本实施例的一种具体实施方式,所述连接建立单元420,具体用于:
监听第一通用串行总线端口是否处于接通状态;
如果是,建立与第二终端的通用串行总线连接;否则,建立与第二终端的无线保真连接。
作为本实施例的另一种具体实施方式,所述连接建立单元420,具体用于:
以并行方式,建立与第二终端的无线保真连接和通用串行总线连接;
将最先建立成功的连接,作为后续与所述第二终端进行数据通信所采用的连接。
上述产品可执行本发明任意实施例所提供的由第一终端执行的方法,具备执行方法相应的功能模块和有益效果。
实施例四
本实施例提供一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个模块,当所述一个或者多个模块被一个执行终端互联方法的设备执行时,使得所述设备执行如下操作:
第一终端获取到用户触发的对第二终端的连接请求;
第一终端建立起与第二终端的无线保真连接或通用串行总线连接;
第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
上述存储介质中存储的模块被所述设备执行时,根据第一终端基于所建立起的无线保真连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,可包括:
第一终端按照所述第二套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,第一终端接收第二终端按照所述第一套接字端口的地址,采 用传输控制/因特网互联协议,基于所述无线保真连接发送的所述第二套接字端口中的发送数据。
上述存储介质中存储的模块被所述设备执行时,根据第一终端基于所建立起的通用串行总线连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,可包括:
第一终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,第一终端接收第二终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,发送的所述第二套接字端口中的发送数据。
上述存储介质中存储的模块被所述设备执行时,所述数据通信可以采用安卓调试桥技术实现。
上述存储介质中存储的模块被所述设备执行时,根据第一终端建立起与第二终端的无线保真连接或通用串行总线连接,可包括:
第一终端监听第一通用串行总线端口是否处于接通状态;
如果是,第一终端建立与第二终端的通用串行总线连接;
否则,第一终端建立与第二终端的无线保真连接。
上述存储介质中存储的模块被所述设备执行时,根据第一终端建立起与第二终端的无线保真连接或通用串行总线连接,还可包括:
第一终端以并行方式,建立与第二终端的无线保真连接和通用串行总线连接;
第一终端将最先建立成功的连接,作为后续与所述第二终端进行数据通信所采用的连接。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例, 而本发明的范围由所附的权利要求范围决定。

Claims (13)

  1. 一种终端互联方法,其特征在于,包括:
    第一终端获取到用户触发的对第二终端的连接请求;
    第一终端建立起与第二终端的无线保真连接或通用串行总线连接;
    第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
    其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
  2. 根据权利要求1所述的方法,其特征在于,第一终端基于所建立起的无线保真连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,包括:
    第一终端按照所述第二套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,第一终端接收第二终端按照所述第一套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接发送的所述第二套接字端口中的发送数据。
  3. 根据权利要求1所述的方法,其特征在于,第一终端基于所建立起的通用串行总线连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输,包括:
    第一终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,第一终端接收第二终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,发送的所述第二套接字端口中的发送数据。
  4. 根据权利要求3所述的方法,其特征在于,所述数据通信采用安卓调试桥技术实现。
  5. 根据权利要求1所述的方法,其特征在于,第一终端建立起与第二终端的无线保真连接或通用串行总线连接,包括:
    第一终端监听第一通用串行总线端口是否处于接通状态;
    如果是,第一终端建立与第二终端的通用串行总线连接;
    否则,第一终端建立与第二终端的无线保真连接。
  6. 根据权利要求1所述的方法,其特征在于,第一终端建立起与第二终端的无线保真连接或通用串行总线连接,包括:
    第一终端以并行方式,建立与第二终端的无线保真连接和通用串行总线连接;
    第一终端将最先建立成功的连接,作为后续与所述第二终端进行数据通信所采用的连接。
  7. 一种终端互联装置,其特征在于,应用于第一终端,包括:
    连接请求获取单元,用于获取到用户触发的对第二终端的连接请求;
    连接建立单元,用于建立起与第二终端的无线保真连接或通用串行总线连接;
    数据传输单元,用于基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
    其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
  8. 根据权利要求7所述的装置,其特征在于,所述数据传输单元,包括第一传输单元,用于:
    按照所述第二套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,接收第二终端按照所述第一套接字端口的地址,采用传输控制/因特网互联协议,基于所述无线保真连接发送的所述第二套接字端口中的发送数据。
  9. 根据权利要求7所述的装置,其特征在于,所述数据传输单元,包括第二传输单元,用于:
    采用传输控制/因特网互联协议,基于所述通用串行总线连接,将所述第一套接字端口中的发送数据发送至所述第二套接字端口;以及,接收第二终端采用传输控制/因特网互联协议,基于所述通用串行总线连接,发送的所述第二套接字端口中的发送数据。
  10. 根据权利要求9所述的装置,其特征在于,所述数据通信采用安卓调 试桥技术实现。
  11. 根据权利要求7所述的装置,其特征在于,所述连接建立单元,具体用于:
    监听第一通用串行总线端口是否处于接通状态;
    如果是,建立与第二终端的通用串行总线连接;
    否则,建立与第二终端的无线保真连接。
  12. 根据权利要求7所述的装置,其特征在于,所述连接建立单元,具体用于:
    以并行方式,建立与第二终端的无线保真连接和通用串行总线连接;
    将最先建立成功的连接,作为后续与所述第二终端进行数据通信所采用的连接。
  13. 一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个模块,其特征在于,当所述一个或者多个模块被一个执行终端互联方法的设备执行时,使得所述设备执行如下操作:
    第一终端获取到用户触发的对第二终端的连接请求;
    第一终端建立起与第二终端的无线保真连接或通用串行总线连接;
    第一终端基于所建立起的连接与所述第二终端进行数据通信,以实现第一套接字端口与第二套接字端口间数据的传输;
    其中,所述第一套接字端口为所述第一终端上第一消息中心对应的通信端口,所述第二套接字端口为所述第二终端上第二消息中心对应的通信端口。
PCT/CN2015/096523 2015-09-14 2015-12-07 终端互联方法、装置和存储介质 WO2017045276A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP15903963.5A EP3337130A4 (en) 2015-09-14 2015-12-07 Terminal interconnecting method, device, and storage medium
JP2018513639A JP6611921B2 (ja) 2015-09-14 2015-12-07 端末の相互接続方法、装置、不揮発性コンピュータ記憶媒体及びコンピュータプログラム
US15/760,159 US20180253396A1 (en) 2015-09-14 2015-12-07 Method and device for interconnecting terminals, and storage medium
KR1020187010463A KR102110698B1 (ko) 2015-09-14 2015-12-07 단말기 상호 연결 방법, 장치 및 저장 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510583738.X 2015-09-14
CN201510583738.XA CN105120009A (zh) 2015-09-14 2015-09-14 终端互联方法及装置

Publications (1)

Publication Number Publication Date
WO2017045276A1 true WO2017045276A1 (zh) 2017-03-23

Family

ID=54667892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096523 WO2017045276A1 (zh) 2015-09-14 2015-12-07 终端互联方法、装置和存储介质

Country Status (6)

Country Link
US (1) US20180253396A1 (zh)
EP (1) EP3337130A4 (zh)
JP (1) JP6611921B2 (zh)
KR (1) KR102110698B1 (zh)
CN (1) CN105120009A (zh)
WO (1) WO2017045276A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385265A (zh) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 一种iOS系统中的通信方法和装置

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120009A (zh) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 终端互联方法及装置
CN105865460B (zh) * 2016-03-31 2019-06-07 深圳市益光实业有限公司 一种车机及车机通讯方法
CN105975353A (zh) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 电子设备、从直连的另一电子设备中复制数据的方法
CN105975426A (zh) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 电子设备、从直连的另一电子设备中复制数据的方法
CN106357607A (zh) * 2016-07-20 2017-01-25 北京海誉动想科技股份有限公司 电子设备连接与安全验证、通信、通信监测方法及装置
WO2018120645A1 (zh) * 2016-12-27 2018-07-05 华为技术有限公司 设备连接方法及终端
CN106603860A (zh) * 2016-12-30 2017-04-26 百度在线网络技术(北京)有限公司 通信连接建立方法及系统、移动终端与车载设备
CN109428851B (zh) * 2017-07-06 2021-08-10 阿里巴巴(中国)有限公司 一种数据传输组件及方法
CN109871288B (zh) * 2018-12-25 2021-11-23 上海瑞家信息技术有限公司 执行Android系统命令的方法、装置、设备及介质
CN110371049A (zh) * 2019-06-27 2019-10-25 深圳市点嘀互联网络有限公司 使用车机屏幕和车机音响实现多媒体的装置及方法
CN110493838A (zh) * 2019-07-15 2019-11-22 深圳中兴网信科技有限公司 网路连接切换方法、装置、系统、移动终端及存储介质
CN111328155B (zh) * 2020-02-27 2022-01-07 Oppo广东移动通信有限公司 数据传输方法、装置、存储介质及电子设备
CN112311759B (zh) * 2020-09-14 2022-06-14 浙江宇视科技有限公司 一种混合网络下的设备连接切换方法和系统
CN114205813A (zh) * 2021-12-03 2022-03-18 阿波罗智联(北京)科技有限公司 添加好友的方法、装置、电子设备及可读存储介质
CN117097795B (zh) * 2023-10-19 2024-01-23 飞天诚信科技股份有限公司 一种Android智能设备数据通讯方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771707A (zh) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 实现终端间资源共享的方法、资源处理系统及终端
CN103051690A (zh) * 2012-12-12 2013-04-17 广东好帮手电子科技股份有限公司 一种局域网内车载主机播放手机音乐的系统及实现方法
CN103281438A (zh) * 2013-05-03 2013-09-04 广东翼卡车联网服务有限公司 车联网中基于手机通讯模块的数据传输方法和系统
CN103428283A (zh) * 2013-08-06 2013-12-04 惠州华阳通用电子有限公司 车载终端共享智能移动终端网络的方法
CN104333844A (zh) * 2014-11-12 2015-02-04 沈阳美行科技有限公司 一种车载终端与智能手机的互联方法
CN105120009A (zh) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 终端互联方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1885107A1 (en) * 2006-08-04 2008-02-06 Sysopen Digia Oyj Mobile terminal control by vehicle
CN101022294A (zh) * 2007-02-28 2007-08-22 深圳市杰普林数码科技有限公司 一种通过电脑收发手机短信的方法
CN101663875B (zh) * 2007-06-27 2014-09-03 三菱电机株式会社 通信网络连接装置
EP2312697B1 (en) * 2009-03-26 2013-03-06 Hitachi Chemical Company, Ltd. Adhesive material reel
KR101027971B1 (ko) * 2010-12-10 2011-04-13 (주)헬릭스테크 애플리케이션 검사 가능한 이동통신 단말기 및 그 검사 방법
JP2013077968A (ja) * 2011-09-30 2013-04-25 Alpine Electronics Inc 電子装置および情報端末を用いたメディアシステム
WO2016008077A1 (zh) * 2014-07-14 2016-01-21 华为技术有限公司 智能终端与车载终端互联的方法及装置
CN104881020A (zh) * 2015-04-27 2015-09-02 深圳市元征软件开发有限公司 汽车诊断系统的无线通讯方法以及汽车诊断系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771707A (zh) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 实现终端间资源共享的方法、资源处理系统及终端
CN103051690A (zh) * 2012-12-12 2013-04-17 广东好帮手电子科技股份有限公司 一种局域网内车载主机播放手机音乐的系统及实现方法
CN103281438A (zh) * 2013-05-03 2013-09-04 广东翼卡车联网服务有限公司 车联网中基于手机通讯模块的数据传输方法和系统
CN103428283A (zh) * 2013-08-06 2013-12-04 惠州华阳通用电子有限公司 车载终端共享智能移动终端网络的方法
CN104333844A (zh) * 2014-11-12 2015-02-04 沈阳美行科技有限公司 一种车载终端与智能手机的互联方法
CN105120009A (zh) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 终端互联方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385265A (zh) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 一种iOS系统中的通信方法和装置

Also Published As

Publication number Publication date
EP3337130A1 (en) 2018-06-20
EP3337130A4 (en) 2018-07-11
KR102110698B1 (ko) 2020-05-28
JP2018535574A (ja) 2018-11-29
CN105120009A (zh) 2015-12-02
US20180253396A1 (en) 2018-09-06
KR20180054702A (ko) 2018-05-24
JP6611921B2 (ja) 2019-11-27

Similar Documents

Publication Publication Date Title
WO2017045276A1 (zh) 终端互联方法、装置和存储介质
JP6352365B2 (ja) Wi−fiディスプレイ接続のオーディオおよび音声バックチャネルを確立および制御すること
AU2013207642B2 (en) Wireless communication system for offline participation in a display session
US7656847B2 (en) Method and apparatus for utilizing bluetooth for WLAN service authentication and discovery
KR101705764B1 (ko) 무선 도킹
US10425454B2 (en) Device and method for transferring the rendering of multimedia content
CN110121902B (zh) 一种通信建立的方法及终端
US10560532B2 (en) Quick relay session management protocol
WO2013097401A1 (zh) 浏览器客户端与后端服务器直通的方法、网关和通信系统
US20140293997A1 (en) Method, Apparatus, and System for Implementing VOIP Call in Cloud Computing Environment
WO2015021650A1 (zh) 媒体流的传输方法、装置与系统
CN104158883A (zh) 跨终端设备进行用户登陆的方法、装置、设备及系统
JP2005086467A5 (zh)
EP2832181A1 (en) Method and apparatus for relaying data communications in a bluetooth network
CN105450676A (zh) 网络共享的方法、装置及网络共享系统
CN106375453B (zh) 基于http连接的双向通讯设备、系统和方法
CN104243281A (zh) 基于移动互联网的语音通信方法
WO2013120325A1 (zh) 浏览器与浏览器直通的方法、装置和通信系统
WO2018129876A1 (zh) 多媒体数据传输的方法、服务器和终端
JP6393475B2 (ja) 通信アダプタ装置、通信システム、トンネル通信方法、及びプログラム
WO2012175024A1 (zh) 实现无线数据传输与短信收发并行的方法、系统及设备
JP5931224B2 (ja) データ・アクセス方法及び装置
WO2012010002A1 (zh) 一种物联网终端java应用的业务调试装置和方法
CN115883572A (zh) 外设共享方法及装置
CN104683419B (zh) 一种基于android系统和m2m的通信方法和系统

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018513639

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15760159

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20187010463

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2015903963

Country of ref document: EP