Movatterモバイル変換


[0]ホーム

URL:


CN106161586A - Realize the intelligent terminal's long polling system system and method to car machine - Google Patents

Realize the intelligent terminal's long polling system system and method to car machine
Download PDF

Info

Publication number
CN106161586A
CN106161586ACN201610405573.1ACN201610405573ACN106161586ACN 106161586 ACN106161586 ACN 106161586ACN 201610405573 ACN201610405573 ACN 201610405573ACN 106161586 ACN106161586 ACN 106161586A
Authority
CN
China
Prior art keywords
car machine
intelligent terminal
communication server
end communication
engine end
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.)
Granted
Application number
CN201610405573.1A
Other languages
Chinese (zh)
Other versions
CN106161586B (en
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co LtdfiledCriticalSichuan Changhong Electric Co Ltd
Priority to CN201610405573.1ApriorityCriticalpatent/CN106161586B/en
Publication of CN106161586ApublicationCriticalpatent/CN106161586A/en
Application grantedgrantedCritical
Publication of CN106161586BpublicationCriticalpatent/CN106161586B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The present invention relates to car networking.The present invention provides a kind of and realizes the intelligent terminal's long polling system system to car machine, intelligent terminal issues remote control command to intelligent terminal server, remote control command is forwarded to engine end communication server by intelligent terminal server, engine end communication server is set up long connection with car machine, and safeguards that an order is lined up for each car machine;When receiving order, new remote control command is joined order to line up, during transmitting order to lower levels, remote control command is gone out team;Meanwhile, whether engine end communication server moment querying command lines up to be empty, is then to maintain to be connected with the length between car machine, otherwise transmitting order to lower levels.Engine end communication server arranges and keeps http request the long time connected, and when, in time threshold, connecting and do not discharge, is released if it exceeds connect;Car machine sends this request again, when engine end communication server receives request, every time period A to engine end overtime return.It is applicable to the intelligent terminal's long polling system to car machine.

Description

Realize the intelligent terminal's long polling system system and method to car machine
Technical field
The present invention relates to the Internet, car networking, service platform and mobile terminal exploitation, particularly to mobile internet environmentUnder, carry out order delivery method timely, reliable to engine end.
Background technology
The Internet in prior art, mobile Internet network environment as follows:
The network infrastructure development of the Internet, through the development that the more than ten years are long-term, the most relatively stable and ripe, PC terminal,The ability of operating system has also reached higher level.
And mobile Internet, owing to relating to wireless telephony network base station, the development of 2G, 3G and 4G technology, it is steadyThough each side such as qualitative, bandwidth, resource distribution are gradually improved, but the current existence the most eventually also having many problems.Further, since moveIts essence " moved " of dynamic the Internet, adds that the development of intelligent terminal (smart mobile phone, panel computer) is later, the most also existsSituation about constantly developing, compared with the Internet, the situation that mobile Internet or low speed, instability, terminal capability are the most weak.AndOwing to it " moves " essence, in the short time, it is extremely difficult to the quality of the Internet.
So, inside the environment of the Internet, web application is due to the network facilities, the maturation of operating system, exploitationUsing and be easier, resource is the most sufficient.And mobile Internet is also intended to " worrying about petty gain or loss ".
Intelligent terminal's battery durable ability, system dormancy:
The battery durable ability of intelligent terminal is technical bottleneck all the time.In the case of using continuously, the overwhelming majoritySmart machine battery cannot be supported more than two hours.So not having the situation of external power source, intelligent terminal must frequencyDormancy numerous, long-time, this network application scene that will greatly affect under two kinds of network environments.
IP address, port resource:
Owing to needing dynamic IP address allocation (to refer not only to the IP of Internet portal here, also include within LANIP), the operation principle of router is all through port mapping, internal network (include PC, mobile phone, flat board, Wifi, 2G, 3G,4G) IP becomes external IP (typically public network IP) and corresponding port with port mapping, and maintains this mapping relations, could be normalGround is revised, E-Packet information, it is ensured that each ip internal, port and each outside ip, the communication of port.
But, the port resource of single ip address is limited, and theoretical upper limit is 65535 ports.For common wideFor router, this is the most sufficient.But, for large-scale network service, network backbone access point etc., ifIP inadequate resource, the resource of each several ten thousand ports of IP quickly can exhaust, thus affect normal communication.
Just because of this, all of router all can arrange ageing time for each port mapping relationship, if aging timeBetween count down toward 0, then port mapping relationship lost efficacy, this port be released to other connect use.If port all exhausts, then withoutThe most newly-built inside of method is connected with outside network.
Port mapping ageing time, than a lot of people imagine in short a lot.General domestic broadband router, time agingBetween be usually two or three minutes;Accessing part in cable broadband operator, ageing time is possibly less than two minutes.At radiotelephony networkNetwork operator accesses part (such as GPRS connection), and ageing time is even less than one minute.
It is to say, any one network communication (no matter being TCP or UDP), if there is no network message within a few minutesTransmission, the IP address port that it takies will be reclaimed by router.This time, no matter this communication of TCP or UDP will terminate.The fact that more cruel it is that the Internet is regarded as being formed by connecting by numerous router, and a network service generally requires logicalCrossing n router, each router can be the port mapping of a connection setup oneself.As long as one of them router reclaimsIts port, the most whole communicating interrupt.
Summary of the invention
The technical problem to be solved, it is simply that provide a kind of and realize the intelligent terminal long polling system system to car machineCar machine section is carried out ordering the most reliably issuing by system and method to realize engine end communication server.
The present invention solves described technical problem, employed technical scheme comprise that, it is achieved the intelligent terminal's long poll control to car machineSystem processed, including intelligent terminal, intelligent terminal server, engine end communication server and car machine, described intelligent terminal and intelligenceTerminal server connects, and intelligent terminal server is connected with engine end communication server, and engine end communication server is with car machine evenConnect;
Described intelligent terminal is used for issuing remote control command to intelligent terminal server;
Described intelligent terminal server for being forwarded to engine end communication server by remote control command;
Described engine end communication server is for setting up long connection with car machine, and is that a command line safeguarded by each car machineTeam;When receiving order, new remote control command is joined order to line up, during transmitting order to lower levels, remote control command is gone out team;WithTime, whether engine end communication server moment querying command line up to be empty, is then to maintain to be connected with long between car machine, otherwise underSay the word.
Concrete, described car machine, it is additionally operable to by, in sending HTTP request, arranging head keep-Alive:timeout=A;
Described engine end communication server, is additionally operable to arrange the long time-out time B that connects, and A < B, described time A and time BBy being manually set.
Further, when described car machine is additionally operable to send HTTP request, the long connection of detection is the most overtime, is then to set up and carThe new long connection of machine end communication server, otherwise by leading between the longest connection establishment and engine end communication serverNews.
Further, described engine end communication server, it is additionally operable to set up long-chain at engine end communication server and car machineAfter connecing, return link information to car machine;
Described car machine is additionally operable to receive after returning link information and again sends HTTP request, and engine end communication server detectsWhether order lines up to be empty, otherwise orders out team to be issued to car machine, is that then waiting time A returns heartbeat packet to car machine, maintenanceHTTP connection is not released.
The mobile phone terminal control method to the long polling system system of engine end is realized based on http protocol, bag for above-mentionedInclude following steps:
Intelligent terminal issues remote control command to intelligent terminal server, and intelligent terminal server is by remote control commandBeing forwarded to engine end communication server, engine end communication server is set up long connection with car machine, and is that each car machine safeguards oneOrder is lined up;When receiving order, new remote control command is joined order to line up, by remote control command during transmitting order to lower levelsGo out team;Meanwhile, whether engine end communication server moment querying command lines up to be empty, is then to maintain the length between car machine evenConnect, otherwise transmitting order to lower levels.
Concrete, engine end communication server is set up with car machine and is comprised the following steps long connection:
Car machine, in sending HTTP request, arranges head keep-Alive:timeout=A;
Engine end communication server arranges connection time-out time B, and A < B, and described time A and time B is by being manually set.
Further, described car machine sends HTTP request, if long connection has timed out, it is logical with engine end that system sets up car machineThe new long connection establishment communication of inquiry server, otherwise by the longest connection establishment communication, engine end communication server returnsLink information is to car machine.
Further, described car machine sends HTTP request, engine end communication server after receiving and returning link information againWhether sense command lines up to be empty, otherwise orders out team to be issued to car machine, is that then waiting time A returns heartbeat packet to car machine, dimensionHold HTTP connection not to be released.
The invention has the beneficial effects as follows: engine end communication server arranges and keeps http request the long time connected, whenTime within time threshold, connection will not discharge, and when car machine has new request, uses the connection that this has set up, will not createNew connection;If it exceeds time threshold, connection can be released, and when retransmiting new request, can re-establish connection;Car simultaneouslyAfter machine receives the order return of engine end communication server every time, all can again send this request, engine end communication server is receivedDuring to request, every time period A to engine end overtime return, by this polling mechanism, engine end, server send heartbeat packet dimensionHold http to connect and be not released, thus realize server and client is carried out order timely, reliable issue.
Accompanying drawing explanation
Fig. 1 is that the present invention realizes intelligent terminal to system authority in the long polling system system and method embodiment of car machineFigure;
Fig. 2 be the present invention realize intelligent terminal in the long polling system system and method embodiment of car machine car machine send pleaseSeek flow chart;
Fig. 3 is that the present invention realizes intelligent terminal's connection long to detection in the long polling system system and method embodiment of car machineThe most effectively flow chart.
Below in conjunction with the detailed description of the invention of embodiment, the foregoing of the present invention is described in further detail again.But this should not being interpreted as, the scope of the above-mentioned theme of the present invention is only limitted to Examples below.Thinking without departing from the above-mentioned technology of the present inventionIn the case of thinking, the various replacements made according to ordinary skill knowledge and customary means or change, all should be included in thisIn bright scope.
Detailed description of the invention
Below in conjunction with the accompanying drawings and embodiment describe in detail technical scheme:
The ageing time that the present invention is directed to the mapping of prior art middle port causes port to be recovered thus causes connecting being releasedThe problem put, it is provided that a kind of realize the intelligent terminal's long polling system system to car machine, including intelligent terminal, intelligent terminal's serviceDevice, engine end communication server and car machine, described intelligent terminal is connected with intelligent terminal server, intelligent terminal server and carMachine end communication server connects, and engine end communication server is connected with car machine;Described intelligent terminal is used for issuing and remotely controls to orderOrder is to intelligent terminal server;Described intelligent terminal server for being forwarded to engine end Communications service by remote control commandDevice;Described engine end communication server is for setting up long connection with car machine, and safeguards that an order is lined up for each car machine;ReceiveDuring order, new remote control command is joined order to line up, during transmitting order to lower levels, remote control command is gone out team;Meanwhile, car machineWhether end communication server moment querying command lines up to be empty, is then to maintain to be connected with the length between car machine, otherwise transmitting order to lower levels.Realizing the mobile phone terminal control method to the long polling system system of engine end for above-mentioned based on http protocol, intelligent terminal issuesRemote control command is to intelligent terminal server, and remote control command is forwarded to engine end Communications service by intelligent terminal serverDevice, engine end communication server is set up long connection with car machine, and is safeguarded that an order is lined up for each car machine;Receiving will when orderingNew remote control command joins order and lines up, and during transmitting order to lower levels, remote control command is gone out team;Meanwhile, engine end communication garmentWhether business device moment querying command lines up to be empty, is then to maintain to be connected with the length between car machine, otherwise transmitting order to lower levels.Engine end leads toInquiry server arranges and keeps http request the long time connected, and when within time threshold, connection will not discharge, Che JiyouDuring new request, use the connection that this has set up, new connection will not be created;If it exceeds time threshold, connection can be releasedPut, when retransmiting new request, connection can be re-established;Car machine receives the order return of engine end communication server every time simultaneouslyAfter, all can again send this request, when engine end communication server receives request, every time period A to engine end overtime return,By this polling mechanism, engine end, server send heartbeat packet and maintain http connection not to be released, thus realize server to visitorFamily end carries out order timely, reliable and issues.
Embodiment
HTTP be a request<prominent example of->response modes, i.e. user end to server send a solicited message,Server responds this information.In old HTTP version, each request will be created a new client-> serviceThe connection of device, sends request on this connection, then receives request.Such pattern has the advantage the biggest to be exactly, itThe simplest, it is readily understood that and programming realization;It also has a shortcoming the biggest to be exactly that its efficiency is the lowest, therefore Keep-Alive is proposed to solve inefficient problem.And Keep-Alive (keeping connecting) function makes client arrive server endConnection continuous and effective, when occurring the subsequent requests of server, Keep-Alive function avoids foundation or again buildsVertical connection.
This example be aiming at http keep connect this mechanism, it is achieved server client is carried out timely, order reliablyOrder issues.
System structure as it is shown in figure 1, include intelligent terminal, intelligent terminal server, engine end communication server and car machine,Described intelligent terminal is connected with intelligent terminal server, and intelligent terminal server is connected with engine end communication server, engine endCommunication server is connected with car machine;Described intelligent terminal is used for issuing remote control command to intelligent terminal server;Described intelligenceCan be used for being forwarded to remote control command engine end communication server by terminal server;Described engine end communication server is used forSet up long connection with car machine, and safeguard that an order is lined up for each car machine;When receiving order, new remote control command is addedEnter and line up to order, during transmitting order to lower levels, remote control command is gone out team;Meanwhile, engine end communication server moment querying command rowWhether team is empty, is then to maintain to be connected with the length between car machine, otherwise transmitting order to lower levels.
It is as follows that engine end is connected implementation with the http length of the communication server:
1. engine end is in the Http request sent, and arranges head Keep-Alive:timeout=A;(server will waitTreat that time period A just returns);
2. engine end communication server arranges connection time-out time B, and A < B, and described time A and time B is by being manually set.The servers such as IIS, Apache arrange the time B that http request keeps connect, and when within time threshold B, connection will notRelease, when engine end has new request, uses the connection that this has set up, will not create new connection.If it exceeds time thresholdValue B, connection can be released, and when retransmiting new request, can re-establish connection.
System work time, engine end sends under mobile network environment maintain connection http request, when IP address change,The reasons such as network environment disconnect this request that will resend, as shown in Figure 2;If long connection has timed out, system sets up carMachine is connected, otherwise by the longest connection establishment communication with the new length of engine end communication server.
And after car machine receives the link information that engine end communication server returns every time, all can again send this request, carWhen machine end communication server receives request, every time period A, client timeout is returned.By this polling mechanism, engine end, clothesBusiness device sends heartbeat packet and maintains http connection not to be released.And when service end has order to issue, returned by this request, and notIt is to return heartbeat packet.The most as shown in Figure 3.Wherein, HTTP effectively returns and includes the return of order and without the return ordered, and hasTime of return < the A of order;Time of return=A without order.But, whether comprising order no matter returning, returning all at TCP chainConnect in holding time and carry out, i.e. A < B.Returning if effectively returning, no matter whether this return includes order, being all explanation,Engine end communication server aspect safeguards the TCP channel having present communications, needs again to be initiated under order by this passage at onceSend out request;And return value is if overtime return, illustrate that this passage had lost efficacy, again will set up new when of requestTCP channel.The command number that can carry due to HTTP request only has one, and all orders issue server end and use queueCache and all of do not had transmitting order to lower levels, when upper once HTTP request arrives, whether had effective order data according to threshold decisionNeeds issue.
Considering the delay under mobile network environment, the value of B-A need to be in OK range, it is ensured that before Connection Release, and oneDirectly heartbeat packet is had to send.

Claims (8)

CN201610405573.1A2016-06-072016-06-07Realize intelligent terminal to the long poll control system and method for vehicle deviceActiveCN106161586B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610405573.1ACN106161586B (en)2016-06-072016-06-07Realize intelligent terminal to the long poll control system and method for vehicle device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610405573.1ACN106161586B (en)2016-06-072016-06-07Realize intelligent terminal to the long poll control system and method for vehicle device

Publications (2)

Publication NumberPublication Date
CN106161586Atrue CN106161586A (en)2016-11-23
CN106161586B CN106161586B (en)2019-03-19

Family

ID=57352879

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610405573.1AActiveCN106161586B (en)2016-06-072016-06-07Realize intelligent terminal to the long poll control system and method for vehicle device

Country Status (1)

CountryLink
CN (1)CN106161586B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109274778A (en)*2018-12-102019-01-25浪潮(北京)电子信息产业有限公司 Scheduling method, device and device for requesting access to file system resources
CN112688979A (en)*2019-10-172021-04-20北京百度网讯科技有限公司Unmanned vehicle remote login processing method, device, equipment and storage medium
CN114710522A (en)*2022-03-172022-07-05重庆长安汽车股份有限公司Android platform-based vehicle-mounted network architecture system and method
EP3968600B1 (en)*2020-09-112024-11-06Volkswagen AgControlling a communication between a vehicle and a backend device

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102523177A (en)*2011-12-192012-06-27北京新媒传信科技有限公司Method and system for realization of message push service
CN102724329A (en)*2012-07-052012-10-10深圳市路畅科技股份有限公司Control method of in-car navigator
CN102829795A (en)*2012-07-172012-12-19广东好帮手电子科技股份有限公司Navigation system and control method thereof
CN103407428A (en)*2013-08-232013-11-27哈尔滨工业大学Intelligent driving assisting system in automobile interconnect time
CN104468547A (en)*2014-11-282015-03-25北京奇虎科技有限公司Long connection establishing method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102523177A (en)*2011-12-192012-06-27北京新媒传信科技有限公司Method and system for realization of message push service
CN102724329A (en)*2012-07-052012-10-10深圳市路畅科技股份有限公司Control method of in-car navigator
CN102829795A (en)*2012-07-172012-12-19广东好帮手电子科技股份有限公司Navigation system and control method thereof
CN103407428A (en)*2013-08-232013-11-27哈尔滨工业大学Intelligent driving assisting system in automobile interconnect time
CN104468547A (en)*2014-11-282015-03-25北京奇虎科技有限公司Long connection establishing method, device and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109274778A (en)*2018-12-102019-01-25浪潮(北京)电子信息产业有限公司 Scheduling method, device and device for requesting access to file system resources
CN112688979A (en)*2019-10-172021-04-20北京百度网讯科技有限公司Unmanned vehicle remote login processing method, device, equipment and storage medium
CN112688979B (en)*2019-10-172022-08-16阿波罗智能技术(北京)有限公司Unmanned vehicle remote login processing method, device, equipment and storage medium
US11621952B2 (en)2019-10-172023-04-04Apollo Intelligent Driving Technology (Beijing) Co., Ltd.Remote login processing method, apparatus, device and storage medium for unmanned vehicle
EP3968600B1 (en)*2020-09-112024-11-06Volkswagen AgControlling a communication between a vehicle and a backend device
CN114710522A (en)*2022-03-172022-07-05重庆长安汽车股份有限公司Android platform-based vehicle-mounted network architecture system and method
CN114710522B (en)*2022-03-172023-05-26重庆长安汽车股份有限公司Vehicle-mounted network architecture system and method based on Android platform

Also Published As

Publication numberPublication date
CN106161586B (en)2019-03-19

Similar Documents

PublicationPublication DateTitle
CN102761864B (en)Data transmission method, system and device
CN102769603B (en)The method of a kind of data transmission, system and equipment
CN113572835B (en)Data processing method, network element equipment and readable storage medium
CN106161586A (en)Realize the intelligent terminal&#39;s long polling system system and method to car machine
CN106161598B (en)Agent keep-alive system and method
KR20100031309A (en)A method for management device in a communication network and a system thereof
CN103457985B (en)A kind of dual-channels communication method and system
US20060221987A1 (en)LAN and WWAN gateway
WO2017097023A1 (en)Perception-free authentication method and system, and control method and system based on method
EP4246936A1 (en)Data processing method, function device and readable storage medium
CN109982281A (en)A kind of communication system and method based on LoRaWAN
CN106941536A (en)Data interactive method between client and server based on http protocol
CN102984237A (en)System and method for data transmission and based on socket
CN105262836A (en)Information push method of server and push information reception method of client
CN102185885A (en)Intelligent internet of things management system for white goods
EP2157813A1 (en)Remote control system, equipment-side controller, equipment control program, and equipment control method
CN113824594B (en)Message sending method and device
CN102340828A (en)Method for improving terminal processing performance through base station and base station thereof
CN108234595B (en)Log transmission method and system
CN109587028A (en)A kind of method and apparatus controlling client traffic
CN105163339A (en)Network access device buffered asymmetric long connection method and system
CN102833791A (en)Packet domain content caching system for radio network controller (RNC) and implementing method thereof
CN104798397A (en) Method and apparatus for hosting an application through an access node
CN112039917B (en)Internet of things communication management system
CN109922159B (en) A method for two-way virtual connection between Internet of Things devices in the cloud

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp