﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GPS软件平台开发技术博客 &#187; Socket</title>
	<atom:link href="http://www.jt808.com/?feed=rss2&#038;tag=socket" rel="self" type="application/rss+xml" />
	<link>http://www.jt808.com</link>
	<description>帮助IT团队快速构建符合部标的GPS和视频平台(2379423771@qq.com)</description>
	<lastBuildDate>Sun, 03 Nov 2024 04:30:16 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>基于部标JT/T 808协议及数据格式的GPS服务器</title>
		<link>http://www.jt808.com/?p=322</link>
		<comments>http://www.jt808.com/?p=322#comments</comments>
		<pubDate>Thu, 07 Mar 2013 09:59:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GPS系统]]></category>
		<category><![CDATA[部标808]]></category>
		<category><![CDATA[部标监控平台]]></category>
		<category><![CDATA[gps部标]]></category>
		<category><![CDATA[JT/T 808]]></category>
		<category><![CDATA[Socket]]></category>

		<guid isPermaLink="false">http://www.ltmonitor.com/blog/?p=322</guid>
		<description><![CDATA[2011年5月10日信息中心下发了《印发道路运输车辆卫星定位系统平台和道路运输车辆卫星定位系统车载终端标准符合 [...]]]></description>
			<content:encoded><![CDATA[<div class="info" style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px;">2011年5月10日信息中心下发了《印发道路运输车辆卫星定位系统平台和道路运输车辆卫星定位系统车载终端标准符合性审查办法（试行）的通知》。通知要求，系统平台和车载终端应当分别满足《平台要求》和《终端要求》，同时分别满足《道路运输车辆卫星定位系统平台数据交换》和《道路运输车辆卫星定位系统终端通讯协议及数据格式》的要求。系统平台和车载终端，应按照本办法通过标准符合性审查。不符合标准的，不得用于道路运输车辆动态监管工作。《道路运输车辆卫星定位系统平台和道路运输车辆卫星定位系统车载终端标准》简称部标，部标包括《道路运输车辆卫星定位系统平台技术要求》（JT/T796-2011，简称《平台部标》）和《 道路运输车辆卫星定位系统车载终端技术要求》（JT/T794-2011，简称《终端部标》）。至此，关于系统平台和车载终端必须符合部标的政策性文件正式出台。而对应硬件终端标准的通信协议标准JT/T808-2011和JT/T809-2011协议也随之出台。</div>
<div class="content">
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">部标808和809的出台，统一了产品的标准，统一了平台与终端之间的通讯协议，对于GPS运营商而言，只要平台支持部标，那可以选择任意一家的GPS车载终端，也不会受厂商的制约，GPS运营商在市场竞争过程中将更看重产品的质量及服务，从而也间接地促进市场上产品的稳定性和可靠性。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">但是开发部标GPS服务器是一个繁琐苦逼的活，有各种各样的GPS终端需要兼容和支持，现在交通部颁发了统一的标准协议和数据格式，大部分车辆的GPS终端都需要支持，软件也需要支持，否则可能在市场准入的时候就遇到麻烦。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">我们开发了一个支持JT/T 808-2011数据格式的健壮的GPS服务器，提供下载。数据库版本支持Mysql, Sqlserver和Oracle等关系数据库，可以直接拿来做服务器连接前段GPS客户端和报表开发。<strong><span style="line-height: 1.8; text-decoration: underline;">需要JT 808 源码(java和C#两版本可选其一)+808模拟测试终端 + 压力测试工具的请联系我购买1200元<u>(</u></span><u><span style="color: rgb(0, 0, 0); font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; font-size: 12px; line-height: 18px;">2379423771@qq.com</span><span style="line-height: 1.8; text-decoration: underline;">)</span></u></strong><strong>,</strong>&nbsp;Java版本参见:<a href="http://www.jt808.com/?p=495">基于Java Mina框架的部标GPS服务器</a>，JT 808源码很完整，已通过交管平台接入，可以直接使用。如果自己来写，可能需要很长时间的编写，由于需要结合终端或模拟终端进行测试，很多测试用例很难测试，如拍照，多媒体上传，行车记录仪数据上传等等，很容易走弯路，浪费了大量的时间，建议直接购买808源码省时省力。而通过808模拟测试终端可以模拟硬件设备的上传行为通过TCP或UDP发送数据，帮助检验我们的程序是否正确的实现了808协议。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">需要购买基于苏标协议的Adas主动安全平台，参见文章：<span style="color:#f00;"><strong><u><a href="http://www.jt808.com/?p=1564" rel="bookmark" style="font-family: Georgia, Arial, Helvetica, sans-serif; font-size: 2em; text-transform: capitalize; margin: 0px; padding: 0px; color: rgb(38, 38, 38); text-decoration-line: none;">基于部标1078视频协议和苏标Adas协议构建主动安全平台</a></u></strong></span></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">&nbsp;</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">基于1078协议开发的视频服务器，参见文章：<strong><u><a href="http://www.jt808.com/?p=1584" rel="bookmark" style="font-family: Georgia, Arial, Helvetica, sans-serif; font-size: 2em; text-transform: capitalize; margin: 0px; padding: 0px; color: rgb(38, 38, 38); text-decoration-line: none;">基于JT/T 1078协议设计和开发部标视频服务器</a></u></strong></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;"><img alt="部标808服务器源码" height="544" src="http://www.jt808.com/wp-content/uploads/808server.jpg" width="955" /></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">&nbsp;</p>
<p style="margin: 10px auto !important;"><font color="#333333" face="Georgia, Times New Roman, Times, sans-serif"><span style="font-size: 14px; line-height: 1.5;">809转发服务器的设计，参见:</span><a href="http://www.jt808.com/?p=386"><span style="font-size: 14px; line-height: 21px;">基于JT/T809-2011的(已过检)GPS平台数据交换及转发服务器</span></a></font><br />
		<a href="http://www.jt808.com/wp-content/plugins/download-monitor/download.php?id=15" style="color: rgb(61, 129, 238); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.5; outline: none; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed;"><img alt="交通部JT808协议GPS数据Socket服务器" src="http://www.ltmonitor.com/blog/wp-content/uploads/2011/08/Download-17.png" style="border: 0px rgb(221, 221, 221);" />交通部JT808协议GPS数据Socket服务器(需要Net4.0环境) 已下载 373 次</a></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;"><span style="line-height: 1.8;">试用版不提供指令下发的功能，没有数据存储和报警分析。如果没有安装.NET4.0 runtime ,将不能运行，.NET4 runtime 安装请到微软网站 :&nbsp;</span><a href="http://www.microsoft.com/zh-cn/download/details.aspx?id=17718" style="line-height: 21px; outline: none; text-decoration: none; color: rgb(61, 129, 238); border-bottom-width: 1px; border-bottom-style: dashed;">http://www.microsoft.com/zh-cn/download/details.aspx?id=17718</a></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">&nbsp;</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;"><span style="line-height: 1.5;">1.支持TCP和UDP两种传输协议, 完整实现808协议的所有命令和消息；</span>主要功能有：</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">2.基于完成端口的异步通信模式，可以支持大规模运输车辆的终端并发上传GPS数据；</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">3.对于数据包和定位包及服务器终端连接状态进行在线实时监控，提供在线下发命令接口可以很方便的与终端进行交互，如拍照摄像等；</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">4.对于GPS数据包进行日志保存，便于调试跟踪。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">5.开发语言采用C# .NET4.0框架， 数据库框架采用Nhibernate，这样便于数据库移植，可以支持Oracle, MySql和MS Sqlserver等多个数据库。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">6.Socket服务器模型采用了基于SocketAsyncEventArgs的SocketServer. &nbsp;SocketAsyncEventArgs是.net提供的关于异步socket类，封装了IOCP的使用，可以用它方便的实现非阻塞通信（non-blocking IO），同时采用对象池和缓冲区管理，大大减少了对象分配和垃圾收集的工作，对于Server性能和吞吐量有很大提升。单机测试可以并发支持上万个终端。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">7.数据库版，自动分析GPS数据，形成报警记录，停车报表，油量记录和加油漏油记录、历史轨迹等多个丰富的报表，直接拿来就可以用。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">8.高性能的解析模块，在大规模连接的情况下，对于上传的数据包的粘包、断包仍然需要进行不差毫厘的解析，防止出现丢包的情况，这也是交通部平台过检所要求的：在5000和1万个终端连接的情况下，不允许出现连接中断、丢包的情况。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">&nbsp;主界面功能如下图所示，提供连接和数据包的视图，对于连接的终端可以批量下发各种命令。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">&nbsp;</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">&nbsp;</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">服务器提供了从终端控制、参数设置和行车记录仪及其他所有808规定的平台下发指令。可以对多个终端下发。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;"><img alt="808服务器界面" height="722" src="http://www.jt808.com/wp-content/uploads/808serverui.jpg" width="1024" /></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">GPS服务器连接的特点是基于长连接，高吞吐量的处理特点，</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">1.很多企业在设计的时候，基于TCP协议开发，服务器所承受的连接都是长连接。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">2.由于808协议规定终端发上来的包除了应答包，都要进行应答，很多终端企业在开发的时候，死板的照抄808协议，不应答不行。这样就造成了大批量数据上传和大批量数据应答的情况。实际上定位上传的数据包完全不应该应答，心跳包就更没道理去进行应答了。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">为了提高终端接入能力和数据分析、入库能力，将终端消息的处理分成独立的五级处理模块，每个处理模块都是异步独立的，每个模块内都含有独立的处理队列，互不影响，提高数据的吞吐量和系统的响应能力。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">1）第一级：实时数据解析入库，入库能力决定了客户端所看到的实时数据是否延迟；</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">2）第二级：报警分析并入库（包括32种808协议规定的报警、停车报警和路线偏移报警)，报警分析只有快速分析才能快速的推送到前端客户端；</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">3) &nbsp;第三级：消息应答和指令下发，应答可以有一定的延迟，而不影响整个系统性能。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">4）第四级：报表统计，由于油量统计、里程统计、上线率统计，需要定时扫描数据库，生成每个时段的数据统计提供给报表查询使用.</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">5）第五级：日志记录和显示</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">采用终端模拟工具，自动生成静态车辆数据，自动进行并发连接、注册和鉴权后，开始定位数据上传。每个车辆的上传轨迹是独立不重复的，报警位和状态位定时反转，便于测试报警分析和入库能力。</p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 1.8; margin: 10px auto !important;">这样经过五秒传一次的模拟的压力测试后，真实环境就不在话下了。如何进行压力测试参见:<a href="http://www.jt808.com/?p=578">GPS部标监控平台-压力测试</a></p>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">如果购买单独的808服务器，不能满足你的要求，也可以增加预算购买完整的gps平台（含服务器和BS客户端、CS客户端和手机客户端).</p>
<p style="margin: 0px 0px 10px; padding: 0px; color: rgb(51, 51, 51); font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; line-height: 24px;"><span style="margin: 0px; padding: 0px; font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; font-weight: bold; line-height: 25px; text-decoration: underline;">如需购买GPS平台源码+文档+服务，可以联系我2379423771@qq.com。</span></p>
<h3 style="margin: 0px; padding: 0px; font-size: 14px; font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; line-height: 24px; color: red;">Java平台，参见：<a href="http://www.jt808.com/?p=522" style="margin: 0px; padding: 0px; color: rgb(0, 94, 172); text-decoration: none;"><span style="margin: 0px; padding: 0px;">基于<span style="margin: 0px; padding: 0px; color: rgb(92, 121, 144); font-family: Georgia, Arial, Helvetica, sans-serif; text-transform: capitalize;">Struts+Spring+Hibernate+Ibatis+Quartz+Mina框架构建部标监控平台</span></span></a></h3>
<p style="margin: 0px 0px 10px; padding: 0px; color: rgb(51, 51, 51); font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif; line-height: 24px;">.NET平台，参见：<a href="http://www.jt808.com/?p=665" rel="bookmark" style="margin: 0px; padding: 0px; color: rgb(38, 38, 38); text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(223, 223, 223); font-family: Georgia, Arial, Helvetica, sans-serif; font-size: 2em; text-transform: capitalize;">基于Asp.NET MVC构建GPS部标平台</a></p>
<h2 style="margin: 0px; padding: 0px 0px 3px; font-size: 2em; color: rgb(92, 121, 144); text-shadow: rgb(255, 255, 255) 0px 1px 0px, rgb(190, 190, 190) 0px -1px 3px; font-family: Georgia, Arial, Helvetica, sans-serif; text-transform: capitalize;">cs客户端参见:<a href="http://www.jt808.com/?p=617">GPS监控CS客户端设计</a></h2>
<p style="color: rgb(51, 51, 51); font-family: Georgia, 'Times New Roman', Times, sans-serif; font-size: 14px; line-height: 25px; margin: 10px auto !important;">&nbsp;</p>
</div>
<p> (46213)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jt808.com/?feed=rss2&#038;p=322</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
