CN103812878A - Android-based road condition information interaction system - Google Patents

Android-based road condition information interaction system Download PDF

Info

Publication number
CN103812878A
CN103812878A CN201410096897.2A CN201410096897A CN103812878A CN 103812878 A CN103812878 A CN 103812878A CN 201410096897 A CN201410096897 A CN 201410096897A CN 103812878 A CN103812878 A CN 103812878A
Authority
CN
China
Prior art keywords
client
data
string
request
protocol
Prior art date
Application number
CN201410096897.2A
Other languages
Chinese (zh)
Inventor
王英立
张小清
徐志强
王同
Original Assignee
哈尔滨理工大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 哈尔滨理工大学 filed Critical 哈尔滨理工大学
Priority to CN201410096897.2A priority Critical patent/CN103812878A/en
Publication of CN103812878A publication Critical patent/CN103812878A/en

Links

Abstract

The invention relates to an Android-based road condition information interaction system, wherein with the high-speed development of society, driving safety and jam problem are increasingly prominent. From composition, the Android-based road condition information interaction system disclosed by the invention comprises a foreground client which is in charge of interaction with a user and used for sending the request of the user to a background server; the background server is in charge of receiving the request of the client and responding the request, sending to the foreground client, and adopting Tomcat; a database is used as a data storage medium which can only be accessed by the server, and adopts Mysal. The invention is used for a road condition information interaction system.

Description

