CN109889513A - Realize the method that communication control is carried out between fusion device internal gateway and the end OTT - Google Patents

Realize the method that communication control is carried out between fusion device internal gateway and the end OTT Download PDF

Info

Publication number
CN109889513A
CN109889513A CN201910106924.2A CN201910106924A CN109889513A CN 109889513 A CN109889513 A CN 109889513A CN 201910106924 A CN201910106924 A CN 201910106924A CN 109889513 A CN109889513 A CN 109889513A
Authority
CN
China
Prior art keywords
server
client
message
ott
fusion device
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910106924.2A
Other languages
Chinese (zh)
Inventor
张玲增
闵长春
季鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Gongjin Communication Technology Co Ltd
Original Assignee
Shanghai Gongjin Communication Technology Co Ltd
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 Shanghai Gongjin Communication Technology Co Ltd filed Critical Shanghai Gongjin Communication Technology Co Ltd
Priority to CN201910106924.2A priority Critical patent/CN109889513A/en
Publication of CN109889513A publication Critical patent/CN109889513A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The present invention relates to a kind of methods realized and carry out communication control between fusion device internal gateway and the end OTT, server-side includes gateway module, method includes the steps that server-side carries out communication information processing, it is connect specifically includes the following steps: (1-1) server-side establishes socket with client, json reference format defines communication information, and carries out message communicating by socket socket;(1-2) server-side judges the type of message that client is sent, and keeps connection status or disconnection according to the message content.The step of carrying out communication information processing the invention further relates to client.Using method of the invention, it is possible to neatly define type of message and message content, facilitate the information exchange of server-side and client, it is convenient to be interacted with user, not only guarantee real-time, the robustness of communication, but also guaranteed that channel is not take up resource when not communicating, and obtain better user experience.

Description

Realize the method that communication control is carried out between fusion device internal gateway and the end OTT
Technical field
The present invention relates to network communication equipment field more particularly to intelligent television fields, in particular to a kind of realization to merge The method of communication control is carried out between equipment internal gateway and the end OTT.
Background technique
With the fast development of network technology, the circulation way of traditional tv media constantly changes, intelligence electricity Depending on providing the service of content abundant and hommization for user by network transmission TV information data, compared to traditional wire electricity There is apparent advantage depending on single direct broadcast function.Convergence gateway equipment has both network routing function and smart television function, net Network routing function realizes that smart television function is realized by the OTT module inside equipment by the gateway module inside equipment.Two The independent system of a each self-operating of module, gateway module operation is Linux system, and the operation of OTT module is android system System.The interface that equipment is interacted with user is responsible for by OOT module, and the parameter setting of gateway module and information show and is also required to pass through OTT module realizes that this just needs gateway module and OTT module to have the ability of message communicating, and therefore, it is necessary in OTT module The Linux system run on the Android system and gateway module of operation establishes a communication channel, should guarantee the reality of communication Shi Xing, robustness guarantee that channel is not take up resource when not communicating, again to obtain better user experience.
Summary of the invention
The purpose of the present invention is overcoming the above-mentioned prior art, provides and a kind of meet real-time, occupy resource Less, the method for realizing progress communication control between fusion device internal gateway and the end OTT applied widely.
To achieve the goals above, communication control is carried out between realization fusion device internal gateway of the invention and the end OTT Method it is as follows:
The method that communication control is carried out between the realization fusion device internal gateway and the end OTT, is mainly characterized by, and services End includes gateway module, and the method includes the steps that server-side carries out communication information processing, and the method includes following Step:
(1-1) server-side is established socket with client and is connect, and json reference format defines communication information, and passes through Socket socket carries out message communicating;
(1-2) server-side judges the type of message that client is sent, and keeps connection status according to the message content Or it disconnects.
Preferably, the step (1) specifically includes the following steps:
(1-1.1) opens server-side process, initializes and sets port;
Server-side described in (1-1.2) waits the linking request of client, judges whether server-side is received within a limited period of time To the message of client, if it is, establishing the link and starting timing, the information for waiting client to send continues step (1- 2);Otherwise, link, exit step are closed.
Preferably, the step (1-2) specifically includes the following steps:
(1-2.1) judges whether server-side receives the information of client transmission within a limited period of time, if it is, parsing visitor Family client information obtains type of message, and timer is reset, reclocking, continues step (1-2.2);Otherwise, link is closed, etc. It is linked to next time with client;
(1-2.2) server-side judges the type of message that client is sent, and keeps connection shape according to the message content State or disconnection.
Preferably, the step (1-2.2) specifically includes the following steps:
(1-2.2.1) server-side judges whether received be heartbeat packet, if it is, generating server-side heartbeat packet, and returns Multiple client heartbeat packet;Otherwise, continue step (1-2.2.2);
(1-2.2.2) server-side judges whether received be event package, if it is, parsing message content and executing correspondence Event generates server-side and accordingly wraps and reply client;Otherwise, it disconnects and being linked with client, and continue step (1-1).
Preferably, client includes OTT module, the method includes the steps that client carries out communication information processing, Specifically includes the following steps:
The configuration of (2-1) OTT Module registers Android DTV services and provides aidl interface, and client and server-side are established Link;
(2-2) client sends heartbeat packet to server-side according to setting time interval, judges whether receive in limiting time The heartbeat packet that server-side is replied, if it is, continuing step (2-3);Otherwise, it sends and disconnects packet, and disconnect socket company It connects, re-initiates socket connection to server;
(2-3) client receives the response message that gateway module is sent, and parses simultaneously processing character string message, judges received Whether response message is heartbeat packet, if it is, Updating time, sends heartbeat packet after prefixed time interval again to servicing End;Otherwise, Updating time obtains and parses field contents.
Preferably, the step (2-2) is further comprising the steps of:
(2-2.1) client receives the json format string of server encapsulation by socket.
Preferably, the step (2-3) is further comprising the steps of
(2-3.1) judgement with server disconnect whether be the last one realize aidl interface application, if so, Then client transmission disconnects packet, and disconnects with server-side.
Preferably, the communication information that json reference format defines in the step (1-1) includes type of message, in message Appearance, informed source, message whereabouts and message id.
Preferably, the type of message includes heartbeat packet, event package, response bag, notice packet and disconnects packet.
The method that communication control is carried out between fusion device internal gateway and the end OTT is realized using of the invention, it can Type of message and message content are neatly defined, the information exchange of server-side and client is facilitated.It can be mentioned simultaneously in running background It is used for the different foreground application of Android system for AIDL interface, convenient interact with user, both guarantee communicated real-time Property, robustness, and guarantee channel resource is not take up when not communicating, obtain better user experience.
Detailed description of the invention
Fig. 1 is the service for realizing the method for progress communication control between fusion device internal gateway and the end OTT of the invention End carries out the flow chart of communication information processing
Fig. 2 is the service for realizing the method for progress communication control between fusion device internal gateway and the end OTT of the invention The communication interaction schematic diagram at end and client.
Specific embodiment
It is further to carry out combined with specific embodiments below in order to more clearly describe technology contents of the invention Description.
Of the invention should realize the side that communication control is carried out between fusion device internal gateway and the end OTT based on above system Method, including following steps:
Server-side includes gateway module, and the method includes the steps that server-side carries out communication information processing, described Method the following steps are included:
(1-1) server-side is established socket with client and is connect, and json reference format defines communication information, and passes through Socket socket carries out message communicating;
(1-1.1) opens server-side process, initializes and sets port;
Server-side described in (1-1.2) waits the linking request of client, judges whether server-side is received within a limited period of time To the message of client, if it is, establishing the link and starting timing, the information for waiting client to send continues step
(1-2);Otherwise, link, exit step are closed;
(1-2) server-side judges the type of message that client is sent, and keeps connection status according to the message content Or it disconnects;
(1-2.1) judges whether server-side receives the information of client transmission within a limited period of time, if it is, parsing visitor Family client information obtains type of message, and timer is reset, reclocking, continues step (1-2.2);Otherwise, link is closed, etc. It is linked to next time with client;
(1-2.2) server-side judges the type of message that client is sent, and keeps connection shape according to the message content State or disconnection;
(1-2.2.1) server-side judges whether received be heartbeat packet, if it is, generating server-side heartbeat packet, and returns Multiple client heartbeat packet;Otherwise, continue step (1-2.2.2);
(1-2.2.2) server-side judges whether received be event package, if it is, parsing message content and executing correspondence Event generates server-side and accordingly wraps and reply client;Otherwise, it disconnects and being linked with client, and continue step (1-1).
Preferably, client includes OTT module, the method includes the steps that client carries out communication information processing, Specifically includes the following steps:
The configuration of (2-1) OTT Module registers Android DTV services and provides aidl interface, and client and server-side are established Link;
(2-2) client sends heartbeat packet to server-side according to setting time interval, judges whether receive in limiting time The heartbeat packet that server-side is replied, if it is, continuing step (2-3);Otherwise, it sends and disconnects packet, and disconnect socket company It connects, re-initiates socket connection to server;
(2-2.1) client receives the json format string of server encapsulation by socket;
(2-3) client receives the response message that gateway module is sent, and parses simultaneously processing character string message, judges received Whether response message is heartbeat packet, if it is, Updating time, sends heartbeat packet after prefixed time interval again to servicing End;Otherwise, Updating time obtains and parses field contents;
(2-3.1) judgement with server disconnect whether be the last one realize aidl interface application, if so, Then client transmission disconnects packet, and disconnects with server-side.
As the preferred embodiment of the present invention, json reference format defines in the step (1-1) communication information Including type of message, message content, informed source, message whereabouts and message id.
As the preferred embodiment of the present invention, the type of message includes heartbeat packet, event package, response bag, notice Wrap and disconnect packet.
In a specific embodiment of the invention, the communication means of a kind of standby internal gateway and the end OTT is disclosed, to merge net It closes device gateway and set-top box direct communication provides a kind of flexible and efficient implementation for facilitating communication.The program passes through in net It closes and establishes socket communication realization message transmission between module Linux system and OTT module Android system, wherein gateway mould Block uses json format, can neatly define type of message as server-side, OTT module as client, the message of communication And message content, facilitate the information exchange of server-side and client.OTT module runs Android system, communicates as socket Client, the function of socket client is realized using the service component of Android system, and in running background, simultaneously AIDL interface is provided to use for the different foreground application of Android system, it is convenient to be interacted with user.In the technical program Andtvservice service refers to the configuration service of android DTV, and iptvd refers to that DTV configures server-side.
It establishes socket between the Linux system and the Android system of OTT module of gateway module to connect, gateway module As server-side, OTT module carries out message communicating by socket socket as client, both ends.
By the communication of socket connection setup gateway module and OTT module, disappeared using the definition communication of json reference format Breath realizes information exchange flexibly and efficiently and guarantees the robustness of link, and the end OTT is convenient using android service component User's operation.
Define server-side and client communication message using json standard, including define type of message, message content, Informed source and message whereabouts, message id.Type of message includes heartbeat packet, event package, response bag, and notice packet disconnects packet. Message content has scalability, depending on message content.
Server-side and client are connected by sending heartbeat packet holding, and client disconnects packet closing company by sending It connects.
OTT module realizes the function of socket communication customer end, service by the service component of Android system Component may operate in Android system backstage, not influenced by foreground manipulation, and the communication with gateway module server-side is kept.
The end OTT service module provides AIDL interface, and foreground application or other application, can be with by realizing the interface Easily communicated with gateway module.
The specific implementation step of a kind of communication means of fusion device internal gateway and the end OTT, server-side and client is such as Under:
Server-side:
1, gateway module realizes the server-side function of socket communication, after system starting, opens server-side process, initialization Socket sets port, waits the linking request of client.
2, server-side receives client link request, establishes the link, and waits client to send message, and start timing, such as Fruit does not receive client message within a limited period of time, closes link.
3, server-side receives client and sends message, and timer is reset, reclocking.Client message is parsed, acquisition disappears Type is ceased, if it is heartbeat packet message, then server-side heartbeat packet is generated, replys client.
If what 4, server-side received is event package, the message field contents of event package are obtained, are parsed in message Hold, calls gateway module system interface to obtain corresponding informance according to interface message wherein included or execute corresponding operating, then Response bag is generated, client is replied.
If what 5, server-side received is to disconnect packet, disconnect.
6, if it exceeds limiting time does not receive the message of client, then connection is closed, waits client next time Connection request.
Client:
1, OTT module registers andtvservice service in the launch program that Android system starts.
2, andtvservice service routine provides aidl interface, and other application is logical by realizing the interface and the service Letter.
3, when there is first application connection andtvservice service for realizing the aidl interface, service starting, wound Socket client is built to connect with gateway module socket server-side.
4, after client and server-side establish connection, client sends heartbeat to server-side according to setting time interval Packet, when client is more than not receive the reply heartbeat packet of server-side in the time restriction arranged with server-side, client is sent Packet is disconnected, and disconnects socket connection, then re-initiates socket connection to server.
5, when andtvservice service, which receives Android system other application, sends message request, message is encapsulated At json format string, then sent by socket client to gateway side socket server-side.
6, when socket client receives the response message that gateway side socket server-side is sent, parsing json character string disappears Breath, different processing is done according to type of message.If it is heartbeat packet, Updating time, until next time interval is sent out again Send heartbeat packet to server-side.If it is event package or notice packet, Updating time, and the content of message field is obtained, parsed After issue corresponding application.
7, when the last one realizes that the application of aidl interface is disconnected with andtvservice service, The socket client transmission of andtvservice service disconnects packet, disconnects with socket server-side.
The method that communication control is carried out between fusion device internal gateway and the end OTT is realized using of the invention, it can Type of message and message content are neatly defined, the information exchange of server-side and client is facilitated.It can be mentioned simultaneously in running background It is used for the different foreground application of Android system for AIDL interface, convenient interact with user, both guarantee communicated real-time Property, robustness, and guarantee channel resource is not take up when not communicating, obtain better user experience.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that can still make Various modifications and alterations are without departing from the spirit and scope of the invention.Therefore, the description and the appended drawings should be considered as illustrative And not restrictive.

