WO2016165584A1 - Communication method and device between terminal - Google Patents

Communication method and device between terminal Download PDF

Info

Publication number
WO2016165584A1
WO2016165584A1 PCT/CN2016/078803 CN2016078803W WO2016165584A1 WO 2016165584 A1 WO2016165584 A1 WO 2016165584A1 CN 2016078803 W CN2016078803 W CN 2016078803W WO 2016165584 A1 WO2016165584 A1 WO 2016165584A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
application
identifier
processing object
target
Prior art date
Application number
PCT/CN2016/078803
Other languages
French (fr)
Chinese (zh)
Inventor
李欣
王卓然
Original Assignee
乐视控股(北京)有限公司
乐视网信息技术(北京)股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视网信息技术(北京)股份有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2016165584A1 publication Critical patent/WO2016165584A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a communication method between terminals and a communication device between terminals.
  • a user can download a video that is desired to be viewed to a mobile phone (mobile terminal) in a scene with Wi-Fi (Wireless Fidelity), and then watch the video in a scene without Wi-Fi.
  • Wi-Fi Wireless Fidelity
  • the operation of the user on the terminal is cumbersome and may even damage the terminal.
  • the user may go to do housework such as cleaning and cooking. If the user still wants to continue watching the video on the mobile phone, he needs to carry the mobile phone anytime and anywhere, which is very inconvenient and may be The phone is broken.
  • embodiments of the present application have been made in order to provide a communication method between terminals and a corresponding communication device between terminals, which overcomes the above problems or at least partially solves the above problems.
  • the embodiment of the present application discloses a communication method between terminals, including:
  • the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and a target selected from one or more application identifiers associated with the target terminal identifier Application identification, and message content;
  • the embodiment of the present application further discloses a communication device between terminals, including:
  • the querying module is configured to: when receiving the terminal query request sent by the first terminal, return one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request ;
  • the application call request receiving module is configured to receive an application call request sent by the first terminal, where the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and an association associated with the target terminal identifier Target application identifier selected from multiple application identifiers, and message content;
  • the application call request sending module is configured to send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
  • the embodiment of the present application also discloses a computer readable recording medium recorded with a program for executing the above method.
  • the application of the first terminal calls the corresponding application in the second terminal to perform corresponding processing based on the application call request of the first terminal, and implements the inheritance of the processing content to adapt to different processing requirements, thereby greatly improving the simplicity of the operation.
  • the interaction between the first terminal and the second terminal is implemented by the intermediary, and the interaction between the first terminal and the second terminal is not limited to a specific protocol, and is not limited to specific content, and has strong scalability and various forms.
  • the embodiments of the present application process the registration, establish a long connection, and distribute messages through a unified interface, which greatly reduces the development cost of the application and improves the service efficiency.
  • Embodiment 1 is a flow chart showing the steps of Embodiment 1 of a method for communication between terminals according to the present application;
  • Embodiment 2 is a flow chart showing the steps of Embodiment 2 of a method for communication between terminals according to the present application;
  • FIG. 3 is a structural block diagram of an embodiment of a communication device between terminals of the present application.
  • FIG. 1 a flow chart of the steps of the first embodiment of the communication method between the terminals of the present application is shown, which may specifically include the following steps:
  • Step 101 When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
  • Step 102 Receive an application call request sent by the first terminal, where the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and one or more application identifiers associated with the target terminal identifier.
  • Step 103 Send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
  • the embodiment of the present application invokes the application in the second terminal to perform corresponding processing, and implements inheritance of the processing content to adapt to different processing requirements, thereby greatly improving the simplicity of the operation.
  • the interaction between the first terminal and the second terminal is implemented by the intermediary, and the interaction between the first terminal and the second terminal is not limited to a specific protocol, and is not limited to specific content, and has strong scalability and various forms.
  • FIG. 2 a flow chart of the steps of the second embodiment of the communication method between the terminals of the present application is shown, which may specifically include the following steps:
  • Step 201 Receive a registration request.
  • the embodiment of the present application can be applied to a service platform, and the essence of the service platform Can be a standalone server, or a server cluster.
  • the service platform can be connected to a plurality of terminals, such as a first terminal and a second terminal.
  • the terminal can include a mobile phone, a tablet computer, a television, a personal computer, a smart watch, and the like.
  • the service platform may provide a server registration interface, such as an HTTP (HyperText Transfer Protocol) interface, and the service platform is sent by the server registration interface receiving terminal (such as the first terminal and the second terminal). Registration request.
  • HTTP HyperText Transfer Protocol
  • a unified interface can be encapsulated by the SDK (Application Development Kit) and provided to the application, and the SDK completes the registration by defining a corresponding protocol with the service platform.
  • SDK Application Development Kit
  • the first terminal has a unified interface, and the unified interface sends a registration request to the service platform, that is, the first terminal can register through the unified interface.
  • the second terminal has a unified interface, and the unified interface sends a registration request to the service platform, that is, the second terminal can register through the unified interface.
  • Step 202 When the registration request includes the user identifier and the terminal identifier, establish an association relationship between the user identifier and the terminal identifier.
  • the service platform may register the terminal, indicating that the terminal can accept the pushed service message (such as an application call request).
  • the service platform may establish an association relationship between the user identifier and the terminal identifier, and complete the registration, and the service platform may store the registration information to bind different terminals under the same user, and construct a terminal ecosystem belonging to the user.
  • service extension can be supported. For example, if the user has his own sharing circle and friend circle, the user identifier corresponding to the known friend can be sent to send a message.
  • the user identifier may be information capable of representing a uniquely determined user, for example, a user ID (IDentity), a User_ID;
  • the terminal identifier may be information capable of representing a uniquely determined terminal, for example, a terminal ID, Device_ID.
  • Step 203 When the registration request includes the terminal identifier and the application identifier, establish an association relationship between the terminal identifier and the application identifier.
  • the service platform may register the application, indicating that the application can accept the pushed service message (such as an application call request).
  • the service platform may establish an association relationship between the terminal identifier and the identifier, and complete the registration, and the service platform stores the registration information to bind different applications under the same terminal.
  • the application identifier may be information capable of representing a uniquely determined application, for example, an application ID, APP_ID.
  • the application may be an application of the terminal system, or may be a third-party application (Application, APP), which is not limited in this embodiment of the present application.
  • Application Application, APP
  • the terminal (such as the first terminal and the second terminal) can also send an unbinding request (ie, anti-registration) to the service platform through the unified interface provided by the SDK, and the service platform can release the user according to the unbinding request.
  • an unbinding request ie, anti-registration
  • Step 204 Establish a first long connection with the first terminal.
  • Step 205 Establish a second long connection with the second terminal.
  • a long connection (such as a first long connection and a second long connection) may mean that multiple data packets may be continuously transmitted on one connection. During the connection hold period, if no data packet is sent, both parties need to send a link detection packet.
  • TCP Transmission Control Protocol
  • the unified interface can be encapsulated by the SDK and provided to the application, and the SDK completes the connection by defining a corresponding protocol with the service platform.
  • the first terminal has a unified interface, and the first terminal can establish a first long connection with the service platform by using the unified interface, where the first long connection can be used by the service platform to communicate with the first terminal.
  • the second terminal has a unified interface, and the second terminal can establish a second long connection with the service platform through the unified interface, where the second long connection can be used for the service platform to communicate with the second terminal.
  • the service platform may use the terminal identifier to calculate a long connection with the terminal (such as the first terminal and the second terminal) according to a preset allocation manner.
  • a long connection such as the first terminal and the second terminal
  • the service platform may use the terminal identifier to calculate a long connection with the terminal (such as the first terminal and the second terminal) according to a preset allocation manner.
  • the terminal such as the first terminal and the second terminal
  • the service platform may use the terminal identifier to calculate a long connection with the terminal (such as the first terminal and the second terminal) according to a preset allocation manner.
  • a preset allocation manner such as the first long connection, the second long connection server.
  • the service platform may send the information of the server, such as an IP (Internet Protocol, protocol) address, port, and the like, to the terminal (such as the first terminal and the second terminal) for buffering.
  • IP Internet Protocol, protocol
  • the terminal eg, the first terminal, the second terminal
  • the terminal may request information of the server from the service platform at a specific time (such as when booting).
  • the terminal (such as the first terminal and the second terminal) initiates a connection request to the corresponding server in the service platform according to the information of the server, and the server in the service platform detects the terminal (such as the first terminal,
  • the registration information of the second terminal (such as the terminal identifier registered at the time of registration) is established, a legal long connection (such as a first long connection and a second long connection) is established.
  • some service requirements are multi-screen interaction, and the technical feature is a long connection.
  • the use of long-connection communication can ensure high real-time communication and power consumption between terminals (such as the first terminal and the second terminal). Less, less traffic.
  • Step 206 When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
  • the communication between the service platform and the first terminal may include a communication terminal query request, that is, the first terminal may send a terminal query request through the first long connection, and the service platform may receive the terminal query request through the first long connection.
  • the terminal query request may refer to an instruction sent by the first terminal to query other terminals.
  • the terminal can be triggered by clicking a certain control to find other terminals, and continue watching the video in other terminals.
  • the terminal can automatically trigger the terminal to query the other terminal to find the other terminal and prompt the short message in the other terminal.
  • the communication between the service platform and the first terminal may include a communication terminal identifier and an application identifier, that is, the service platform may return one or more terminal identifiers to the first terminal through the first long connection, and one or more application identifiers associated with each terminal identifier.
  • the first terminal may receive one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers by using the first long connection.
  • step 206 can include the following sub-steps:
  • Sub-step S11 extracting a user identifier from the terminal query request
  • Sub-step S12 searching for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
  • Sub-step S13 returning the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
  • the service platform may search for the terminal bound to the same user according to the registration information, and the application that is bound to the terminal, that is, the terminal identifier associated with the same user identifier and the application identifier associated with the terminal identifier.
  • the method for searching for the terminal identifier is only used as an example.
  • the search mode of other terminal identifiers may be set according to the actual situation, which is not limited in this embodiment of the present application.
  • the terminal query request may include the address information of the first terminal, such as an IP address, a MAC (Media Access Control Address) address, and the like, and the service platform may query the information by establishing a long connection through the terminal.
  • the terminal identifier of the terminal that matches the address information of the first terminal such as the terminal identifier of other terminals located in the same local area network. If the local area network may be a home local area network, the other terminals may be other terminals in the home.
  • the returned one or more terminal identifiers may be terminal identifiers of the online terminals.
  • online as used in the embodiment of the present application may refer to that the terminal establishes a long connection with the service platform, and can directly communicate.
  • the service platform can query the online information or offline information to know whether the terminal is online or offline.
  • Step 207 Receive an application call request sent by the first terminal.
  • the application call request may include a target terminal identifier selected from the one or more terminal identifiers, a target application identifier selected from one or more application identifiers associated with the target terminal identifier, and message content.
  • the communication between the service platform and the first terminal may include an application call request.
  • the communication that is, the first terminal can send an application call request through the first long connection, and the service platform can receive the application call request through the first long connection.
  • the first terminal may display the UI (User Interface), and the user may The target terminal identifier is selected from the plurality of terminal identifiers, and the target application identifier is selected from one or more application identifiers associated with the target terminal identifier.
  • UI User Interface
  • the first terminal may also select the target terminal identifier and the target application identifier in other manners, which is not limited in this embodiment.
  • the adaptation relationship between the terminal and the application may be preset to indicate which applications of which terminals can process the same content, that is, an application of a certain terminal can support the content of other applications of other terminals, and an example thereof is as follows: Shown as follows:
  • Terminal identification Application identifier Terminal identification Application identifier Mobile phone Video application A TV Video player B
  • the above table may indicate that the video application A in the mobile phone and the video player B in the television can process the same content, that is, the video player B in the television can support playing the video in the video application A in the mobile phone.
  • the first terminal may search for the terminal identifier and the application identifier that are matched with the terminal identifier of the first terminal and the application identifier of the current application in the adaptation relationship, as the target terminal identifier and the target application identifier.
  • the message content can be generated based on the processing object of the application in the first terminal, ie the first terminal and the second terminal can process the same processing object synchronously.
  • the processing object may include at least one or more of the following:
  • the processing object may be directly used as a message content
  • the processing object identifier of the processing object may be used as the message content, and the second terminal may obtain the corresponding processing according to the processing object identifier.
  • the processing object identifier may be information capable of representing a uniquely determined terminal, for example, a processing object ID, a processing object name, and the like.
  • the processing state can be identified to indicate the state in which the application in the first terminal processes the processing object.
  • the processing status may include playing time information
  • the processing status may include the current number of pages.
  • the content of the message and the manner of generating the foregoing are only examples.
  • other message content and a generating manner may be set according to actual conditions, for example, directly processing a processing object with a large data stream as a message content, and the like.
  • This embodiment of the present application does not limit this.
  • the content of the message and the manner of generating the message may be used by those skilled in the art in addition to the content of the message and the manner of the foregoing, and the embodiment of the present application does not limit this.
  • target terminal identifier the target terminal identifier
  • target application identifier the target application identifier
  • message content other information may be written in the application call request for other purposes, which is not limited in this embodiment of the present application.
  • the terminal identifier of the first terminal and the application identifier of the currently processed application may be written in the application call request for counting the frequency at which the terminal and the application initiate the call.
  • Step 208 Send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
  • the communication between the service platform and the second terminal may include the communication of the application call request, that is, the service platform may send the application call request through the second long connection, and the second terminal may receive the application call request through the second long connection.
  • the service platform may directly transmit the request to the second terminal without performing any processing on the application call request.
  • the unified interface of the SDK may be encapsulated and provided to the application, and the SDK defines a corresponding protocol by the service platform to complete the application processing message content corresponding to the target application identifier.
  • the SDK may parse the target application identifier in the application call request, and if the application corresponding to the target application identifier is identified, the SDK may distribute the application call request to the application. Processing, the application can parse the message content for corresponding processing.
  • step 208 can include the following sub-steps:
  • Sub-step S21 in the first server, query whether the local second communication has a second long connection corresponding to the target terminal identifier; if yes, perform sub-step S22, and if not, perform sub-step S23;
  • Sub-step S22 sending the application call request to the second terminal by using the second long connection
  • Sub-step S23 writing the application call request to a preset message queue
  • Sub-step S24 forwarding, in the second server, the application call request in the message queue to a third server having the second long connection;
  • Sub-step S25 the application call request is sent to the second terminal by the second long connection in the third server.
  • the service platform has a message routing service, and the message routing service may be provided by an independent server or a server cluster.
  • the message routing service can be used for routing messages between devices across a network, and is generally not directly directed to users and terminals.
  • the message routing service performs message production by establishing a long-connected server, and then is consumed by the message routing service.
  • the message is distributed to the long-connected server where the target terminal is located, and is delivered to the target terminal through the available long connection.
  • each server can manage long connections of millions of terminals. Different terminals of the same user may be assigned due to different network types and the like. Different servers establish long connections.
  • the application call request may be first sent to the first server through the first long connection, and the first server finds that the second long connection of the second terminal is not local.
  • Application calls can be written to the message queue during maintenance.
  • the second server providing the message routing service is responsible for listening to the message queue.
  • the second server consumes the message (ie, the application call request) and parses the message ( That is, the application call request finds a third server having a second long connection, and the second server transmits a message (ie, an application call request) to the third server through a connection established with the third server.
  • the third server sends an application call request to the second terminal through the second long connection.
  • the message queue can be a public queue, that is, the server in the service platform can access, write a message (ie, an application call request) to the queue, and the server that provides the message routing service can consume the message in the message queue (ie, the application)
  • the request may be), which may be a storage space (such as a memory) of any server, which is not limited in this embodiment of the present application.
  • the second server that provides the second long connection with the second terminal is calculated by using the terminal identifier according to the preset allocation manner, and the second server that provides the message routing service may adopt the message (ie, the application call request)
  • the terminal identifier in the system calculates the server (ie, the third server) that establishes the second long connection according to the allocation manner.
  • the second terminal may process the message content in the following manner:
  • Sub-step S31 when the message content includes a processing object, calling an application corresponding to the target application identifier to process the processing object;
  • the processing object if the processing object is included in the message content, the corresponding application may be directly invoked to process the processing object.
  • the processing object is a short message (text)
  • the second terminal can call a text editor (application) to display the short message.
  • Sub-step S32 when the message content includes the processing object identifier, requesting, by the specified content server, the processing object corresponding to the processing object identifier;
  • Sub-step S33 the application corresponding to the target application identifier is invoked to process the processing object
  • the corresponding processing object may be requested by the content server, and the corresponding application is invoked to process the processing object.
  • processing object may be pre-stored in a content server, which is not necessarily a server in the service platform.
  • the processing object may be uploaded by the current user, or may be uploaded by another user, or may be stored by the content server itself, which is not limited in this embodiment of the present application.
  • the processing object is an image, which is uploaded by the current user to the content server, and the second terminal can call the image display (application) to display the image after requesting the image from the content server.
  • Sub-step S34 when the message content includes the processing object identifier and the processing state, requesting, by the preset content server, the processing object corresponding to the processing object identifier and in the processing state;
  • Sub-step S35 invoking an application corresponding to the target application identifier to process a processing object in the processing state.
  • the processing object includes the processing state, that is, the processing state
  • the processing object that is in the processing state may be requested from the content server, and the corresponding application is invoked to process the processing object.
  • the processing object is a video
  • the content server itself stores the video
  • the application of the first terminal plays the video to the time X (processing state)
  • the second terminal may request the video server after the video of the time X to call the video.
  • the player (app) plays the video at time X.
  • the second terminal may automatically request the content of the next episode to be played by the content server according to the processing object identifier of the current video.
  • the foregoing processing manner is only an example.
  • other processing manners may be set according to actual conditions.
  • the second terminal directly establishes a connection request corresponding to the first terminal, and then invokes the corresponding application.
  • the processing, and the like the embodiment of the present application does not limit this.
  • other processing methods may be used by those skilled in the art according to actual needs, and the embodiments of the present application do not limit this.
  • the SDK is used to encapsulate a unified interface, so that all applications that need to receive and push messages on the same terminal can share the service of the push platform, and the SDK implements registration, establishes a long connection, sends a message, and deregisters the application.
  • Interface, application integration SDK you can use these functions, the specific implementation is done by the SDK, the application itself does not need to care about the specific implementation, so that all implementations are defined by the SDK and the service platform to define the protocol, for the terminal
  • the application is transparent.
  • the traditional way is that each application needs to implement these functions by using these services.
  • the SDK is convenient to reduce the development cost of the services using the push platform, ensuring that all applications use a unified interface to ensure a long connection channel. This channel can be used for all application communications, greatly improving service efficiency.
  • the user can trigger the terminal to query the request by clicking on the control specified on the video application.
  • the service platform When the service platform detects the terminal query request, it can search for the terminal, such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
  • the terminal such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
  • the user can select the TV (target terminal identifier) and its video player (target application identifier) from the terminal and the application.
  • the mobile phone may generate an application call request according to the user's selection, and then send an application call request to the service platform, where the application call request includes the video name and its set number (processing object identifier) and play time (processing status).
  • the service platform can forward the application call request to the television (second terminal) through a message routing service.
  • the television requests the video website (content server) to be the video corresponding to the video name and its set number at the playing time, and calls the video player to play.
  • the response range of the TV is wider than that of the mobile phone, the user can continue to watch the video while doing housework, greatly improving the flexibility of the video playing, improving the user experience, and reducing the video viewing on the mobile phone while doing housework. Potential damage to the phone.
  • the video player calling the television continues to play the video.
  • the mobile phone can automatically trigger the terminal to query the request.
  • the service platform When the service platform detects the terminal query request, it can search for the terminal, such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
  • the terminal such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
  • the mobile phone can select a television (target terminal identifier) and its text editor from the terminal and the application. (target application identifier), and generate an application call request, and then send an application call request to the service platform, where the application call request includes a short message (processing object).
  • the service platform can forward the application call request to the television (second terminal) through a message routing service.
  • the television displays the text message according to the call text editor, which further improves the synchronization operation between the mobile phone and the television.
  • FIG. 3 a structural block diagram of an embodiment of a communication device between terminals of the present application is shown, which may specifically include the following modules:
  • the querying module 301 is configured to: when receiving the terminal query request sent by the first terminal, return one or more terminal identifiers and one or more applications associated with each terminal identifier to the first terminal according to the terminal query request Identification
  • the application call request receiving module 302 is configured to receive an application call request sent by the first terminal; the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and one associated with the target terminal identifier Or target application identifier selected in multiple application identifiers, and message content;
  • the application call request sending module 303 is configured to send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
  • the apparatus may further include the following modules:
  • a registration request receiving module configured to receive a registration request
  • a terminal registration module configured to establish an association relationship between the user identifier and the terminal identifier when the registration request includes a user identifier and a terminal identifier;
  • the application registration module is configured to establish an association relationship between the terminal identifier and the application identifier when the registration request includes the terminal identifier and the application identifier.
  • the apparatus may further include the following modules:
  • a first long connection establishing module configured to establish a first long connection with the first terminal
  • a second long connection establishing module configured to establish a second long connection with the second terminal
  • the first long connection is used for communicating with the first terminal, including receiving a terminal query request, an application call request, returning one or more terminal identifiers, and one or more application identifiers associated with each terminal identifier;
  • the second long connection is for communicating with the second terminal, including sending an application call request.
  • the query module 301 can include the following modules:
  • An extraction module configured to extract a user identifier from the terminal query request
  • a search module configured to search for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
  • the returning module is configured to return the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
  • the application call request sending module 303 may include the following modules:
  • the long connection query module is configured to query, in the first server, whether the local second connection has communication with the second terminal corresponding to the target terminal identifier; if yes, the first sending module is invoked; if not, the call is written Queue module
  • a first sending module configured to send the application call request to the second terminal by using the second long connection
  • a write queue module configured to write the application call request to a preset message queue
  • a routing module configured to forward the application call request in the message queue to a third server having the second long connection in a second server;
  • the second sending module is configured to send the application call request to the second terminal by using the second long connection in the third server.
  • the message content may be generated based on a processing object of an application in the first terminal;
  • the second terminal may process the message content by calling the following module:
  • a first processing module configured to: when the message content includes a processing object, invoke an application corresponding to the target application identifier to process the processing object;
  • the first requesting module is configured to: when the message content includes the processing object identifier, request the processing object corresponding to the processing object identifier from the specified content server;
  • a second processing module configured to invoke an application corresponding to the target application identifier to process the processing object
  • a second requesting module configured to: when the content of the message includes a processing object identifier and a processing status, request, by the preset content server, a processing object that is in the processing state corresponding to the processing object identifier;
  • the third processing module is configured to invoke a processing object corresponding to the target application identifier to process the processing object in the processing state.
  • the processing object may include one or more of the following:
  • the processing state may include playing time information.
  • the first terminal may have a unified interface, and the first terminal registers by using the unified interface to establish a first long connection.
  • the second terminal has a unified interface, and the second terminal can register by using the unified interface, establish a second long connection, and invoke an application corresponding to the target application identifier to process the message content.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the present application also provides a computer readable recording medium on which a program for executing the above method is recorded.
  • the computer readable recording medium includes a form readable by a computer (eg, a computer) Any mechanism for storing or transmitting information.
  • a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , infrared signals, digital signals, etc.).
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

A communication method and device between terminals. The method comprises: upon receipt of a terminal query request sent by a first terminal, returning, according to the terminal query request, to the first terminal one or more terminal identifiers and one or more application identifiers associated with each of the terminal identifiers; receiving an application invoking request sent by the first terminal, wherein the application invoking request comprises a target terminal identifier selected from the one or more terminal identifiers, a target application identifier selected from the one or more application identifiers associated with said target terminal identifier, and message content; sending the application invoking request to a second terminal corresponding to the target terminal identifier, so as to drive the second terminal to invoke an application corresponding to the target application identifier to process the message content. The embodiments of the present application realizes inheritance of to-be-processed content to adapt to different processing requirements, thus greatly improving simplicity of operation.

Description

一种终端之间的通信方法和装置Communication method and device between terminals 技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种终端之间的通信方法和一种终端之间的通信装置。The present application relates to the field of communications technologies, and in particular, to a communication method between terminals and a communication device between terminals.
背景技术Background technique
随着网络通信技术的快速发展,各种类型的终端,尤其是移动终端,在用户的日常生活、学习、工作等各方面的应用越来越广泛。例如,用户可以在具有Wi-Fi(无线保真)的场景下将想要观看的视频下载到手机(移动终端)中,然后在不具有Wi-Fi的场景下观看视频。With the rapid development of network communication technologies, various types of terminals, especially mobile terminals, have become more and more widely used in daily life, learning, and work of users. For example, a user can download a video that is desired to be viewed to a mobile phone (mobile terminal) in a scene with Wi-Fi (Wireless Fidelity), and then watch the video in a scene without Wi-Fi.
但在某些情况下,用户在终端上的操作较为繁琐,甚至有可能损害终端。例如,当用户回到家的时候,可能会去做打扫、煮饭等家务,此时若用户仍然想继续观看手机上的视频,就需要随时随地带着手机,十分不方便,还有可能会将手机摔损。However, in some cases, the operation of the user on the terminal is cumbersome and may even damage the terminal. For example, when the user returns home, he or she may go to do housework such as cleaning and cooking. If the user still wants to continue watching the video on the mobile phone, he needs to carry the mobile phone anytime and anywhere, which is very inconvenient and may be The phone is broken.
发明内容Summary of the invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种终端之间的通信方法和相应的一种终端之间的通信装置。In view of the above problems, embodiments of the present application have been made in order to provide a communication method between terminals and a corresponding communication device between terminals, which overcomes the above problems or at least partially solves the above problems.
为了解决上述问题,本申请实施例公开了一种终端之间的通信方法,包括:In order to solve the above problem, the embodiment of the present application discloses a communication method between terminals, including:
当接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;Receiving an application call request sent by the first terminal; the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and a target selected from one or more application identifiers associated with the target terminal identifier Application identification, and message content;
将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。 And sending the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke an application corresponding to the target application identifier to process the message content.
本申请实施例还公开了一种终端之间的通信装置,包括:The embodiment of the present application further discloses a communication device between terminals, including:
查询模块,用于在接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The querying module is configured to: when receiving the terminal query request sent by the first terminal, return one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request ;
应用调用请求接收模块,用于接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;The application call request receiving module is configured to receive an application call request sent by the first terminal, where the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and an association associated with the target terminal identifier Target application identifier selected from multiple application identifiers, and message content;
应用调用请求发送模块,用于将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。The application call request sending module is configured to send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
本申请实施例还公开了一种记录有用于执行上述方法的程序的计算机可读记录介质。The embodiment of the present application also discloses a computer readable recording medium recorded with a program for executing the above method.
本申请实施例包括以下优点:Embodiments of the present application include the following advantages:
本申请实施例基于第一终端的应用调用请求,调用第二终端中对应的应用进行相应的处理,实现处理内容的继承,以适应不同的处理要求,大大提高了操作的简便性。The application of the first terminal calls the corresponding application in the second terminal to perform corresponding processing based on the application call request of the first terminal, and implements the inheritance of the processing content to adapt to different processing requirements, thereby greatly improving the simplicity of the operation.
本申请实施例通过中介进行应用调用请求的推送,实现第一终端与第二终端的交互,不受限于特定的协议,不受限于特定的内容,扩展性强,形式多样。In the embodiment of the present application, the interaction between the first terminal and the second terminal is implemented by the intermediary, and the interaction between the first terminal and the second terminal is not limited to a specific protocol, and is not limited to specific content, and has strong scalability and various forms.
本申请实施例通过统一的接口进行注册、建立长连接、分发消息等处理,大大降低了应用的开发成本,提高了服务效率。The embodiments of the present application process the registration, establish a long connection, and distribute messages through a unified interface, which greatly reduces the development cost of the application and improves the service efficiency.
附图说明DRAWINGS
图1是本申请的一种终端之间的通信方法实施例1的步骤流程图;1 is a flow chart showing the steps of Embodiment 1 of a method for communication between terminals according to the present application;
图2是本申请的一种终端之间的通信方法实施例2的步骤流程图;2 is a flow chart showing the steps of Embodiment 2 of a method for communication between terminals according to the present application;
图3是本申请的一种终端之间的通信装置实施例的结构框图。 3 is a structural block diagram of an embodiment of a communication device between terminals of the present application.
具体实施方式detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。The above described objects, features and advantages of the present application will become more apparent and understood.
参照图1,示出了本申请的一种终端之间的通信方法实施例1的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1 , a flow chart of the steps of the first embodiment of the communication method between the terminals of the present application is shown, which may specifically include the following steps:
步骤101,当接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;Step 101: When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
步骤102,接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;Step 102: Receive an application call request sent by the first terminal, where the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and one or more application identifiers associated with the target terminal identifier. The selected target application identifier and message content;
步骤103,将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。Step 103: Send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
本申请实施例基于第一终端的应用调用请求,调用第二终端中的应用进行相应的处理,实现处理内容的继承,以适应不同的处理要求,大大提高了操作的简便性。Based on the application call request of the first terminal, the embodiment of the present application invokes the application in the second terminal to perform corresponding processing, and implements inheritance of the processing content to adapt to different processing requirements, thereby greatly improving the simplicity of the operation.
目前,有某些应用支持直接从第一终端调用第二终端的应用播放视频,但是,这些应用一般需要支持特定的协议,扩展性差,仅支持视频的播放,形式单一。At present, some applications support the application of the second terminal to directly play the video from the first terminal. However, these applications generally need to support a specific protocol, and the scalability is poor, and only the video playback is supported, and the form is single.
本申请实施例通过中介进行应用调用请求的推送,实现第一终端与第二终端的交互,不受限于特定的协议,不受限于特定的内容,扩展性强,形式多样。In the embodiment of the present application, the interaction between the first terminal and the second terminal is implemented by the intermediary, and the interaction between the first terminal and the second terminal is not limited to a specific protocol, and is not limited to specific content, and has strong scalability and various forms.
参照图2,示出了本申请的一种终端之间的通信方法实施例2的步骤流程图,具体可以包括如下步骤:Referring to FIG. 2, a flow chart of the steps of the second embodiment of the communication method between the terminals of the present application is shown, which may specifically include the following steps:
步骤201,接收注册请求;Step 201: Receive a registration request.
需要说明的是,本申请实施例可以应用于服务平台,该服务平台的实质 可以是独立的服务器,或者,服务器集群。It should be noted that the embodiment of the present application can be applied to a service platform, and the essence of the service platform Can be a standalone server, or a server cluster.
该服务平台可以连接多个终端,如第一终端、第二终端,该终端可以包括手机、平板电脑、电视、个人电脑、智能手表等等,本申请实施例对此不加以限制。The service platform can be connected to a plurality of terminals, such as a first terminal and a second terminal. The terminal can include a mobile phone, a tablet computer, a television, a personal computer, a smart watch, and the like.
在本申请实施例中,服务平台可以提供一个服务器注册接口,如HTTP(HyperText Transfer Protocol,超文本传输协议)接口,服务平台由该服务器注册接口接收终端(如第一终端、第二终端)发送的注册请求。In the embodiment of the present application, the service platform may provide a server registration interface, such as an HTTP (HyperText Transfer Protocol) interface, and the service platform is sent by the server registration interface receiving terminal (such as the first terminal and the second terminal). Registration request.
在终端(如第一终端、第二终端)中,可以由SDK(Software Development Kit,应用开发工具包)封装统一的接口,提供给应用,SDK通过和服务平台定义相应的协议,完成注册。In the terminal (such as the first terminal and the second terminal), a unified interface can be encapsulated by the SDK (Application Development Kit) and provided to the application, and the SDK completes the registration by defining a corresponding protocol with the service platform.
具体而言,第一终端中具有统一的接口,由该统一的接口向服务平台发送注册请求,即第一终端可以通过该统一的接口进行注册。Specifically, the first terminal has a unified interface, and the unified interface sends a registration request to the service platform, that is, the first terminal can register through the unified interface.
第二终端中具有统一的接口,由该统一的接口向服务平台发送注册请求,即第二终端可以通过该统一的接口进行注册。The second terminal has a unified interface, and the unified interface sends a registration request to the service platform, that is, the second terminal can register through the unified interface.
步骤202,当所述注册请求包括用户标识与终端标识时,建立所述用户标识与所述终端标识的关联关系;Step 202: When the registration request includes the user identifier and the terminal identifier, establish an association relationship between the user identifier and the terminal identifier.
在本申请实施例中,服务平台可以对终端进行注册,表示该终端可以接受推送的业务消息(如应用调用请求)。In the embodiment of the present application, the service platform may register the terminal, indicating that the terminal can accept the pushed service message (such as an application call request).
在实际应用中,服务平台可以建立用户标识与终端标识的关联关系,完成注册,服务平台可以存储注册信息,以绑定同一用户下的不同的终端,构建的属于该用户的终端生态***。In an actual application, the service platform may establish an association relationship between the user identifier and the terminal identifier, and complete the registration, and the service platform may store the registration information to bind different terminals under the same user, and construct a terminal ecosystem belonging to the user.
在该终端生态***中可以支持业务扩展,如用户有自己的一个分享圈、好友圈,则可以给已知的好友对应的用户标识去发送消息。In the terminal ecosystem, service extension can be supported. For example, if the user has his own sharing circle and friend circle, the user identifier corresponding to the known friend can be sent to send a message.
其中,用户标识可以是能够代表一个唯一确定的用户的信息,例如,用户ID(IDentity,身份标识号码),User_ID;The user identifier may be information capable of representing a uniquely determined user, for example, a user ID (IDentity), a User_ID;
终端标识可以是能够代表一个唯一确定的终端的信息,例如,终端ID,Device_ID。The terminal identifier may be information capable of representing a uniquely determined terminal, for example, a terminal ID, Device_ID.
步骤203,当所述注册请求包括终端标识与应用标识时,建立所述终端标识与所述应用标识的关联关系。 Step 203: When the registration request includes the terminal identifier and the application identifier, establish an association relationship between the terminal identifier and the application identifier.
在本申请实施例中,服务平台可以对应用进行注册,表示该应用可以接受推送的业务消息(如应用调用请求)。In this embodiment of the present application, the service platform may register the application, indicating that the application can accept the pushed service message (such as an application call request).
在实际应用中,服务平台可以建立终端标识与标识的关联关系,完成注册,服务平台会存储注册信息,以绑定同一终端下的不同的应用。In an actual application, the service platform may establish an association relationship between the terminal identifier and the identifier, and complete the registration, and the service platform stores the registration information to bind different applications under the same terminal.
其中,应用标识可以是能够代表一个唯一确定的应用的信息,例如,应用ID,APP_ID。The application identifier may be information capable of representing a uniquely determined application, for example, an application ID, APP_ID.
该应用可以为终端***的应用,也可以为第三方应用(Application,APP),本申请实施例对此不加以限制。The application may be an application of the terminal system, or may be a third-party application (Application, APP), which is not limited in this embodiment of the present application.
需要说明的是,终端(如第一终端、第二终端)还可以通过SDK提供的统一的接口向服务平台发送解除绑定请求(即反注册),服务平台可以依据该解除绑定请求解除用户标识与终端标识的关联关系,和/或,解除终端标识与应用标识的关联关系。It should be noted that the terminal (such as the first terminal and the second terminal) can also send an unbinding request (ie, anti-registration) to the service platform through the unified interface provided by the SDK, and the service platform can release the user according to the unbinding request. The association between the identifier and the terminal identifier, and/or the association between the terminal identifier and the application identifier.
步骤204,与第一终端之间建立第一长连接;Step 204: Establish a first long connection with the first terminal.
步骤205,与第二终端之间建立第二长连接;Step 205: Establish a second long connection with the second terminal.
长连接(如第一长连接、第二长连接)可以指在一个连接上可以连续发送多个数据包,在连接保持期间,如果没有数据包发送,需要双方发链路检测包。A long connection (such as a first long connection and a second long connection) may mean that multiple data packets may be continuously transmitted on one connection. During the connection hold period, if no data packet is sent, both parties need to send a link detection packet.
长连接,如TCP(Transmission Control Protocol,传输控制协议)连接,一般可以用于操作频繁、点对点的通信。Long connections, such as TCP (Transmission Control Protocol) connections, can generally be used for frequent, point-to-point communication.
在终端(如第一终端、第二终端)中,可以由SDK封装统一的接口,提供给应用,SDK通过和服务平台定义相应的协议,完成连接。In the terminal (such as the first terminal and the second terminal), the unified interface can be encapsulated by the SDK and provided to the application, and the SDK completes the connection by defining a corresponding protocol with the service platform.
具体而言,第一终端中具有统一的接口,第一终端可以通过该统一的接口与服务平台建立第一长连接,该第一长连接可以用于服务平台与第一终端进行通信。Specifically, the first terminal has a unified interface, and the first terminal can establish a first long connection with the service platform by using the unified interface, where the first long connection can be used by the service platform to communicate with the first terminal.
第二终端中具有统一的接口,第二终端可以通过该统一的接口与服务平台建立第二长连接,该第二长连接可以用于服务平台与第二终端进行通信。The second terminal has a unified interface, and the second terminal can establish a second long connection with the service platform through the unified interface, where the second long connection can be used for the service platform to communicate with the second terminal.
在具体实现中,终端(如第一终端、第二终端)在注册时,服务平台可以采用终端标识按照预设的分配方式计算与该终端(如第一终端、第二终端)建立长连接(如第一长连接、第二长连接)的服务器。 In a specific implementation, when the terminal (such as the first terminal and the second terminal) is registered, the service platform may use the terminal identifier to calculate a long connection with the terminal (such as the first terminal and the second terminal) according to a preset allocation manner. Such as the first long connection, the second long connection) server.
在完成注册后,服务平台可以将该服务器的信息,如IP(Internet Protocol,网络之间互连的协议)地址、端口等,发送至终端(如第一终端、第二终端)中缓存。After the registration is completed, the service platform may send the information of the server, such as an IP (Internet Protocol, protocol) address, port, and the like, to the terminal (such as the first terminal and the second terminal) for buffering.
或者,终端(如第一终端、第二终端)可以在特定时间(如开机时)向服务平台请求该服务器的信息。Alternatively, the terminal (eg, the first terminal, the second terminal) may request information of the server from the service platform at a specific time (such as when booting).
终端(如第一终端、第二终端)按照该服务器的信息,由SDK提供的统一的接口向服务平台中相应的服务器发起连接请求,服务平台中的服务器检测到该终端(如第一终端、第二终端)的注册信息(如注册时登记的终端标识)时,建立合法的长连接(如第一长连接、第二长连接)。The terminal (such as the first terminal and the second terminal) initiates a connection request to the corresponding server in the service platform according to the information of the server, and the server in the service platform detects the terminal (such as the first terminal, When the registration information of the second terminal (such as the terminal identifier registered at the time of registration) is established, a legal long connection (such as a first long connection and a second long connection) is established.
在本申请实施例中,某些业务需求是多屏互动,技术特点是长连接,使用长连接通信的可以保证终端(如第一终端、第二终端)间通信的高实时性和耗电更少、流量更小。In the embodiment of the present application, some service requirements are multi-screen interaction, and the technical feature is a long connection. The use of long-connection communication can ensure high real-time communication and power consumption between terminals (such as the first terminal and the second terminal). Less, less traffic.
步骤206,当接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;Step 206: When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
在本申请实施例中,服务平台与第一终端的通信可以包括通信终端查询请求,即第一终端可以通过第一长连接发送终端查询请求,服务平台可以通过第一长连接接收终端查询请求。In the embodiment of the present application, the communication between the service platform and the first terminal may include a communication terminal query request, that is, the first terminal may send a terminal query request through the first long connection, and the service platform may receive the terminal query request through the first long connection.
其中,终端查询请求可以是指第一终端发出的查询其他终端的指示。The terminal query request may refer to an instruction sent by the first terminal to query other terminals.
例如,用户在手机(第一终端)上观看视频时,可以通过点击某个控件来触发终端查询请求,以查找其他终端,在其他终端中继续观看该视频。For example, when a user watches a video on a mobile phone (first terminal), the terminal can be triggered by clicking a certain control to find other terminals, and continue watching the video in other terminals.
又例如,当手机(第一终端)接收到短信时,则可以自动触发终端查询请求,以查找其他终端,在其他终端中提示该短信。For another example, when the mobile phone (the first terminal) receives the short message, the terminal can automatically trigger the terminal to query the other terminal to find the other terminal and prompt the short message in the other terminal.
服务平台与第一终端的通信可以包括通信终端标识、应用标识,即服务平台可以通过第一长连接向第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识,第一终端可以通过第一长连接接收一个或多个终端标识、及各个终端标识关联的一个或多个应用标识。The communication between the service platform and the first terminal may include a communication terminal identifier and an application identifier, that is, the service platform may return one or more terminal identifiers to the first terminal through the first long connection, and one or more application identifiers associated with each terminal identifier. The first terminal may receive one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers by using the first long connection.
在本申请的一种优选实施例中,步骤206可以包括如下子步骤:In a preferred embodiment of the present application, step 206 can include the following sub-steps:
子步骤S11,从所述终端查询请求中提取用户标识; Sub-step S11, extracting a user identifier from the terminal query request;
子步骤S12,查找所述用户标识关联的一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;Sub-step S12, searching for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
子步骤S13,将所述一个或多个终端标识、及各个终端标识关联的一个或多个应用标识返回所述第一终端。Sub-step S13, returning the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
在本申请实施例中,服务平台可以按照注册信息查找同一用户下绑定的终端,及在该终端中绑定的应用,即返回同一用户标识关联的终端标识、该终端标识关联的应用标识。In the embodiment of the present application, the service platform may search for the terminal bound to the same user according to the registration information, and the application that is bound to the terminal, that is, the terminal identifier associated with the same user identifier and the application identifier associated with the terminal identifier.
当然,上述终端标识的查找方式只是作为示例,在实施本申请实施例时,可以根据实际情况设置其他终端标识的查找方式,本申请实施例对此不加以限制。Of course, the method for searching for the terminal identifier is only used as an example. When the embodiment of the present application is implemented, the search mode of other terminal identifiers may be set according to the actual situation, which is not limited in this embodiment of the present application.
例如,终端查询请求中可以包括第一终端的地址信息,如IP地址、路由的MAC(Media Access Control Address,媒体访问控制地址)地址等,服务平台可以通过终端在建立长连接的信息查询与该第一终端的地址信息匹配的终端的终端标识,如位于同一局域网的其他终端的终端标识,若局域网可以是家庭局域网,则其他终端可以为家庭中的其他终端。For example, the terminal query request may include the address information of the first terminal, such as an IP address, a MAC (Media Access Control Address) address, and the like, and the service platform may query the information by establishing a long connection through the terminal. The terminal identifier of the terminal that matches the address information of the first terminal, such as the terminal identifier of other terminals located in the same local area network. If the local area network may be a home local area network, the other terminals may be other terminals in the home.
进一步而言,返回的该一个或多个终端标识,可以为在线终端的终端标识。Further, the returned one or more terminal identifiers may be terminal identifiers of the online terminals.
本申请实施例所指“在线”,可以指终端与服务平台建立了长连接,可以直接进行通信。The term "online" as used in the embodiment of the present application may refer to that the terminal establishes a long connection with the service platform, and can directly communicate.
在服务平台中,可以在与某终端建立长连接后,对该终端的终端标识配置在线信息,可以在与某终端建立取消长连接后,对该终端的终端标识配置离线信息。On the service platform, after establishing a long connection with a terminal, you can configure online information for the terminal identifier of the terminal. After establishing a canceled long connection with a terminal, you can configure offline information for the terminal identifier of the terminal.
服务平台可以查询该在线信息或离线信息获知该终端处于在线状态或是处于离线状态。The service platform can query the online information or offline information to know whether the terminal is online or offline.
步骤207,接收第一终端发送的应用调用请求;Step 207: Receive an application call request sent by the first terminal.
其中,所述应用调用请求可以包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;The application call request may include a target terminal identifier selected from the one or more terminal identifiers, a target application identifier selected from one or more application identifiers associated with the target terminal identifier, and message content.
在本申请实施例中,服务平台与第一终端的通信可以包括应用调用请求 的通信,即第一终端可以通过第一长连接发送应用调用请求,服务平台可以通过第一长连接接收应用调用请求。In this embodiment of the present application, the communication between the service platform and the first terminal may include an application call request. The communication, that is, the first terminal can send an application call request through the first long connection, and the service platform can receive the application call request through the first long connection.
在具体实现中,第一终端接收到一个或多个终端标识、及各个终端标识关联的一个或多个应用标识后,可以在UI(User Interface,用户界面)进行显示,用户可以从该一个或多个终端标识中选取目标终端标识,从该目标终端标识关联的一个或多个应用标识中选取目标应用标识。In a specific implementation, after the first terminal receives one or more terminal identifiers and one or more application identifiers associated with each terminal identifier, the first terminal may display the UI (User Interface), and the user may The target terminal identifier is selected from the plurality of terminal identifiers, and the target application identifier is selected from one or more application identifiers associated with the target terminal identifier.
当然,除了用户选取目标终端标识及目标应用标识之外,第一终端还可以采用其他方式选取目标终端标识及目标应用标识,本申请实施例对此不加以限制。Of course, in addition to the user selecting the target terminal identifier and the target application identifier, the first terminal may also select the target terminal identifier and the target application identifier in other manners, which is not limited in this embodiment.
例如,可以预先设置终端及应用的适配关系,表示哪些终端的哪些应用之间可以处理相同的内容,即某个终端的某个应用可以支持处理其他终端的其他应用的内容,其示例如下表所示:For example, the adaptation relationship between the terminal and the application may be preset to indicate which applications of which terminals can process the same content, that is, an application of a certain terminal can support the content of other applications of other terminals, and an example thereof is as follows: Shown as follows:
终端标识Terminal identification 应用标识Application identifier 终端标识Terminal identification 应用标识Application identifier
手机Mobile phone 视频应用AVideo application A 电视TV 视频播放器BVideo player B
上表可以表示在手机中的视频应用A与在电视中的视频播放器B可以处理相同的内容,即电视中的视频播放器B可以支持播放手机中的视频应用A中的视频。The above table may indicate that the video application A in the mobile phone and the video player B in the television can process the same content, that is, the video player B in the television can support playing the video in the video application A in the mobile phone.
第一终端可以在该适配关系中查找与第一终端的终端标识及当前应用的应用标识适配的终端标识及应用标识,作为目标终端标识及目标应用标识。The first terminal may search for the terminal identifier and the application identifier that are matched with the terminal identifier of the first terminal and the application identifier of the current application in the adaptation relationship, as the target terminal identifier and the target application identifier.
此外,消息内容可以基于第一终端中的应用的处理对象生成,即第一终端和第二终端可以同步处理相同的处理对象。Furthermore, the message content can be generated based on the processing object of the application in the first terminal, ie the first terminal and the second terminal can process the same processing object synchronously.
在本申请实施例的一种优选示例中,所述处理对象至少可以包括以下的一种或多种:In a preferred example of the embodiment of the present application, the processing object may include at least one or more of the following:
视频、音频、图像、文本、文档;Video, audio, images, text, documents;
在本申请实施例中,针对文本等数据量较少的处理对象,可以直接将该处理对象作为消息内容;In the embodiment of the present application, for a processing object with a small amount of data such as text, the processing object may be directly used as a message content;
针对图像、文档、视频、音频等数据量较大的处理对象,为减少流量消耗及加快响应速度,可以将处理对象的处理对象标识作为消息内容,第二终端可以依据处理对象标识获取相应的处理对象。 For processing objects with large data volume such as images, documents, videos, and audio, in order to reduce the traffic consumption and speed up the response, the processing object identifier of the processing object may be used as the message content, and the second terminal may obtain the corresponding processing according to the processing object identifier. Object.
其中,处理对象标识可以是能够代表一个唯一确定的终端的信息,例如,处理对象ID,处理对象名称等等。The processing object identifier may be information capable of representing a uniquely determined terminal, for example, a processing object ID, a processing object name, and the like.
对于文档、视频、音频等处理过程较长的处理对象,则可以对其标识处理状态,以表示第一终端中的应用处理该处理对象时所处的状态。For a processing object with a long processing process such as document, video, audio, etc., the processing state can be identified to indicate the state in which the application in the first terminal processes the processing object.
例如,当处理对象为视频或音频时,该处理状态可以包括播放时间信息;For example, when the processing object is video or audio, the processing status may include playing time information;
又例如,当处理对象为文档时,该处理状态可以包括当前的页数。For another example, when the processing object is a document, the processing status may include the current number of pages.
当然,上述消息内容及生成方式只是作为示例,在实施本申请实施例时,可以根据实际情况设置其他消息内容及生成方式,例如,直接将数据流较大的处理对象作为消息内容,等等,本申请实施例对此不加以限制。另外,除了上述消息内容及生成方式外,本领域技术人员还可以根据实际需要采用其它消息内容及生成方式,本申请实施例对此也不加以限制。Certainly, the content of the message and the manner of generating the foregoing are only examples. When the embodiment of the present application is implemented, other message content and a generating manner may be set according to actual conditions, for example, directly processing a processing object with a large data stream as a message content, and the like. This embodiment of the present application does not limit this. In addition, the content of the message and the manner of generating the message may be used by those skilled in the art in addition to the content of the message and the manner of the foregoing, and the embodiment of the present application does not limit this.
需要说明的是,在应用调用请求中除了目标终端标识、目标应用标识及消息内容之外,还可以写入其他信息,以用于其他用途,本申请实施例对此不加以限制。It should be noted that, in addition to the target terminal identifier, the target application identifier, and the message content, other information may be written in the application call request for other purposes, which is not limited in this embodiment of the present application.
例如,可以在应用调用请求中写入第一终端的终端标识及当前处理的应用的应用标识,以用于统计终端及应用发起调用的频率。For example, the terminal identifier of the first terminal and the application identifier of the currently processed application may be written in the application call request for counting the frequency at which the terminal and the application initiate the call.
步骤208,将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。Step 208: Send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
在本申请实施例中,服务平台与第二终端的通信可以包括应用调用请求的通信,即服务平台可以通过第二长连接发送应用调用请求,第二终端可以通过第二长连接接收应用调用请求。In this embodiment, the communication between the service platform and the second terminal may include the communication of the application call request, that is, the service platform may send the application call request through the second long connection, and the second terminal may receive the application call request through the second long connection. .
需要说明的是,服务平台可以不对应用调用请求不进行任何处理,直接透传给第二终端。It should be noted that the service platform may directly transmit the request to the second terminal without performing any processing on the application call request.
在第二终端中,可以由SDK封装统一的接口,提供给应用,SDK通过和服务平台定义相应的协议,完成调用目标应用标识对应的应用处理消息内容。In the second terminal, the unified interface of the SDK may be encapsulated and provided to the application, and the SDK defines a corresponding protocol by the service platform to complete the application processing message content corresponding to the target application identifier.
具体而言,SDK可以将应用调用请求中解析出目标应用标识,如果识别出目标应用标识对应的应用,则SDK可以将应用调用请求分发给该应用进行 处理,该应用可以会解析消息内容进行相应的处理。Specifically, the SDK may parse the target application identifier in the application call request, and if the application corresponding to the target application identifier is identified, the SDK may distribute the application call request to the application. Processing, the application can parse the message content for corresponding processing.
在本申请的一种优选实施例中,步骤208可以包括如下子步骤:In a preferred embodiment of the present application, step 208 can include the following sub-steps:
子步骤S21,在第一服务器中查询本地是否具有与所述目标终端标识对应的第二终端进行通信的第二长连接;若是,则执行子步骤S22,若否,则执行子步骤S23;Sub-step S21, in the first server, query whether the local second communication has a second long connection corresponding to the target terminal identifier; if yes, perform sub-step S22, and if not, perform sub-step S23;
子步骤S22,通过所述第二长连接将所述应用调用请求发送至所述第二终端;Sub-step S22, sending the application call request to the second terminal by using the second long connection;
子步骤S23,将所述应用调用请求写入预设的消息队列;Sub-step S23, writing the application call request to a preset message queue;
子步骤S24,在第二服务器中将所述消息队列中的所述应用调用请求转发至具有所述第二长连接的第三服务器;Sub-step S24, forwarding, in the second server, the application call request in the message queue to a third server having the second long connection;
子步骤S25,在第三服务器中通过所述第二长连接将所述应用调用请求发送至所述第二终端。Sub-step S25, the application call request is sent to the second terminal by the second long connection in the third server.
在本申请实施例中,服务平台具有消息路由服务,该消息路由服务可以由独立的服务器或者服务器集群提供。In the embodiment of the present application, the service platform has a message routing service, and the message routing service may be provided by an independent server or a server cluster.
该消息路由服务可以用于跨网络的设备间消息的路由,一般不直接面向用户和终端,该消息路由服务通过建立长连接的服务器进行消息的生产,再由消息路由服务进行消费,最后将该消息分发到目标终端所在的长连接的服务器,通过可用的长连接下发到目标终端。The message routing service can be used for routing messages between devices across a network, and is generally not directly directed to users and terminals. The message routing service performs message production by establishing a long-connected server, and then is consumed by the message routing service. The message is distributed to the long-connected server where the target terminal is located, and is delivered to the target terminal through the available long connection.
由于服务平台可能同时支持千万级甚至上亿级的终端在线,每台服务器大概能够管理百万级终端的长连接,同一个用户的不同终端由于网络类型等的不同,有可能会被分配到不同的服务器建立长连接。Since the service platform may support 10 million or even hundreds of millions of terminals online at the same time, each server can manage long connections of millions of terminals. Different terminals of the same user may be assigned due to different network types and the like. Different servers establish long connections.
当第一终端的应用预期把应用调用请求推送到第二终端的应用,可以先将应用调用请求通过第一长连接发送到第一服务器,第一服务器发现第二终端的第二长连接不在本地维护时,可以将应用调用请求写入消息队列。When the application of the first terminal is expected to push the application call request to the application of the second terminal, the application call request may be first sent to the first server through the first long connection, and the first server finds that the second long connection of the second terminal is not local. Application calls can be written to the message queue during maintenance.
提供消息路由服务的第二服务器负责监听消息队列,当监听到新的消息(即应用调用请求)进入消息队列时,第二服务器会消费该消息(即应用调用请求),并通过解析该消息(即应用调用请求)找到具有第二长连接的第三服务器,第二服务器通过和第三服务器建立的连接将消息(即应用调用请求)发送给第三服务器。 The second server providing the message routing service is responsible for listening to the message queue. When a new message (ie, an application call request) is intercepted into the message queue, the second server consumes the message (ie, the application call request) and parses the message ( That is, the application call request finds a third server having a second long connection, and the second server transmits a message (ie, an application call request) to the third server through a connection established with the third server.
第三服务器通过第二长连接将应用调用请求发送给第二终端。The third server sends an application call request to the second terminal through the second long connection.
其中,消息队列可以为公共的队列,即服务平台中的服务器可以进行访问,将消息(即应用调用请求)写入该队列,提供消息路由服务的服务器可以消费该消息队列中的消息(即应用调用请求),其可以为任一服务器的存储空间(如内存),本申请实施例对此不加以限制。The message queue can be a public queue, that is, the server in the service platform can access, write a message (ie, an application call request) to the queue, and the server that provides the message routing service can consume the message in the message queue (ie, the application) The request may be), which may be a storage space (such as a memory) of any server, which is not limited in this embodiment of the present application.
此外,若第二终端在注册时,采用其终端标识按照预设的分配方式计算与第二终端建立第二长连接的服务器,则提供消息路由服务的第二服务器可以采用消息(即应用调用请求)中的终端标识按照该分配方式计算建立第二长连接的服务器(即第三服务器)。In addition, if the second terminal is registered, the second server that provides the second long connection with the second terminal is calculated by using the terminal identifier according to the preset allocation manner, and the second server that provides the message routing service may adopt the message (ie, the application call request) The terminal identifier in the system calculates the server (ie, the third server) that establishes the second long connection according to the allocation manner.
在本申请的一种优选实施例中,所述第二终端可以通过以下方式处理消息内容:In a preferred embodiment of the present application, the second terminal may process the message content in the following manner:
子步骤S31,当所述消息内容包括处理对象时,调用所述目标应用标识对应的应用处理所述处理对象;Sub-step S31, when the message content includes a processing object, calling an application corresponding to the target application identifier to process the processing object;
在本申请实施例中,若消息内容中包括处理对象,则可以直接调用相应的应用处理该处理对象。In the embodiment of the present application, if the processing object is included in the message content, the corresponding application may be directly invoked to process the processing object.
例如,该处理对象为短信(文本),第二终端可以调用文本编辑器(应用)显示该短息。For example, the processing object is a short message (text), and the second terminal can call a text editor (application) to display the short message.
或者,or,
子步骤S32,当所述消息内容包括处理对象标识时,向指定的内容服务器请求所述处理对象标识对应的处理对象;Sub-step S32, when the message content includes the processing object identifier, requesting, by the specified content server, the processing object corresponding to the processing object identifier;
子步骤S33,调用所述目标应用标识对应的应用处理所述处理对象;Sub-step S33, the application corresponding to the target application identifier is invoked to process the processing object;
在本申请实施例中,若消息内容中包括处理对象标识,则可以向内容服务器请求相应的处理对象后,调用相应的应用处理该处理对象。In the embodiment of the present application, if the processing object identifier is included in the message content, the corresponding processing object may be requested by the content server, and the corresponding application is invoked to process the processing object.
需要说明的是,该处理对象可以预先存储在内容服务器中,该内容服务器不一定为服务平台中的服务器。It should be noted that the processing object may be pre-stored in a content server, which is not necessarily a server in the service platform.
该处理对象可以是当前用户上传的,也可以是其他用户上传,还可以是内容服务器本身存储的,本申请实施例对此不加以限制。The processing object may be uploaded by the current user, or may be uploaded by another user, or may be stored by the content server itself, which is not limited in this embodiment of the present application.
例如,该处理对象为图像,由当前用户上传至内容服务器,第二终端可以向内容服务器请求该图像之后,调用图像显示器(应用)显示该图像。 For example, the processing object is an image, which is uploaded by the current user to the content server, and the second terminal can call the image display (application) to display the image after requesting the image from the content server.
或者,or,
子步骤S34,当所述消息内容包括处理对象标识和处理状态时,向预置的内容服务器请求所述处理对象标识对应的、处于所述处理状态的处理对象;Sub-step S34, when the message content includes the processing object identifier and the processing state, requesting, by the preset content server, the processing object corresponding to the processing object identifier and in the processing state;
子步骤S35,调用所述目标应用标识对应的应用处理处于所述处理状态的处理对象。Sub-step S35, invoking an application corresponding to the target application identifier to process a processing object in the processing state.
在本申请实施例中,若消息内容中包括处理对象标识即处理状态,则可以向内容服务器请求处于该处理状态的处理对象后,调用相应的应用处理该处理对象。In the embodiment of the present application, if the processing object includes the processing state, that is, the processing state, the processing object that is in the processing state may be requested from the content server, and the corresponding application is invoked to process the processing object.
例如,该处理对象为视频,内容服务器本身存储有该视频,第一终端的应用播放该视频至时间X(处理状态),则第二终端可以向内容服务器请求处于时间X的视频之后,调用视频播放器(应用)播放处于时间X的视频。For example, the processing object is a video, the content server itself stores the video, and the application of the first terminal plays the video to the time X (processing state), and the second terminal may request the video server after the video of the time X to call the video. The player (app) plays the video at time X.
需要说明的是,若该处理对象为电视剧等视频,则第二终端可以根据当前视频的处理对象标识自动向内容服务器请求下一集的视频进行播放。It should be noted that, if the processing object is a video such as a TV series, the second terminal may automatically request the content of the next episode to be played by the content server according to the processing object identifier of the current video.
当然,上述处理方式只是作为示例,在实施本申请实施例时,可以根据实际情况设置其他处理方式,例如,第二终端与第一终端直接建立连接请求相应的处理对象,再调用相应的应用进行处理,等等,本申请实施例对此不加以限制。另外,除了上述处理方式外,本领域技术人员还可以根据实际需要采用其它处理方式,本申请实施例对此也不加以限制。Of course, the foregoing processing manner is only an example. When the embodiment of the present application is implemented, other processing manners may be set according to actual conditions. For example, the second terminal directly establishes a connection request corresponding to the first terminal, and then invokes the corresponding application. The processing, and the like, the embodiment of the present application does not limit this. In addition, in addition to the foregoing processing manners, other processing methods may be used by those skilled in the art according to actual needs, and the embodiments of the present application do not limit this.
在本申请实施例中,采用SDK封装统一的接口,可以让同一终端上所有需要接收、推送消息的应用共享推送平台的服务,SDK对应用实现了注册、建立长连接、发消息、反注册等接口,应用集成了SDK,则可以使用这些功能,具体实现都是由SDK完成,应用本身不需要关心具体实现,这样能让所有的实现由SDK与服务平台之间来定义协议完成,对于终端上的应用是透明的。In the embodiment of the present application, the SDK is used to encapsulate a unified interface, so that all applications that need to receive and push messages on the same terminal can share the service of the push platform, and the SDK implements registration, establishes a long connection, sends a message, and deregisters the application. Interface, application integration SDK, you can use these functions, the specific implementation is done by the SDK, the application itself does not need to care about the specific implementation, so that all implementations are defined by the SDK and the service platform to define the protocol, for the terminal The application is transparent.
传统的途径是,每个应用要使用这些服务,就需要自己实现一套这些功能,SDK便于降低应用使用推送平台的服务的开发成本,保证所有应用使用统一的接口,保证一套长连接通道,所有应用的通信都可以使用这个通道,大大提高了服务效率。 The traditional way is that each application needs to implement these functions by using these services. The SDK is convenient to reduce the development cost of the services using the push platform, ensuring that all applications use a unified interface to ensure a long connection channel. This channel can be used for all application communications, greatly improving service efficiency.
为使本领域技术人员更好地理解本申请实施例,以下通过几种应用场景的示例对本申请实施例作进一步说明:In order to enable a person skilled in the art to better understand the embodiments of the present application, the following embodiments of the present application are further described by way of examples of several application scenarios:
应用场景一:Application scenario 1:
用户在手机(第一终端)的视频应用上观看视频,在回到家后,可能去做打扫、煮饭等家务,但是用户想一边做家务,一边观看该视频。The user watches the video on the video application of the mobile phone (first terminal), and after returning home, may go to do housekeeping such as cleaning, cooking, etc., but the user wants to watch the video while doing housework.
此时,用户可以通过点击视频应用上指定的控件等方式,触发终端查询请求。At this point, the user can trigger the terminal to query the request by clicking on the control specified on the video application.
服务平台检测到该终端查询请求,则可以查找该用户绑定的,家里的电视、平板电脑、个人电脑、其他手机等终端及其绑定的应用。When the service platform detects the terminal query request, it can search for the terminal, such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
用户可以从该终端及应用中选取电视(目标终端标识)及其视频播放器(目标应用标识)。The user can select the TV (target terminal identifier) and its video player (target application identifier) from the terminal and the application.
手机可以按照用户的选择生成应用调用请求,进而向服务平台发送应用调用请求,该应用调用请求中包括视频名称及其集数(处理对象标识)、播放时间(处理状态)。The mobile phone may generate an application call request according to the user's selection, and then send an application call request to the service platform, where the application call request includes the video name and its set number (processing object identifier) and play time (processing status).
服务平台可以通过消息路由服务将该应用调用请求转发至该电视(第二终端)。The service platform can forward the application call request to the television (second terminal) through a message routing service.
电视向视频网站(内容服务器)请求处于该播放时间的、该视频名称及其集数对应视频,调用视频播放器进行播放。The television requests the video website (content server) to be the video corresponding to the video name and its set number at the playing time, and calls the video player to play.
由于电视的响应范围比手机广,用户可以在一边做家务的同时,一边继续观看该视频,大大提高了视频播放的灵活性,提高了用户体验,并减少了在做家务时用手机观看视频所潜在的对手机造成的损伤。Since the response range of the TV is wider than that of the mobile phone, the user can continue to watch the video while doing housework, greatly improving the flexibility of the video playing, improving the user experience, and reducing the video viewing on the mobile phone while doing housework. Potential damage to the phone.
应用场景二:Application scenario 2:
用户在手机(第一终端)的视频应用上观看视频时,调用电视(第二终端)的视频播放器继续播放该视频。When the user watches the video on the video application of the mobile phone (first terminal), the video player calling the television (second terminal) continues to play the video.
若此时手机接收到了短信,则手机可以自动触发终端查询请求。If the mobile phone receives the short message at this time, the mobile phone can automatically trigger the terminal to query the request.
服务平台检测到该终端查询请求,则可以查找该用户绑定的,家里的电视、平板电脑、个人电脑、其他手机等终端及其绑定的应用。When the service platform detects the terminal query request, it can search for the terminal, such as the home TV, tablet, personal computer, other mobile phone, and its bound application.
手机可以从该终端及应用中选取电视(目标终端标识)及其文本编辑器 (目标应用标识),并生成应用调用请求,进而向服务平台发送应用调用请求,该应用调用请求中包括短信(处理对象)。The mobile phone can select a television (target terminal identifier) and its text editor from the terminal and the application. (target application identifier), and generate an application call request, and then send an application call request to the service platform, where the application call request includes a short message (processing object).
服务平台可以通过消息路由服务将该应用调用请求转发至该电视(第二终端)。The service platform can forward the application call request to the television (second terminal) through a message routing service.
电视依据该调用文本编辑器显示该短信,进一步提高了手机与电视之间的同步操作。The television displays the text message according to the call text editor, which further improves the synchronization operation between the mobile phone and the television.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because In accordance with embodiments of the present application, certain steps may be performed in other sequences or concurrently. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required in the embodiments of the present application.
参照图3,示出了本申请的一种终端之间的通信装置实施例的结构框图,具体可以包括如下模块:Referring to FIG. 3, a structural block diagram of an embodiment of a communication device between terminals of the present application is shown, which may specifically include the following modules:
查询模块301,配置为在接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The querying module 301 is configured to: when receiving the terminal query request sent by the first terminal, return one or more terminal identifiers and one or more applications associated with each terminal identifier to the first terminal according to the terminal query request Identification
应用调用请求接收模块302,配置为接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;The application call request receiving module 302 is configured to receive an application call request sent by the first terminal; the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and one associated with the target terminal identifier Or target application identifier selected in multiple application identifiers, and message content;
应用调用请求发送模块303,配置为将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。The application call request sending module 303 is configured to send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke the application corresponding to the target application identifier to process the message content.
在本申请的一种优选实施例中,该装置还可以包括如下模块:In a preferred embodiment of the present application, the apparatus may further include the following modules:
注册请求接收模块,配置为接收注册请求;a registration request receiving module configured to receive a registration request;
终端注册模块,配置为在所述注册请求包括用户标识与终端标识时,建立所述用户标识与所述终端标识的关联关系; a terminal registration module, configured to establish an association relationship between the user identifier and the terminal identifier when the registration request includes a user identifier and a terminal identifier;
应用注册模块,配置为在所述注册请求包括终端标识与应用标识时,建立所述终端标识与所述应用标识的关联关系。The application registration module is configured to establish an association relationship between the terminal identifier and the application identifier when the registration request includes the terminal identifier and the application identifier.
在本申请的一种优选实施例中,该装置还可以包括如下模块:In a preferred embodiment of the present application, the apparatus may further include the following modules:
第一长连接建立模块,配置为与第一终端之间建立第一长连接;a first long connection establishing module, configured to establish a first long connection with the first terminal;
第二长连接建立模块,配置为与第二终端之间建立第二长连接;a second long connection establishing module, configured to establish a second long connection with the second terminal;
其中,所述第一长连接用于与所述第一终端进行通信,包括接收终端查询请求、应用调用请求、返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The first long connection is used for communicating with the first terminal, including receiving a terminal query request, an application call request, returning one or more terminal identifiers, and one or more application identifiers associated with each terminal identifier;
所述第二长连接用于与所述第二终端进行通信,包括发送应用调用请求。The second long connection is for communicating with the second terminal, including sending an application call request.
在本申请的一种优选实施例中,所述查询模块301可以包括如下模块:In a preferred embodiment of the present application, the query module 301 can include the following modules:
提取模块,配置为从所述终端查询请求中提取用户标识;An extraction module, configured to extract a user identifier from the terminal query request;
查找模块,配置为查找所述用户标识关联的一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;a search module, configured to search for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
返回模块,配置为将所述一个或多个终端标识、及各个终端标识关联的一个或多个应用标识返回所述第一终端。The returning module is configured to return the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
在本申请的一种优选实施例中,所述应用调用请求发送模块303可以包括如下模块:In a preferred embodiment of the present application, the application call request sending module 303 may include the following modules:
长连接查询模块,配置为在第一服务器中查询本地是否具有与所述目标终端标识对应的第二终端进行通信的第二长连接;若是,则调用第一发送模块;若否,则调用写队列模块;The long connection query module is configured to query, in the first server, whether the local second connection has communication with the second terminal corresponding to the target terminal identifier; if yes, the first sending module is invoked; if not, the call is written Queue module
第一发送模块,配置为通过所述第二长连接将所述应用调用请求发送至所述第二终端;a first sending module, configured to send the application call request to the second terminal by using the second long connection;
写队列模块,配置为将所述应用调用请求写入预设的消息队列;a write queue module configured to write the application call request to a preset message queue;
路由模块,配置为在第二服务器中将所述消息队列中的所述应用调用请求转发至具有所述第二长连接的第三服务器;a routing module, configured to forward the application call request in the message queue to a third server having the second long connection in a second server;
第二发送模块,配置为在第三服务器中通过所述第二长连接将所述应用调用请求发送至所述第二终端。The second sending module is configured to send the application call request to the second terminal by using the second long connection in the third server.
在本申请的一种优选实施例中,所述消息内容可以基于所述第一终端中的应用的处理对象生成; In a preferred embodiment of the present application, the message content may be generated based on a processing object of an application in the first terminal;
所述第二终端可以通过调用如下模块处理消息内容:The second terminal may process the message content by calling the following module:
第一处理模块,配置为在所述消息内容包括处理对象时,调用所述目标应用标识对应的应用处理所述处理对象;a first processing module, configured to: when the message content includes a processing object, invoke an application corresponding to the target application identifier to process the processing object;
或者,or,
第一请求模块,配置为在所述消息内容包括处理对象标识时,向指定的内容服务器请求所述处理对象标识对应的处理对象;The first requesting module is configured to: when the message content includes the processing object identifier, request the processing object corresponding to the processing object identifier from the specified content server;
第二处理模块,配置为调用所述目标应用标识对应的应用处理所述处理对象;a second processing module, configured to invoke an application corresponding to the target application identifier to process the processing object;
或者,or,
第二请求模块,配置为在所述消息内容包括处理对象标识和处理状态时,向预置的内容服务器请求所述处理对象标识对应的、处于所述处理状态的处理对象;a second requesting module, configured to: when the content of the message includes a processing object identifier and a processing status, request, by the preset content server, a processing object that is in the processing state corresponding to the processing object identifier;
第三处理模块,配置为调用所述目标应用标识对应的应用处理处于所述处理状态的处理对象。The third processing module is configured to invoke a processing object corresponding to the target application identifier to process the processing object in the processing state.
在本申请实施例的一种优选示例中,所述处理对象可以包括以下的一种或多种:In a preferred example of the embodiment of the present application, the processing object may include one or more of the following:
视频、音频、图像、文本、文档;Video, audio, images, text, documents;
其中,当所述处理对象为视频时,所述处理状态可以包括播放时间信息。Wherein, when the processing object is a video, the processing state may include playing time information.
在本申请的一种优选实施例中,所述第一终端中可以具有统一的接口,所述第一终端通过所述统一的接口进行注册、建立第一长连接;In a preferred embodiment of the present application, the first terminal may have a unified interface, and the first terminal registers by using the unified interface to establish a first long connection.
所述第二终端中具有统一的接口,所述第二终端可以通过所述统一的接口进行注册、建立第二长连接、调用所述目标应用标识对应的应用处理所述消息内容。The second terminal has a unified interface, and the second terminal can register by using the unified interface, establish a second long connection, and invoke an application corresponding to the target application identifier to process the message content.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本申请还提供了一种在其上记录有用于执行上述方法的程序的计算机可读记录介质。The present application also provides a computer readable recording medium on which a program for executing the above method is recorded.
所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式 存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等。The computer readable recording medium includes a form readable by a computer (eg, a computer) Any mechanism for storing or transmitting information. For example, a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , infrared signals, digital signals, etc.).
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments can be referred to each other.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present application. range.