Traffic information interactive system based on Android
technical field:
the present invention relates to a kind of traffic information interactive system based on Android.
background technology:
society's high speed development, the safety of driving and the problem of blocking up also become increasingly conspicuous.The modern life makes people more and more rely on mobile network and mobile phone fast, so for making will the pass through congestion design native system in path of the more safe and efficient understanding of people.Native system cell-phone customer terminal adopts the Android operating system being most widely used at present, and cellphone subscriber can carry out shirtsleeve operation by phonetic function just can obtain needed traffic information from server end.
existing road condition information inquiry be all bundled in navigation system cannot guarantee information detailed accurately, more lack the method for obtaining from main speech.
summary of the invention:
the object of the present invention is to provide a kind of traffic information interactive system based on Android.
the object of the present invention is achieved like this:
a traffic information interactive system based on Android, its composition comprises: foreground client, described foreground client is responsible for mutual with user, and user's request is sent to background server; Described background server end is responsible for receiving client's request and request is made to response, is sent to described foreground client, adopts Tomcat; Database, as the medium of data storage, can only be accessed by serviced device, adopts Mysal.
the described traffic information interactive system based on Android, remote terminal application is to develop based on C/S service architecture, for identifying user instruction by voice signal, thereby complete assigned work, described foreground client is Android mobile phone, and described background server is Google cloud service end; Described service end has street name identification module, the street name that described street name identification module is stored by parsing is mated with Google Voice phonetic search data, Google Voice module by with the integration of Google API, use multithreading, match street name, and carry out corresponding to matching result, if the match is successful, Input matching content, if mate unsuccessfully, returns to previous step and mates or exit and carry out key-press input.
the described traffic information interactive system based on Android, described sound identification module calls after Google phonetic search API, user says the street name of wanting the information of searching, the data that Google cloud service end returns to speech recognition are to client, it is right that the data of the street name of these data and user mobile phone storage are carried out, to success, input corresponding title.
the described traffic information interactive system based on Android, the communication protocol of whole communication system is made up of two parts, designs respectively the self-defining communication protocol on bottom HTTP Internet protocol and upper strata; Wherein, communication protocol definition the interactive mode of server and client, client is carried out the tissue of request message according to request protocol, server end carries out the tissue of corresponding message according to response protocol; Described HTTP bottom-layer network agreement: customer end adopted HTTP agreement and application server communicate, is encapsulated in privately owned communication protocol among the data segment of HTTP message;
(1) the HTTP request message form that client is sent
pOST/OSSServer HTTP/1.1-----CUS submits data to by POST method;
connection:close-----connects disconnection: close;
user-agent:CA Client/1.0-----client kind;
accept:text/plain-----accepts the form of file;
accept-language:en-----accepts language;
content-Length:200-----data segment, length;
the form of Content-Type:text/plain-----data segment;
this has a line feed-----;
-----data segment (encapsulation proprietary protocol communication data);
(2) the HTTP back message using form that Server returns
hTTP/1.1 200 OK-----statusline;
connection:close-----connects disconnection: close;
date:Thu, 13 2006 05:33:47 GMT-----times of Oct;
server:CA Server/2.2-----server;
last-Modified:Thu, 13 Oct 2006 02:32:47 GMT-----last modification times;
content-Length:200-----data segment, length;
the form of Content-Type:text/plain-----data segment;
this has a line feed-----
-----data segment.
the described traffic information interactive system based on Android, described communication protocol form: the communication data form of communication protocol uses JSON, JSON is a kind of data interchange format of lightweight, and this form is beneficial to be read and writes, and is also easy to machine simultaneously and resolves and generate; Agreement, with the formal definition of data class, is below the definition of request class and response class.
(1) definition of request class
/?**
@Description: client-requested data model
*/
public?class?RequestData?{
private String protocol; // protocol version
private int command; // order Id, is used for identifying different requests
private String userId; // user Id-library card number
private String clientVersion; // client release
private String clientModel; // client type
// extended field
private?Map?<String,?String?>?extra?=?new?HashMap?<
String,?String>();
......}
illustrate: the content shape of clientVersion field, as " v1.0 ", represents to prepare the official release number of issue;
(2) definition of response class
/?**
*@Description: server response data model
*/
public?class?ResponseData?{
private String protocol; // protocol version
private int command; // order Id
private boolean hasUpdate; // whether there are renewal, false to represent, true indicates renewal
private String message; // information
private int errorCode; // error code, specific definition is with reference to protocol definition
// extended field
?private?Map<String,?String>?extra?=?new?HashMap<String,?String>();
......
above two class definitions request and response public field, extended field according to request difference, refer to the corresponding definition of different affairs; It is 1 that for example user logs in request command value; In request extended field, comprise userPassword, represent the password that user logs in; Corresponding response extended field comprises userInfo, represents user basic information, is also JSON character string simultaneously, the data class definition of corresponding user information.
beneficial effect:
1. first, client does not need to carry out a large amount of calculating and data storage, and that has reduced client realizes difficulty and the requirement to hardware; Secondly, take unified communication protocol and file format, can realize with the client of different platform and docking; Finally, server end is directly connected with database, has guaranteed fail safe and the consistency of data.
accompanying drawing explanation:
accompanying drawing 1 is system framework figure of the present invention.
accompanying drawing 2 is Android acoustic control input system framework hierarchy charts.
accompanying drawing 3 is sound identification module identification process figure.
accompanying drawing 4 is communication flow diagram.
embodiment:
embodiment 1:
a traffic information interactive system based on Android, its composition comprises: foreground client, described foreground client is responsible for mutual with user, and user's request is sent to background server; Described background server end is responsible for receiving client's request and request is made to response, is sent to described foreground client, adopts Tomcat; Database, as the medium of data storage, can only be accessed by serviced device, adopts Mysal.
embodiment 2:
according to the traffic information interactive system based on Android described in embodiment 1, remote terminal application is to develop based on C/S service architecture, be mainly used in by voice signal and identify user instruction, thereby complete assigned work, described foreground client is Android mobile phone, and described background server is Google cloud service end; This terminal system function mainly contains a submodule: street name identification module, the street name that described street name identification module is mainly stored by parsing is mated with Google Voice phonetic search data, Google Voice module by with the integration of Google API, use multithreading, match street name, and carry out corresponding to matching result, if the match is successful, Input matching content, if mate unsuccessfully, return to previous step and mate or exit and carry out key-press input.
embodiment 3:
according to the traffic information interactive system based on Android described in embodiment 1 or 2, sound identification module: the function of speech recognition realizes principle and is: call after Google phonetic search API, user says the street name of wanting the information of searching, the data that Google cloud service end returns to speech recognition are to client, it is right that the data of the street name of these data and user mobile phone storage are carried out, to success, input corresponding title.
embodiment 4:
according to the traffic information interactive system based on Android described in embodiment 1 or 2 or 3, the communication protocol of whole communication system is made up of two parts, designs respectively the self-defining communication protocol on bottom HTTP Internet protocol and upper strata; Wherein, communication protocol definition the interactive mode of server and client, client is carried out the tissue of request message according to request protocol, server end carries out the tissue of corresponding message according to response protocol; Described HTTP bottom-layer network agreement: customer end adopted HTTP agreement and application server communicate, is encapsulated in privately owned communication protocol among the data segment of HTTP message,
(1) the HTTP request message form that client is sent
pOST/OSSServer HTTP/1.1-----CUS submits data to by POST method
connection:close-----connects disconnection: close
user-agent:CA Client/1.0-----client kind
accept:text/plain-----accepts the form of file
accept-language:en-----accepts language
content-Length:200-----data segment, length
the form of Content-Type:text/plain-----data segment
this has a line feed-----
-----data segment (encapsulation proprietary protocol communication data)
(2) the HTTP back message using form that Server returns
hTTP/1.1 200 OK-----statusline
connection:close-----connects disconnection: close
date:Thu, 13 2006 05:33:47 GMT-----times of Oct
server:CA Server/2.2-----server
last-Modified:Thu, 13 Oct 2006 02:32:47 GMT-----last modification times
content-Length:200-----data segment, length
the form of Content-Type:text/plain-----data segment
this has a line feed-----
-----data segment.
embodiment 5:
according to the traffic information interactive system based on Android described in embodiment 1 or 2 or 3 or 4, communication protocol form: the communication data form of communication protocol uses JSON, JSON is a kind of data interchange format of lightweight, this form is beneficial to be read and writes, and is also easy to machine simultaneously and resolves and generate; Agreement is with the formal definition of data class
it is below the definition of request class and response class.
(1) definition of request class
/?**
@Description: client-requested data model
*/
public?class?RequestData?{
private String protocol; // protocol version
private int command; // order Id, is used for identifying different requests
private String userId; // user Id-library card number
private String clientVersion; // client release
private String clientModel; // client type
// extended field
private?Map?<String,?String?>?extra?=?new?HashMap?<
String,?String>();
......}
illustrate: the content shape of clientVersion field, as " v1.0 ", represents to prepare the official release number of issue;
(2) definition of response class
/?**
*@Description: server response data model
*/
public?class?ResponseData?{
private String protocol; // protocol version
private int command; // order Id
private boolean hasUpdate; // whether there are renewal, false to represent, true indicates renewal
private String message; // information
private int errorCode; // error code, specific definition is with reference to protocol definition
// extended field
?private?Map<String,?String>?extra?=?new?HashMap<String,?String>();
......
above two class definitions request and response public field, extended field according to request difference, refer to the corresponding definition of different affairs; It is 1 that for example user logs in request command value; In request extended field, comprise userPassword, represent the password that user logs in; Corresponding response extended field comprises userInfo, represents user basic information, is also JSON character string simultaneously, the data class definition of corresponding user information.

Claims (5)

1. the traffic information interactive system based on Android, its composition comprises: foreground client, is characterized in that: described foreground client is responsible for mutual with user, and user's request is sent to background server; Described background server end is responsible for receiving client's request and request is made to response, is sent to described foreground client, adopts Tomcat; Database, as the medium of data storage, can only be accessed by serviced device, adopts Mysal.
2. the traffic information interactive system based on Android according to claim 1, it is characterized in that: remote terminal application is to develop based on C/S service architecture, for identifying user instruction by voice signal, thereby complete assigned work, described foreground client is Android mobile phone, and described background server is Google cloud service end; Described service end has street name identification module, the street name that described street name identification module is stored by parsing is mated with Google Voice phonetic search data, Google Voice module by with the integration of Google API, use multithreading, match street name, and carry out corresponding to matching result, if the match is successful, Input matching content, if mate unsuccessfully, returns to previous step and mates or exit and carry out key-press input.
3. the traffic information interactive system based on Android according to claim 1 and 2, it is characterized in that: described sound identification module calls after Google phonetic search API, user says the street name of wanting the information of searching, the data that Google cloud service end returns to speech recognition are to client, it is right that the data of the street name of these data and user mobile phone storage are carried out, to success, input corresponding title.
4. according to the traffic information interactive system based on Android described in claim 1 or 2 or 3, it is characterized in that: the communication protocol of whole communication system is made up of two parts, design respectively the self-defining communication protocol on bottom HTTP Internet protocol and upper strata; Wherein, communication protocol definition the interactive mode of server and client, client is carried out the tissue of request message according to request protocol, server end carries out the tissue of corresponding message according to response protocol; Described HTTP bottom-layer network agreement: customer end adopted HTTP agreement and application server communicate, is encapsulated in privately owned communication protocol among the data segment of HTTP message;
(1) the HTTP request message form that client is sent
POST/OSSServer HTTP/1.1-----CUS submits data to by POST method;
Connection:close-----connects disconnection: close;
User-agent:CA Client/1.0-----client kind;
Accept:text/plain-----accepts the form of file;
Accept-language:en-----accepts language;
Content-Length:200-----data segment, length;
The form of Content-Type:text/plain-----data segment;
This has a line feed-----;
-----data segment (encapsulation proprietary protocol communication data);
(2) the HTTP back message using form that Server returns
HTTP/1.1 200 OK-----statusline;
Connection:close-----connects disconnection: close;
Date:Thu, 13 2006 05:33:47 GMT-----times of Oct;
Server:CA Server/2.2-----server;
Last-Modified:Thu, 13 Oct 2006 02:32:47 GMT-----last modification times;
Content-Length:200-----data segment, length;
The form of Content-Type:text/plain-----data segment;
This has a line feed-----
-----data segment.
5. according to the traffic information interactive system based on Android described in claim 1 or 2 or 3 or 4, it is characterized in that: described communication protocol form: the communication data form of communication protocol uses JSON, JSON is a kind of data interchange format of lightweight, this form is beneficial to be read and writes, and is also easy to machine simultaneously and resolves and generate; Agreement, with the formal definition of data class, is below the definition of request class and response class,
(1) definition of request class
/?**
@Description: client-requested data model
*/
public?class?RequestData?{
Private String protocol; // protocol version
Private int command; // order Id, is used for identifying different requests
Private String userId; // user Id-library card number
Private String clientVersion; // client release
Private String clientModel; // client type
// extended field
private?Map?<String,?String?>?extra?=?new?HashMap?<
String,?String>();
......}
Illustrate: the content shape of clientVersion field, as " v1.0 ", represents to prepare the official release number of issue;
(2) definition of response class
/?**
*@Description: server response data model
*/
public?class?ResponseData?{
Private String protocol; // protocol version
Private int command; // order Id
Private boolean hasUpdate; // whether there are renewal, false to represent, true indicates renewal
Private String message; // information
Private int errorCode; // error code, specific definition is with reference to protocol definition
// extended field
private?Map<String,?String>?extra?=?new?HashMap<String,?String>();
......
Above two class definitions request and response public field, extended field according to request difference, refer to the corresponding definition of different affairs; It is 1 that for example user logs in request command value; In request extended field, comprise userPassword, represent the password that user logs in; Corresponding response extended field comprises userInfo, represents user basic information, is also JSON character string simultaneously, the data class definition of corresponding user information.
CN201410096897.2A 2014-03-17 2014-03-17 Android-based road condition information interaction system CN103812878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410096897.2A CN103812878A (en) 2014-03-17 2014-03-17 Android-based road condition information interaction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410096897.2A CN103812878A (en) 2014-03-17 2014-03-17 Android-based road condition information interaction system

Publications (1)

Publication Number Publication Date
CN103812878A true CN103812878A (en) 2014-05-21

Family

ID=50709079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410096897.2A CN103812878A (en) 2014-03-17 2014-03-17 Android-based road condition information interaction system

Country Status (1)

Country Link
CN (1) CN103812878A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572416A (en) * 2014-12-29 2015-04-29 北京锐安科技有限公司 Operation and maintenance data processing method and device
CN105138619A (en) * 2015-08-12 2015-12-09 百度在线网络技术(北京)有限公司 Searching method and searching system for mobile side web pages
CN105141567A (en) * 2014-05-26 2015-12-09 腾讯科技(深圳)有限公司 Interactive data processing method and system of terminal application and service end and interaction method
CN109062574A (en) * 2018-07-11 2018-12-21 武汉灯塔之光科技有限公司 A kind of expansible securities market data transmission display methods and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1265505A (en) * 1999-03-02 2000-09-06 国际商业机器公司 Intelligent traffic reporting system
CN101872362A (en) * 2010-06-25 2010-10-27 大陆汽车亚太管理(上海)有限公司 Information inquiry system of dynamic voice label and information inquiry method thereof
CN102169508A (en) * 2011-05-27 2011-08-31 上海市城市建设设计研究院 Traffic information query method based on cloud computing and system thereof
CN102467827A (en) * 2010-11-09 2012-05-23 现代自动车株式会社 Traffic information providing system and terminal and method of providing traffic information using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1265505A (en) * 1999-03-02 2000-09-06 国际商业机器公司 Intelligent traffic reporting system
CN101872362A (en) * 2010-06-25 2010-10-27 大陆汽车亚太管理(上海)有限公司 Information inquiry system of dynamic voice label and information inquiry method thereof
CN102467827A (en) * 2010-11-09 2012-05-23 现代自动车株式会社 Traffic information providing system and terminal and method of providing traffic information using the same
CN102169508A (en) * 2011-05-27 2011-08-31 上海市城市建设设计研究院 Traffic information query method based on cloud computing and system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李德贤等: "《json-rpc协议分析、扩展及其应用》", 《中国科技论文在线》 *
龚成莹 等: "《基于JSON的Android移动终端与PHP及MySQL数据通信》", 《工业仪表与自动化装置》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141567A (en) * 2014-05-26 2015-12-09 腾讯科技(深圳)有限公司 Interactive data processing method and system of terminal application and service end and interaction method
CN105141567B (en) * 2014-05-26 2019-03-01 腾讯科技(深圳)有限公司 Interaction data processing method and system, the exchange method of terminal applies and server-side
CN104572416A (en) * 2014-12-29 2015-04-29 北京锐安科技有限公司 Operation and maintenance data processing method and device
CN105138619A (en) * 2015-08-12 2015-12-09 百度在线网络技术(北京)有限公司 Searching method and searching system for mobile side web pages
CN109062574A (en) * 2018-07-11 2018-12-21 武汉灯塔之光科技有限公司 A kind of expansible securities market data transmission display methods and system

Similar Documents

Publication Publication Date Title
JP6744314B2 (en) Updating Language Understanding Classifier Model for Digital Personal Assistant Based on Crowdsourcing
US20170278518A1 (en) Communicating metadata that identifies a current speaker
EP3594814A1 (en) Automated assistant invocation of appropriate agent
AU2015375326B2 (en) Headless task completion within digital personal assistants
US9529657B2 (en) Techniques for generating diagnostic identifiers to trace events and identifying related diagnostic information
US9530415B2 (en) System and method of providing speech processing in user interface
CA2936503C (en) Infrastructure for synchronization of mobile device with mobile cloud service
CN106796526B (en) JSON style sheet language transformation
US10613719B2 (en) Generating a form response interface in an online application
US9529658B2 (en) Techniques for generating diagnostic identifiers to trace request messages and identifying related diagnostic information
US9712511B2 (en) Mobile cloud service architecture
KR101768509B1 (en) On-line voice translation method and device
US10489435B2 (en) Method, device and equipment for acquiring answer information
US20160132487A1 (en) Lemma mapping to universal ontologies in computer natural language processing
US10893048B2 (en) Multi-blockchain network data processing
US20160259779A1 (en) Evidence-Based Natural Language Input Recognition
US9117451B2 (en) Methods and systems for sharing of adapted voice profiles
US20160308799A1 (en) Virtual assistance for chat agents
CN103377652B (en) A kind of method, device and equipment for carrying out speech recognition
US20170040018A1 (en) Voice access and control
US10748531B2 (en) Management layer for multiple intelligent personal assistant services
US20190102078A1 (en) Analytics for a bot system
US20140379334A1 (en) Natural language understanding automatic speech recognition post processing
KR101838095B1 (en) Method, interaction device, server, and system for speech recognition
US20120109656A1 (en) Audio output of a document from mobile device

Legal Events

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

Application publication date: 20140521

RJ01 Rejection of invention patent application after publication