C. J. SHI, Y. FANG
Copyright © 2013 SciRes. CN
tocol to adapt to changing requirements in data encapsu-
lation. Third, some mHealth services such as telemoni-
toring require low-latency transmission.
The existing real-time communication methods for
mHealth use socket or http to maintain data link as well
as perform data transmission using custom binary data
packages [6,7]. These methods have two aspects of prob-
lems. First, due to stateless transmission which most me-
thods are using, they cannot handle service status renew-
al on breakout chain and deal with latency of service
requests and responses. Second, lacking of unified appli-
cation layer protocol and using binary format in data
package make methods not suitable for expanding trans-
mission demand of mHealth services.
3. Communication Method
3.1. XMPP Protocol Basis
XMPP protocol is an X ML based instant messaging pr o-
tocol, which uses XML based structured information dur-
ing entire communication process, having good semantic
integrity and flexible scalability. SASL and TLS built
into the core XMPP specifications guarantees the securi-
ty of the data transmission [8,9].
XMPP protocol use TCP persistent connection to bu ild
XML stream flow which carries “messa g e”, “iq” and
“presence” packages to composite instant communication
process. This paper uses and extends these basic me-
chanisms to implement connection maintenance, status
tracking and data transfer process of mHealth service.
Based on XEP-0045 standard of XMPP [10], proposed
method constructs the session room to organize the trans-
mission process and trace the status between user and
providers. Data format for mHealth service can be scala-
ble defined by exte nding “message” and “iq” packages.
3.2. Establishment and Destruction of
Communication
mHealth services typically involve several roles as user
and multiple service providers. Using session room me-
chanism of XMPP, the method organizes all roles into a
session room initiated by user. With session room, server
can track the status of all roles, forward data packages
during service process and isolate user’s medical data
from external. The communication process is shown in
Figure 2.
1) User conn ects to XMPP server and finishes id entity
authentication. Session room creation request will be sent
after connection established.
2) Server receives session room creation request and
create the room with identity “username@service/name”.
Then server query providers bounded to user and send
invitation request to them.
Figure 2. Establishment and destruction of communication.
3) Providers receive invitation request and join the
session room. User and providers confirm all the roles in
session room by exchanging “presence” packages and
meanwhile start the service process.
4) Wh en user de cides to termin ate pro cess, “iq” package
will be sent to server for connection destruction.
5) Server receives destruction request and remove all
roles in session room. Then server destroys the session
room and notifies user by sending “iq” package.
3.3. Information Data Communication
Information data of mHealth services refers to non-in-
teractive data passing between user and providers. This
type of data is mainly designed for information delivery
during the servic e process, including user info data, ph y-
siological signal data, diagnostic data, advisory informa-
tion, etc.
The data is packaged as extended “message” packages
according to the data type and sent to server. Server will
forward it to corresponding roles of session room. User
or providers receive “message” packages and restore the
information to finish the service process.
With the scalability of XMPP protocol, various data
formats in the mHealth services can be defined. Physio-
logical signal data for instance involves waveform data
like ECG and numerical data like NIBP. A child element
“monitordata” is added to “message” package to define
the type of data. Specific data can be encapsulated in
XML sematic way or in-band binary way. The XML way
distinguishes types of sensors by “ecg” “nibp” element
and record data by body of elements. The In-band way
encapsulates sensor’s byte array in Base64 encoding
packages and attaches them to “monitordata” element.
An instance of ECG monitoring data packaged in XML
way is showed in Figure 3. The data includes 3 path