Claims (17)

  1. 一种终端之间的通信方法,其特征在于,包括:A communication method between terminals, comprising:
    当接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;When receiving the terminal query request sent by the first terminal, returning one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request;
    接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;Receiving an application call request sent by the first terminal; the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and a target selected from one or more application identifiers associated with the target terminal identifier Application identification, and message content;
    将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。And sending the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to invoke an application corresponding to the target application identifier to process the message content.
  2. 根据权利要求1所述的方法,其特征在于,在所述依据所述终端查询请求查找一个或多个终端标识、及各个终端标识关联的一个或多个应用标识的步骤之前,所述方法还包括:The method according to claim 1, wherein before the step of searching for one or more terminal identifiers and one or more application identifiers associated with each terminal identifier according to the terminal query request, the method further include:
    接收注册请求;Receiving a registration request;
    当所述注册请求包括用户标识与终端标识时,建立所述用户标识与所述终端标识的关联关系;When the registration request includes the user identifier and the terminal identifier, establishing an association relationship between the user identifier and the terminal identifier;
    当所述注册请求包括终端标识与应用标识时,建立所述终端标识与所述应用标识的关联关系。When the registration request includes the terminal identifier and the application identifier, establishing an association relationship between the terminal identifier and the application identifier.
  3. 根据权利要求1所述的方法,其特征在于,在所述依据所述终端查询请求查找一个或多个终端标识、及各个终端标识关联的一个或多个应用标识的步骤之前,所述方法还包括:The method according to claim 1, wherein before the step of searching for one or more terminal identifiers and one or more application identifiers associated with each terminal identifier according to the terminal query request, the method further include:
    与第一终端之间建立第一长连接;Establishing a first long connection with the first terminal;
    与第二终端之间建立第二长连接;Establishing a second long connection with the second terminal;
    其中,所述第一长连接用于与所述第一终端进行通信,包括接收终端查询请求、应用调用请求、返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The first long connection is used for communicating with the first terminal, including receiving a terminal query request, an application call request, returning one or more terminal identifiers, and one or more application identifiers associated with each terminal identifier;
    所述第二长连接用于与所述第二终端进行通信,包括发送应用调用请求。The second long connection is for communicating with the second terminal, including sending an application call request.
  4. 根据权利要求1或2或3所述的方法,其特征在于,所述依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识的步骤包括: The method according to claim 1 or 2 or 3, wherein the returning one or more terminal identifiers and one or more applications associated with each terminal identifier to the first terminal according to the terminal query request The steps of identification include:
    从所述终端查询请求中提取用户标识;Extracting a user identifier from the terminal query request;
    查找所述用户标识关联的一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;Searching for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
    将所述一个或多个终端标识、及各个终端标识关联的一个或多个应用标识返回所述第一终端。Returning the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
  5. 根据权利要求1或2或3所述的方法,其特征在于,所述将所述应用调用请求发送至所述目标终端标识对应的第二终端的步骤包括:The method according to claim 1 or 2 or 3, wherein the step of sending the application call request to the second terminal corresponding to the target terminal identifier comprises:
    在第一服务器中查询本地是否具有与所述目标终端标识对应的第二终端进行通信的第二长连接;Querying, in the first server, whether the local second communication has a second terminal that communicates with the second terminal corresponding to the target terminal identifier;
    若本地具有与所述目标终端标识对应的第二终端进行通信的第二长连接,则通过所述第二长连接将所述应用调用请求发送至所述第二终端;If the second long connection that the second terminal corresponding to the target terminal identifier communicates locally, the application call request is sent to the second terminal by using the second long connection;
    若本地没有与所述目标终端标识对应的第二终端进行通信的第二长连接,则将所述应用调用请求写入预设的消息队列;If there is no second long connection in which the second terminal corresponding to the target terminal identifier communicates locally, the application call request is written into a preset message queue;
    在第二服务器中将所述消息队列中的所述应用调用请求转发至具有所述第二长连接的第三服务器;Forwarding, in the second server, the application call request in the message queue to a third server having the second long connection;
    在第三服务器中通过所述第二长连接将所述应用调用请求发送至所述第二终端。The application call request is sent to the second terminal by the second long connection in a third server.
  6. 根据权利要求1或2或3所述的方法,其特征在于,所述消息内容基于所述第一终端中的应用的处理对象生成;The method according to claim 1 or 2 or 3, wherein the message content is generated based on a processing object of an application in the first terminal;
    所述第二终端通过以下方式处理消息内容:The second terminal processes the message content in the following manner:
    当所述消息内容包括处理对象时,调用所述目标应用标识对应的应用处理所述处理对象;When the content of the message includes a processing object, calling an application corresponding to the target application identifier to process the processing object;
    或者,or,
    当所述消息内容包括处理对象标识时,向指定的内容服务器请求所述处理对象标识对应的处理对象;When the content of the message includes a processing object identifier, requesting, by the specified content server, a processing object corresponding to the processing object identifier;
    调用所述目标应用标识对应的应用处理所述处理对象;Invoking an application corresponding to the target application identifier to process the processing object;
    或者,or,
    当所述消息内容包括处理对象标识和处理状态时,向预置的内容服务器请求所述处理对象标识对应的、处于所述处理状态的处理对象;When the message content includes the processing object identifier and the processing state, requesting, by the preset content server, the processing object corresponding to the processing object identifier and in the processing state;
    调用所述目标应用标识对应的应用处理处于所述处理状态的处理对象。 The application corresponding to the target application identifier is called to process the processing object in the processing state.
  7. 根据权利要求6所述的方法,其特征在于,所述处理对象包括以下的一种或多种:The method according to claim 6, wherein the processing object comprises one or more of the following:
    视频、音频、图像、文本、文档;Video, audio, images, text, documents;
    其中,当所述处理对象为视频时,所述处理状态包括播放时间信息。Wherein, when the processing object is a video, the processing state includes playing time information.
  8. 根据权利要求1或2或3或7所述的方法,其特征在于,所述第一终端中具有统一的接口,所述第一终端通过所述统一的接口进行注册、建立第一长连接;The method according to claim 1 or 2 or 3 or 7, wherein the first terminal has a unified interface, and the first terminal registers with the unified interface to establish a first long connection;
    所述第二终端中具有统一的接口,所述第二终端通过所述统一的接口进行注册、建立第二长连接、调用所述目标应用标识对应的应用处理所述消息内容。The second terminal has a unified interface, and the second terminal performs registration by using the unified interface, establishes a second long connection, and invokes an application corresponding to the target application identifier to process the message content.
  9. 一种终端之间的通信装置,其特征在于,包括:A communication device between terminals, comprising:
    查询模块,配置为在接收到第一终端发送的终端查询请求时,依据所述终端查询请求向所述第一终端返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The querying module is configured to: when receiving the terminal query request sent by the first terminal, return one or more terminal identifiers and one or more application identifiers associated with each terminal identifier to the first terminal according to the terminal query request ;
    应用调用请求接收模块,配置为接收第一终端发送的应用调用请求;所述应用调用请求包括从所述一个或多个终端标识中选取的目标终端标识、从所述目标终端标识关联的一个或多个应用标识中选取的目标应用标识、及消息内容;The application call request receiving module is configured to receive an application call request sent by the first terminal; the application call request includes a target terminal identifier selected from the one or more terminal identifiers, and one associated with the target terminal identifier Target application identifier selected from multiple application identifiers, and message content;
    应用调用请求发送模块,配置为将所述应用调用请求发送至所述目标终端标识对应的第二终端,以驱动所述第二终端调用所述目标应用标识对应的应用处理所述消息内容。The application call request sending module is configured to send the application call request to the second terminal corresponding to the target terminal identifier, to drive the second terminal to call the application corresponding to the target application identifier to process the message content.
  10. 根据权利要求9所述的装置,其特征在于,还包括:The device according to claim 9, further comprising:
    注册请求接收模块,配置为接收注册请求;a registration request receiving module configured to receive a registration request;
    终端注册模块,配置为在所述注册请求包括用户标识与终端标识时,建立所述用户标识与所述终端标识的关联关系;a terminal registration module, configured to establish an association relationship between the user identifier and the terminal identifier when the registration request includes a user identifier and a terminal identifier;
    应用注册模块,配置为在所述注册请求包括终端标识与应用标识时,建立所述终端标识与所述应用标识的关联关系。The application registration module is configured to establish an association relationship between the terminal identifier and the application identifier when the registration request includes the terminal identifier and the application identifier.
  11. 根据权利要求9所述的装置,其特征在于,还包括:The device according to claim 9, further comprising:
    第一长连接建立模块,配置为与第一终端之间建立第一长连接; a first long connection establishing module, configured to establish a first long connection with the first terminal;
    第二长连接建立模块,配置为与第二终端之间建立第二长连接;a second long connection establishing module, configured to establish a second long connection with the second terminal;
    其中,所述第一长连接用于与所述第一终端进行通信,包括接收终端查询请求、应用调用请求、返回一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;The first long connection is used for communicating with the first terminal, including receiving a terminal query request, an application call request, returning one or more terminal identifiers, and one or more application identifiers associated with each terminal identifier;
    所述第二长连接用于与所述第二终端进行通信,包括发送应用调用请求。The second long connection is for communicating with the second terminal, including sending an application call request.
  12. 根据权利要求9或10或11所述的装置,其特征在于,所述查询模块包括:The device according to claim 9 or 10 or 11, wherein the query module comprises:
    提取模块,配置为从所述终端查询请求中提取用户标识;An extraction module, configured to extract a user identifier from the terminal query request;
    查找模块,配置为查找所述用户标识关联的一个或多个终端标识、及各个终端标识关联的一个或多个应用标识;a search module, configured to search for one or more terminal identifiers associated with the user identifier, and one or more application identifiers associated with each terminal identifier;
    返回模块,配置为将所述一个或多个终端标识、及各个终端标识关联的一个或多个应用标识返回所述第一终端。The returning module is configured to return the one or more terminal identifiers and one or more application identifiers associated with the respective terminal identifiers to the first terminal.
  13. 根据权利要求9或10或11所述的装置,其特征在于,所述应用调用请求发送模块包括:The device according to claim 9 or 10 or 11, wherein the application call request sending module comprises:
    长连接查询模块,配置为在第一服务器中查询本地是否具有与所述目标终端标识对应的第二终端进行通信的第二长连接;若是,则调用第一发送模块;若否,则调用写队列模块;The long connection query module is configured to query, in the first server, whether the local second connection has communication with the second terminal corresponding to the target terminal identifier; if yes, the first sending module is invoked; if not, the call is written Queue module
    第一发送模块,配置为通过所述第二长连接将所述应用调用请求发送至所述第二终端;a first sending module, configured to send the application call request to the second terminal by using the second long connection;
    写队列模块,配置为将所述应用调用请求写入预设的消息队列;a write queue module configured to write the application call request to a preset message queue;
    路由模块,配置为在第二服务器中将所述消息队列中的所述应用调用请求转发至具有所述第二长连接的第三服务器;a routing module, configured to forward the application call request in the message queue to a third server having the second long connection in a second server;
    第二发送模块,配置为在第三服务器中通过所述第二长连接将所述应用调用请求发送至所述第二终端。The second sending module is configured to send the application call request to the second terminal by using the second long connection in the third server.
  14. 根据权利要求9或10或11所述的装置,其特征在于,所述消息内容基于所述第一终端中的应用的处理对象生成;The apparatus according to claim 9 or 10 or 11, wherein the message content is generated based on a processing object of an application in the first terminal;
    所述第二终端通过调用如下模块处理消息内容:The second terminal processes the message content by calling the following module:
    第一处理模块,配置为在所述消息内容包括处理对象时,调用所述目标应用标识对应的应用处理所述处理对象;a first processing module, configured to: when the message content includes a processing object, invoke an application corresponding to the target application identifier to process the processing object;
    或者, Or,
    第一请求模块,配置为在所述消息内容包括处理对象标识时,向指定的内容服务器请求所述处理对象标识对应的处理对象;The first requesting module is configured to: when the message content includes the processing object identifier, request the processing object corresponding to the processing object identifier from the specified content server;
    第二处理模块,配置为调用所述目标应用标识对应的应用处理所述处理对象;a second processing module, configured to invoke an application corresponding to the target application identifier to process the processing object;
    或者,or,
    第二请求模块,配置为在所述消息内容包括处理对象标识和处理状态时,向预置的内容服务器请求所述处理对象标识对应的、处于所述处理状态的处理对象;a second requesting module, configured to: when the content of the message includes a processing object identifier and a processing status, request, by the preset content server, a processing object that is in the processing state corresponding to the processing object identifier;
    第三处理模块,配置为调用所述目标应用标识对应的应用处理处于所述处理状态的处理对象。The third processing module is configured to invoke a processing object corresponding to the target application identifier to process the processing object in the processing state.
  15. 根据权利要求14所述的装置,其特征在于,所述处理对象包括以下的一种或多种:The apparatus according to claim 14, wherein said processing object comprises one or more of the following:
    视频、音频、图像、文本、文档;Video, audio, images, text, documents;
    其中,当所述处理对象为视频时,所述处理状态包括播放时间信息。Wherein, when the processing object is a video, the processing state includes playing time information.
  16. 根据权利要求9或10或11或15所述的装置,其特征在于,所述第一终端中具有统一的接口,所述第一终端通过所述统一的接口进行注册、建立第一长连接;The device according to claim 9 or 10 or 11 or 15, wherein the first terminal has a unified interface, and the first terminal registers with the unified interface to establish a first long connection;
    所述第二终端中具有统一的接口,所述第二终端通过所述统一的接口进行注册、建立第二长连接、调用所述目标应用标识对应的应用处理所述消息内容。The second terminal has a unified interface, and the second terminal performs registration by using the unified interface, establishes a second long connection, and invokes an application corresponding to the target application identifier to process the message content.
  17. 一种记录有用于执行权利要求1所述方法的程序的计算机可读记录介质。 A computer readable recording medium recorded with a program for executing the method of claim 1.
