WO2018126853A1 - 数据传输方法及装置 - Google Patents

数据传输方法及装置 Download PDF

Info

Publication number
WO2018126853A1
WO2018126853A1 PCT/CN2017/115623 CN2017115623W WO2018126853A1 WO 2018126853 A1 WO2018126853 A1 WO 2018126853A1 CN 2017115623 W CN2017115623 W CN 2017115623W WO 2018126853 A1 WO2018126853 A1 WO 2018126853A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
target
information
target terminal
peer device
Prior art date
Application number
PCT/CN2017/115623
Other languages
English (en)
French (fr)
Inventor
梁宇轩
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to JP2019525772A priority Critical patent/JP2019536155A/ja
Priority to KR1020197022587A priority patent/KR102153645B1/ko
Publication of WO2018126853A1 publication Critical patent/WO2018126853A1/zh
Priority to US16/433,897 priority patent/US10805380B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • 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
    • 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
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles

Definitions

  • the embodiments of the present application relate to the field of communications technologies, and in particular, to a data transmission method and apparatus.
  • the smart phone acts as a control terminal, generates a control command and sends it to the server, and the server sends the control command to the smart TV.
  • the smart TV acts as a display terminal, responds to the control command, and displays a corresponding interface.
  • a plurality of devices are in one-way communication, for example, a smart phone sends a control command to a smart TV, and the smart TV cannot send information to the smart phone, that is, two-way communication cannot be realized.
  • the present invention provides a data transmission method and apparatus to overcome the problem that multiple devices in the prior art cannot achieve two-way communication.
  • the present invention provides the following technical solutions:
  • a data transmission method comprising:
  • the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate the target terminal device For the console or display;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response The information is used to indicate an operation performed by the corresponding control instruction, where the input information is information received by the target terminal for controlling the peer device;
  • a data transmission method is applied to a terminal device, and the data transmission method includes:
  • the identity token information is used to identify the identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate that the target terminal device is the control terminal. Or display side;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response
  • the information is used to indicate an operation performed in response to the corresponding control instruction
  • the input information is information received by the target terminal for controlling the peer device.
  • a data transmission device comprising:
  • a receiving module configured to receive identity token information sent by the target terminal device, where the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate
  • the target terminal device is a control terminal or a display terminal;
  • a first determining module configured to determine, according to a logical response file corresponding to each identity type stored in advance, a target logical response file corresponding to the identity type of the target terminal device;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response The information is used to indicate an operation performed by the corresponding control instruction, where the input information is information received by the target terminal for controlling the peer device;
  • a sending module configured to send the target logical response file to the target terminal device.
  • a data transmission device is applied to a terminal device, including:
  • a sending module configured to send identity token information to the server, where the identity token information is used to identify an identity type of the terminal device when interacting with the peer device, where the identity type is used to indicate the terminal device For the console or display;
  • a receiving module configured to receive, by the server, a target logical response file corresponding to an identity type of the terminal device
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the terminal device needs to send to the peer device, and response information. And an operation performed by the terminal device to control the peer device.
  • a server comprising: a memory, a transceiver, a processor, and a bus system;
  • the memory is used to store a program
  • the processor is configured to execute a program in the memory, including the following steps:
  • the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate the target terminal device For the console or display;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response The information is used to indicate an operation performed by the corresponding control instruction, where the input information is information received by the target terminal for controlling the peer device;
  • the bus system is configured to connect the memory and the processor to cause the memory and the processor to communicate.
  • a terminal device comprising: a memory, a transceiver, a processor, and a bus system;
  • the memory is used to store a program
  • the processor is configured to execute a program in the memory, including the following steps:
  • the identity token information is used to indicate the identity type of the terminal device when interacting with the peer device, where the identity type is used to indicate that the terminal device is a control terminal or a display end;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the terminal device needs to send to the peer device, and response information. And an operation performed by the terminal device to control the peer device;
  • the bus system is configured to connect the memory and the processor to cause the memory and the processor to communicate.
  • a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of the first aspect or perform the method of the second aspect.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect or cause the computer to perform the method of the second aspect.
  • the embodiment of the present invention provides a data transmission method, where the server presets a logical response file corresponding to each identity type, and the target terminal device can obtain the same from the server.
  • a target logical response file corresponding to the identity type the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control command that the target terminal device needs to send to the peer device
  • the response information is used to indicate the operation performed by the corresponding control command
  • the input information is the information received by the target terminal for controlling the peer device, so that the target terminal device can pass as the control terminal or the display terminal.
  • the target logical response file responds to the control instruction of the peer device, and generates a control instruction for controlling the peer device through the target logical response file, thereby implementing two-way communication between the plurality of devices.
  • FIG. 1 is a schematic structural diagram of a data transmission system according to an embodiment of the present application.
  • FIG. 3 is a signaling flowchart of two-way communication between a target terminal device and a peer device according to an embodiment of the present disclosure
  • FIG. 4 is a signaling flowchart of a method for generating an operation interface of a target terminal device in a data transmission method according to an embodiment of the present disclosure
  • FIG. 5 is a signaling flowchart of establishing a Websocket connection between a target terminal device and a server according to an embodiment of the present disclosure
  • FIG. 6 is an interaction diagram of a Websocket request response target terminal and a server according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of a frame of each terminal device and server in FIG. 1 according to an embodiment of the present disclosure
  • FIG. 8 is a schematic structural diagram of a data transmission apparatus applied to a server according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of a data transmission apparatus applied to a terminal device according to an embodiment of the present disclosure.
  • FIG. 10 is a block diagram showing the hardware structure of a server having the function shown in FIG. 2 according to an embodiment of the present invention.
  • the data transmission method provided by the embodiment of the present application can be applied to a data transmission system.
  • FIG. 1 it is a schematic structural diagram of a data transmission system provided by the embodiment of the present application.
  • the data transmission system includes: a server 110 and a plurality of terminal devices 111. ⁇ 11n, n is a positive integer greater than or equal to 2, and m in FIG. 1 is a positive integer greater than or equal to 1 and less than or equal to n.
  • the plurality of terminal devices 111 to 11n correspond to two identity types, which are a control terminal and a display terminal.
  • the terminal devices in the 120 area are all control terminals
  • the terminal devices in the 130 area are all display terminals.
  • the terminal device as the control terminal can send a control command to the terminal device as the display terminal through the server 110.
  • the terminal device as the display terminal can also send a control command to the terminal device as the control terminal through the server 110, thereby realizing the two-way communication of the multi-terminal device.
  • FIG. 2 is a signaling flowchart of a data transmission method provided by an embodiment of the present application, where the method includes:
  • Step S201 The target terminal device 210 transmits the identity token information to the server 110.
  • the identity token information is used to indicate the identity type of the target terminal device when it interacts with the peer device, and the identity type is used to indicate that the target terminal device is the control terminal or the display terminal.
  • the target terminal device 210 may be a control terminal as shown in FIG. 1 or a display terminal as shown in FIG. 1. Therefore, it is not convenient to mark the target terminal device by using the label of each terminal device in FIG. 1, so 210 is used. If the target terminal device 210 is the control terminal, the peer device is the display terminal; if the target terminal device 210 is the display terminal, the peer device is the control terminal.
  • the user can open the browser in the target terminal device 210, access the server 110 through the browser, and the server 110 can feed back the selected identity type interface to the target terminal device 210, and the user can select the identity type displayed in the browser in the target terminal device 210.
  • the interface selects its own identity type to generate corresponding identity token information.
  • a console button and a display button are displayed.
  • the generated identity token information represents the target terminal device as the control terminal; when the user touches the presentation button
  • the generated identity token information represents the target terminal device as a presentation terminal.
  • IP Internet Protocol
  • the above identity token information may be the above link.
  • the port corresponding to the control end may be port 80; the port corresponding to the display end may be port 102.
  • Step S202 The server 110 receives the identity token information sent by the target terminal device 210, and determines a target logical response file corresponding to the identity type of the target terminal device 210 from the corresponding logical response file of each identity type.
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control command that the target terminal device needs to send to the peer device, and the response information is used to indicate a corresponding control.
  • the input information in the “correspond relationship between the input information and the control command sent by the target terminal device to the peer device” may be: information input by the user in the operation interface displayed in the target terminal device, such as voice information, text information, etc. Or; the user inputs the information of the target button by touching the target button in the operation interface displayed by the target terminal device (the button can be a physical button or a virtual button); or, the user displays by touching the target terminal device The operation interface, the input touch location information.
  • the target logical response file may include a corresponding character string of each button in the operation interface displayed by the target terminal device.
  • the target string corresponding to the target button may be determined according to the corresponding character string of each button, and the target The terminal device can generate a corresponding control instruction according to the target character string.
  • the response information corresponding to each control instruction sent by the peer device included in the target logical response file is response information corresponding to the character string corresponding to each button in the operation interface displayed by the peer device.
  • Determining, according to the corresponding logical response file of each identity type, the target logical response file corresponding to the identity type of the target terminal device may include: determining, according to a pre-stored port of each identity type, an identity type of the target terminal device a corresponding target port; obtaining the target logical response file through the target port.
  • Step S203 The server 110 sends the target logical response file to the target terminal device 210.
  • the target terminal device 210 receives the target logical response file, if the target terminal device 210 is the control terminal, the corresponding operation interface of the control terminal is displayed; if the target terminal device 210 is the display terminal, the corresponding operation of the display terminal is displayed.
  • the interface is operated by the user through the operation interface displayed by the target terminal device 210, for example, inputting input information for controlling the peer device.
  • the peer device when the target terminal device is the control terminal, the peer device is the display terminal; when the target terminal device is the display terminal, the peer device is the control terminal. That is, the embodiment of the present application can provide the target terminal device as the display terminal with the function of controlling the peer terminal.
  • the server presets a logical response file corresponding to each identity type
  • the target terminal device may obtain a target logical response file corresponding to the identity type of the server from the server, and the target logical response
  • the file includes response information corresponding to each control command sent by the peer device, and a correspondence between the input information and a control command that the target terminal device needs to send to the peer device; and the response information is used to indicate the corresponding control command
  • the input information is the information received by the target terminal for controlling the peer device, and therefore, whether the target terminal device is used as the control terminal or the presentation terminal, the control command of the peer device can be responded to by the target logical response file, and A control instruction for controlling the peer device is generated by the target logical response file, thereby implementing two-way communication between the plurality of devices.
  • the process of obtaining the logical response file corresponding to the identity type of the peer device 310 from the server is the same as the process shown in FIG. 2, and details are not described herein again.
  • FIG. 3 is a two-way communication between the target terminal device and the peer device according to the embodiment of the present application. Let the flow chart, the specific process includes:
  • Step S301 The target terminal device 210 receives target input information for controlling the peer device.
  • step S202 For a detailed description of the target input information, refer to the related description of step S202 in the process shown in FIG. 2, and details are not described herein again.
  • Step S302 The target terminal device 210 acquires the target input information according to the correspondence between the input information in the target logical response file and the control command that the target terminal device needs to send to the peer device.
  • the first control instruction The first control instruction.
  • the first control instruction carries the communication address information of the peer device.
  • the communication address information may be an Internet Protocol (IP) address or a Media Access Control (MAC) address that is interconnected between the networks of the peer device 310.
  • IP Internet Protocol
  • MAC Media Access Control
  • the communication address information may also be the user name and/or user password of the user logged in the peer device 310, and the like.
  • Step S303 The target terminal device 210 sends the first control instruction to the server 110.
  • Step S304 The server 110 sends the first control instruction to the peer device 310.
  • Step S305 The peer device 310 responds to the first control instruction according to a logical response file corresponding to its own identity type.
  • the corresponding logical response file of the identity type includes: response information corresponding to each control instruction sent by the target terminal device 210, and control information that the input device and the destination device 310 need to send to the target terminal device 210.
  • the response information is used to indicate an operation performed by the corresponding control command, and the input information is information received by the opposite terminal for controlling the target terminal device. That is, the location of the "peer device 310" and the "target terminal device 210" in the content included in the target logical response file is interchanged, that is, the logical response file corresponding to the identity type of the peer device 310.
  • Step S305 can include:
  • the peer device 310 determines, according to the pre-stored response information corresponding to each control command sent by the target terminal device 210, response information corresponding to the first control instruction;
  • Corresponding response operations are performed according to the corresponding response information of the first control instruction.
  • the step of “performing a corresponding response operation according to the corresponding response information of the first control instruction” may include feeding back, by the server 110, a message that has responded to the first control instruction to the target terminal device 210.
  • Step S306 The peer device 310 sends a second control instruction to the server 110.
  • the method for generating the second control command by the peer device 310 is the same as the process for the target terminal device 210 to generate the first control command, and specifically includes:
  • the peer device 310 receives input information that controls the target terminal device 210.
  • the peer device 310 obtains the correspondence between the input information included in the logical response file corresponding to the identity type of the peer device and the control command sent by the peer terminal 310 device to the target terminal device, and the peer device 310 receives the corresponding relationship.
  • the input information corresponds to the second control command.
  • the second control instruction carries the communication address information of the target terminal device.
  • the communication address information may be an IP address or a MAC address of the target terminal device 210.
  • the communication address information may also be the user name and/or user password of the user logged in the target terminal device 210, and the like.
  • Step S307 The server 110 transmits the second control instruction to the target terminal device 210.
  • Step S308 The target terminal device 210 determines the target response information corresponding to the second control instruction from the response information corresponding to each control command sent by the peer device.
  • Step S309 The target terminal device 210 performs a corresponding response operation according to the target response information.
  • Step S309 can include feeding back, by the server 110, a message that has responded to the second control instruction to the peer device 310.
  • Performing the corresponding response operation by the target terminal device 210 according to the target response information may include generating an operation interface currently displayed by the target terminal device 210.
  • the peer device 310 performs “response response information according to the first control instruction.
  • the corresponding response operation may include generating an operation interface currently displayed by the peer device 310.
  • the target terminal device 210 will be described below as an example.
  • FIG. 4 is a signaling flowchart of a method for generating an operation interface of a target terminal device in a data transmission method according to an embodiment of the present disclosure, where the method includes:
  • Step S401 The server 110 obtains a target operation interface template corresponding to the target terminal device from the corresponding operation interface template of each identity type, and sends the target operation interface template to the target terminal device 210.
  • Step S402 The target terminal device 210 generates an operation interface that the terminal device needs to display according to the target response information and the target operation interface template.
  • the target response information can be obtained by the flow shown in FIG.
  • the step S402 is specifically configured to: generate, according to the target response code and the target operation interface template, an operation interface currently displayed by the target terminal device based on the pre-stored reveal.js file.
  • the reveal.js file can store the style information of the operation interface, for example, the position information of the content displayed in the operation interface, the position information of each button in the operation interface, the size information of each button, the position information of each input box, and the like.
  • a Websocket connection can be established between each terminal device and the server.
  • the following describes the process by taking the target terminal device as an example, as shown in FIG.
  • a signaling flowchart for establishing a Websocket connection between a target terminal device and a server provided by the embodiment of the present application, where the method includes:
  • Step S501 The target terminal device 210 sends a request to establish a Websocket connection to the server 110.
  • the establishment of the Websocket connection request carries the identification information of the target terminal device.
  • WebSocket is a network technology for full-duplex communication between a browser and a server in a terminal device provided by HyperText Markup Language (HTML) 5.
  • the WebSocket is based on a transmission control protocol (TCP). Full duplex communication protocol.
  • TCP transmission control protocol
  • API application programming interface
  • the browser and the server only need to do a handshake, and then a fast channel is formed between the browser and the server in the terminal device. Data can be transferred directly between the two.
  • WebSocket protocol can save server resources and bandwidth and achieve real-time communication.
  • Step S502 The server 110 determines to establish a Websocket connection with the target terminal device 210, and stores a Websocket connection corresponding to the identification information of the target terminal device, where the Websocket connection is used for information interaction between the target terminal device and the server. aisle.
  • the server 110 can establish a Websocket connection with multiple terminal devices. To identify the corresponding Websocket connection of each terminal device, the WebSocket connection line corresponding to the ID of each terminal device needs to be bound and stored.
  • the identification ID of the target terminal device may be the user name of the user who logged in to the target terminal device, and/or the IP address of the target terminal, and/or the MAC address of the target terminal.
  • the communication address information of the peer device carried in the first control instruction in FIG. 3 may be the identifier information of the peer device, or the communication address information of the peer device is associated with the identifier information of the peer device;
  • the communication address information of the target terminal device carried in the second control instruction may be the identification information of the target terminal device, or the communication address of the target terminal device is associated with the identification information of the target terminal device. That is, the server 110 in FIG. 3 can obtain the identification information of the peer device by using the communication address information of the peer device, thereby determining the Websocket connection corresponding to the identification information of the peer device, thereby passing the first control instruction through the identification information of the peer device. The corresponding Websocket connection is sent to the peer device.
  • the server 110 in FIG. 3 can obtain the identification information of the target terminal device by using the communication address information of the target terminal device, thereby determining the Websocket connection corresponding to the identification information of the target terminal device, thereby passing the second control instruction through the target terminal device.
  • the corresponding Websocket connection of the identification information is sent to the target terminal device.
  • step S502 may include: the user may input a user name and a password through an operation interface displayed by the browser on the target terminal device 210, and after the user inputs the user name and password and clicks the login button, the user name and the user password may be Send to server 110.
  • the server 110 may perform an authentication judgment according to the user name and the user password, and after the authentication judgment is passed, determine that the Websocket connection is established with the target terminal device 210.
  • the "Call of Duty OL" game is taken as an example to illustrate the authentication method of the server 110. Since the "Call of Duty OL" game can be teamed up, there are multiple players in each group, and the corresponding terminal devices of multiple players. The interaction may be performed as shown in FIG. 3, and the server may store the user name of the corresponding member of each group identifier. If the server receives the establishment of the Websocket connection request sent by the target terminal device, and the established Websocket connection request carries the target group.
  • the server determines the user name corresponding to the target identifier from the corresponding user name of each identifier stored by the server, and determines the target terminal device if the corresponding user name in the target identifier includes the target user name. Establish a Websocket connection. If the target user name does not include the target user name, the Websocket connection is not established with the target terminal device.
  • Step S503 The server 110 feeds back to the target terminal device a message that the establishment of the Websocket connection is completed.
  • the connection open shown in FIG. 6 indicates that the WebSocket connection between the target terminal device and the server is successfully established; the connection close indicates that the WebSocket connection between the target terminal device and the server is disconnected.
  • the data refers to data exchanged between the target terminal device 210 and the server 110, and the data includes a first control instruction, a second control instruction, a target logical response file, a target operation interface template, and the like.
  • WebSocket is a communication mode similar to Socket's Transmission Control Protocol (TCP) long connection. Once the WebSocket connection is established, subsequent data is transmitted in the form of a frame sequence. Before the target terminal device disconnects the WebSocket connection or the server disconnects the WebSocket connection, the target terminal device and the server are not required to re-initiate the connection request. In the case of massive concurrent and large load traffic between the target device and the server, the consumption of network bandwidth resources is greatly saved, and the performance advantage is obvious, and the target terminal device sends and receives messages on the same persistent connection. The real-time advantage is obvious.
  • the server 110 can build an Express server based on Node.js, and the socket 110 is installed in the server 110.
  • FIG. 7 is a schematic diagram of a frame of each terminal device and server in FIG. 1 according to an embodiment of the present application.
  • the framework of the other terminal devices located in the 120 area is the same as the frame of the terminal device 111; the frame of the other terminal devices located in the 130 area is the same as the frame of the terminal device 11n.
  • the reveal.js file may also be included in each terminal device in FIG. 7.
  • the socket.io plug-in is a concrete implementation of the Javascript language for the WebSocket protocol. It is more convenient to use the WebSocket protocol for two-way communication through the Socket.io server and terminal devices.
  • the server-installed Socket.io is integrated into Node.js as an extension to Node.js and is used by the Node.js class library that introduces Socket.io in the terminal device.
  • Node.js is an event-driven I/O server-side JavaScript environment based on Google's V8 engine. The goal is to provide a program for writing scalable web applications, such as Web services.
  • the target terminal device 210 can also transmit its own login status to the server 110.
  • the login status may include communication address information of the peer device 310, and the server 110 may send the login status to the peer device 310.
  • the login status can include the logged in status and the unlogged in status.
  • the logged in status includes the online status, and the unlogged status includes the offline status.
  • the server 110 transmitting the login status to the peer device 310 includes: calculating, according to the corresponding login status of each target terminal device, the target terminal device in the logged-in state. The number of the login status of each target terminal device and the number of target terminal devices in the logged-in state are sent to the peer device.
  • the large screen of the release site can be used as the display terminal, and the corresponding login status of each terminal device on the site and the terminal in the logged-in state can be displayed.
  • the number of devices can be used as the display terminal, and the corresponding login status of each terminal device on the site and the terminal in the logged-in state. The number of devices.
  • the above-mentioned unregistered state may refer to a related interface in which the terminal device does not display the "Call of Duty OL" game.
  • the logged in status may refer to an interface in which the terminal device displays a game called "Summon OL".
  • the data transmission device corresponding to the above data transmission method will be described below, and the same portions can be referred to each other.
  • FIG. 8 is a schematic structural diagram of a data transmission apparatus applied to a server according to an embodiment of the present disclosure.
  • the apparatus includes: a receiving module 81, a determining module 82, and a sending module 83, where:
  • the receiving module 81 is configured to receive identity token information sent by the target terminal device, where the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used. Instructing the target terminal device to be a control terminal or a display terminal;
  • a determining module 82 configured to determine, according to a logical response file corresponding to each identity type stored in advance, a target logical response file corresponding to the identity type of the target terminal device;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response The information is used to indicate an operation performed by the corresponding control instruction, where the input information is information received by the target terminal for controlling the peer device;
  • the sending module 83 is configured to send the target logical response file to the target terminal device.
  • the determining module 82 in the foregoing data transmission device embodiment applied to the server includes:
  • a first determining unit configured to determine, according to a pre-stored corresponding port of each identity type, a target port corresponding to the identity type of the target terminal device;
  • a second determining unit configured to obtain the target logical response file by using the target port.
  • the foregoing data transmission device embodiment applied to the server further includes:
  • a second receiving module configured to receive a first control instruction sent by the target terminal device, where the first control instruction carries communication address information of the peer device;
  • a second sending module configured to send the first control instruction to the peer device according to the communication address information of the peer device, so that the peer device according to the logical response file corresponding to the identity type of the peer device Responding to the first control instruction.
  • the foregoing data transmission device embodiment applied to the server further includes:
  • a third receiving module configured to receive a second control command sent by the peer device, where the second control command carries communication address information of the target terminal device, where the second control command is based on the pair
  • the identity type of the end device is generated by the corresponding logical response file
  • a third sending module configured to send the second control instruction to the target terminal device according to the communication address information of the target terminal device, so that the target terminal device responds to the target according to the target logical response file Two control instructions.
  • the foregoing data transmission device embodiment applied to the server further includes:
  • a fourth receiving module configured to receive a login status sent by the target terminal device, where the login status includes a logged in status and an unlogged in status;
  • a fourth sending module configured to send the login status to the peer device.
  • the number of the target terminal devices in the implementation of the data transmission device that is applied to the server is multiple, and the fourth sending module includes:
  • a calculating unit configured to calculate, according to the corresponding login status of each target terminal device, the number of target terminal devices in the logged in state
  • a sending unit configured to send the corresponding login status of each target terminal device and the number of target terminal devices in the logged-in state to the peer device.
  • the foregoing data transmission device embodiment applied to the server further includes:
  • An obtaining module configured to obtain a target operating interface template corresponding to the target terminal device from a corresponding operation interface template of each identity type;
  • a fifth sending module configured to send the target operation interface template to the target terminal device, so that the target terminal device generates an operation interface according to the target operation interface template.
  • the method before the receiving the identity token information sent by the target terminal device in the data transmission device embodiment that is applied to the server, the method further includes:
  • a fifth receiving module configured to receive a request for establishing a Websocket connection sent by the target terminal device, where the establishing a Websocket connection request carries the identification information of the target terminal device;
  • a second determining module configured to determine a Websocket connection with the target terminal device, and store a Websocket connection corresponding to the identity information of the target terminal device, where the Websocket connection performs information interaction between the target terminal device and the server Channel
  • a sixth sending module configured to feed back, to the target terminal device, a message that completes establishing a Websocket connection.
  • a schematic structural diagram of a data transmission apparatus applied to a terminal device includes: a sending module 91 and a receiving module 92, where:
  • the sending module 91 is configured to send identity token information to the server, where the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate the
  • the target terminal device is a control terminal or a display terminal;
  • the receiving module 92 is configured to receive, by the server, a target logical response file corresponding to the identity type of the terminal device;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response
  • the information is used to indicate an operation performed in response to the corresponding control instruction
  • the input information is information received by the target terminal for controlling the peer device.
  • the foregoing data transmission device embodiment applied to the terminal device further includes:
  • a second receiving module configured to receive target input information for controlling the peer device
  • a first acquiring module configured to acquire a first control instruction corresponding to the target input information according to a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device;
  • a second sending module configured to send the first control instruction to the peer device by using the server.
  • the foregoing data transmission device embodiment applied to the terminal device further includes:
  • a third receiving module configured to receive a second control instruction sent by the peer device
  • a first determining module configured to determine, according to pre-stored response information corresponding to each control instruction sent by the peer device, target response information corresponding to the second control instruction;
  • the first execution module is configured to perform a corresponding response operation according to the target response information.
  • the foregoing data transmission device embodiment applied to the terminal device further includes:
  • a fourth receiving module configured to receive a target operation interface template that is obtained by the server according to the corresponding operation interface template of each identity type that is pre-stored, and that is obtained according to the identity type of the terminal device;
  • the first execution module is configured to: generate an operation interface that the terminal device needs to display according to the target response information and the target operation interface template.
  • the foregoing data transmission device embodiment applied to the terminal device further includes:
  • a third sending module configured to send a request for establishing a Websocket connection to the server
  • the fifth receiving module is configured to receive, by the server, a message that completes establishing a Websocket connection, where the Websocket connection is a channel for information exchange between the terminal device and the server.
  • the foregoing data transmission device embodiment applied to the terminal device further includes:
  • a second determining module configured to determine a current login status, where the login status includes a logged in status and an unlogged in status
  • a fourth sending module configured to send the login status to the peer device by using the server.
  • FIG. 10 is a block diagram showing the hardware structure of a server having the function shown in FIG. 2 according to an embodiment of the present invention.
  • the server may include: a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004.
  • the processor 1001, the communication interface 1002, and the memory 1003 complete communication with each other through the communication bus 1004.
  • the communication interface 1002 can be an interface of the communication module, such as an interface of the GSM module;
  • a processor 1001 configured to execute a program
  • the program can include program code, the program code including computer operating instructions.
  • the processor 1001 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 1003 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the program can be specifically used to:
  • the identity token information is used to identify an identity type of the target terminal device when interacting with the peer device, where the identity type is used to indicate the target terminal device For the console or display;
  • the target logical response file includes response information corresponding to each control instruction sent by the peer device, and a correspondence between the input information and a control instruction that the target terminal device needs to send to the peer device, and the response The information is used to indicate an operation performed by the corresponding control instruction, where the input information is information received by the target terminal for controlling the peer device;

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供了一种数据传输方法及装置,服务器预先设置了各身份类型相应的逻辑响应文件,目标终端设备可以从服务器中获得与自身的身份类型相应的目标逻辑响应文件,该目标逻辑响应文件包括与对端设备发送的各控制指令相应的响应信息,以及,输入信息与目标终端设备所需向对端设备发送的控制指令的对应关系;由于响应信息用于指示响应对应的控制指令所执行的操作,输入信息为目标终端接收的用于控制对端设备的信息,因此,无论目标终端设备作为控制端还是作为展示端,均可通过目标逻辑响应文件响应对端设备的控制指令,以及通过目标逻辑响应文件生成控制对端设备的控制指令,从而可以实现了多个设备之间的双向通信。

Description

数据传输方法及装置
本申请要求于2017年1月3日提交中国专利局、申请号为201710002152.9、发明名称为“数据传输方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,更具体的涉及数据传输方法及装置。
背景技术
随着电子设备的发展,如个人电脑、平板电脑、智能手机、智能电视等设备越来越多。利用多个设备进行通信的技术应运而生,下面以智能手机对智能电视进行遥控为例,对多个设备之间的通信进行说明。
智能手机作为控制端,生成控制指令并发送至服务器,服务器将控制指令发送至智能电视,智能电视作为展示端,响应该控制指令,并显示相应的界面。
综上,现有技术中多个设备之间为单向通信,例如智能手机向智能电视发送控制指令,而智能电视无法向智能手机发送信息,即无法实现双向通信。
发明内容
有鉴于此,本发明提供了一种数据传输方法及装置,以克服现有技术中多个设备无法实现双向通信的问题。
为实现上述目的,本发明提供如下技术方案:
一种数据传输方法,所述数据传输方法包括:
接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响 应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
将所述目标逻辑响应文件发送至所述目标终端设备。
一种数据传输方法,应用于终端设备,所述数据传输方法包括:
向服务器发送身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息。
一种数据传输装置,包括:
接收模块,用于接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
第一确定模块,用于从预先存储的各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
发送模块,用于将所述目标逻辑响应文件发送至所述目标终端设备。
一种数据传输装置,应用于终端设备,包括:
发送模块,用于向服务器发送身份令牌信息,所述身份令牌信息用于表征所述终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述终端设备为控制端或展示端;
接收模块,用于接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述终端设备接收的用于控制所述对端设备的信息。
一种服务器,所述服务器包括:存储器、收发器、处理器以及总线***;
其中,所述存储器用于存储程序;
所述处理器用于执行所述存储器中的程序,包括如下步骤:
接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
将所述目标逻辑响应文件发送至所述目标终端设备;
所述总线***用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
一种终端设备,所述终端设备包括:存储器、收发器、处理器以及总线***;
其中,所述存储器用于存储程序;
所述处理器用于执行所述存储器中的程序,包括如下步骤:
向服务器发送身份令牌信息,所述身份令牌信息用于表征所述终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述终端设备为控制端或展示端;
接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述终端设备接收的用于控制所述对端设备的信息;
所述总线***用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如第一方面所述的方法,或执行如第二方面所述的方法。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面所述的方法,或使得计算机执行如第二方面所述的方法。
经由上述的技术方案可知,与现有技术相比,本发明实施例提供了一种数据传输方法,服务器预先设置了各身份类型相应的逻辑响应文件,目标终端设备可以从服务器中获得与自身的身份类型相应的目标逻辑响应文件,该目标逻辑响应文件包括与对端设备发送的各控制指令相应的响应信息,以及,输入信息与目标终端设备所需向对端设备发送的控制指令的对应关系;由于响应信息用于指示响应对应的控制指令所执行的操作,输入信息为目标终端接收的用于控制对端设备的信息,因此,无论目标终端设备作为控制端还是作为展示端,均可通过目标逻辑响应文件响应对端设备的控制指令,以及通过目标逻辑响应文件生成控制对端设备的控制指令,从而实现了多个设备之间的双向通信。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请实施例提供的数据传输***的结构示意图;
图2为本申请实施例提供的一种数据传输方法的信令流程图;
图3为本申请实施例提供的目标终端设备和对端设备进行双向通信的信令流程图;
图4为本申请实施例提供的数据传输方法中目标终端设备的操作界面生成方法的信令流程图;
图5为本申请实施例提供的目标终端设备与服务器建立Websocket连接的信令流程图;
图6为本申请实施例提供的Websocket请求响应目标终端与服务器的交互图;
图7为本申请实施例提供的图1中各终端设备和服务器的框架示意图;
图8为本申请实施例提供的一种应用于服务器的数据传输装置的结构示意图;
图9为本申请实施例提供的一种应用于终端设备的数据传输装置的结构示意图;
图10为本发明实施例提供的具有如图2所示功能的服务器的硬件结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本申请实施例提供的数据传输方法可以应用于数据传输***,如图1所示,为本申请实施例提供的数据传输***的结构示意图,该数据传输***包括:服务器110以及多个终端设备111~11n,n为大于等于2的正整数,图1中的m为大于等于1小于等于n的正整数。
多个终端设备111~11n对应两种身份类型,分别为控制端以及展示端。图1中位于120区域的终端设备均为控制端,位于130区域的终端设备均为展示端。
作为控制端的终端设备可以通过服务器110向作为展示端的终端设备发 送控制指令,作为展示端的终端设备也可以通过服务器110向作为控制端的终端设备发送控制指令,从而实现了多终端设备的双向通信。
下面结合图1对本申请实施例提供的数据传输方法进行说明。
如图2所示,为本申请实施例提供的一种数据传输方法的信令流程图,该方法包括:
步骤S201:目标终端设备210向服务器110发送身份令牌信息。
身份令牌信息用于表示目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示目标终端设备为控制端或展示端。
目标终端设备210可以为如图1所示的控制端,也可以为如图1所示的展示端,因此不便用图1中各终端设备的标号对目标终端设备进行标记,所以使用210,其中,若目标终端设备210为控制端,则对端设备为展示端;若目标终端设备210为展示端,则对端设备为控制端。
用户可以在目标终端设备210中打开浏览器,通过浏览器访问服务器110,服务器110可以向目标终端设备210反馈选择身份类型界面,用户可以通过目标终端设备210中的浏览器中显示的选择身份类型界面,选择自身的身份类型,从而生成相应的身份令牌信息。
例如浏览器中显示的选择身份界面中显示有控制端按钮以及展示端按钮,当用户触按控制端按钮时,生成的身份令牌信息表征目标终端设备为控制端;当用户触按展示端按钮时,生成的身份令牌信息表征目标终端设备为展示端。
用户还可以在浏览器中直接输入链接,该链接包括服务器的网际互联协议(Internet Protocol,IP)地址以及端口,服务器可以为不同的身份类型提供不同的端口。
上述身份令牌信息可以为上述链接。
例如控制端对应的端口可以为端口80;展示端对应的端口可以为端口102。
步骤S202:服务器110接收目标终端设备210发送的身份令牌信息,从各身份类型相应的逻辑响应文件中,确定目标终端设备210的身份类型相应的目标逻辑响应文件。
目标逻辑响应文件包括与对端设备发送的各控制指令相应的响应信息,以及,输入信息与目标终端设备所需向对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为目标终端接收的用于控制对端设备的信息。
上述“输入信息与目标终端设备所需向对端设备发送的控制指令的对应关系”中输入信息可以为:用户在目标终端设备中显示的操作界面中输入的信息,例如语音信息、文字信息等等;或,用户通过触按目标终端设备显示的操作界面中的目标按键(按键可以为物理按键也可以为虚拟按键),输入触按目标按键的信息;或,用户通过触按目标终端设备显示的操作界面,输入的触按位置信息。
以输入信息为触按目标按键的信息为例,对目标逻辑响应文件进行说明。目标逻辑响应文件可以包括目标终端设备显示的操作界面中各按键相应的字符串,用户输入触按目标按键的信息后,可以依据各按键相应的字符串,确定目标按键相应的目标字符串,目标终端设备可以依据目标字符串生成相应的控制指令。此时目标逻辑响应文件包括的“与对端设备发送的各控制指令相应的响应信息”,为与对端设备显示的操作界面中各按键相应的字符串对应的响应信息。
从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件可以包括:从预先存储的各身份类型相应的端口中,确定所述目标终端设备的身份类型相应的目标端口;通过所述目标端口获得所述目标逻辑响应文件。
步骤S203:服务器110将所述目标逻辑响应文件发送至所述目标终端设备210。
可选的,目标终端设备210接收到目标逻辑响应文件后,若目标终端设备210为控制端,则显示控制端相应的操作界面;若目标终端设备210为展示端,则显示展示端相应的操作界面,以供用户通过目标终端设备210显示的操作界面,进行操作,例如输入控制对端设备的输入信息。
本申请实施例中当目标终端设备为控制端时,对端设备为展示端;当目标终端设备为展示端时,对端设备为控制端。即本申请实施例可以将作为展 示端的目标终端设备具备控制对端终端的功能。
本发明实施例提供的一种数据传输方法中,服务器预先设置了各身份类型相应的逻辑响应文件,目标终端设备可以从服务器中获得与自身的身份类型相应的目标逻辑响应文件,该目标逻辑响应文件包括与对端设备发送的各控制指令相应的响应信息,以及,输入信息与目标终端设备所需向对端设备发送的控制指令的对应关系;由于响应信息用于指示响应对应的控制指令所执行的操作,输入信息为目标终端接收的用于控制对端设备的信息,因此,无论目标终端设备作为控制端还是作为展示端,均可通过目标逻辑响应文件响应对端设备的控制指令,以及通过目标逻辑响应文件生成控制对端设备的控制指令,从而实现了多个设备之间的双向通信。
对端设备310从服务器获取与自身的身份类型相应的逻辑响应文件的过程与图2所示的流程相同,在此不再赘述。
目标终端设备210和对端设备310均从服务器110中获得相应的逻辑响应文件后,即可进行双向通信,如图3为本申请实施例提供的目标终端设备和对端设备进行双向通信的信令流程图,具体过程包括:
步骤S301:目标终端设备210接收控制所述对端设备的目标输入信息。
对目标输入信息的详细描述可以参见图2所示流程中对步骤S202的相关描述,这里不再赘述。
步骤S302:目标终端设备210依据所述目标逻辑响应文件中的所述输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,获取所述目标输入信息相应的第一控制指令。
所述第一控制指令中携带有所述对端设备的通信地址信息。
通信地址信息可以为对端设备310的网络之间互联的协议(Internet Protocol,IP)地址,或媒体访问控制(Media Access Control,MAC)地址。
若用户在对端设备310中进行了登录,则通信地址信息还可以为在对端设备310中登录的用户的用户名称和/或用户密码等等。
步骤S303:目标终端设备210将所述第一控制指令发送至服务器110。
步骤S304:服务器110将第一控制指令发送至对端设备310。
步骤S305:对端设备310依据与自身的身份类型相应的逻辑响应文件响 应所述第一控制指令。
可以理解的是目标终端设备与对端设备是相对而言的,目标终端设备210的对端设备为对端设备310;对端设备310的对端设备为目标终端设备210,因此对端设备310的身份类型相应的逻辑响应文件包括:与所述目标终端设备210发送的各控制指令相应的响应信息,以及,输入信息与所述对端设备310所需向所述目标终端设备210发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,输入信息为所述对端终端接收的用于控制所述目标终端设备的信息。即将目标逻辑响应文件所包含的内容中“对端设备310”“目标终端设备210”的位置互换,即为对端设备310的身份类型相应的逻辑响应文件。
步骤S305可以包括:
对端设备310从预先存储的与所述目标终端设备210发送的各控制指令相应的响应信息中,确定所述第一控制指令相应的响应信息;
依据所述第一控制指令相应的响应信息,执行相应的响应操作。
步骤“依据所述第一控制指令相应的响应信息,执行相应的响应操作”可以包括通过服务器110向目标终端设备210反馈已响应第一控制指令的消息。
步骤S306:对端设备310向服务器110发送第二控制指令。
对端设备310生成第二控制指令的方法与目标终端设备210生成第一控制指令的过程相同,具体可以包括:
对端设备310接收控制所述目标终端设备210的输入信息。
对端设备310依据与其自身的身份类型相应的逻辑响应文件包含的输入信息与所述对端终端310设备所需向所述目标终端设备发送的控制指令的对应关系,获取对端设备310接收到的输入信息相应的第二控制指令。
第二控制指令携带有所述目标终端设备的通信地址信息。
通信地址信息可以目标终端设备210的IP地址或MAC地址。
若用户在目标终端设备210中进行了登录,则通信地址信息还可以为在目标终端设备210中登录的用户的用户名称和/或用户密码等等。
步骤S307:服务器110将所述第二控制指令发送至目标终端设备210。
步骤S308:目标终端设备210从预先存储的与所述对端设备发送的各控制指令相应的响应信息中,确定所述第二控制指令相应的目标响应信息。
步骤S309:目标终端设备210依据所述目标响应信息执行相应的响应操作。
步骤S309可以包括通过服务器110向对端设备310反馈已响应所述第二控制指令的消息。
目标终端设备210依据所述目标响应信息执行相应的响应操作可以包括生成目标终端设备210当前显示的操作界面,同理,对端设备310的“依据所述第一控制指令相应的响应信息,执行相应的响应操作”可以包括生成对端设备310当前显示的操作界面。下面以目标终端设备210为例进行说明。
如图4所示,为本申请实施例提供的数据传输方法中目标终端设备的操作界面生成方法的信令流程图,该方法包括:
步骤S401:服务器110从各身份类型相应的操作界面模板中,获得所述目标终端设备相应的目标操作界面模板,并将所述目标操作界面模板发送至所述目标终端设备210。
步骤S402:目标终端设备210依据所述目标响应信息以及所述目标操作界面模板生成所述终端设备当前需要显示的操作界面。
目标响应信息可以是通过图3所示的流程获得的。
可选的,步骤S402可以具体用于:依据所述目标响应代码以及所述目标操作界面模板,基于预先存储的reveal.js文件生成所述目标终端设备当前显示的操作界面。
reveal.js文件可以存储有操作界面的样式信息,例如,操作界面中显示的内容的位置信息,操作界面中各按键的位置信息,各按键的大小信息,各输入框的位置信息等等。
为了加快图1中所示的各终端设备与服务器之间的通信速度,各终端设备与服务器之间可以建立Websocket连接,下面以目标终端设备为例对这一过程进行说明,如图5所示,为本申请实施例提供的目标终端设备与服务器建立Websocket连接的信令流程图,该方法包括:
步骤S501:目标终端设备210向服务器110发送建立Websocket连接请 求。
建立Websocket连接请求中携带有所述目标终端设备的标识信息。
WebSocket是超级文本标记语言(HyperText Markup Language,HTML)5提供的一种终端设备中的浏览器与服务器间进行全双工通讯的网络技术,且WebSocket是基于传输控制协议(transmission control protocol,TCP)的全双工通信协议。在WebSocket应用程序编程接口(Application Programming Interface,API)中,浏览器和服务器只需要做一个握手的动作,然后,终端设备中的浏览器和服务器之间就形成了一条快速通道。两者之间就直接可以数据互相传送。WebSocket协议,能更好的节省服务器资源和带宽并达到实时通讯。
步骤S502:服务器110确定与所述目标终端设备210建立Websocket连接,并存储所述目标终端设备的标识信息相应的Websocket连接,所述Websocket连接为所述目标终端设备与所述服务器进行信息交互的通道。
由于服务器110可以与多个终端设备建立Websocket连接,为了识别各终端设备相应的Websocket连接,需要将各终端设备的标识ID相应的WebSocket连接行绑定,并进行存储。
目标终端设备的标识ID可以为登录目标终端设备的用户的用户名称,和/或目标终端的IP地址,和/或目标终端的MAC地址。
相应的,图3中的第一控制指令中携带的对端设备的通信地址信息可以为对端设备的标识信息,或者,对端设备的通信地址信息关联有所述对端设备的标识信息;第二控制指令中携带的目标终端设备的通信地址信息可以为目标终端设备的标识信息,或者,目标终端设备的通信地址关联有所述目标终端设备的标识信息。即图3中服务器110可以通过对端设备的通信地址信息获得对端设备的标识信息,从而确定出对端设备的标识信息相应的Websocket连接,从而将第一控制指令通过对端设备的标识信息相应的Websocket连接发送至对端设备。
同理,图3中服务器110可以通过目标终端设备的通信地址信息获得目标终端设备的标识信息,从而确定出目标终端设备的标识信息相应的Websocket连接,从而将第二控制指令通过目标终端设备的标识信息相应的Websocket连 接发送至目标终端设备。
可选的,步骤S502具体实现过程可以包括:用户可以通过目标终端设备210上的浏览器显示的操作界面中输入用户名和密码,用户在输入用户名和密码后点击登录按钮后,用户名和用户密码会发送至服务器110。服务器110可以依据用户名和用户密码进行鉴权判断,当鉴权判断通过后,才会确定与所述目标终端设备210建立Websocket连接。
以《使命召唤OL》游戏为例对服务器110的鉴权方法进行说明,由于《使命召唤OL》游戏中可以进行组队,每一组中有多个玩家,多个玩家相应的终端设备之间可以进行如图3所示的交互,服务器可以存储有各组的标识相应的成员的用户名,若服务器接收到目标终端设备发送的建立Websocket连接请求,且该建立Websocket连接请求中携带有目标组的目标标识以及目标用户名,服务器会从自身存储的各标识相应的用户名中,确定出目标标识对应的用户名,若目标标识相应的用户名中包括目标用户名,则确定与目标终端设备建立Websocket连接,若目标标识相应的用户名中不包括目标用户名,则不与目标终端设备建立Websocket连接。
步骤S503:服务器110向所述目标终端设备反馈完成建立Websocket连接的消息。
如图6所示,为本申请实施例提供的目标终端设备与服务器的交互图。
其中,图6所示的connection open表示目标终端设备与服务器之间的WebSocket连接建立成功;connection close表示目标终端设备与服务器之间的WebSocket连接断开。data是指目标终端设备210和服务器110之间交互的数据,该数据包括第一控制指令、第二控制指令、目标逻辑响应文件、目标操作界面模板等等。
WebSocket是类似Socket的传输控制协议(Transmission Control Protocol,TCP)长连接的通讯模式,一旦WebSocket连接建立后,后续数据data都以帧序列的形式传输。在目标终端设备断WebSocket连接或服务器断掉WebSocket连接前,不需要目标终端设备和服务端重新发起连接请求。在海量并发及目标设备与服务器交互负载流量大的情况下,极大的节省了网络带宽资源的消耗,有明显的性能优势,且目标终端设备发送和接收消息是在 同一个持久连接上发起,实时性优势明显。
服务器110可以为基于Node.js搭建Express服务器,服务器110中安装有socket.io插件。如图7所示,为本申请实施例提供的图1中各终端设备和服务器的框架示意图。
图7中只示出了一个位于120区域的终端设备111以及一个位于130区域的终端设备11n。位于120区域的其他终端设备的框架与终端设备111的框架相同;位于130区域的其他终端设备的框架与终端设备11n的框架相同。
可选的,图7中各终端设备中还可以包括reveal.js文件。
其中,socket.io插件是对WebSocket协议的用javascript语言的具体实现,通过Socket.io服务器和终端设备可以更方便的使用WebSocket协议进行双向通信。服务器安装的Socket.io作为Node.js的一个扩展插件集成到Node.js中,在终端设备中通过引入Socket.io的Node.js类库使用。
Node.js是一个事件驱动I/O服务器端JavaScript环境,基于Google的V8引擎。目的是为了提供编写可扩充网络程式,如Web服务。
Express是一个基于Node.js平台的极简、灵活的web应用开发框架。
目标终端设备210还可以向服务器110发送自身的登录状态。登录状态中可以包括对端设备310的通信地址信息,服务器110可以将所述登录状态发送至所述对端设备310。
登录状态可以包括已登录状态以及未登录状态。已登录状态包括在线状态,未登录状态包括离线状态。
若目标终端设备210的个数为多个,则服务器110将所述登录状态发送至所述对端设备310包括:依据各目标终端设备相应的登录状态,计算处于已登录状态的目标终端设备的个数;将各目标终端设备相应的登录状态以及处于已登录状态的目标终端设备的个数发送至所述对端设备。
例如,在《使命召唤OL》游戏的发布现场,需要统计现场游戏在线人数,此时可以将发布现场的大屏幕作为展示端,可以显示现场各终端设备相应的登录状态以及处于已登录状态的终端设备的数量。
以《使命召唤OL》游戏为例,上述未登录状态可以是指终端设备未显示《使命召唤OL》游戏的相关界面。已登录状态可以是指终端设备显示有《使 命召唤OL》游戏的相关界面。
下面将介绍与上述数据传输方法相应的数据传输装置,相同部分可相互参照。
如图8所示,为本申请实施例提供的一种应用于服务器的数据传输装置的结构示意图,该装置包括:接收模块81、确定模块82以及发送模块83,其中:
接收模块81,用于接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
确定模块82,用于从预先存储的各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
发送模块83,用于将所述目标逻辑响应文件发送至所述目标终端设备。
可选的,上述应用于服务器的数据传输装置实施例中的确定模块82包括:
第一确定单元,用于从预先存储的各身份类型相应的端口中,确定所述目标终端设备的身份类型相应的目标端口;
第二确定单元,用于通过所述目标端口获得所述目标逻辑响应文件。
可选的,上述应用于服务器的数据传输装置实施例还包括:
第二接收模块,用于接收所述目标终端设备发送的第一控制指令,所述第一控制指令中携带有所述对端设备的通信地址信息;
第二发送模块,用于依据所述对端设备的通信地址信息,将所述第一控制指令发送至所述对端设备,以便所述对端设备依据与自身的身份类型相应的逻辑响应文件响应所述第一控制指令。
可选的,上述应用于服务器的数据传输装置实施例还包括:
第三接收模块,用于接收所述对端设备发送的第二控制指令,所述第二 控制指令携带有所述目标终端设备的通信地址信息,所述第二控制指令是依据与所述对端设备的身份类型相应的逻辑响应文件生成的;
第三发送模块,用于依据所述目标终端设备的通信地址信息,将所述第二控制指令发送至所述目标终端设备,以便所述目标终端设备依据所述目标逻辑响应文件响应所述第二控制指令。
可选的,上述应用于服务器的数据传输装置实施例还包括:
第四接收模块,用于接收所述目标终端设备发送的登录状态,所述登录状态包括已登录状态以及未登录状态;
第四发送模块,用于将所述登录状态发送至所述对端设备。
可选的,上述应用于服务器的数据传输装置实施中所述目标终端设备的个数为多个,第四发送模块包括:
计算单元,用于依据各目标终端设备相应的登录状态,计算处于已登录状态的目标终端设备的个数;
发送单元,用于将各目标终端设备相应的登录状态以及处于已登录状态的目标终端设备的个数发送至所述对端设备。
可选的,上述应用于服务器的数据传输装置实施例还包括:
获取模块,用于从各身份类型相应的操作界面模板中,获得所述目标终端设备相应的目标操作界面模板;
第五发送模块,用于将所述目标操作界面模板发送至所述目标终端设备,以便所述目标终端设备依据所述目标操作界面模板生成操作界面。
可选的,上述应用于服务器的数据传输装置实施例中在所述接收目标终端设备发送的身份令牌信息之前,还包括:
第五接收模块,用于接收所述目标终端设备发送的建立Websocket连接请求,所述建立Websocket连接请求中携带有所述目标终端设备的标识信息;
第二确定模块,用于确定与所述目标终端设备建立Websocket连接,并存储所述目标终端设备的标识信息相应的Websocket连接,所述Websocket连接为所述目标终端设备与所述服务器进行信息交互的通道;
第六发送模块,用于向所述目标终端设备反馈完成建立Websocket连接的消息。
如图9所示,为本申请实施例提供的一种应用于终端设备的数据传输装置的结构示意图,该装置包括:发送模块91以及接收模块92,其中:
发送模块91,用于向服务器发送身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
接收模块92,用于接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息。
可选的,上述应用于终端设备的数据传输装置实施例中还包括:
第二接收模块,用于接收控制所述对端设备的目标输入信息;
第一获取模块,用于依据所述输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,获取所述目标输入信息相应的第一控制指令;
第二发送模块,用于将所述第一控制指令通过所述服务器发送至所述对端设备。
可选的,上述应用于终端设备的数据传输装置实施例中还包括:
第三接收模块,用于接收所述对端设备发送的第二控制指令;
第一确定模块,用于从预先存储的与所述对端设备发送的各控制指令相应的响应信息中,确定所述第二控制指令相应的目标响应信息;
第一执行模块,用于依据所述目标响应信息执行相应的响应操作。
可选的,上述应用于终端设备的数据传输装置实施例中还包括:
第四接收模块,用于接收所述服务器反馈的依据预先存储的各身份类型相应的操作界面模板,获得的与终端设备的身份类型相应的目标操作界面模板;
第一执行模块,具体用于:依据所述目标响应信息以及所述目标操作界面模板生成所述终端设备当前需要显示的操作界面。
可选的,上述应用于终端设备的数据传输装置实施例中还包括:
第三发送模块,用于向服务器发送建立Websocket连接请求;
第五接收模块,用于接收服务器反馈的完成建立Websocket连接的消息,所述Websocket连接为所述终端设备与所述服务器进行信息交互的通道。
可选的,上述应用于终端设备的数据传输装置实施例中还包括:
第二确定模块,用于确定当前的登录状态,所述登录状态包括已登录状态和未登录状态;
第四发送模块,用于通过所述服务器向所述对端设备发送所述登录状态。
图10示出了本发明实施例提供的具有如图2所示功能的服务器的硬件结构框图,参照图10,该服务器可以包括:处理器1001,通信接口1002,存储器1003和通信总线1004;
其中处理器1001、通信接口1002、存储器1003通过通信总线1004完成相互间的通信;
可选的,通信接口1002可以为通信模块的接口,如GSM模块的接口;
处理器1001,用于执行程序;
存储器1003,用于存放程序和数据;
程序可以包括程序代码,所述程序代码包括计算机操作指令。
处理器1001可能是一个中央处理器CPU,或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
存储器1003可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
其中,程序可具体用于:
接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
将所述目标逻辑响应文件发送至所述目标终端设备。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (20)

  1. 一种数据传输方法,其中,所述数据传输方法包括:
    接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
    从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
    将所述目标逻辑响应文件发送至所述目标终端设备。
  2. 根据权利要求1所述数据传输方法,其中,所述从预先存储的各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件包括:
    从预先存储的各身份类型相应的端口中,确定所述目标终端设备的身份类型相应的目标端口;
    通过所述目标端口获得所述目标逻辑响应文件。
  3. 根据权利要求1或2所述数据传输方法,其中,还包括:
    接收所述目标终端设备发送的第一控制指令,所述第一控制指令中携带有所述对端设备的通信地址信息;
    依据所述对端设备的通信地址信息,将所述第一控制指令发送至所述对端设备,以便所述对端设备依据与自身的身份类型相应的逻辑响应文件响应所述第一控制指令。
  4. 根据权利要求1或2所述数据传输方法,其中,还包括:
    接收所述对端设备发送的第二控制指令,所述第二控制指令携带有所述目标终端设备的通信地址信息,所述第二控制指令是依据与所述对端设备的身份类型相应的逻辑响应文件生成的;
    依据所述目标终端设备的通信地址信息,将所述第二控制指令发送至所 述目标终端设备,以便所述目标终端设备依据所述目标逻辑响应文件响应所述第二控制指令。
  5. 根据权利要求1所述数据传输方法,其中,还包括:
    接收所述目标终端设备发送的登录状态,所述登录状态包括已登录状态以及未登录状态;
    将所述登录状态发送至所述对端设备。
  6. 根据权利要求5所述数据传输方法,其中,所述目标终端设备的个数为多个,所述将所述登录状态发送至所述对端设备包括:
    依据各目标终端设备相应的登录状态,计算处于已登录状态的目标终端设备的个数;
    将各目标终端设备相应的登录状态以及处于已登录状态的目标终端设备的个数发送至所述对端设备。
  7. 根据权利要求1所述数据传输方法,其中,还包括:
    从各身份类型相应的操作界面模板中,获得所述目标终端设备相应的目标操作界面模板;
    将所述目标操作界面模板发送至所述目标终端设备,以便所述目标终端设备依据所述目标操作界面模板生成操作界面。
  8. 根据权利要求1、2、5、6或7所述数据传输方法,其中,在所述接收目标终端设备发送的身份令牌信息之前,还包括:
    接收所述目标终端设备发送的建立网页套接字Websocket连接请求,所述建立Websocket连接请求中携带有所述目标终端设备的标识信息;
    确定与所述目标终端设备建立Websocket连接,并存储所述目标终端设备的标识信息相应的Websocket连接,所述Websocket连接为所述目标终端设备与所述服务器进行信息交互的通道;
    向所述目标终端设备反馈完成建立Websocket连接的消息。
  9. 一种数据传输方法,其中,所述数据传输方法应用于终端设备,所述数据传输方法包括:
    向服务器发送身份令牌信息,所述身份令牌信息用于表征所述终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述终端 设备为控制端或展示端;
    接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述终端设备接收的用于控制所述对端设备的信息。
  10. 根据权利要求9所述数据传输方法,其中,还包括:
    接收控制所述对端设备的目标输入信息;
    依据所述输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,获取所述目标输入信息相应的第一控制指令;
    将所述第一控制指令通过所述服务器发送至所述对端设备。
  11. 根据权利要求9或10所述数据传输方法,其中,还包括:
    接收所述对端设备发送的第二控制指令;
    从预先存储的与所述对端设备发送的各控制指令相应的响应信息中,确定所述第二控制指令相应的目标响应信息;
    依据所述目标响应信息执行相应的响应操作。
  12. 根据权利要求11所述数据传输方法,其中,还包括:
    接收所述服务器反馈的依据预先存储的各身份类型相应的操作界面模板,获得的与终端设备的身份类型相应的目标操作界面模板;
    所述依据所述目标响应信息执行相应的响应操作包括:
    依据所述目标响应信息以及所述目标操作界面模板生成所述终端设备当前需要显示的操作界面。
  13. 根据权利要求9所述数据传输方法,其中,在所述向服务器发送身份令牌信息之前,还包括:
    向服务器发送建立网页套接字Websocket连接请求;
    接收服务器反馈的完成建立Websocket连接的消息,所述Websocket连接为所述终端设备与所述服务器进行信息交互的通道。
  14. 根据权利要求9所述数据传输方法,其中,还包括:
    确定当前的登录状态,所述登录状态包括已登录状态和未登录状态;
    通过所述服务器向所述对端设备发送所述登录状态。
  15. 一种数据传输装置,其中,包括:
    接收模块,用于接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述目标终端设备为控制端或展示端;
    第一确定模块,用于从预先存储的各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
    发送模块,用于将所述目标逻辑响应文件发送至所述目标终端设备。
  16. 一种数据传输装置,其中,应用于终端设备,包括:
    发送模块,用于向服务器发送身份令牌信息,所述身份令牌信息用于表征所述终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述终端设备为控制端或展示端;
    接收模块,用于接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述终端设备接收的用于控制所述对端设备的信息。
  17. 一种服务器,其中,所述服务器包括:存储器、收发器、处理器以及总线***;
    其中,所述存储器用于存储程序;
    所述处理器用于执行所述存储器中的程序,包括如下步骤:
    接收目标终端设备发送的身份令牌信息,所述身份令牌信息用于表征所述目标终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用 于指示所述目标终端设备为控制端或展示端;
    从各身份类型相应的逻辑响应文件中,确定所述目标终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述目标终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述目标终端接收的用于控制所述对端设备的信息;
    将所述目标逻辑响应文件发送至所述目标终端设备;
    所述总线***用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
  18. 一种终端设备,其中,所述终端设备包括:存储器、收发器、处理器以及总线***;
    其中,所述存储器用于存储程序;
    所述处理器用于执行所述存储器中的程序,包括如下步骤:
    向服务器发送身份令牌信息,所述身份令牌信息用于表征所述终端设备在与对端设备进行交互时自身的身份类型,所述身份类型用于指示所述终端设备为控制端或展示端;
    接收所述服务器反馈与所述终端设备的身份类型相应的目标逻辑响应文件;
    所述目标逻辑响应文件包括与所述对端设备发送的各控制指令相应的响应信息,以及,输入信息与所述终端设备所需向所述对端设备发送的控制指令的对应关系,响应信息用于指示响应对应的控制指令所执行的操作,所述输入信息为所述终端设备接收的用于控制所述对端设备的信息;
    所述总线***用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
  19. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1至8中任一项所述的方法,或执行如权利要求9至14中任一项所述的方法。
  20. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算 机执行如权利要求1至8任一项所述的方法,或使得计算机执行如权利要求9至14任一项所述的方法。