Claims (9)

1. a kind of realized using system described in claim 1 carries out communication control between fusion device internal gateway and the end OTT Method, which is characterized in that server-side includes gateway module, the method include server-side carry out communication information processing step Suddenly, specifically includes the following steps:
(1-1) server-side is established socket with client and is connect, and json reference format defines communication information, and is covered by socket It connects word and carries out message communicating;
(1-2) server-side judges the type of message that client is sent, and keeps connection status according to the message content or break It opens.
2. according to claim 1 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, Be characterized in that, the step (1) specifically includes the following steps:
(1-1.1) opens server-side process, initializes and sets port;
Server-side described in (1-1.2) waits the linking request of client, judges whether server-side receives visitor within a limited period of time The message at family end, if it is, establishing the link and starting timing, the information for waiting client to send continues step (1-2);It is no Then, link, exit step are closed.
3. according to claim 1 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, Be characterized in that, the step (1-2) specifically includes the following steps:
(1-2.1) judges whether server-side receives the information of client transmission within a limited period of time, if it is, parsing client Information acquisition messages type, and timer is reset, reclocking, continue step (1-2.2);Otherwise, link is closed, under waiting Secondary linking with client;
(1-2.2) server-side judges the type of message that client is sent, and according to the message content keep connection status or It disconnects.
4. according to claim 1 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, Be characterized in that, the step (1-2.2) specifically includes the following steps:
(1-2.2.1) server-side judges whether received be heartbeat packet, if it is, generating server-side heartbeat packet, and replys visitor Family end heartbeat packet;Otherwise, continue step (1-2.2.2);
(1-2.2.2) server-side judges whether received be event package, if it is, parsing message content and executing corresponding thing Part generates server-side and accordingly wraps and reply client;Otherwise, it disconnects and being linked with client, and continue step (1-1).
5. according to claim 1 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, It is characterized in that, client includes OTT module, and the method includes the steps that client carries out communication information processing, specific to wrap Include following steps:
The configuration of (2-1) OTT Module registers Android DTV services and provides aidl interface, and client and server-side establish chain It connects;
(2-2) client sends heartbeat packet to server-side according to setting time interval, judges service whether is received in limiting time The heartbeat packet replied is held, if it is, continuing step (2-3);Otherwise, it sends and disconnects packet, and disconnect socket connection, to Server re-initiates socket connection;
(2-3) client receives the response message that gateway module is sent, and parses simultaneously processing character string message, judges received response Whether message is heartbeat packet, if it is, Updating time, sends heartbeat packet again to server-side after prefixed time interval;It is no Then, Updating time obtains and parses field contents.
6. according to claim 5 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, It is characterized in that, the step (2-2) is further comprising the steps of:
(2-2.1) client receives the json format string of server encapsulation by socket.
7. according to claim 5 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, It is characterized in that, the step (2-3) is further comprising the steps of
(2-3.1) judgement with server disconnect whether be the last one realize aidl interface application, if it is, objective Family end sends and disconnects packet, and disconnects with server-side.
8. according to claim 1 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, It is characterized in that, the communication information that json reference format defines in the step (1-1) includes type of message, message content, disappears Cease source, message whereabouts and message id.
9. according to claim 8 realize the method that communication control is carried out between fusion device internal gateway and the end OTT, It is characterized in that, the type of message includes heartbeat packet, event package, response bag, notice packet and disconnects packet.
CN201910106924.2A 2019-02-02 2019-02-02 Realize the method that communication control is carried out between fusion device internal gateway and the end OTT Pending CN109889513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910106924.2A CN109889513A (en) 2019-02-02 2019-02-02 Realize the method that communication control is carried out between fusion device internal gateway and the end OTT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910106924.2A CN109889513A (en) 2019-02-02 2019-02-02 Realize the method that communication control is carried out between fusion device internal gateway and the end OTT

