CN104683419A - Communicating method and system based on android system and m2m (machine to machine) - Google Patents

Communicating method and system based on android system and m2m (machine to machine) Download PDF

Info

Publication number
CN104683419A
CN104683419A CN201310642340.XA CN201310642340A CN104683419A CN 104683419 A CN104683419 A CN 104683419A CN 201310642340 A CN201310642340 A CN 201310642340A CN 104683419 A CN104683419 A CN 104683419A
Authority
CN
China
Prior art keywords
data
android system
module
ftp
protocol
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
CN201310642340.XA
Other languages
Chinese (zh)
Other versions
CN104683419B (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201310642340.XA priority Critical patent/CN104683419B/en
Publication of CN104683419A publication Critical patent/CN104683419A/en
Application granted granted Critical
Publication of CN104683419B publication Critical patent/CN104683419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a communicating method and system based on an android system and m2m. The communicating method comprises the following steps that a terminal uses a JNI (Java Native Interface) method to generate a http (hyper text transport protocol) based on the android system and an m2m communicating module and uses the generated http to launch internet access, and the terminal uses the JNI method to generate an FTP (File Transfer Protocol) based on the android system and the m2m communicating module and uses the generated ftp to carry out internet data transmission. The communicating method is convenient to develop and use and high in practicability.

Description

A kind of communication means based on Android system and m2m and system
Technical field
The present invention relates to technical field of the computer network, particularly relate to a kind of communication means based on Android system and m2m and system.
Background technology
Android system is the operating system of freely increasing income based on linux, aims at mobile device and gives birth to.By means of the function that Android system is powerful, the mobile device meeting various demand is also more and more diversified, more and more universal.Wherein, accessing Internet can be described as the most basic function, and Internet of Things is not only also a concept, starts to be applied in daily life.
But also lack good android system internet access method and system in prior art.
Summary of the invention
The object of the present invention is to provide a kind of communication means based on Android system and m2m and system, its convenient exploitation and using, practical.
For a kind of means of communication based on Android system and m2m realizing that the present invention provides, comprising:
Based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement, and utilizes the http agreement generated to initiate linking Internet;
Based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol, and utilizes the ftp agreement generated to carry out Internet data transmission.
More preferably, described based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement and comprises the steps:
Terminal arranges IP address and port, opens the data flow of m2m;
Send request data, receive corresponding data;
Terminal sends request data according to interaction protocol.
More preferably, described request data comprise protocol header and protocol data, and protocol header generates according to http standard:
"POST/ieds/iedsServlet HTTP/1.1\r\n
Content-Length:1024\r\n
Content-Type:application/octet-stream;Charset=gb18030\r\n
Host:www.aisino.com:8080\r\n\r\n"。
More preferably, described based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement and also comprises the steps:
Terminal check and correction protocol header data, then resolve the response returned according to interaction protocol.
More preferably, described based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol and comprises the steps:
Set up two links, the transmission and reception of control connection user command, data cube computation is used for the transmission and reception of data, and two data flow opened on m2m are also synchronous;
IP address and port are set, open control data stream;
Send order, according to ftp agreement, send username and password, utilize the ftp agreement generated to carry out the Internet ftp transfer of data.
More preferably, described ftp transfer of data is active module or Passive Mode.
More preferably, adopt Passive Mode to carry out ftp transfer of data, comprise the steps:
Send PASV order and enter Passive Mode, from response, obtain data IP and port;
Enable data cube computation, just can obtain document data flow by retr order;
Under data flow is write local assigned catalogue, just complete file download;
By stor order, local file is uploaded.
A kind of communication system based on Android system and m2m is also provided, described terminal and comprising for realizing the object of the invention:
Http protocol generation module, ftp protocol generation module, initiation module and data transmission module, wherein:
Described http protocol generation module, for based on Android system and m2m communication module, adopts JNI mode to generate http agreement;
Described ftp module, for based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol;
Described initiation module, initiates linking Internet for utilizing the http agreement of generation;
Described data transmission module, carries out Internet data transmission for utilizing the ftp agreement of generation.
Communication means based on Android system and m2m of the present invention and system, its convenient exploitation and using, practical, avoid the waste of customer flow in the bad situation of network.
Accompanying drawing explanation
Fig. 1 is the communication system schematic diagram based on Android system and m2m according to one embodiment of the invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly thorough, below in conjunction with drawings and Examples, the communication means based on Android system and m2m of the present invention and system are further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The present invention is based on communication means and the system of Android system and m2m, it is by Android system and m2m communication module, complete the realization of network application-level protocol http and ftp, these two agreements have been bases of most of network application, thus complete linking Internet.
Based on the communication means of Android system and m2m, comprise the steps:
Step S100, based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement, and utilizes the http agreement generated to initiate linking Internet;
Step S200, based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol, and utilizes the ftp agreement generated to carry out Internet data transmission.
Described agreement adopts JNI mode to realize, convenient exploitation and use.
Preferably, as a kind of embodiment, described step S100 comprises the steps:
Step S110, terminal arranges IP address and port, opens the data flow of m2m;
Step S120, sends request data, receives corresponding data;
Preferably, as a kind of embodiment, described request data comprise protocol header and protocol data, and protocol header generates according to http standard:
"POST/ieds/iedsServlet HTTP/1.1\r\n
Content-Length:1024\r\n
Content-Type:application/octet-stream;Charset=gb18030\r\n
Host:www.aisino.com:8080\r\n\r\n"
Step S130, terminal sends request data according to interaction protocol.
Preferably, as a kind of embodiment, described step S100 also comprises the steps:
Step S100 ', terminal check and correction protocol header data, then resolve the response returned according to interaction protocol.
Preferably, as a kind of embodiment, described step S200 comprises the steps:
Step S210, sets up two links, the transmission and reception of control connection user command, and data cube computation is used for the transmission and reception of data, and two data flow opened on m2m are also synchronous;
Conveniently control, need to set up two links, the transmission and reception of control connection user command, data cube computation is used for the transmission and reception of data, and two data flow opened on m2m are also synchronous.
Step S220, arranges IP address and port, opens control data stream.
Step S230, sends order, according to ftp agreement, sends username and password, utilizes the ftp agreement generated to carry out the Internet ftp transfer of data.
Described ftp transfer of data has two kinds of patterns, aggressive mode and Passive Mode.Aggressive mode provides file to send by client and the IP address that receives and port, and IP address and the port of Passive Mode to be other equipment (as peripheral server) provide connection.
As a kind of embodiment, in the embodiment of the present invention, adopt Passive Mode.
As a kind of embodiment, the Passive Mode of the embodiment of the present invention carries out ftp transfer of data, comprises the steps:
Step S231, sends PASV order and enters Passive Mode, from response, obtain data IP and port;
Step S232, enables data cube computation, just can obtain document data flow by retr order;
Step S233, under data flow is write local assigned catalogue, just completes file download;
Step S234, is uploaded local file by stor order.
Based on the communication means of Android system and m2m, avoid the waste of customer flow in the bad situation of network.
Based on same goal of the invention, the present invention also comprises a kind of communication system based on Android system and m2m, and described terminal comprises:
Http protocol generation module, ftp protocol generation module, initiation module and data transmission module, wherein:
Described http protocol generation module, for based on Android system and m2m communication module, adopts JNI mode to generate http agreement;
Described ftp module, for based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol;
Described initiation module, initiates linking Internet for utilizing the http agreement of generation;
Described data transmission module, carries out Internet data transmission for utilizing the ftp agreement of generation.
Communication means based on Android system and m2m of the present invention and system, its convenient exploitation and using, practical, avoid the waste of customer flow in the bad situation of network.
Finally it should be noted that obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1., based on a communication means of Android system and m2m, it is characterized in that, comprise the steps:
Based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement, and utilizes the http agreement generated to initiate linking Internet;
Based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol, and utilizes the ftp agreement generated to carry out Internet data transmission.
2. the communication means based on Android system and m2m according to claim 1, is characterized in that, described based on Android system and m2m communication module, and terminal adopts JNI mode to generate http agreement and comprises the steps:
Terminal arranges IP address and port, opens the data flow of m2m;
Send request data, receive corresponding data;
Terminal sends request data according to interaction protocol.
3. the communication means based on Android system and m2m according to claim 2, it is characterized in that, described request data comprise protocol header and protocol data, and protocol header generates according to http standard:
"POST/ieds/iedsServlet HTTP/1.1\r\n
Content-Length:1024\r\n
Content-Type:application/octet-stream;Charset=gb18030\r\n
Host:www.aisino.com:8080\r\n\r\n"。
4. the communication means based on Android system and m2m according to any one of claims 1 to 3, it is characterized in that, described based on Android system and m2m communication module, terminal adopts JNI mode to generate http agreement, and utilizes the http agreement initiation linking Internet generated also to comprise the steps:
Terminal check and correction protocol header data, then resolve the response returned according to interaction protocol.
5. the communication means based on Android system and m2m according to any one of claims 1 to 3, is characterized in that, described based on Android system and m2m communication module, and terminal adopts JNI mode to generate File Transfer Protocol and comprises the steps:
Set up two links, the transmission and reception of control connection user command, data cube computation is used for the transmission and reception of data, and two data flow opened on m2m are also synchronous;
IP address and port are set, open control data stream;
Send order, according to ftp agreement, send username and password, utilize the ftp agreement generated to carry out the Internet ftp transfer of data.
6. the communication means based on Android system and m2m according to claim 5, is characterized in that, described ftp transfer of data is initiatively module or Passive Mode.
7. the communication means based on Android system and m2m according to claim 6, is characterized in that, adopts Passive Mode to carry out ftp transfer of data, comprises the steps:
Send PASV order and enter Passive Mode, from response, obtain data IP and port;
Enable data cube computation, just can obtain document data flow by retr order;
Under data flow is write local assigned catalogue, just complete file download;
By stor order, local file is uploaded.
8., based on a communication system of Android system and m2m, comprise terminal, it is characterized in that, described terminal comprises:
Http protocol generation module, ftp protocol generation module, initiation module and data transmission module, wherein:
Described http protocol generation module, for based on Android system and m2m communication module, adopts JNI mode to generate http agreement;
Described ftp module, for based on Android system and m2m communication module, terminal adopts JNI mode to generate File Transfer Protocol;
Described initiation module, initiates linking Internet for utilizing the http agreement of generation;
Described data transmission module, carries out Internet data transmission for utilizing the ftp agreement of generation.
CN201310642340.XA 2013-12-03 2013-12-03 A kind of communication means and system based on Android system and m2m Active CN104683419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310642340.XA CN104683419B (en) 2013-12-03 2013-12-03 A kind of communication means and system based on Android system and m2m

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310642340.XA CN104683419B (en) 2013-12-03 2013-12-03 A kind of communication means and system based on Android system and m2m

Publications (2)

Publication Number Publication Date
CN104683419A true CN104683419A (en) 2015-06-03
CN104683419B CN104683419B (en) 2019-08-27

Family

ID=53318004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310642340.XA Active CN104683419B (en) 2013-12-03 2013-12-03 A kind of communication means and system based on Android system and m2m

Country Status (1)

Country Link
CN (1) CN104683419B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017215646A1 (en) * 2016-06-17 2017-12-21 中兴通讯股份有限公司 Data transmission method and apparatus
CN110930704A (en) * 2019-11-27 2020-03-27 连云港杰瑞电子有限公司 Traffic flow state statistical analysis method based on edge calculation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100235329A1 (en) * 2009-03-10 2010-09-16 Sandisk Il Ltd. System and method of embedding second content in first content
CN102111660A (en) * 2011-03-28 2011-06-29 博视联(苏州)信息科技有限公司 Interactive type intelligent network television
CN102447714A (en) * 2010-10-07 2012-05-09 鸿富锦精密工业(深圳)有限公司 Cookie management method
US20120214416A1 (en) * 2011-02-23 2012-08-23 Jonathan Douglas Kent Methods and apparatuses for communication between devices
CN103269450A (en) * 2013-04-25 2013-08-28 中国科学院声学研究所 Multimedia system for Android smart television set

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100235329A1 (en) * 2009-03-10 2010-09-16 Sandisk Il Ltd. System and method of embedding second content in first content
CN102447714A (en) * 2010-10-07 2012-05-09 鸿富锦精密工业(深圳)有限公司 Cookie management method
US20120214416A1 (en) * 2011-02-23 2012-08-23 Jonathan Douglas Kent Methods and apparatuses for communication between devices
CN102111660A (en) * 2011-03-28 2011-06-29 博视联(苏州)信息科技有限公司 Interactive type intelligent network television
CN103269450A (en) * 2013-04-25 2013-08-28 中国科学院声学研究所 Multimedia system for Android smart television set

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李磊 编著: "《网络工程师考试辅导 2009版》", 30 September 2009 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017215646A1 (en) * 2016-06-17 2017-12-21 中兴通讯股份有限公司 Data transmission method and apparatus
CN110930704A (en) * 2019-11-27 2020-03-27 连云港杰瑞电子有限公司 Traffic flow state statistical analysis method based on edge calculation
CN110930704B (en) * 2019-11-27 2021-11-05 连云港杰瑞电子有限公司 Traffic flow state statistical analysis method based on edge calculation

Also Published As

Publication number Publication date
CN104683419B (en) 2019-08-27

Similar Documents

Publication Publication Date Title
JP6692862B2 (en) Service layer interworking using MQTT protocol
JP6473500B2 (en) System and method enabling access to third party services through a service layer
CN102546794B (en) Method for directly communicating browser client with back-end server as well as gateway and communication system
CN102017572B (en) The method logged on for providing single service, equipment and computer program
CN112399130B (en) Processing method and device of cloud video conference information, storage medium and communication equipment
WO2015038212A1 (en) Techniques for multi-standard peer-to-peer connection
Chen et al. Intelligent file transfer for smart handheld devices based on mobile cloud computing
US11638138B2 (en) Device-to-device content providing method
US10045216B1 (en) WiFi access point connection protocol adaptation
CN102594886B (en) Method and device for direct communication between browsers, and communication system
CN103812900A (en) Data synchronization method, device and system
CN104394208A (en) File transmission method and server
CN102404616A (en) Method and system for pushing data cloud based on digital television network
CN111201804B (en) Method, apparatus and computer readable storage medium for enabling data continuity services
JP6417046B2 (en) Technology that translates network resource requirements into zero rating network requirements
CN105306577A (en) Data sharing system and method between handheld devices based on APP
CN104683419A (en) Communicating method and system based on android system and m2m (machine to machine)
CN102761780A (en) Method for obtaining media metadata by intelligent remote controller to
CN103731400A (en) Resource sharing system and method
US9674149B2 (en) System and method for establishing a virtual private network of a mobile device through a preferred network
CN112565458B (en) Platform remote control method and device, storage medium and electronic equipment
CN104092602A (en) Cloud computing gateway
TW201533593A (en) Method for processing URL and associated server and non-transitory computer readable storage medium
KR101231203B1 (en) System and method for network communicating between a communication device and information device
CN107948232B (en) Hook API-based proxy implementation method, data transmission method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant