[go: up one dir, main page]

WO2012010002A1 - Apparatus and method for service debugging for java applications in machine to machine terminal - Google Patents

Apparatus and method for service debugging for java applications in machine to machine terminal Download PDF

Info

Publication number
WO2012010002A1
WO2012010002A1 PCT/CN2011/073872 CN2011073872W WO2012010002A1 WO 2012010002 A1 WO2012010002 A1 WO 2012010002A1 CN 2011073872 W CN2011073872 W CN 2011073872W WO 2012010002 A1 WO2012010002 A1 WO 2012010002A1
Authority
WO
WIPO (PCT)
Prior art keywords
protocol stack
message
java
interface
operating system
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.)
Ceased
Application number
PCT/CN2011/073872
Other languages
French (fr)
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE 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 ZTE Corp filed Critical ZTE Corp
Publication of WO2012010002A1 publication Critical patent/WO2012010002A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3696Methods or tools to render software testable
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • the present invention relates to service debugging of an Internet of Things (M2M) terminal, or, in particular, to a service debugging apparatus and method for an Internet of Things terminal JAVA application.
  • M2M Internet of Things
  • the sensor network also known as the Internet of Things, combines technologies such as sensors, low-power, communication, and micro-electromechanics. Its goal is actually to interconnect objects and objects, and then extend the network that now connects the information space to the physical world.
  • the Internet of Things specifications proposed by operators mainly include: platform, service, terminal, and terminal secondary development interface.
  • platform Considering the wide range of IoT applications, its terminals need to adapt to many types of applications, such as: applications such as transmission images or sounds required for monitoring processes, and applications such as reporting temperatures required for logistics processes. Therefore, operators are launching When the interface standard was developed twice, the interface between C and JAVA was introduced. The purpose is to allow application developers to freely choose, deploy quickly, and run across platforms.
  • various M2M terminal development kits mainly include: a secondary development interface and a development environment, and basically no business simulator for business debugging, therefore, the application needs to be deployed on the hardware, on the embedded platform. Perform debugging operations.
  • debugging on embedded platforms is several times more efficient than debugging on a PC.
  • the Java middleware cannot be used to call the C low-level interface on the embedded platform, the debugging of the JAVA application is more difficult.
  • the Internet of Things specification does not belong to the J2ME (Java 2 Micro Edition) scope and is a proprietary specification of the operator. Temporary J2ME does not support it, so the corresponding JAVA application cannot be debugged in the standard J2ME environment on the PC. Summary of the invention
  • the main purpose of the present invention is to provide a service debugging apparatus and method for an JAVA application of an Internet of Things terminal, which can perform service debugging on a JAVA application on a PC to improve the efficiency of M2M service debugging.
  • a service debugging device for an Internet of Things (M2M) terminal JAVA application comprising an M2M application, an M2M application protocol stack, and an M2M platform; the device further comprising: a JAVA middleware adaptation layer located in the M2M application, and an M2M application protocol stack Operating system support layer;
  • M2M Internet of Things
  • the JAVA middleware adaptation layer is located in the M2M application.
  • the bottom layer of the JAVA middleware is used to adapt the interaction interface between the JAVA middleware and the M2M protocol stack to realize the interaction of the AT message between the JAVA middleware and the M2M protocol stack.
  • the operating system support layer is connected to the M2M protocol stack in the M2M application protocol stack, and is used to provide a unified operating system interface for the M2M protocol stack to implement interaction between the M2M protocol stack and the M2M platform.
  • the JAVA middleware adaptation layer adapts the interaction interface between the JAVA middleware and the M2M protocol stack, and implements the interaction of the AT message between the JAVA middleware and the M2M protocol stack, specifically: when the JAVA application sends the AT to the M2M protocol stack.
  • the JAVA application sends the AT message to the JAVA middleware adaptation layer of the JAVA middleware.
  • the JAVA middleware adaptation layer invokes the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits for the M2M.
  • the feedback message of the protocol stack after the JAVA middleware adaptation layer receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message.
  • the unified operating system interfaces provided by the operating system support layer include: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation interface.
  • the operating system interface provided by the operating system support layer implements the interaction of the AT message between the M2M protocol stack and the M2M platform, specifically: the M2M protocol stack invokes the AT message sending and receiving The interface receives the AT message through the inter-process interaction mode, and processes the AT message, and then sends the AT message to the M2M platform through the network interaction interface provided by the operating system support layer; the M2M protocol stack provides the network interaction interface provided by the operating system support layer. The feedback message of the M2M platform is received, and the feedback message is sent to the M2M application through the inter-process interaction.
  • the JAVA middleware adaptation layer is further used for adapting an interface between the JAVA middleware and the operating system; the adaptation is specifically: when the JAVA application needs to invoke an operating system function, the JAVA application passes the JAVA middleware JAVA The operating system function interface between the middleware adaptation layer and the operating system calls the operating system function.
  • a service debugging method for the JAVA application of the Internet of Things terminal includes: an interaction between the JAVA middleware and the M2M protocol stack through an adapted interactive interface; the unified setting between the M2M protocol stack and the M2M platform
  • the operating system interface implements the interaction of AT messages and performs M2M service debugging.
  • the interaction between the JAVA middleware and the M2M protocol stack is implemented through an adapted interaction interface, specifically: when the JAVA application sends an AT message to the M2M protocol stack, the JAVA application sends the AT message to the JAVA middleware, The JAVA middleware calls the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits for the feedback message of the M2M protocol stack; when the JAVA middleware receives the feedback message of the M2M protocol stack through the inter-process interaction mode, The JAVA application is notified to obtain the feedback message.
  • the unified operating system interface includes: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation interface.
  • the M2M protocol stack and the M2M platform implement the interaction of the AT message through a unified operating system interface, specifically: the M2M protocol stack receives the AT message through the inter-process interaction mode, and processes the AT message through the network interaction interface.
  • the AT message is sent to the M2M platform.
  • the M2M protocol stack receives the feedback message of the M2M platform through the network interaction interface, and sends the feedback message to the M2M application through the inter-process interaction.
  • the method further includes: when the JAVA application needs to invoke an operating system function, the JAVA application invokes an operating system function through an operating system function interface adapted between the JAVA middleware and the operating system.
  • the method specifically includes: initializing the M2M protocol stack and establishing a network connection with the M2M platform; the JAVA application invoking the AT message sending interface sends the AT message to the M2M through the inter-process interaction mode. Protocol stack; When the AT message received by the M2M protocol stack needs to be sent to the M2M platform, the M2M protocol stack calls the network interaction interface to send the AT message to the M2M platform; the M2M platform sends a feedback message to the M2M protocol stack, which is to be sent by the M2M protocol stack. The received feedback message is sent to the JAVA application.
  • the method specifically includes: initializing the M2M protocol stack and establishing a network connection with the M2M platform; the M2M platform calls the network interaction interface, and sends the AT message to the M2M protocol stack; the M2M protocol stack calls The AT message sending interface sends an AT message to the JAVA application through an inter-process interaction mode.
  • the service debugging device and method for the JAVA application of the Internet of Things terminal realizes the interaction of the AT message based on the adapted interactive interface between the JAVA middleware and the M2M protocol stack; the M2M protocol stack and the M2M platform pass
  • the unified operating system interface is configured to implement the interaction of AT messages, thereby implementing M2M service debugging.
  • the apparatus and method of the present invention have the advantages of:
  • the invention enables the JAVA application of the M2M terminal to perform device-independent service debugging on the PC through the wired network, thereby solving the problem that the M2M terminal JAVA application development kit has no service simulator, and the JAVA application cannot perform service debugging on the PC, effectively Improve the debugging efficiency of the M2M terminal JAVA application and increase the satisfaction of the secondary developers.
  • FIG. 1 is a schematic structural diagram of a service debugging apparatus for an JAVA application of an Internet of Things terminal according to the present invention
  • FIG. 2 is a flow chart of a service debugging method for an JAVA application of an Internet of Things terminal according to Embodiment 1 of the present invention
  • FIG. 3 is a flow chart of a service debugging method for an JAVA application of an Internet of Things terminal according to Embodiment 2 of the present invention. detailed description
  • the basic idea of the present invention is: the interaction between the JAVA middleware and the M2M protocol stack is implemented through the set interactive interface; the M2M protocol stack and the M2M platform implement the AT message through the unified operating system interface. Interact, thus enabling M2M service debugging.
  • the M2M service is mainly a 4-character interaction between the M2M terminal and the M2M platform, it is characterized by: using the AT command as an interactive mode, using a general packet radio service (GPRS, General Packet Radio Service M ⁇ as a transmission bearer, using transmission control) Protocol (TCP, Transmission Control Protocol) / User Datagram Protocol (UDP) / Internet Protocol (IP) as the transport protocol; From the perspective of service characteristics, the interaction type of M2M services is relatively simple and uniform.
  • the service protocol uses a common transport protocol.
  • the M2M service can be debugged by using the AT command message exchange mode. If the device related layer debugging is not considered, such as the debugging of the M2M terminal and the underlying device such as the camera, on the PC. It is completely feasible to perform device-independent service debugging. Therefore, the present invention mainly performs device-independent service debugging on a PC for the JAVA application of the M2M terminal.
  • one machine such as PC A is used as the M2M terminal
  • the other machine such as PC B is used as the M2M platform
  • the two machines are connected through the local area network.
  • the M2M terminal JAVA application and the M2M protocol stack are run.
  • the M2M terminal JAVA application and the M2M protocol stack are running, they can be two independent processes, and there are various interaction modes between processes, which are applicable in the present invention;
  • PC B Running the M2M platform, as long as it can communicate with the M2M terminal through TCP/UDP/IP, there is no need to consider the specific operation mode of the M2M platform.
  • the service debugging method device for the JAVA application of the Internet of Things terminal is as shown in FIG. 1.
  • the device comprises: an M2M application, an M2M application protocol stack and an M2M platform, and the device further includes Included: the JAVA middleware adaptation layer for the M2M application, and the operating system support layer of the M2M application protocol stack;
  • the JAVA middleware adaptation layer is located at the bottom of the JAVA middleware of the M2M application, and is used to adapt the interaction interface between the JAVA middleware and the M2M protocol stack, and realize the interaction of the AT message between the JAVA middleware and the M2M protocol stack;
  • the operating system support layer is connected to the M2M protocol stack and is used to provide a unified operating system interface for the M2M protocol stack to implement the interaction of the AT message between the M2M protocol stack and the M2M platform.
  • the unified operating system interface provided by the operating system support layer includes: memory operation, local file operation, semaphore operation, network interaction, and service simulation interface; wherein the operating system support layer can perform interface functions of different operating systems. Uniform, and provide a unified interface to the M2M protocol stack, thereby shielding the differences between different operating systems, enabling JAVA applications to run across operating systems.
  • the M2M protocol stack in the device is mainly used for receiving and processing AT commands, including: command format conversion, logic judgment, local processing, codec, and exchange with the M2M platform.
  • the M2M protocol stack runs on the operating system support layer and is basically device-independent. Therefore, the M2M protocol stack can run across operating systems.
  • the JAVA middleware adaptation layer adapts the interaction interface between the JAVA middleware and the M2M protocol stack, and implements the interaction of the AT message between the JAVA middleware and the M2M protocol stack, specifically: when the JAVA application sends to the M2M protocol stack In the AT message, the JAVA application sends the AT message to the JAVA middleware adaptation layer of the JAVA middleware, and the JAVA middleware adaptation layer invokes the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits Feedback message of the M2M protocol stack;
  • the JAVA middleware adaptation layer After the JAVA middleware adaptation layer receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message.
  • the operating system interface provided by the operating system support layer implements the M2M protocol stack and The interaction of the AT message between the M2M platform is specifically as follows:
  • the M2M protocol stack invokes the AT message sending interface to receive the AT message through the inter-process interaction mode, and processes the AT message, and then uses the network interaction interface provided by the operating system support layer to The message is sent to the M2M platform.
  • the network communication interface provided by the operating system support layer receives the feedback message of the M2M platform, and sends the feedback message to the M2M application through the inter-process interaction.
  • the JAVA middleware adaptation layer is also used for adapting the interface between the JAVA middleware and the operating system; specifically: when the JAVA application needs to invoke an operating system function, the JAVA application passes the JAVA middleware adaptation layer and the operating system. Between the operating system function interface, call the operating system function.
  • the present invention provides a service commissioning method for an application of the Internet of Things terminal JAVA application.
  • the service debugging method of the JAVA application of the Internet of Things terminal is As shown in FIG. 2, the following steps are included: Step 201: The M2M protocol stack is initialized.
  • Step 202 The M2M protocol stack establishes a network connection with the M2M platform by calling an operating system interface.
  • the M2M protocol stack calls the operating system interface through the operating system support layer, and establishes a network connection with the M2M platform through TCP/UDP/IP.
  • Step 203 The JAVA application invokes the AT message sending interface of the JAVA middleware adaptation layer in the JAVA middleware, and sends the AT message to the JAVA middleware adaptation layer.
  • Step 204 The JAVA middleware adaptation layer invokes an AT message sending interface, and sends an AT message to the M2M protocol stack through an inter-process interaction mode.
  • Step 205 The M2M protocol stack processes the received AT message, and when the received AT message needs to be sent to the M2M platform, step 206 is performed; when the received AT message does not need to be sent to the M2M platform, the M2M protocol stack will feedback.
  • the message is sent to the JAVA middleware adaptation layer of the M2M application, and step 208 is performed;
  • the protocol stack determines, according to the M2M protocol, which AT messages can be processed within the M2M protocol stack, which AT messages need to be sent to the M2M platform, and when the received AT message needs to be sent to the M2M.
  • step 206 is performed; when the received AT message does not need to be sent to the M2M platform, the M2M protocol stack sends a feedback message to the JAVA middleware adaptation layer of the M2M application, and step 208 is performed;
  • the M2M protocol stack sends a feedback message to the JAVA middleware adaptation layer of the M2M application, and step 208 is performed;
  • Step 206 The M2M protocol stack invokes a network interaction interface of the operating system support layer, and sends an AT message to the M2M platform.
  • Step 207 The M2M platform sends a feedback message to the M2M protocol stack, and the M2M protocol stack invokes the AT message sending interface to send the received feedback message to the JAVA middleware adaptation layer of the M2M application through the inter-process interaction mode.
  • the M2M protocol stack can listen to the feedback message from the M2M platform through the network interaction interface, and process the received feedback message, and then call the AT message sending interface to send the JAVA middleware to the M2M application through the process interaction mode.
  • Adaptation layer can listen to the feedback message from the M2M platform through the network interaction interface, and process the received feedback message, and then call the AT message sending interface to send the JAVA middleware to the M2M application through the process interaction mode.
  • Step 208 The JAVA middleware adaptation layer sends the received feedback message to the JAVA application.
  • Embodiment 2 When the JAVA application receives the AT message sent by the M2M platform, the service debugging method of the JAVA application provided by the present invention, as shown in FIG. 3, includes the following steps: Step 301: Initializing the M2M protocol stack.
  • Step 302 The M2M protocol stack establishes a network connection with the M2M platform by calling an operating system interface.
  • Step 303 The M2M platform invokes a network interaction interface of the operating system support layer, and sends the AT message to the M2M protocol stack.
  • Step 304 The M2M protocol stack invokes the AT message sending interface to send the AT message to the JAVA middleware adaptation layer of the M2M application through the inter-process interaction mode.
  • Step 305 The JAVA middleware adaptation layer sends the received AT message to the JAVA application.
  • the interaction between the JAVA application and the AT message of the M2M protocol stack is realized through the JAVA middleware adaptation layer, and the interaction between the M2M protocol stack and the M2M platform AT message is realized through the operating system support layer, so that the M2M is enabled.
  • the JAVA application of the terminal can perform device-independent service debugging on the PC through the wired network, thereby solving the problem that the M2M terminal JAVA application development kit has no service simulator, the JAVA application cannot perform service debugging on the PC, and the M2M terminal JAVA is improved.
  • the debugging efficiency of the application increased the satisfaction of the secondary developers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention discloses an apparatus and a method for service debugging for JAVA applications in a Machine to Machine (M2M) terminal. Attention (AT) message interaction between a JAVA middleware and an M2M protocol stack is implemented through a set adapted interaction interface. AT message interaction between the M2M protocol stack and an M2M platform is implemented through a set uniform operating system interface to perform M2M service debugging. Application of the apparatus and method of the present invention enables that the service debugging independent of devices for a JAVA application in an M2M terminal is performed on a Personal Computer (PC) via a wired network, so as to solve the problem that the service debugging for the JAVA application cannot be performed on the PC due to no service simulator in the JAVA application development kit in the M2M terminal, thus effectively improving the debugging efficiency for the JAVA application in the M2M terminal, and increasing the degree of satisfaction of secondary developers.

Description

一种物联网终端 JAVA应用的业务调试装置和方法 技术领域  Service network debugging device and method for JAVA application

本发明涉及物联网( M2M, Machine to Machine )终端的业务调试领 i或, 特别是一种物联网终端 JAVA应用的业务调试装置和方法。 背景技术  The present invention relates to service debugging of an Internet of Things (M2M) terminal, or, in particular, to a service debugging apparatus and method for an Internet of Things terminal JAVA application. Background technique

传感网也称物联网, 综合了传感器、 低功耗、 通讯以及微机电等技术, 它的目标实际上是为了实现物与物互联, 然后将现在连接信息空间的网络 向物理世界进行延伸。  The sensor network, also known as the Internet of Things, combines technologies such as sensors, low-power, communication, and micro-electromechanics. Its goal is actually to interconnect objects and objects, and then extend the network that now connects the information space to the physical world.

目前, 运营商提出的物联网规范主要包括: 平台、 业务、 终端、 以及 终端二次开发接口部分。 考虑到物联网应用的广泛性, 其终端需要适应多 种类型的应用, 如: 监控过程所需的传输图像或声音等应用, 以及物流过 程所需的上报温度等应用, 所以, 运营商在推出二次开发接口标准时, 推 出了 C和 JAVA两种实现方式的接口, 其目的是尽可能让应用开发商自由 选择、 快速部署、 跨平台运行。  At present, the Internet of Things specifications proposed by operators mainly include: platform, service, terminal, and terminal secondary development interface. Considering the wide range of IoT applications, its terminals need to adapt to many types of applications, such as: applications such as transmission images or sounds required for monitoring processes, and applications such as reporting temperatures required for logistics processes. Therefore, operators are launching When the interface standard was developed twice, the interface between C and JAVA was introduced. The purpose is to allow application developers to freely choose, deploy quickly, and run across platforms.

现有技术中,各种 M2M终端开发套件主要包括: 二次开发接口和开发 环境, 基本上都没有用于业务调试的业务模拟器, 因此, 需要将应用部署 到硬件上, 在嵌入式平台上进行调试运行。 然而, 由于操作系统能力有限 和跟踪工具功能的局限,使得在嵌入式平台上调试的效率比在 PC上的调试 效率相差数倍。 另外, 由于在嵌入式平台上不能实现 JAVA 中间件调用 C 底层接口, 使得 JAVA应用的调试更加困难; 而且, 物联网规范并不属于 J2ME ( Java 2 Micro Edition )范围, 是运营商私有的规范, 暂时 J2ME还不 支持,所以在 PC上的标准 J2ME环境中无法对相应的 JAVA应用进行调试。 发明内容 In the prior art, various M2M terminal development kits mainly include: a secondary development interface and a development environment, and basically no business simulator for business debugging, therefore, the application needs to be deployed on the hardware, on the embedded platform. Perform debugging operations. However, due to limited operating system capabilities and limitations of the tracking tool functionality, debugging on embedded platforms is several times more efficient than debugging on a PC. In addition, because the Java middleware cannot be used to call the C low-level interface on the embedded platform, the debugging of the JAVA application is more difficult. Moreover, the Internet of Things specification does not belong to the J2ME (Java 2 Micro Edition) scope and is a proprietary specification of the operator. Temporary J2ME does not support it, so the corresponding JAVA application cannot be debugged in the standard J2ME environment on the PC. Summary of the invention

有鉴于此,本发明的主要目的在于提供一种物联网终端 JAVA应用的业 务调试装置和方法, 能在 PC上对 JAVA应用进行业务调试, 以提高 M2M 业务调试的效率。  In view of this, the main purpose of the present invention is to provide a service debugging apparatus and method for an JAVA application of an Internet of Things terminal, which can perform service debugging on a JAVA application on a PC to improve the efficiency of M2M service debugging.

为解决上述技术问题, 本发明的技术方案是这样实现的:  In order to solve the above technical problem, the technical solution of the present invention is implemented as follows:

一种物联网( M2M )终端 JAVA应用的业务调试装置,包括 M2M应用、 M2M应用协议栈和 M2M平台;该装置进一步包括:位于 M2M应用的 JAVA 中间件适配层, 以及位于 M2M应用协议栈的操作系统支持层; 其中,  A service debugging device for an Internet of Things (M2M) terminal JAVA application, comprising an M2M application, an M2M application protocol stack, and an M2M platform; the device further comprising: a JAVA middleware adaptation layer located in the M2M application, and an M2M application protocol stack Operating system support layer;

JAVA中间件适配层, 位于 M2M应用中 JAVA中间件的底层, 用于适 配 JAVA中间件与 M2M协议栈之间的交互接口,实现 JAVA中间件与 M2M 协议栈之间 AT消息的交互;  The JAVA middleware adaptation layer is located in the M2M application. The bottom layer of the JAVA middleware is used to adapt the interaction interface between the JAVA middleware and the M2M protocol stack to realize the interaction of the AT message between the JAVA middleware and the M2M protocol stack.

操作系统支持层, 与 M2M应用协议栈中 M2M协议栈相连, 用于为 M2M协议栈提供统一的操作系统接口, 实现 M2M协议栈与 M2M平台之 间 AT消息的交互。  The operating system support layer is connected to the M2M protocol stack in the M2M application protocol stack, and is used to provide a unified operating system interface for the M2M protocol stack to implement interaction between the M2M protocol stack and the M2M platform.

所述 JAVA中间件适配层适配 JAVA中间件与 M2M协议栈之间的交互 接口, 实现 JAVA中间件与 M2M协议栈之间 AT消息的交互, 具体为: 当 JAVA应用向 M2M协议栈发送 AT消息时 , JAVA应用将 AT消息发送给 JAVA 中间件的 JAVA中间件适配层, 由 JAVA中间件适配层调用 AT消息发送接 口通过进程间交互方式将 AT消息发送给 M2M协议栈, 并等待 M2M协议 栈的反馈消息; 当 JAVA中间件适配层通过进程间交互方式接收到 M2M协 议栈的反馈消息后, 通知 JAVA应用获取所述反馈消息。  The JAVA middleware adaptation layer adapts the interaction interface between the JAVA middleware and the M2M protocol stack, and implements the interaction of the AT message between the JAVA middleware and the M2M protocol stack, specifically: when the JAVA application sends the AT to the M2M protocol stack. In the message, the JAVA application sends the AT message to the JAVA middleware adaptation layer of the JAVA middleware. The JAVA middleware adaptation layer invokes the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits for the M2M. The feedback message of the protocol stack; after the JAVA middleware adaptation layer receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message.

所述操作系统支持层提供的统一的操作系统接口包括: 内存操作接口、 本地文件操作接口、 信号量操作接口、 网络交互接口和业务模拟接口。  The unified operating system interfaces provided by the operating system support layer include: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation interface.

所述通过操作系统支持层提供的操作系统接口, 实现 M2M协议栈与 M2M平台之间 AT消息的交互, 具体为: M2M协议栈调用 AT消息发送接 口通过进程间交互方式接收 AT消息, 并对 AT消息进行处理后, 通过操作 系统支持层提供的网络交互接口, 将 AT消息发送给 M2M平台; M2M协 议栈通过操作系统支持层提供的网络交互接口接收 M2M平台的反馈消息, 将反馈消息通过进程间交互方式发送给 M2M应用。 The operating system interface provided by the operating system support layer implements the interaction of the AT message between the M2M protocol stack and the M2M platform, specifically: the M2M protocol stack invokes the AT message sending and receiving The interface receives the AT message through the inter-process interaction mode, and processes the AT message, and then sends the AT message to the M2M platform through the network interaction interface provided by the operating system support layer; the M2M protocol stack provides the network interaction interface provided by the operating system support layer. The feedback message of the M2M platform is received, and the feedback message is sent to the M2M application through the inter-process interaction.

所述 JAVA中间件适配层,还用于 JAVA中间件与操作系统之间接口的 适配; 所述适配具体为: 当 JAVA应用需要调用操作系统函数时, JAVA应 用通过 JAVA中间件的 JAVA中间件适配层与操作系统之间的操作系统函数 接口, 调用操作系统函数。  The JAVA middleware adaptation layer is further used for adapting an interface between the JAVA middleware and the operating system; the adaptation is specifically: when the JAVA application needs to invoke an operating system function, the JAVA application passes the JAVA middleware JAVA The operating system function interface between the middleware adaptation layer and the operating system calls the operating system function.

一种物联网终端 JAVA应用的业务调试方法, 包括: JAVA 中间件与 M2M协议栈之间通过设置的适配的交互接口实现 AT消息的交互; M2M协 议栈与 M2M平台之间通过设置的统一的操作系统接口实现 AT 消息的交 互, 进行 M2M业务调试。  A service debugging method for the JAVA application of the Internet of Things terminal includes: an interaction between the JAVA middleware and the M2M protocol stack through an adapted interactive interface; the unified setting between the M2M protocol stack and the M2M platform The operating system interface implements the interaction of AT messages and performs M2M service debugging.

所述 JAVA中间件与 M2M协议栈之间通过适配的交互接口实现 AT消 息的交互 , 具体为: 当 JAVA应用向 M2M协议栈发送 AT消息时 , JAVA应 用将 AT消息发送给 JAVA中间件, 由 JAVA中间件调用 AT消息发送接口 通过进程间交互方式将 AT消息发送给 M2M协议栈, 并等待 M2M协议栈 的反馈消息; 当 JAVA中间件通过进程间交互方式接收到 M2M协议栈的反 馈消息后, 通知 JAVA应用获取所述反馈消息。  The interaction between the JAVA middleware and the M2M protocol stack is implemented through an adapted interaction interface, specifically: when the JAVA application sends an AT message to the M2M protocol stack, the JAVA application sends the AT message to the JAVA middleware, The JAVA middleware calls the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits for the feedback message of the M2M protocol stack; when the JAVA middleware receives the feedback message of the M2M protocol stack through the inter-process interaction mode, The JAVA application is notified to obtain the feedback message.

所述统一的操作系统接口包括: 内存操作接口、 本地文件操作接口、 信号量操作接口、 网络交互接口和业务模拟接口。  The unified operating system interface includes: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation interface.

所述 M2M协议栈与 M2M平台之间通过统一的操作系统接口实现 AT 消息的交互, 具体为: M2M协议栈通过进程间交互方式接收 AT消息, 并 对 AT消息进行处理后, 通过网络交互接口将 AT消息发送给 M2M平台; M2M协议栈通过网络交互接口接收 M2M平台的反馈消息, 将反馈消息通 过进程间交互方式发送给 M2M应用。 该方法还包括: 当 JAVA应用需要调用操作系统函数时, JAVA应用通 过 JAVA中间件与操作系统之间适配的操作系统函数接口,调用操作系统函 数。 The M2M protocol stack and the M2M platform implement the interaction of the AT message through a unified operating system interface, specifically: the M2M protocol stack receives the AT message through the inter-process interaction mode, and processes the AT message through the network interaction interface. The AT message is sent to the M2M platform. The M2M protocol stack receives the feedback message of the M2M platform through the network interaction interface, and sends the feedback message to the M2M application through the inter-process interaction. The method further includes: when the JAVA application needs to invoke an operating system function, the JAVA application invokes an operating system function through an operating system function interface adapted between the JAVA middleware and the operating system.

当 JAVA应用向 M2M协议栈主动发送 AT消息时, 该方法具体包括: M2M协议栈初始化, 并与 M2M平台建立网络连接; JAVA应用调用 AT消 息发送接口通过进程间交互方式,将 AT消息发送给 M2M协议栈; 当 M2M 协议栈所接收的 AT消息需要发送给 M2M平台时, M2M协议栈调用网络 交互接口,将 AT消息发送给 M2M平台; M2M平台向 M2M协议栈发送反 馈消息, 由 M2M协议栈将接收到的反馈消息发送给 JAVA应用。  When the JAVA application actively sends an AT message to the M2M protocol stack, the method specifically includes: initializing the M2M protocol stack and establishing a network connection with the M2M platform; the JAVA application invoking the AT message sending interface sends the AT message to the M2M through the inter-process interaction mode. Protocol stack; When the AT message received by the M2M protocol stack needs to be sent to the M2M platform, the M2M protocol stack calls the network interaction interface to send the AT message to the M2M platform; the M2M platform sends a feedback message to the M2M protocol stack, which is to be sent by the M2M protocol stack. The received feedback message is sent to the JAVA application.

当 JAVA应用接收 M2M平台发送的 AT消息时,该方法具体包括: M2M 协议栈初始化, 并与 M2M平台建立网络连接; M2M平台调用网络交互接 口, 将 AT消息发送给 M2M协议栈; M2M协议栈调用 AT消息发送接口通 过进程间交互方式, 将 AT消息发送给 JAVA应用。  When the JAVA application receives the AT message sent by the M2M platform, the method specifically includes: initializing the M2M protocol stack and establishing a network connection with the M2M platform; the M2M platform calls the network interaction interface, and sends the AT message to the M2M protocol stack; the M2M protocol stack calls The AT message sending interface sends an AT message to the JAVA application through an inter-process interaction mode.

本发明所提供的物联网终端 JAVA应用的业务调试装置和方法, 基于 JAVA中间件与 M2M协议栈之间通过设置的适配的交互接口实现 AT消息 的交互; M2M协议栈与 M2M平台之间通过设置的统一的操作系统接口实 现 AT消息的交互, 从而实现 M2M业务调试。 釆用本发明所述的装置和方 法, 其优点在于:  The service debugging device and method for the JAVA application of the Internet of Things terminal provided by the present invention realizes the interaction of the AT message based on the adapted interactive interface between the JAVA middleware and the M2M protocol stack; the M2M protocol stack and the M2M platform pass The unified operating system interface is configured to implement the interaction of AT messages, thereby implementing M2M service debugging. The apparatus and method of the present invention have the advantages of:

本发明使 M2M终端的 JAVA应用能通过有线网络在 PC上进行与设备 无关的业务调试, 从而解决了 M2M终端 JAVA应用开发套件没有业务模拟 器、 JAVA应用无法在 PC上进行业务调试的问题,有效提高 M2M终端 JAVA 应用的调试效率, 增加了二次开发商的满意度。 附图说明  The invention enables the JAVA application of the M2M terminal to perform device-independent service debugging on the PC through the wired network, thereby solving the problem that the M2M terminal JAVA application development kit has no service simulator, and the JAVA application cannot perform service debugging on the PC, effectively Improve the debugging efficiency of the M2M terminal JAVA application and increase the satisfaction of the secondary developers. DRAWINGS

图 1为本发明物联网终端 JAVA应用的业务调试装置结构示意图; 图 2为本发明实施例一中物联网终端 JAVA应用的业务调试方法流程 图; 1 is a schematic structural diagram of a service debugging apparatus for an JAVA application of an Internet of Things terminal according to the present invention; FIG. 2 is a flow chart of a service debugging method for an JAVA application of an Internet of Things terminal according to Embodiment 1 of the present invention; Figure

图 3为本发明实施例二中物联网终端 JAVA应用的业务调试方法流程 图。 具体实施方式  FIG. 3 is a flow chart of a service debugging method for an JAVA application of an Internet of Things terminal according to Embodiment 2 of the present invention. detailed description

本发明的基本思想是: JAVA中间件与 M2M协议栈之间通过设置的适 配的交互接口实现 AT消息的交互; M2M协议栈与 M2M平台之间通过设 置的统一的操作系统接口实现 AT消息的交互, 从而实现 M2M业务调试。  The basic idea of the present invention is: the interaction between the JAVA middleware and the M2M protocol stack is implemented through the set interactive interface; the M2M protocol stack and the M2M platform implement the AT message through the unified operating system interface. Interact, thus enabling M2M service debugging.

由于 M2M业务主要是 M2M终端和 M2M平台之间的 4艮文交互 , 其特 点是: 以 AT命令作为交互方式, 使用通用分组无线服务(GPRS, General Packet Radio Service M乍为传输承载,使用传输控制协议( TCP, Transmission Control Protocol ) /用户数据包协议(UDP, User Datagram Protocol ) /网络 互联协议(IP, Internet Protocol )作为传输协议; 从业务特点上看, M2M 业务的交互类型比较单一、 有统一的业务协议、 使用通用的传输协议。 利 用 AT命令的报文交互方式, 可以对 M2M业务进行调试; 如果不考虑设备 相关层的调试, 如 M2M终端与底层设备如摄像头的调试, 则在 PC上进行 与设备无关的业务调试完全是可行的。 因此, 本发明主要针对 M2M终端的 JAVA应用在 PC上进行与设备无关的业务调试。  Since the M2M service is mainly a 4-character interaction between the M2M terminal and the M2M platform, it is characterized by: using the AT command as an interactive mode, using a general packet radio service (GPRS, General Packet Radio Service M乍 as a transmission bearer, using transmission control) Protocol (TCP, Transmission Control Protocol) / User Datagram Protocol (UDP) / Internet Protocol (IP) as the transport protocol; From the perspective of service characteristics, the interaction type of M2M services is relatively simple and uniform. The service protocol uses a common transport protocol. The M2M service can be debugged by using the AT command message exchange mode. If the device related layer debugging is not considered, such as the debugging of the M2M terminal and the underlying device such as the camera, on the PC. It is completely feasible to perform device-independent service debugging. Therefore, the present invention mainly performs device-independent service debugging on a PC for the JAVA application of the M2M terminal.

一般, 用一台机器如 PC A作为 M2M终端, 另一台机器如 PC B作为 M2M平台, 两台机器通过局域网连通。 PC A上运行 M2M终端 JAVA应用 和 M2M协议栈, M2M终端 JAVA应用和 M2M协议栈运行时,可以是两个 独立进程, 进程间的交互方式有多种, 在本发明中均适用; PC B 上运行 M2M平台, 只要能与 M2M终端通过 TCP/UDP/IP正常通讯, 这里无需考 虑 M2M平台的具体运行方式。  Generally, one machine such as PC A is used as the M2M terminal, and the other machine such as PC B is used as the M2M platform, and the two machines are connected through the local area network. On the PC A, the M2M terminal JAVA application and the M2M protocol stack are run. When the M2M terminal JAVA application and the M2M protocol stack are running, they can be two independent processes, and there are various interaction modes between processes, which are applicable in the present invention; PC B Running the M2M platform, as long as it can communicate with the M2M terminal through TCP/UDP/IP, there is no need to consider the specific operation mode of the M2M platform.

本发明提供的物联网终端 JAVA应用的业务调试方法装置,如图 1所示, 该装置包括: M2M应用、 M2M应用协议栈和 M2M平台, 该装置进一步包 括: 位于 M2M应用的 JAVA中间件适配层, 以及位于 M2M应用协议栈的 操作系统支持层; 其中, The service debugging method device for the JAVA application of the Internet of Things terminal provided by the present invention is as shown in FIG. 1. The device comprises: an M2M application, an M2M application protocol stack and an M2M platform, and the device further includes Included: the JAVA middleware adaptation layer for the M2M application, and the operating system support layer of the M2M application protocol stack;

JAVA中间件适配层, 位于 M2M应用的 JAVA中间件的底层, 用于适 配 JAVA中间件与 M2M协议栈之间的交互接口,实现 JAVA中间件与 M2M 协议栈之间 AT消息的交互;  The JAVA middleware adaptation layer is located at the bottom of the JAVA middleware of the M2M application, and is used to adapt the interaction interface between the JAVA middleware and the M2M protocol stack, and realize the interaction of the AT message between the JAVA middleware and the M2M protocol stack;

操作系统支持层, 与 M2M协议栈相连, 用于为 M2M协议栈提供统一 的操作系统接口, 实现 M2M协议栈与 M2M平台之间 AT消息的交互。  The operating system support layer is connected to the M2M protocol stack and is used to provide a unified operating system interface for the M2M protocol stack to implement the interaction of the AT message between the M2M protocol stack and the M2M platform.

所述操作系统支持层提供的统一的操作系统接口包括: 内存操作、 本 地文件操作、 信号量操作、 网络交互和业务模拟等接口; 其中, 操作系统 支持层可以将不同的操作系统的接口函数进行统一, 并将统一的接口提供 给 M2M协议栈, 从而屏蔽不同操作系统的差异, 使 JAVA应用能够跨操作 系统运行。  The unified operating system interface provided by the operating system support layer includes: memory operation, local file operation, semaphore operation, network interaction, and service simulation interface; wherein the operating system support layer can perform interface functions of different operating systems. Uniform, and provide a unified interface to the M2M protocol stack, thereby shielding the differences between different operating systems, enabling JAVA applications to run across operating systems.

该装置中的 M2M协议栈, 主要用于 AT命令的接收和处理, 包括: 命 令格式转换、 逻辑判断、 本地处理、 编解码、 以及与 M2M平台的交换等。 M2M 协议栈运行于操作系统支持层之上, 基本与设备无关, 所以, M2M 协议栈可以跨操作系统运行。  The M2M protocol stack in the device is mainly used for receiving and processing AT commands, including: command format conversion, logic judgment, local processing, codec, and exchange with the M2M platform. The M2M protocol stack runs on the operating system support layer and is basically device-independent. Therefore, the M2M protocol stack can run across operating systems.

所述 JAVA中间件适配层 , 适配 JAVA中间件与 M2M协议栈之间的交 互接口, 实现 JAVA中间件与 M2M协议栈之间 AT消息的交互, 具体为: 当 JAVA应用向 M2M协议栈发送 AT消息时 , JAVA应用将 AT消息发 送给 JAVA中间件的 JAVA中间件适配层, 由 JAVA中间件适配层调用 AT 消息发送接口通过进程间交互方式将 AT消息发送给 M2M协议栈, 并等待 M2M协议栈的反馈消息;  The JAVA middleware adaptation layer adapts the interaction interface between the JAVA middleware and the M2M protocol stack, and implements the interaction of the AT message between the JAVA middleware and the M2M protocol stack, specifically: when the JAVA application sends to the M2M protocol stack In the AT message, the JAVA application sends the AT message to the JAVA middleware adaptation layer of the JAVA middleware, and the JAVA middleware adaptation layer invokes the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits Feedback message of the M2M protocol stack;

当 JAVA中间件适配层通过进程间交互方式接收到 M2M协议栈的反馈 消息后, 再通知 JAVA应用获取所述反馈消息。  After the JAVA middleware adaptation layer receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message.

所述通过操作系统支持层提供的操作系统接口, 实现 M2M协议栈与 M2M平台之间 AT消息的交互, 具体为: M2M协议栈调用 AT消息发送接 口通过进程间交互方式接收 AT消息, 并对 AT消息进行处理后, 通过操作 系统支持层提供的网络交互接口, 将 AT消息发送给 M2M平台; 再通过操 作系统支持层提供的网络交互接口接收 M2M平台的反馈消息,将反馈消息 通过进程间交互方式发送给 M2M应用。 The operating system interface provided by the operating system support layer implements the M2M protocol stack and The interaction of the AT message between the M2M platform is specifically as follows: The M2M protocol stack invokes the AT message sending interface to receive the AT message through the inter-process interaction mode, and processes the AT message, and then uses the network interaction interface provided by the operating system support layer to The message is sent to the M2M platform. The network communication interface provided by the operating system support layer receives the feedback message of the M2M platform, and sends the feedback message to the M2M application through the inter-process interaction.

所述 JAVA中间件适配层,还用于 JAVA中间件与操作系统之间接口的 适配;具体为:当 JAVA应用需要调用操作系统函数时, JAVA应用通过 JAVA 中间件适配层与操作系统之间的操作系统函数接口, 调用操作系统函数。  The JAVA middleware adaptation layer is also used for adapting the interface between the JAVA middleware and the operating system; specifically: when the JAVA application needs to invoke an operating system function, the JAVA application passes the JAVA middleware adaptation layer and the operating system. Between the operating system function interface, call the operating system function.

基于上述装置,本发明提供了一种物联网终端 JAVA应用的业务调试方 实施例一: 当 JAVA应用向 M2M协议栈主动发送 AT消息时, 本发明 提供的物联网终端 JAVA应用的业务调试方法,如图 2所示,包括以下步骤: 步骤 201: M2M协议栈初始化。  Based on the above apparatus, the present invention provides a service commissioning method for an application of the Internet of Things terminal JAVA application. When the JAVA application actively sends an AT message to the M2M protocol stack, the service debugging method of the JAVA application of the Internet of Things terminal provided by the present invention is As shown in FIG. 2, the following steps are included: Step 201: The M2M protocol stack is initialized.

步骤 202: M2M协议栈通过调用操作系统接口与 M2M平台建立网络 连接;  Step 202: The M2M protocol stack establishes a network connection with the M2M platform by calling an operating system interface.

本步骤中, M2M 协议栈通过操作系统支持层调用操作系统接口, 与 M2M平台通过 TCP/UDP/IP建立网络连接。  In this step, the M2M protocol stack calls the operating system interface through the operating system support layer, and establishes a network connection with the M2M platform through TCP/UDP/IP.

步骤 203: JAVA应用调用 JAVA中间件中 JAVA中间件适配层的 AT消 息发送接口, 将 AT消息发送到 JAVA中间件适配层。  Step 203: The JAVA application invokes the AT message sending interface of the JAVA middleware adaptation layer in the JAVA middleware, and sends the AT message to the JAVA middleware adaptation layer.

步骤 204: JAVA中间件适配层调用 AT消息发送接口, 通过进程间交 互方式, 将 AT消息发送给 M2M协议栈。  Step 204: The JAVA middleware adaptation layer invokes an AT message sending interface, and sends an AT message to the M2M protocol stack through an inter-process interaction mode.

步骤 205: M2M协议栈对接收到的 AT消息进行处理, 并当所接收的 AT消息需要发送给 M2M平台时, 执行步骤 206; 当所接收的 AT消息不需 要发送给 M2M平台时, M2M协议栈将反馈消息发送给 M2M应用的 JAVA 中间件适配层, 并执行步骤 208; 本步骤中, Μ2Μ协议栈接收到 AT消息后, 会根据 M2M协议判断出 哪些 AT消息可以在 M2M协议栈内部进行处理, 哪些 AT消息需要发送给 M2M平台,并当所接收的 AT消息需要发送给 M2M平台时,执行步骤 206; 当所接收的 AT消息不需要发送给 M2M平台时, M2M协议栈将反馈消息 发送给 M2M应用的 JAVA中间件适配层, 并执行步骤 208; 其中, 该判断 过程可以通过现有技术实现, 不属于本发明的重点, 在此不做详细描述。 Step 205: The M2M protocol stack processes the received AT message, and when the received AT message needs to be sent to the M2M platform, step 206 is performed; when the received AT message does not need to be sent to the M2M platform, the M2M protocol stack will feedback. The message is sent to the JAVA middleware adaptation layer of the M2M application, and step 208 is performed; In this step, after receiving the AT message, the protocol stack determines, according to the M2M protocol, which AT messages can be processed within the M2M protocol stack, which AT messages need to be sent to the M2M platform, and when the received AT message needs to be sent to the M2M. In the case of the platform, step 206 is performed; when the received AT message does not need to be sent to the M2M platform, the M2M protocol stack sends a feedback message to the JAVA middleware adaptation layer of the M2M application, and step 208 is performed; The prior art implementation is not an important point of the present invention and will not be described in detail herein.

步骤 206: M2M协议栈调用操作系统支持层的网络交互接口, 将 AT 消息发送给 M2M平台;  Step 206: The M2M protocol stack invokes a network interaction interface of the operating system support layer, and sends an AT message to the M2M platform.

步骤 207: M2M平台向 M2M协议栈发送反馈消息 , M2M协议栈调用 AT 消息发送接口通过进程间交互方式, 将接收到的反馈消息发送给 M2M 应用的 JAVA中间件适配层;  Step 207: The M2M platform sends a feedback message to the M2M protocol stack, and the M2M protocol stack invokes the AT message sending interface to send the received feedback message to the JAVA middleware adaptation layer of the M2M application through the inter-process interaction mode.

本步骤中, M2M协议栈可以通过网络交互接口侦听到来自 M2M平台 的反馈消息, 并将接收到的反馈消息进行处理后, 调用 AT消息发送接口通 过进程交互方式发送给 M2M应用的 JAVA中间件适配层。  In this step, the M2M protocol stack can listen to the feedback message from the M2M platform through the network interaction interface, and process the received feedback message, and then call the AT message sending interface to send the JAVA middleware to the M2M application through the process interaction mode. Adaptation layer.

步骤 208: JAVA中间件适配层将接收到的反馈消息发送给 JAVA应用。 实施例二: 当 JAVA应用接收 M2M平台发送的 AT消息时, 本发明提 供的物联网终端 JAVA应用的业务调试方法, 如图 3所示, 包括以下步骤: 步骤 301 : M2M协议栈初始化。  Step 208: The JAVA middleware adaptation layer sends the received feedback message to the JAVA application. Embodiment 2: When the JAVA application receives the AT message sent by the M2M platform, the service debugging method of the JAVA application provided by the present invention, as shown in FIG. 3, includes the following steps: Step 301: Initializing the M2M protocol stack.

步骤 302: M2M协议栈通过调用操作系统接口与 M2M平台建立网络 连接。  Step 302: The M2M protocol stack establishes a network connection with the M2M platform by calling an operating system interface.

步骤 303 : M2M平台调用操作系统支持层的网络交互接口, 将 AT消 息发送给 M2M协议栈。  Step 303: The M2M platform invokes a network interaction interface of the operating system support layer, and sends the AT message to the M2M protocol stack.

步骤 304: M2M协议栈调用 AT消息发送接口通过进程间交互方式, 将 AT消息发送给 M2M应用的 JAVA中间件适配层。  Step 304: The M2M protocol stack invokes the AT message sending interface to send the AT message to the JAVA middleware adaptation layer of the M2M application through the inter-process interaction mode.

步骤 305: JAVA中间件适配层将接收到的 AT消息发送给 JAVA应用。 在上述业务调试过程中,通过 JAVA中间件适配层实现了 JAVA应用与 M2M协议栈的 AT消息的交互, 以及通过操作系统支持层实现了 M2M协 议栈与 M2M平台的 AT消息的交互 , 使 M2M终端的 JAVA应用能够通过 有线网络在 PC上进行与设备无关的业务调试,从而解决了 M2M终端 JAVA 应用开发套件没有业务模拟器、 JAVA应用无法在 PC上进行业务调试的问 题,提高了 M2M终端 JAVA应用的调试效率,增加了二次开发商的满意度。 Step 305: The JAVA middleware adaptation layer sends the received AT message to the JAVA application. In the above-mentioned service debugging process, the interaction between the JAVA application and the AT message of the M2M protocol stack is realized through the JAVA middleware adaptation layer, and the interaction between the M2M protocol stack and the M2M platform AT message is realized through the operating system support layer, so that the M2M is enabled. The JAVA application of the terminal can perform device-independent service debugging on the PC through the wired network, thereby solving the problem that the M2M terminal JAVA application development kit has no service simulator, the JAVA application cannot perform service debugging on the PC, and the M2M terminal JAVA is improved. The debugging efficiency of the application increased the satisfaction of the secondary developers.

以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围, 凡在本发明的精神和原则之内所作的任何修改、 等同替换和改进 等, 均应包含在本发明的保护范围之内。  The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included. Within the scope of protection of the present invention.

Claims

权利要求书 Claim 1、 一种物联网 (M2M )终端 JAVA应用的业务调试装置, 包括 M2M 应用、 M2M应用协议栈和 M2M平台; 其特征在于, 该装置进一步包括: 位于 M2M应用的 JAVA中间件适配层, 以及位于 M2M应用协议栈的操作 系统支持层; 其中,  A service debugging device for an Internet of Things (M2M) terminal JAVA application, comprising an M2M application, an M2M application protocol stack, and an M2M platform; wherein the device further comprises: a JAVA middleware adaptation layer located in the M2M application, and The operating system support layer of the M2M application protocol stack; JAVA中间件适配层, 位于 M2M应用中 JAVA中间件的底层, 用于适 配 JAVA中间件与 M2M协议栈之间的交互接口,实现 JAVA中间件与 M2M 协议栈之间 AT消息的交互;  The JAVA middleware adaptation layer is located in the M2M application. The bottom layer of the JAVA middleware is used to adapt the interaction interface between the JAVA middleware and the M2M protocol stack to realize the interaction of the AT message between the JAVA middleware and the M2M protocol stack. 操作系统支持层, 与 M2M应用协议栈中 M2M协议栈相连, 用于为 M2M协议栈提供统一的操作系统接口, 实现 M2M协议栈与 M2M平台之 间 AT消息的交互。  The operating system support layer is connected to the M2M protocol stack in the M2M application protocol stack, and is used to provide a unified operating system interface for the M2M protocol stack to implement interaction between the M2M protocol stack and the M2M platform. 2、 根据权利要求 1所述的装置, 其特征在于, 所述 JAVA中间件适配 层适配 JAVA中间件与 M2M协议栈之间的交互接口 , 实现 JAVA中间件与 M2M协议栈之间 AT消息的交互, 具体为:  2. The apparatus according to claim 1, wherein the JAVA middleware adaptation layer adapts an interaction interface between the JAVA middleware and the M2M protocol stack, and implements an AT message between the JAVA middleware and the M2M protocol stack. The interaction is specifically as follows: 当 JAVA应用向 M2M协议栈发送 AT消息时 , JAVA应用将 AT消息发 送给 JAVA中间件的 JAVA中间件适配层, 由 JAVA中间件适配层调用 AT 消息发送接口通过进程间交互方式将 AT消息发送给 M2M协议栈, 并等待 M2M协议栈的反馈消息;  When the JAVA application sends an AT message to the M2M protocol stack, the JAVA application sends the AT message to the JAVA middleware adaptation layer of the JAVA middleware, and the JAVA middleware adaptation layer invokes the AT message sending interface to process the AT message through the inter-process interaction mode. Send to the M2M protocol stack and wait for feedback messages from the M2M protocol stack; 当 JAVA中间件适配层通过进程间交互方式接收到 M2M协议栈的反馈 消息后, 通知 JAVA应用获取所述反馈消息。  When the JAVA middleware adaptation layer receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message. 3、 根据权利要求 1所述的装置, 其特征在于, 所述操作系统支持层提 供的统一的操作系统接口包括: 内存操作接口、 本地文件操作接口、 信号 量操作接口、 网络交互接口和业务模拟接口。  3. The device according to claim 1, wherein the unified operating system interface provided by the operating system support layer comprises: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation. interface. 4、 根据权利要求 3所述的装置, 其特征在于, 所述通过操作系统支持 层提供的操作系统接口, 实现 M2M协议栈与 M2M平台之间 AT消息的交 互, 具体为: The device according to claim 3, wherein the operating system interface provided by the operating system support layer implements the intersection of the AT message between the M2M protocol stack and the M2M platform. Mutual, specifically: M2M协议栈调用 AT消息发送接口通过进程间交互方式接收 AT消息, 并对 AT 消息进行处理后, 通过操作系统支持层提供的网络交互接口, 将 AT消息发送给 M2M平台; M2M协议栈通过操作系统支持层提供的网络交 互接口接收 M2M平台的反馈消息,将反馈消息通过进程间交互方式发送给 M2M应用。  The M2M protocol stack invokes the AT message sending interface to receive the AT message through the inter-process interaction mode, and after processing the AT message, sends the AT message to the M2M platform through the network interaction interface provided by the operating system support layer; the M2M protocol stack passes the operating system. The network interaction interface provided by the support layer receives the feedback message of the M2M platform, and sends the feedback message to the M2M application through the inter-process interaction mode. 5、 根据权利要求 1至 4任一项所述的装置, 其特征在于, 所述 JAVA 中间件适配层, 还用于 JAVA中间件与操作系统之间接口的适配;  The device according to any one of claims 1 to 4, wherein the JAVA middleware adaptation layer is further used for adapting an interface between the JAVA middleware and an operating system; 所述适配具体为: 当 JAVA应用需要调用操作系统函数时, JAVA应用 通过 JAVA中间件的 JAVA中间件适配层与操作系统之间的操作系统函数接 口, 调用操作系统函数。  The adaptation is specifically as follows: When the JAVA application needs to invoke the operating system function, the JAVA application invokes the operating system function through the JAVA middleware adaptation layer of the JAVA middleware and the operating system function interface between the operating system. 6、 一种物联网终端 JAVA应用的业务调试方法, 其特征在于, 该方法 包括:  6. An IoT terminal service debugging method for a JAVA application, characterized in that the method comprises: JAVA中间件与 M2M协议栈之间通过设置的适配的交互接口实现 AT 消息的交互;  The interaction between the AT message is implemented between the JAVA middleware and the M2M protocol stack through the set interactive interface; M2M协议栈与 M2M平台之间通过设置的统一的操作系统接口实现 AT 消息的交互, 进行 M2M业务调试。  The M2M protocol stack and the M2M platform implement the interaction of the AT message through the unified operating system interface, and perform M2M service debugging. 7、 根据权利要求 6 所述的方法, 其特征在于, 所述 JAVA 中间件与 M2M协议栈之间通过适配的交互接口实现 AT消息的交互, 具体为:  The method according to claim 6, wherein the interaction between the JAVA middleware and the M2M protocol stack is implemented through an adapted interactive interface, specifically: 当 JAVA应用向 M2M协议栈发送 AT消息时 , JAVA应用将 AT消息发 送给 JAVA中间件, 由 JAVA中间件调用 AT消息发送接口通过进程间交互 方式将 AT消息发送给 M2M协议栈, 并等待 M2M协议栈的反馈消息; 当 JAVA 中间件通过进程间交互方式接收到 M2M协议栈的反馈消息 后, 通知 JAVA应用获取所述反馈消息。  When the JAVA application sends an AT message to the M2M protocol stack, the JAVA application sends the AT message to the JAVA middleware, and the JAVA middleware invokes the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode, and waits for the M2M protocol. The feedback message of the stack; after the JAVA middleware receives the feedback message of the M2M protocol stack through the inter-process interaction mode, the JAVA application is notified to obtain the feedback message. 8、 根据权利要求 6所述的方法, 其特征在于, 所述统一的操作系统接 口包括: 内存操作接口、 本地文件操作接口、 信号量操作接口、 网络交互 接口和业务模拟接口。 8. The method according to claim 6, wherein the unified operating system is connected The ports include: a memory operation interface, a local file operation interface, a semaphore operation interface, a network interaction interface, and a service simulation interface. 9、 根据权利要求 8 所述的方法, 其特征在于, 所述 M2M协议栈与 M2M平台之间通过统一的操作系统接口实现 AT消息的交互 , 具体为: The method according to claim 8, wherein the interaction between the M2M protocol stack and the M2M platform is implemented through a unified operating system interface, specifically: M2M协议栈通过进程间交互方式接收 AT消息, 并对 AT消息进行处 理后, 通过网络交互接口将 AT消息发送给 M2M平台; M2M协议栈通过 网络交互接口接收 M2M平台的反馈消息,将反馈消息通过进程间交互方式 发送给 M2M应用。 The M2M protocol stack receives the AT message through the inter-process interaction mode, and processes the AT message, and then sends the AT message to the M2M platform through the network interaction interface. The M2M protocol stack receives the feedback message of the M2M platform through the network interaction interface, and passes the feedback message. Inter-process interaction is sent to the M2M application. 10、 根据权利要求 6至 9任一项所述的方法, 其特征在于, 该方法还 包括: 当 JAVA应用需要调用操作系统函数时, JAVA应用通过 JAVA中间 件与操作系统之间适配的操作系统函数接口, 调用操作系统函数。  The method according to any one of claims 6 to 9, wherein the method further comprises: when the JAVA application needs to invoke an operating system function, the JAVA application adapts the operation between the JAVA middleware and the operating system. System function interface, call operating system function. 11、 根据权利要求 6至 9任一项所述的方法, 其特征在于, 当 JAVA应 用向 M2M协议栈主动发送 AT消息时, 该方法具体包括: M2M协议栈初 始化, 并与 M2M平台建立网络连接; JAVA应用调用 AT消息发送接口通 过进程间交互方式, 将 AT消息发送给 M2M协议栈; 当 M2M协议栈所接 收的 AT消息需要发送给 M2M平台时, M2M协议栈调用网络交互接口, 将 AT消息发送给 M2M平台; M2M平台向 M2M协议栈发送反馈消息 , 由 M2M协议栈将接收到的反馈消息发送给 JAVA应用。  The method according to any one of claims 6 to 9, wherein when the JAVA application actively sends an AT message to the M2M protocol stack, the method specifically includes: initializing the M2M protocol stack, and establishing a network connection with the M2M platform. The JAVA application calls the AT message sending interface to send the AT message to the M2M protocol stack through the inter-process interaction mode; when the AT message received by the M2M protocol stack needs to be sent to the M2M platform, the M2M protocol stack calls the network interaction interface, and the AT message is sent. The M2M platform sends a feedback message to the M2M protocol stack, and the M2M protocol stack sends the received feedback message to the JAVA application. 12、根据权利要求 6至 9任一项所述的方法, 其特征在于, 当 JAVA应 用接收 M2M平台发送的 AT消息时, 该方法具体包括: M2M协议栈初始 化, 并与 M2M平台建立网络连接; M2M平台调用网络交互接口, 将 AT 消息发送给 M2M协议栈; M2M协议栈调用 AT消息发送接口通过进程间 交互方式, 将 AT消息发送给 JAVA应用。  The method according to any one of claims 6 to 9, wherein, when the JAVA application receives the AT message sent by the M2M platform, the method specifically includes: initializing the M2M protocol stack, and establishing a network connection with the M2M platform; The M2M platform invokes the network interaction interface to send the AT message to the M2M protocol stack. The M2M protocol stack invokes the AT message sending interface to send the AT message to the JAVA application through the inter-process interaction mode.
PCT/CN2011/073872 2010-07-21 2011-05-10 Apparatus and method for service debugging for java applications in machine to machine terminal Ceased WO2012010002A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010234762.X 2010-07-21
CN201010234762.XA CN101895441B (en) 2010-07-21 2010-07-21 Service debugging device and method for JAVA application of terminal of Internet of things

Publications (1)

Publication Number Publication Date
WO2012010002A1 true WO2012010002A1 (en) 2012-01-26

Family

ID=43104518

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073872 Ceased WO2012010002A1 (en) 2010-07-21 2011-05-10 Apparatus and method for service debugging for java applications in machine to machine terminal

Country Status (2)

Country Link
CN (1) CN101895441B (en)
WO (1) WO2012010002A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763395A (en) * 2014-02-10 2014-04-30 安徽皖通邮电股份有限公司 Middleware connecting internet of things management platform with terminal device and working method of middleware

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895441B (en) * 2010-07-21 2014-03-12 中兴通讯股份有限公司 Service debugging device and method for JAVA application of terminal of Internet of things
CN102790781B (en) * 2011-05-17 2015-10-28 南京中兴新软件有限责任公司 The M2M system of a kind of middleware, band sector application middleware and application process thereof
JP6193479B2 (en) * 2013-05-06 2017-09-06 コンヴィーダ ワイヤレス, エルエルシー Internet of Things (IOT) adaptation service
CN108055239B (en) * 2017-11-13 2020-06-26 北京全路通信信号研究设计院集团有限公司 RSSP-I security protocol separation deployment method
CN114527958A (en) * 2021-12-28 2022-05-24 安徽清新物联科技有限公司 Secondary development implementation method and storage medium for embedded security monitoring equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1490724A (en) * 2002-10-18 2004-04-21 上海贝尔有限公司 Virtual machine for embedded systemic software development
CN1997028A (en) * 2006-01-05 2007-07-11 索尼株式会社 Information processing apparatus, information processing method, and program
CN101719960A (en) * 2009-12-01 2010-06-02 中国电信股份有限公司 Communication device and cdma terminal
CN101895441A (en) * 2010-07-21 2010-11-24 中兴通讯股份有限公司 Service debugging device and method for JAVA application of terminal of Internet of things

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7350211B2 (en) * 2002-09-23 2008-03-25 Telefonaktiebolaget Lm Ericsson (Publ) Middleware application environment
CN101339508B (en) * 2008-08-18 2011-11-02 华为终端有限公司 Java2 miniature edition application operation method and device
CN101739255A (en) * 2009-11-30 2010-06-16 马亚平 Component reverse calling platform and method for inter-component similar group communication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1490724A (en) * 2002-10-18 2004-04-21 上海贝尔有限公司 Virtual machine for embedded systemic software development
CN1997028A (en) * 2006-01-05 2007-07-11 索尼株式会社 Information processing apparatus, information processing method, and program
CN101719960A (en) * 2009-12-01 2010-06-02 中国电信股份有限公司 Communication device and cdma terminal
CN101895441A (en) * 2010-07-21 2010-11-24 中兴通讯股份有限公司 Service debugging device and method for JAVA application of terminal of Internet of things

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763395A (en) * 2014-02-10 2014-04-30 安徽皖通邮电股份有限公司 Middleware connecting internet of things management platform with terminal device and working method of middleware
CN103763395B (en) * 2014-02-10 2018-01-05 安徽皖通邮电股份有限公司 The middleware and its method of work of attachment network management platform and terminal device

Also Published As

Publication number Publication date
CN101895441B (en) 2014-03-12
CN101895441A (en) 2010-11-24

Similar Documents

Publication Publication Date Title
US20090113460A1 (en) Systems and methods for providing a generic interface in a communications environment
CN105120009A (en) Terminal interconnection method and device
US9774704B2 (en) Home gateway, cloud server, and method for communication therebetween
CN101297537B (en) Telephony and web services coordination
CN102447627B (en) Message encapsulation/decapsulation device and method
WO2012010002A1 (en) Apparatus and method for service debugging for java applications in machine to machine terminal
CN103139150A (en) Terminal adaptation processing method, protocol adaptation module and terminal
CN108494817A (en) Data transmission method, relevant apparatus and system
WO2014059827A1 (en) Method, device and terminal for realizing application of internet of things
EP2429150A1 (en) Apparatus, web service component and method based on web service
CN114189438B (en) Industrial equipment automatic discovery and configuration method based on OPC UA
CN106936932A (en) A kind of method wrapped by cloud service protocol access robot software
WO2012122767A1 (en) Method, system and terminal for implementing cloud computing
CN112804338A (en) Method for remote communication between Web front end and Internet of things equipment
US20090135736A1 (en) Method of connecting network terminal devices of a private network by using a hand-held electronic device
CN103036729A (en) System and method for opening network capability, and relevant network element
KR20070026682A (en) Data transmission method between network devices
CN114731302B (en) Information transmission method and related equipment
CN101485141A (en) Method and system for two-phase mechanism for discovering web services based management service
CN104935484A (en) A method and device for invoking home appliance services through a gateway
CN101022364A (en) Trap message reporting method and system warning information resource/warning agent service device
JP4934148B2 (en) SIP multi-user media client with user agent shared by multiple user applications
CN107438063A (en) Implement logical endpoints in Internet-enabled devices
CN104702602B (en) The system and method that cluster gateway dynamic creation passage and dilatation are realized based on SIP
CN101453741A (en) Method and system for mobile terminal data service debugging

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11809190

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11809190

Country of ref document: EP

Kind code of ref document: A1