Publications (1)

Publication Number Publication Date
CN109889513A true CN109889513A (en) 2019-06-14

Family

ID=66927864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910106924.2A Pending CN109889513A (en) 2019-02-02 2019-02-02 Realize the method that communication control is carried out between fusion device internal gateway and the end OTT

Country Status (1)

Country Link
CN (1) CN109889513A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182078A (en) * 2020-01-03 2020-05-19 清华大学深圳国际研究生院 Multi-screen interaction method based on intelligent cabin
WO2024098748A1 (en) * 2022-11-10 2024-05-16 中国电信股份有限公司 Communication method and system, and client, gateway device and global server load balance device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141422A (en) * 2007-10-26 2008-03-12 中国电信股份有限公司 Method and system to access family gateway and family gateway
CN102647314A (en) * 2012-05-16 2012-08-22 深圳市乐唯科技开发有限公司 Client side on-line state judgment method and system
US8732810B2 (en) * 2011-10-27 2014-05-20 Cellco Partnership IP push platform and connection protocol in a push notification framework
CN104660708A (en) * 2015-03-13 2015-05-27 黄庆宇 HTTP (Hyper Text Transfer Protocol) based mobile application message forwarding method and system
CN105681391A (en) * 2015-12-28 2016-06-15 智慧方舟科技有限公司 Server, Android client and network communication method and device of server and Android client
CN108718421A (en) * 2018-05-08 2018-10-30 深圳唱刻科技有限公司 A kind of requesting song control system and method
CN109040165A (en) * 2018-05-28 2018-12-18 烽火通信科技股份有限公司 Integrated Intelligent Network shuts the system and communication means of heterogeneous platform communication

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141422A (en) * 2007-10-26 2008-03-12 中国电信股份有限公司 Method and system to access family gateway and family gateway
US8732810B2 (en) * 2011-10-27 2014-05-20 Cellco Partnership IP push platform and connection protocol in a push notification framework
CN102647314A (en) * 2012-05-16 2012-08-22 深圳市乐唯科技开发有限公司 Client side on-line state judgment method and system
CN104660708A (en) * 2015-03-13 2015-05-27 黄庆宇 HTTP (Hyper Text Transfer Protocol) based mobile application message forwarding method and system
CN105681391A (en) * 2015-12-28 2016-06-15 智慧方舟科技有限公司 Server, Android client and network communication method and device of server and Android client
CN108718421A (en) * 2018-05-08 2018-10-30 深圳唱刻科技有限公司 A kind of requesting song control system and method
CN109040165A (en) * 2018-05-28 2018-12-18 烽火通信科技股份有限公司 Integrated Intelligent Network shuts the system and communication means of heterogeneous platform communication

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘永欢: "基于Android系统的智能家居控制系统的软件设计", 《中国优秀硕士学位论文全文数据库》 *
罗培松: "IPTV机顶盒的浏览器设计与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182078A (en) * 2020-01-03 2020-05-19 清华大学深圳国际研究生院 Multi-screen interaction method based on intelligent cabin
WO2024098748A1 (en) * 2022-11-10 2024-05-16 中国电信股份有限公司 Communication method and system, and client, gateway device and global server load balance device