PCT/CN2017/115623 2017-01-03 2017-12-12 数据传输方法及装置 WO2018126853A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2019525772A JP2019536155A (ja) 2017-01-03 2017-12-12 データ伝送方法及び装置
KR1020197022587A KR102153645B1 (ko) 2017-01-03 2017-12-12 데이터 송신 방법 및 장치
US16/433,897 US10805380B2 (en) 2017-01-03 2019-06-06 Data transmission method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710002152.9A CN106657370B (zh) 2017-01-03 2017-01-03 数据传输方法及装置
CN201710002152.9 2017-01-03

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/433,897 Continuation US10805380B2 (en) 2017-01-03 2019-06-06 Data transmission method and device

Publications (1)

Publication Number Publication Date
WO2018126853A1 true WO2018126853A1 (zh) 2018-07-12

Family

ID=58838318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/115623 WO2018126853A1 (zh) 2017-01-03 2017-12-12 数据传输方法及装置

Country Status (5)

Country Link
US (1) US10805380B2 (zh)
JP (1) JP2019536155A (zh)
KR (1) KR102153645B1 (zh)
CN (1) CN106657370B (zh)
WO (1) WO2018126853A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026572A (zh) * 2019-11-15 2020-04-17 北京金山云网络技术有限公司 分布式***的故障处理方法、装置及电子设备
CN112332947A (zh) * 2020-07-30 2021-02-05 深圳Tcl新技术有限公司 数据传输方法、移动终端及计算机存储介质
CN113347234A (zh) * 2021-05-21 2021-09-03 微民保险代理有限公司 网络信息获取方法、装置、***、计算机设备和存储介质
CN116032691A (zh) * 2023-03-30 2023-04-28 鹏城实验室 靶场互联互通方法、电子设备及可读存储介质
CN117995264A (zh) * 2024-04-02 2024-05-07 杭州海康威视数字技术股份有限公司 一种生物信息建模终端及方法

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657370B (zh) * 2017-01-03 2019-08-30 腾讯科技(深圳)有限公司 数据传输方法及装置
CN107222545B (zh) * 2017-06-20 2020-04-21 北京全域医疗技术集团有限公司 一种数据传输方法及装置
CN108769793A (zh) * 2018-06-15 2018-11-06 深圳市茁壮网络股份有限公司 一种移动应用投影到电视的实现方法及***
CN111208899B (zh) * 2018-11-22 2023-05-26 阿里巴巴集团控股有限公司 交互处理方法、装置、终端及服务器
CN110187685A (zh) * 2019-05-30 2019-08-30 深圳创龙智新科技有限公司 一种数据传输方法、装置、电子设备及存储介质
CN110191189A (zh) * 2019-06-04 2019-08-30 深圳创维-Rgb电子有限公司 网络医疗咨询方法、装置、计算机设备及存储介质
CN112351421B (zh) * 2020-09-14 2024-02-06 深圳Tcl新技术有限公司 数据传输的控制方法、控制设备以及计算机存储介质
CN112463872A (zh) * 2020-11-04 2021-03-09 中国建设银行股份有限公司 一种可视化指标数据获取方法、装置、***及介质
CN112416323B (zh) * 2020-11-24 2024-02-23 乐聚(深圳)机器人技术有限公司 控制代码的生成方法、运行方法、装置、设备及存储介质
CN112738162B (zh) * 2020-12-11 2023-01-10 深圳市越疆科技有限公司 终端与设备的通信方法、终端、电子设备及存储介质
CN113806175A (zh) * 2021-09-22 2021-12-17 杭州遥望网络科技有限公司 一种终端控制方法、装置、电子设备及可读存储介质
CN113873044B (zh) * 2021-10-15 2024-01-02 阿里巴巴(中国)有限公司 数据传输方法、***、设备及存储介质
CN114301925B (zh) * 2021-12-31 2023-12-08 展讯通信(天津)有限公司 数据传输方法及相关设备
CN114531314B (zh) * 2022-01-11 2023-12-22 宁波天擎航天科技有限公司 航天领域大数据可靠传输的方法、电子设备及存储介质
CN114546223A (zh) * 2022-01-25 2022-05-27 吕贺 文件控制方法、装置、电子设备及计算机可读存储介质
CN114650615A (zh) * 2022-03-28 2022-06-21 百富计算机技术(深圳)有限公司 智能销售终端的控制方法、装置、终端设备及存储介质
CN115086387B (zh) * 2022-05-24 2024-01-26 福瑞泰克智能***有限公司 域控制器的控制方法和装置、存储介质及电子装置
CN116094846A (zh) * 2023-04-10 2023-05-09 睿云联(厦门)网络通讯技术有限公司 基于tcp长连接的远程运维***和方法
CN117311258B (zh) * 2023-12-01 2024-03-12 合肥中科鸿创信息科技有限公司 一种基于udp与plc的多设备同步控制方法及***

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1882055A (zh) * 2005-06-14 2006-12-20 乐金电子(沈阳)有限公司 家庭网络***的控制菜单实现装置及方法
US7194689B2 (en) * 2000-08-22 2007-03-20 Microsoft Corporation Generic user control point tool for universal plug and play (UPnP) devices
CN101334932A (zh) * 2007-06-25 2008-12-31 株式会社日立制作所 家电代理设备
US7603266B2 (en) * 2003-09-19 2009-10-13 Microsoft Corporation Generic emulator of devices in a device communications protocol
CN103517116A (zh) * 2012-12-25 2014-01-15 Tcl集团股份有限公司 一种子母遥控器的遥控方法及遥控***

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2331703C (en) 1998-05-07 2007-10-09 Samsung Electronics Co., Ltd. Method and system for device to device command and control in a network
US20060077165A1 (en) * 2004-10-12 2006-04-13 Samsung Electronics Co., Ltd. Wireless LCD device for displaying images received from a mobile communication terminal and an operation method thereof
CN1988489B (zh) * 2006-11-30 2010-05-12 中国电信集团公司 一种智能家居监控的***和方法
KR100888478B1 (ko) 2007-03-08 2009-03-12 삼성전자주식회사 액션 처리 방법, 피제어 장치의 제어 방법, 피제어 장치 및제어 포인트
US9519772B2 (en) * 2008-11-26 2016-12-13 Free Stream Media Corp. Relevancy improvement through targeting of information based on data gathered from a networked device associated with a security sandbox of a client device
TWI395470B (zh) * 2009-04-03 2013-05-01 Mstar Semiconductor Inc 多媒體系統及其控制方法
CN103414746B (zh) * 2013-07-05 2017-04-12 深圳市天朗时代科技有限公司 一种跨平台网络交互的实现方法及其识读器和网络服务器
US9386004B2 (en) * 2013-10-23 2016-07-05 Qualcomm Incorporated Peer based authentication
CN103634688A (zh) * 2013-12-23 2014-03-12 乐视致新电子科技(天津)有限公司 移动通信终端控制智能电视播放视频文件的方法及装置
CN105578310A (zh) * 2016-02-03 2016-05-11 青岛海信传媒网络技术有限公司 基于websocket协议的智能电视遥控方法及装置
US10623450B2 (en) * 2016-12-01 2020-04-14 Accenture Global Solutions Limited Access to data on a remote device
CN106657370B (zh) * 2017-01-03 2019-08-30 腾讯科技(深圳)有限公司 数据传输方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194689B2 (en) * 2000-08-22 2007-03-20 Microsoft Corporation Generic user control point tool for universal plug and play (UPnP) devices
US7603266B2 (en) * 2003-09-19 2009-10-13 Microsoft Corporation Generic emulator of devices in a device communications protocol
CN1882055A (zh) * 2005-06-14 2006-12-20 乐金电子(沈阳)有限公司 家庭网络***的控制菜单实现装置及方法
CN101334932A (zh) * 2007-06-25 2008-12-31 株式会社日立制作所 家电代理设备
CN103517116A (zh) * 2012-12-25 2014-01-15 Tcl集团股份有限公司 一种子母遥控器的遥控方法及遥控***

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026572A (zh) * 2019-11-15 2020-04-17 北京金山云网络技术有限公司 分布式***的故障处理方法、装置及电子设备
CN112332947A (zh) * 2020-07-30 2021-02-05 深圳Tcl新技术有限公司 数据传输方法、移动终端及计算机存储介质
CN112332947B (zh) * 2020-07-30 2024-04-02 深圳Tcl新技术有限公司 数据传输方法、移动终端及计算机存储介质
CN113347234A (zh) * 2021-05-21 2021-09-03 微民保险代理有限公司 网络信息获取方法、装置、***、计算机设备和存储介质
CN113347234B (zh) * 2021-05-21 2022-10-25 微民保险代理有限公司 网络信息获取方法、装置、***、计算机设备和存储介质
CN116032691A (zh) * 2023-03-30 2023-04-28 鹏城实验室 靶场互联互通方法、电子设备及可读存储介质
CN117995264A (zh) * 2024-04-02 2024-05-07 杭州海康威视数字技术股份有限公司 一种生物信息建模终端及方法

Also Published As

Publication number Publication date
KR20190098766A (ko) 2019-08-22
CN106657370B (zh) 2019-08-30
JP2019536155A (ja) 2019-12-12
US10805380B2 (en) 2020-10-13
CN106657370A (zh) 2017-05-10
US20190349417A1 (en) 2019-11-14
KR102153645B1 (ko) 2020-09-08

Similar Documents

Publication Publication Date Title
WO2018126853A1 (zh) 数据传输方法及装置
US11258864B2 (en) Communication device capable of interacting with devices on a network
EP3497560B1 (en) Systems and methods for real-time remote control of mobile applications
WO2015117367A1 (zh) 远程协助的控制方法及装置
EP2854376A1 (en) Transmission method, device and system for media stream
US10594768B2 (en) Method and apparatus of performing remote command dispatching
CN104601650A (zh) 为Web实时通信(WebRTC)交互流提供智能管理的方法和***
WO2019153722A1 (zh) 终端通信的方法、装置、终端及存储介质
AU2013227696A1 (en) Information processing system, information processing method, mobile phone, server, and control method and control program thereof
EP3217596B1 (en) Communication terminal, communication system, and data transmission method
CN106105158A (zh) 用于在搜索者装置与目标装置之间建立连接的方法和***
CN103259771A (zh) 一种网络应用的互动方法及装置
TW201730739A (zh) 資訊交互方法和裝置
WO2024061308A1 (zh) 通知处理方法、终端设备、服务端及计算机存储介质
WO2014026542A1 (zh) 即时通信应用的实现方法及***、与设备
CN111831513A (zh) 日志查询方法、装置、电子设备、及存储介质
WO2019119280A1 (zh) 业务处理方法、云服务器和终端设备
WO2016095449A1 (zh) 一种虚拟桌面的显示方法、终端和存储介质
WO2023109045A1 (zh) WebRTC连接方法及***
US20150120805A1 (en) Bi-directional Channel-based Progress Indicator
JP2017091261A (ja) 装置、プログラム及びシステム
CN114125017B (zh) 媒体信息的显示方法和装置、存储介质及电子设备
JP2014016850A (ja) アプリケーション・ウィンドウの表示を共有する方法、情報端末装置およびコンピュータ・プログラム
JP2023059710A (ja) 通信装置、制御方法、及び制御プログラム
TW201520777A (zh) 提供外部裝置使用通訊服務之系統及其方法

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019525772

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20197022587

Country of ref document: KR

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 17890659

Country of ref document: EP

Kind code of ref document: A1