PCT/CN2016/078803 2015-04-13 2016-04-08 Communication method and device between terminal WO2016165584A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510174136.9A CN105743958A (en) 2015-04-13 2015-04-13 Terminal-to-terminal communication method and device
CN201510174136.9 2015-04-13

Publications (1)

Publication Number Publication Date
WO2016165584A1 true WO2016165584A1 (en) 2016-10-20

Family

ID=56295899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078803 WO2016165584A1 (en) 2015-04-13 2016-04-08 Communication method and device between terminal

Country Status (2)

Country Link
CN (1) CN105743958A (en)
WO (1) WO2016165584A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786963A (en) * 2020-06-12 2020-10-16 青岛海尔科技有限公司 Method and device for realizing communication process, storage medium and electronic device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR112019003128A2 (en) * 2016-09-15 2019-05-21 Nuts Holdings, Llc transit and storage of encrypted user data
CN107395686B (en) * 2017-06-28 2018-06-05 甘棠软件***(上海)有限公司 The method, apparatus and system of the long connection of switching
CN107172211A (en) * 2017-07-07 2017-09-15 北京奇艺世纪科技有限公司 Communication connection request method for building up and server
CN108391242B (en) * 2018-02-26 2021-10-19 青岛海信移动通信技术股份有限公司 Remote control method and remote control device
CN108933838B (en) * 2018-08-08 2022-07-29 网易(杭州)网络有限公司 Application data processing method and device
CN109672738A (en) * 2018-12-24 2019-04-23 成都四方伟业软件股份有限公司 A kind of method and system based on multi-screen interactive cross-terminal service
CN111740887B (en) * 2020-06-22 2022-09-23 广州三星通信技术研究有限公司 Method and device for distributing unfinished tasks of electronic terminal
CN113590248A (en) * 2021-07-22 2021-11-02 上汽通用五菱汽车股份有限公司 Screen projection method and device of vehicle-mounted terminal and readable storage medium
CN114501449B (en) * 2022-01-28 2024-02-09 Oppo广东移动通信有限公司 Information query method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034159A1 (en) * 2002-12-20 2005-02-10 Texas Instruments Incorporated Implementing a hybrid wireless and coaxial cable network
CN101594594A (en) * 2009-06-30 2009-12-02 中兴通讯股份有限公司 A kind of LAN system and its implementation that realizes streaming media switch between peer device
CN101668182A (en) * 2009-10-20 2010-03-10 中国电信股份有限公司 Method and system for realizing displacement of video program among multiple types of terminals
CN104468494A (en) * 2013-09-25 2015-03-25 华为终端有限公司 Method and device for switching media playing device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437050A (en) * 2008-11-27 2009-05-20 四川长虹电器股份有限公司 Player remote control system and player remote control method
CN101729553B (en) * 2009-11-19 2013-03-27 中兴通讯股份有限公司 Method for realizing terminal remote control, terminal server, control terminal and controlled terminal
CN104424244B (en) * 2013-08-27 2019-09-27 卓易畅想(北京)科技有限公司 A kind of method, apparatus and equipment obtaining search result
CN103491179B (en) * 2013-09-27 2017-01-18 百视通网络电视技术发展有限责任公司 Multi-screen interaction method and system based on Web
CN103617285A (en) * 2013-12-11 2014-03-05 百度在线网络技术(北京)有限公司 Method and device for displaying search result in mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034159A1 (en) * 2002-12-20 2005-02-10 Texas Instruments Incorporated Implementing a hybrid wireless and coaxial cable network
CN101594594A (en) * 2009-06-30 2009-12-02 中兴通讯股份有限公司 A kind of LAN system and its implementation that realizes streaming media switch between peer device
CN101668182A (en) * 2009-10-20 2010-03-10 中国电信股份有限公司 Method and system for realizing displacement of video program among multiple types of terminals
CN104468494A (en) * 2013-09-25 2015-03-25 华为终端有限公司 Method and device for switching media playing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786963A (en) * 2020-06-12 2020-10-16 青岛海尔科技有限公司 Method and device for realizing communication process, storage medium and electronic device