Similar Documents

Publication Publication Date Title
CN102790776B (en) Heartbeat connection normalizing processing method, terminal, server and communication system
CN103701695B (en) Intelligent home gateway control system
CN111132135B (en) Wireless network distribution method and system for intelligent home terminal
CN103906000B (en) The communication means and system of a kind of mobile terminal and POS terminal
CN109120962A (en) The method and apparatus of software terminal connection view networking
CN109194660A (en) The method of network entry and device of mobile terminal
US11012375B2 (en) Enhanced handling of multicast data streams within a broadband access network of a telecommunications network
CN105516262B (en) Application program remote control method and system
CN109889513A (en) Realize the method that communication control is carried out between fusion device internal gateway and the end OTT
CN109787981A (en) Protocol conversion system, method, apparatus, equipment and storage medium
CN110460366A (en) A kind of Unmanned Aerial Vehicle Data interconnection method, system, electronic equipment and storage medium
CN117201579A (en) Semi-physical simulation communication system based on UDP and DDS architecture
CN105790988A (en) Implementation method and device of operation, administration and management function
CN107122237A (en) Data communication method and device
CN105306276B (en) OAM protocol encapsulating method, system and EPON based on software defined network access net
CN110138631A (en) The method for detecting connectivity and terminal device in a kind of view networking tunnel
CN114221909A (en) Data transmission method, device, terminal and storage medium
WO2011160341A1 (en) Reader driver device, system and method based on llrp (low-level reader protocol)
CN110167193A (en) WiFi matches network method and WiFi equipment automatically
CN110138633A (en) A kind of storage gateway method of network entry and device
CN108989157B (en) Method and device for controlling intelligent equipment
CN102523122B (en) Remote management method of terminal equipment in wide area network and management apparatus thereof
CN109688124B (en) Data exchange method based on video boundary
CN104038557A (en) Batch upgrading method of equipment software in optical fiber connection tree shape network structure
CN111865957A (en) Frame structure and method and system thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190614

RJ01 Rejection of invention patent application after publication