Also Published As

Publication number Publication date
CN105743958A (en) 2016-07-06

Similar Documents

Publication Publication Date Title
WO2016165584A1 (en) Communication method and device between terminal
EP2640099B1 (en) Method, system and apparatus for providing stream media service
CN105335112B (en) Multi-screen display information processing and main control end content sending method and device
WO2019090902A1 (en) Screen sharing method and apparatus, electronic device, and storage medium
CN104253814B (en) A kind of Streaming Media processing method, server and browser
US9065666B2 (en) System and method of multi-media conferencing between universal plug and play (UPnP) enabled telephony devices and wireless area network (WAN) devices
WO2019128682A1 (en) Convergent messaging system and message processing method
WO2016050080A1 (en) Multi-user video-watching real-time interaction method and system
WO2018090978A1 (en) Self-adaptive playing and control method, set top box and electronic programme server
WO2013177734A1 (en) Processing method, device and system for media resource playlist in local area network
US10412123B2 (en) Session initiation for multimedia services
CN109586929B (en) Conference content transmission method and device, electronic equipment and storage medium
US20200053419A1 (en) Enabling a Media Orchestration
US8908853B2 (en) Method and device for displaying information
EP2974159B1 (en) Method, device and system for voice communication
WO2016197955A1 (en) Multimedia stream multicasting method and device
US10708330B2 (en) Multimedia resource management method, cloud server and electronic apparatus
WO2015077983A1 (en) Device and method for playing media in home network
CN109413120B (en) Communication method and device, electronic equipment and server
JP5552171B2 (en) Live media stream time shift
US20190098351A1 (en) Method for managing the access right to an item of digital content
CN113918108A (en) Screen projection method and corresponding electronic equipment and system
KR20140034129A (en) SYSTEM AND METHOD FOR MANIPULATING MULTIMEDIA STREAMS OF ?c? TELECOMMUNICATIONS FOR MULTIPLE ?c?-ENABLED USER DEVICES
KR20140117977A (en) N-Screen Service System for ASMD support and the method thereof
WO2017096789A1 (en) Information sharing method and device

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

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

Country of ref document: EP

Kind code of ref document: A1