HK1221045B - Method for realizing data interaction between intelligent display terminal and somatosensory device - Google Patents
Method for realizing data interaction between intelligent display terminal and somatosensory device Download PDFInfo
- Publication number
- HK1221045B HK1221045B HK16109127.9A HK16109127A HK1221045B HK 1221045 B HK1221045 B HK 1221045B HK 16109127 A HK16109127 A HK 16109127A HK 1221045 B HK1221045 B HK 1221045B
- Authority
- HK
- Hong Kong
- Prior art keywords
- data
- somatosensory
- motion
- subunit
- standardized
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及智能显示终端技术领域,具体涉及一种智能显示终端与体感设备实现数据交互的方法。本申请同时涉及一种智能显示终端与体感设备实现数据交互的装置、用于智能显示终端与体感设备实现数据交互的体感设备中间件和用于智能显示终端与体感设备实现数据交互的软件开发工具包。This application relates to the field of intelligent display terminal technology, and more specifically, to a method for implementing data interaction between an intelligent display terminal and a somatosensory device. This application also relates to an apparatus for implementing data interaction between an intelligent display terminal and a somatosensory device, somatosensory device middleware for implementing data interaction between an intelligent display terminal and a somatosensory device, and a software development kit for implementing data interaction between an intelligent display terminal and a somatosensory device.
背景技术Background Art
智能电视终端,是指能够搭载智能操作系统(比如:IOS系统、Android系统和阿里巴巴TV OS)的智能电视或者电视盒子(比如:Apple TV、小米盒子、乐视TV和阿里巴巴的天猫魔盒)等终端设备。用户在欣赏普通电视内容的同时,还可以自行安装和卸载各类应用软件和游戏,对电视的功能进行扩充和升级。今年来,随着智能电视的迅速发展,各种应用于智能电视的各种应用程序也得到了快速的发展,尤其表现为游戏的多样化和丰富化;此外,为了满足用户在智能电视上的游戏需求,出现了各种各样专门适配于智能电视应用程序的外设产品,比如:手柄、遥控器、鼠标和体感设备(通过内置传感器检测用户动作或者状态的设备)。Smart TV terminals refer to devices such as smart TVs or TV boxes (such as Apple TV, Xiaomi Box, LeTV TV, and Alibaba's Tmall Magic Box) that are equipped with smart operating systems (such as iOS, Android, and Alibaba TV OS). While users enjoy regular TV content, they can also install and uninstall various applications and games to expand and upgrade the TV's functionality. With the rapid development of smart TVs in recent years, the variety of applications used in smart TVs has also grown rapidly, especially in the diversification and enrichment of games. Furthermore, to meet users' gaming needs on smart TVs, a variety of peripherals specifically adapted for smart TV applications have emerged, such as controllers, remote controls, mice, and motion sensors (devices that detect user movements or status through built-in sensors).
现有技术下,智能电视终端的操作系统源于智能手机操作系统,一般来说,智能电视终端的操作系统只支持一套体感设备,为了实现多人游戏,首先开发出多人模式的体感游戏,都需要其特定的游戏手柄(比如:运动加加和小霸王的多人游戏),游戏通过直接读取其游戏手柄传输的不同标记的数据来区分不同游戏手柄,以此实现支持游戏的多人模式。Under the existing technology, the operating system of smart TV terminals is derived from the operating system of smart phones. Generally speaking, the operating system of smart TV terminals only supports one set of motion sensing devices. In order to realize multiplayer games, multiplayer motion sensing games are first developed, which require their own specific game controllers (for example: multiplayer games of Sports Plus and Subor). The game distinguishes different game controllers by directly reading the data with different tags transmitted by their game controllers, thereby supporting the multiplayer mode of the game.
上述现有技术提供的智能电视终端上管理体感设备的方法具有明显的缺陷。现有技术下,智能电视终端上安装的软件或者游戏只能与特定的一款或者几款体感设备实现数据交互,兼容性差;此外,对于软件开发人员来说,只能根据特定的体感设备开发出一个或者一个系列的游戏,用户开发出来的游戏只能适用于特定的体感设备,接口不统一;对于用户来说,购买一款体感设备,只能玩该体感设备对应的一款或者一个系列的游戏,并且一旦该游戏过时,用户想要进行其它的游戏,则必须重新购买新的体感设备,该体感设备被丢弃,造成资源浪费。The above-mentioned prior art methods for managing motion sensing devices on smart TV terminals have significant drawbacks. Under the existing technology, software or games installed on smart TV terminals can only interact with one or several specific motion sensing devices, resulting in poor compatibility. Furthermore, software developers can only develop one or a series of games based on a specific motion sensing device, and user-developed games are only compatible with specific motion sensing devices, resulting in inconsistent interfaces. Users, upon purchasing a motion sensing device, can only play the one or a series of games corresponding to that device. Once a game becomes outdated, users must purchase a new device to play another game, which is then discarded, resulting in a waste of resources.
发明内容Summary of the Invention
本申请提供一种智能显示终端与体感设备实现数据交互的方法,以解决现有的方法存在的兼容性差和接口不统一的问题。本申请另外提供一种智能显示终端与体感设备实现数据交互的装置、用于智能显示终端与体感设备实现数据交互的体感设备中间件和用于智能显示终端与体感设备实现数据交互的软件开发工具包。This application provides a method for enabling data interaction between a smart display terminal and a somatosensory device to address the issues of poor compatibility and inconsistent interfaces in existing methods. This application also provides an apparatus for enabling data interaction between a smart display terminal and a somatosensory device, somatosensory device middleware for enabling data interaction between a smart display terminal and a somatosensory device, and a software development kit for enabling data interaction between a smart display terminal and a somatosensory device.
本申请提供一种智能显示终端与体感设备实现数据交互的方法,包括:This application provides a method for realizing data interaction between an intelligent display terminal and a somatosensory device, comprising:
基于智能显示终端读取体感设备上传的设备数据;Read device data uploaded by the somatosensory device based on the smart display terminal;
将所述设备数据转化为标准化体感数据;Converting the device data into standardized somatosensory data;
应用程序读取所述标准化体感数据。The application program reads the standardized body sensing data.
可选的,所述基于智能电视终端读取体感设备上传的设备数据,是通过接口驱动模块接收;Optionally, the smart TV terminal reads the device data uploaded by the somatosensory device and receives the data through an interface driver module;
其中,所述接口驱动模块包括:USB驱动、WIFI驱动和/或蓝牙驱动。Wherein, the interface driver module includes: USB driver, WIFI driver and/or Bluetooth driver.
可选的,所述将所述设备数据转化为标准化体感数据,包括:Optionally, converting the device data into standardized somatosensory data includes:
获取所述设备数据对应的体感设备采用的数据格式标准;Obtaining a data format standard adopted by a somatosensory device corresponding to the device data;
根据所述数据格式标准解析所述设备数据,生成体感数据;Parsing the device data according to the data format standard to generate somatosensory data;
基于预设的转换算法将所述体感数据转换为标准化体感数据。The somatosensory data is converted into standardized somatosensory data based on a preset conversion algorithm.
可选的,所述转换算法是根据体感数据格式与标准化体感数据格式之间的关系,为所述体感数据格式制定的。Optionally, the conversion algorithm is formulated for the somatosensory data format based on the relationship between the somatosensory data format and the standardized somatosensory data format.
可选的,所述应用程序读取所述标准化体感数据之前,包括:Optionally, before the application reads the standardized somatosensory data, the application may include:
将所述标准化体感数据按照私有协议打包,获得体感数据包;Packaging the standardized somatosensory data according to a private protocol to obtain a somatosensory data packet;
将所述体感数据包发送至应用程序。The motion sensing data packet is sent to the application.
可选的,所述应用程序读取所述标准化体感数据,包括:Optionally, the application reads the standardized somatosensory data, including:
应用程序接收所述体感数据包;The application receives the somatosensory data packet;
所述应用程序按照所述私有协议对所述体感数据包进行解析,获得标准化体感数据。The application parses the body sensing data packet according to the private protocol to obtain standardized body sensing data.
可选的,所述应用程序接收所述体感数据包,具体是,所述应用程序通过应用程序编程接口接收所述体感数据包。Optionally, the application receives the somatosensory data packet, specifically, the application receives the somatosensory data packet through an application programming interface.
可选的,所述智能显示终端通过所述应用程序编程接口,向所述体感设备发送指令。Optionally, the intelligent display terminal sends instructions to the somatosensory device through the application programming interface.
本申请另外提供一种智能显示终端与体感设备实现数据交互的装置,包括:The present application further provides a device for realizing data interaction between an intelligent display terminal and a somatosensory device, comprising:
设备数据读取单元,用于基于智能显示终端读取体感设备上传的设备数据;A device data reading unit, used to read device data uploaded by the somatosensory device based on the smart display terminal;
数据转化单元,用于将所述设备数据转化为标准化体感数据;A data conversion unit, configured to convert the device data into standardized somatosensory data;
数据调用单元,用于实现应用程序读取所述标准化体感数据。The data calling unit is used to enable the application to read the standardized body sensing data.
可选的,所述数据转化单元包括:Optionally, the data conversion unit includes:
数据标准获取子单元,用于获取所述设备数据对应的体感设备采用的数据格式标准;A data standard acquisition subunit, configured to acquire a data format standard adopted by a somatosensory device corresponding to the device data;
设备数据解析子单元,用于根据所述数据格式标准解析所述设备数据,生成体感数据;a device data parsing subunit, configured to parse the device data according to the data format standard to generate somatosensory data;
标准化体感数据生成子单元,用于基于预设的转换算法将所述体感数据转换为标准化体感数据。The standardized somatosensory data generating subunit is configured to convert the somatosensory data into standardized somatosensory data based on a preset conversion algorithm.
可选的,所述智能显示终端与体感设备实现数据交互的装置,包括:Optionally, the device for realizing data interaction between the intelligent display terminal and the somatosensory device includes:
数据打包单元,用于将所述标准化体感数据按照私有协议打包,获得体感数据包;a data packaging unit, configured to package the standardized somatosensory data according to a private protocol to obtain a somatosensory data packet;
数据发送单元,用于将所述体感数据包发送至应用程序。A data sending unit is used to send the somatosensory data packet to an application.
可选的,所述数据调用单元,包括:Optionally, the data calling unit includes:
数据接收子单元,应用程序接收所述体感数据包;A data receiving subunit, wherein the application receives the somatosensory data packet;
数据解析子单元,所述应用程序按照所述私有协议对所述体感数据包进行解析,获得标准化设备数据。The data parsing subunit is configured such that the application parses the somatosensory data packet according to the private protocol to obtain standardized device data.
本申请还提供一种用于智能显示终端与体感设备实现数据交互的体感设备中间件,包括:驱动对接单元,数据标准化单元,体感设备管理单元,数据通信单元;The present application also provides a somatosensory device middleware for realizing data interaction between an intelligent display terminal and a somatosensory device, comprising: a driver docking unit, a data standardization unit, a somatosensory device management unit, and a data communication unit;
所述驱动对接单元,用于基于智能电视终端读取体感设备上传的设备数据,以及发送由应用程序下行的命令;The driver docking unit is used to read the device data uploaded by the somatosensory device based on the smart TV terminal, and send commands downloaded by the application;
所述数据标准化单元,用于将所述设备数据转化为标准化体感数据;The data standardization unit is used to convert the device data into standardized body sensing data;
所述体感设备管理单元,用于管理接入所述智能显示终端的体感设备以及该体感设备对应的设备数据;The somatosensory device management unit is used to manage the somatosensory devices connected to the intelligent display terminal and the device data corresponding to the somatosensory devices;
所述数据通信单元,基于进程间通信与所述应用程序之间进行数据通信。The data communication unit performs data communication with the application based on inter-process communication.
可选的,所述数据标准化单元包括:Optionally, the data standardization unit includes:
数据格式标准获取子单元,用于获取所述设备数据对应的体感设备采用的数据格式标准;A data format standard acquisition subunit, configured to acquire a data format standard adopted by a somatosensory device corresponding to the device data;
数据解析子单元,用于根据所述数据格式标准解析所述设备数据,生成体感数据;a data parsing subunit, configured to parse the device data according to the data format standard to generate somatosensory data;
数据转换子单元,用于基于预设的转换算法将所述体感数据转换为标准化体感数据。The data conversion subunit is used to convert the somatosensory data into standardized somatosensory data based on a preset conversion algorithm.
可选的,所述体感设备管理单元包括:Optionally, the somatosensory device management unit includes:
解析子单元,用于对所述标准化体感数据进行解析,获得设备特征信息;an analysis subunit, configured to analyze the standardized somatosensory data to obtain device feature information;
存储子单元,用于将所述标准化体感数据存储到所述设备特征信息对应的数据存储区域中。The storage subunit is configured to store the standardized somatosensory data in a data storage area corresponding to the device characteristic information.
可选的,所述数据通信单元包括:Optionally, the data communication unit includes:
体感数据包生成子单元,用于将所述标准化体感数据按照私有协议打包,获得体感数据包;a somatosensory data packet generating subunit, configured to package the standardized somatosensory data according to a private protocol to obtain a somatosensory data packet;
体感数据包发送子单元,用于将所述体感数据包发送至所述应用程序;以及a somatosensory data packet sending subunit, configured to send the somatosensory data packet to the application; and
指令数据包接收子单元,用于接收所述应用程序发送的指令数据包;An instruction data packet receiving subunit, configured to receive an instruction data packet sent by the application;
指令数据包解析子单元,用于将所述指令数据包按照私有协议解析为标准化的指令数据。The instruction data packet parsing subunit is used to parse the instruction data packet into standardized instruction data according to a private protocol.
可选的,所述进程间通信包括:消息队列、共享内存或Socket套接字。Optionally, the inter-process communication includes: a message queue, a shared memory or a Socket.
本申请还提供一种用于智能显示终端与体感设备实现数据交互的软件开发工具包,包括:数据通信单元,事件管理单元,体感设备管理单元,接口封装单元;The present application also provides a software development kit for realizing data interaction between an intelligent display terminal and a somatosensory device, comprising: a data communication unit, an event management unit, a somatosensory device management unit, and an interface encapsulation unit;
所述数据通信单元,基于进程间通信与体感设备中间件之间进行数据通信;The data communication unit performs data communication with the somatosensory device middleware based on inter-process communication;
所述事件管理单元,基于预设的各类体感事件实现对所述应用程序的操作控制;The event management unit implements operation control of the application based on various preset somatosensory events;
体感设备管理单元,用于管理接入所述智能显示终端的体感设备以及该体感设备对应的设备数据;A somatosensory device management unit, configured to manage the somatosensory devices connected to the intelligent display terminal and device data corresponding to the somatosensory devices;
接口提供单元,用于向应用程序提供应用程序接口。The interface providing unit is used to provide an application program interface to the application program.
可选的,所述数据通信单元包括:Optionally, the data communication unit includes:
体感数据包接收子单元,用于接收所述体感设备中间件发送的体感数据包;A somatosensory data packet receiving subunit, configured to receive a somatosensory data packet sent by the somatosensory device middleware;
体感数据包解析子单元,用于将所述体感数据包按照私有协议进行解析,获得标准化体感数据;A somatosensory data packet parsing subunit, configured to parse the somatosensory data packet according to a private protocol to obtain standardized somatosensory data;
指令数据包生成子单元,用于将所述指令数据按照私有协议打包,获得指令数据包;An instruction data packet generating subunit, configured to package the instruction data according to a private protocol to obtain an instruction data packet;
指令数据包发送子单元,用于将所述指令数据包发送至所述体感设备中间件。The instruction data packet sending subunit is used to send the instruction data packet to the somatosensory device middleware.
可选的,所述体感设备管理单元包括:Optionally, the somatosensory device management unit includes:
体感事件解析子单元,用于对所述体感事件进行解析,获得设备特征信息和标准化体感数据;A somatosensory event parsing subunit, configured to parse the somatosensory event to obtain device feature information and standardized somatosensory data;
体感设备获取子单元,用于根据所述设备特征信息从体感设备列表中获取该设备特征信息对应的体感设备;a somatosensory device acquisition subunit, configured to acquire, from a somatosensory device list, a somatosensory device corresponding to the device characteristic information according to the device characteristic information;
数据存储子单元,用于将所述标准化体感数据存储到所述设备特征信息对应的数据存储区域中。The data storage subunit is used to store the standardized somatosensory data in a data storage area corresponding to the device characteristic information.
可选的,所述接口提供单元包括:Optionally, the interface providing unit includes:
接口实现子单元,基于所述体感设备管理单元实现所述应用程序编程接口;An interface implementation subunit, which implements the application programming interface based on the somatosensory device management unit;
接口封装子单元,用于将所述应用程序编程接口打包编译成库文件并输出。The interface encapsulation subunit is used to package and compile the application programming interface into a library file and output it.
与现有技术相比,本申请具有以下优点:Compared with the prior art, this application has the following advantages:
本申请提供的智能显示终端与体感设备实现数据交互的方法,局限性小,节省资源。The method for realizing data interaction between the intelligent display terminal and the somatosensory device provided in this application has few limitations and saves resources.
本申请提供的智能显示终端与体感设备实现数据交互的方法,包括:基于智能显示终端读取体感设备上传的设备数据;将所述设备数据转化为标准化体感数据;应用程序读取所述标准化体感数据。The method provided in the present application for realizing data interaction between a smart display terminal and a somatosensory device includes: reading device data uploaded by the somatosensory device based on the smart display terminal; converting the device data into standardized somatosensory data; and reading the standardized somatosensory data by an application.
本申请提供的上述方法,能够将不同设备厂商生产的体感设备采集的设备数据转换为统一数据格式标准的标准化体感数据,使智能显示终端上安装的应用程序能够兼容不同设备厂商生产的不同数据格式标准的体感设备,兼容性好;此外,本申请提供的上述方法基于所述标准化体感数据向软件开发者提供统一的接口。The above-mentioned method provided in the present application can convert the device data collected by somatosensory devices produced by different device manufacturers into standardized somatosensory data with a unified data format standard, so that the application installed on the smart display terminal can be compatible with somatosensory devices with different data format standards produced by different device manufacturers, with good compatibility; in addition, the above-mentioned method provided in the present application provides a unified interface to software developers based on the standardized somatosensory data.
本申请另外提供一种用于智能显示终端与体感设备实现数据交互的体感设备中间件,包括驱动对接单元,数据标准化单元,体感设备管理单元,数据通信单元;所述驱动对接单元,用于基于智能电视终端读取体感设备上传的设备数据,以及发送由应用程序下行的命令;所述数据标准化单元,用于将所述设备数据转化为标准化体感数据;所述体感设备管理单元,用于管理接入所述智能显示终端的体感设备以及该体感设备对应的设备数据;所述数据通信单元,基于进程间通信与所述应用程序之间进行数据通信。The present application further provides a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device, comprising a driver docking unit, a data standardization unit, a somatosensory device management unit, and a data communication unit; the driver docking unit is used to read device data uploaded by the somatosensory device based on the smart TV terminal, and to send commands downloaded by the application; the data standardization unit is used to convert the device data into standardized somatosensory data; the somatosensory device management unit is used to manage the somatosensory device connected to the smart display terminal and the device data corresponding to the somatosensory device; the data communication unit performs data communication with the application based on inter-process communication.
本申请提供的所述体感设备中间件,将不同设备厂商生产的不同数据格式标准的体感设备上传的设备数据转化为统一的数据格式标准的标准化体感数据,供应用程序调用,使应用程序能够兼容不同设备厂商生产的不同数据格式标准的体感设备,兼容性好。The somatosensory device middleware provided in this application converts the device data uploaded by somatosensory devices with different data format standards produced by different device manufacturers into standardized somatosensory data with a unified data format standard for application calls, so that the application can be compatible with somatosensory devices with different data format standards produced by different device manufacturers, and has good compatibility.
本申请还提供一种用于智能显示终端与体感设备实现数据交互的软件开发工具包,包括数据通信单元,事件管理单元,体感设备管理单元,接口封装单元;所述数据通信单元,基于进程间通信与体感设备中间件之间进行数据通信;所述事件管理单元,基于预设的各类体感事件实现对所述应用程序的操作控制;体感设备管理单元,用于管理接入所述智能显示终端的体感设备以及该体感设备对应的设备数据;接口提供单元,用于向应用程序提供应用程序接口。The present application also provides a software development toolkit for realizing data interaction between a smart display terminal and a somatosensory device, comprising a data communication unit, an event management unit, a somatosensory device management unit, and an interface encapsulation unit; the data communication unit performs data communication with the somatosensory device middleware based on inter-process communication; the event management unit realizes operation control of the application based on various preset somatosensory events; the somatosensory device management unit is used to manage the somatosensory device connected to the smart display terminal and the device data corresponding to the somatosensory device; and the interface providing unit is used to provide an application interface to the application.
本申请提供的所述软件开发工具包,基于统一数据格式标准的标准化体感数据向软件开发人员提供统一的应用程序接口,避免了软件开发人员就同一款软件或者游戏针对不同的数据格式标准开发出对应的软件或者游戏,节省了资源。The software development kit provided in this application provides software developers with a unified application programming interface based on standardized somatosensory data with a unified data format standard, thereby avoiding the need for software developers to develop corresponding software or games for the same software or game for different data format standards, thereby saving resources.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请第一实施例提供的一种智能显示终端与体感设备实现数据交互的方法处理流程图。FIG1 is a processing flow chart of a method for realizing data interaction between a smart display terminal and a somatosensory device provided in the first embodiment of the present application.
图2是本申请第二实施例提供的一种智能显示终端与体感设备实现数据交互的装置示意图。FIG2 is a schematic diagram of a device for realizing data interaction between a smart display terminal and a somatosensory device provided in a second embodiment of the present application.
图3是本申请第三实施例提供的一种用于智能显示终端与体感设备实现数据交互的体感设备中间件示意图。FIG3 is a schematic diagram of a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device, provided in a third embodiment of the present application.
图4是本申请第四实施例提供的一种用于智能显示终端与体感设备实现数据交互的软件开发工具包示意图。FIG4 is a schematic diagram of a software development kit for realizing data interaction between a smart display terminal and a somatosensory device, provided in a fourth embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
本申请提供一种智能显示终端与体感设备实现数据交互的方法,本申请另外提供一种智能显示终端与体感设备实现数据交互的装置、用于智能显示终端与体感设备实现数据交互的体感设备中间件以及用于智能显示终端与体感设备实现数据交互的软件开发工具包。The present application provides a method for realizing data interaction between a smart display terminal and a somatosensory device. The present application also provides an apparatus for realizing data interaction between a smart display terminal and a somatosensory device, a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device, and a software development kit for realizing data interaction between a smart display terminal and a somatosensory device.
下面结合附图和实施例对本申请的智能显示终端与体感设备实现数据交互的方法进行详细说明。The following describes in detail the method for realizing data interaction between the intelligent display terminal and the somatosensory device of the present application with reference to the accompanying drawings and embodiments.
实施例一Example 1
参照图1,其示出了本申请第一实施例提供的一种智能显示终端与体感设备实现数据交互的方法处理流程图。1 , which shows a processing flow chart of a method for implementing data interaction between an intelligent display terminal and a somatosensory device provided in a first embodiment of the present application.
本实施例所述一种智能显示终端与体感设备实现数据交互的方法包括如下步骤:The method for implementing data interaction between an intelligent display terminal and a somatosensory device described in this embodiment includes the following steps:
S101;基于智能显示终端读取体感设备上传的设备数据。S101: Read device data uploaded by the somatosensory device based on the smart display terminal.
所述智能显示终端是指用于播放显示功能的设备终端,并且能够安装运行智能操作系统和应用程序,比如:智能电视终端和PC;所述体感设备包括体感手柄、智能移动终端以及可穿戴式设备;所述设备数据包括体感设备内置的传感器采集的数据,此外,所述设备数据还包括设备信息数据(体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型等)。The smart display terminal refers to a device terminal used for playback and display functions, and can install and run smart operating systems and applications, such as: smart TV terminals and PCs; the somatosensory devices include somatosensory handles, smart mobile terminals and wearable devices; the device data includes data collected by sensors built into the somatosensory devices. In addition, the device data also includes device information data (device ID, device manufacturer ID, device name, sensor model, type, etc. of the somatosensory device).
本实施例中,以智能电视终端为例进行说明,其它类型的智能显示终端与智能电视终端相类似,参照本实施例提供如下智能显示终端与体感设备实现数据交互的方法即可,本实施例不在一一列出。In this embodiment, a smart TV terminal is used as an example for explanation. Other types of smart display terminals are similar to smart TV terminals. The following method for realizing data interaction between a smart display terminal and a somatosensory device is provided with reference to this embodiment, which is not listed one by one in this embodiment.
本步骤所述的基于智能显示终端读取体感设备上传的设备数据之前,所述体感设备上传所述设备数据的过程包括如下两步:1)体感设备采集设备数据,体感设备通过内置的传感器采集当前体感设备的设备数据;2)所述体感设备将所述设备数据上传至所述智能电视终端。Before the smart display terminal reads the device data uploaded by the somatosensory device in this step, the process of the somatosensory device uploading the device data includes the following two steps: 1) the somatosensory device collects device data, and the somatosensory device collects the device data of the current somatosensory device through the built-in sensor; 2) the somatosensory device uploads the device data to the smart TV terminal.
完成所述体感设备上传所述设备数据的步骤之后,基于智能显示终端读取体感设备上传的设备数据。所述基于智能电视终端读取体感设备上传的设备数据,是通过接口驱动模块接收;其中,所述接口驱动模块包括:USB驱动、WIFI驱动和蓝牙驱动。After the somatosensory device uploads the device data, the smart display terminal reads the device data uploaded by the somatosensory device. The smart TV terminal reads the device data uploaded by the somatosensory device via an interface driver module; wherein the interface driver module includes: a USB driver, a WIFI driver, and a Bluetooth driver.
完成本步骤所述的基于智能显示终端读取体感设备上传的设备数据之后,则进行将所述设备数据转化为标准化体感数据的步骤。After completing the step of reading the device data uploaded by the somatosensory device based on the intelligent display terminal, the step of converting the device data into standardized somatosensory data is performed.
S102;将所述设备数据转化为标准化体感数据。S102: Convert the device data into standardized body sensing data.
所述将设备数据转化为标准化体感数据包括:The converting of device data into standardized somatosensory data includes:
1)获取所述设备数据对应的体感设备采用的数据格式标准;1) Obtaining the data format standard adopted by the somatosensory device corresponding to the device data;
所述设备数据包括体感设备内置的传感器采集的数据以及设备信息数据,所述设备信息数据包括:体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型等。对于体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型不同的体感设备,所对应的设备数据的数据格式标准也有可能不同。The device data includes data collected by the sensors built into the motion sensing device and device information data, including the device ID, manufacturer ID, device name, and sensor model and type of the motion sensing device. Motion sensing devices with different device IDs, manufacturer IDs, device names, and sensor models and types may have different data format standards for the corresponding device data.
本步骤中,提前获取体感设备厂提供的体感设备对应的数据格式标准或者传感器厂商提供的所述体感设备内置的传感器对应的数据格式标准,并将所述数据格式标准存储。In this step, a data format standard corresponding to the somatosensory device provided by the somatosensory device manufacturer or a data format standard corresponding to the sensor built into the somatosensory device provided by the sensor manufacturer is obtained in advance, and the data format standard is stored.
2)根据所述数据格式标准解析所述设备数据,生成体感数据;2) parsing the device data according to the data format standard to generate somatosensory data;
所述体感数据是指能够表征体感设备运动特征的数据;本步骤的目的在于将所述设备数据中体感设备内置的传感器采集的数据通过解析计算转化为能够表征体感设备运动特征或者用户体感动作的体感数据。The somatosensory data refers to data that can characterize the motion characteristics of the somatosensory device; the purpose of this step is to convert the data collected by the built-in sensor of the somatosensory device in the device data into somatosensory data that can characterize the motion characteristics of the somatosensory device or the user's somatosensory movements through analytical calculation.
3)基于预设的转换算法将所述体感数据转换为标准化体感数据。3) Converting the somatosensory data into standardized somatosensory data based on a preset conversion algorithm.
所述标准化数据是指基于统一标准的表征体感设备运动特征或者用户体感动作的体感数据;本步骤的目的在于将不同数据格式标准的体感数据转化为统一数据格式标准的体感数据,即:标准化体感数据;所述转化算法是根据所述体感数据的数据格式标准与标准化体感数据的数据格式标准之间的关系制定的。The standardized data refers to the somatosensory data that characterizes the motion characteristics of the somatosensory device or the user's somatosensory movements based on a unified standard; the purpose of this step is to convert somatosensory data with different data format standards into somatosensory data with a unified data format standard, that is, standardized somatosensory data; the conversion algorithm is formulated based on the relationship between the data format standard of the somatosensory data and the data format standard of the standardized somatosensory data.
根据上述三个步骤将所述设备数据转化为标准化体感数据之后,将所述标准化体感数据发送至应用程序。After the device data is converted into standardized somatosensory data according to the above three steps, the standardized somatosensory data is sent to the application.
S103;将所述标准化体感数据按照私有协议打包,获得体感数据包。S103: Pack the standardized body sensing data according to a private protocol to obtain a body sensing data packet.
将所述标准化体感数据发送至应用程序之前,将所述标准化体感数据按照私有协议打包,获得体感数据包;获得所述体感数据包之后,将所述体感数据包发送至应用程序。本步骤中所述的将所述标准化体感数据按照私有协议打包,不属于本实施例的重点,在此不赘述。Before sending the standardized somatosensory data to the application, the standardized somatosensory data is packaged according to a proprietary protocol to obtain a somatosensory data packet. After obtaining the somatosensory data packet, the somatosensory data packet is sent to the application. The packaging of the standardized somatosensory data according to the proprietary protocol described in this step is not the focus of this embodiment and is not detailed here.
S104;将所述体感数据包发送至应用程序。S104: Send the somatosensory data packet to the application.
将所述体感数据包发送至应用程序基于进程间通信方式实现,所述进程间通信方式包括:消息队列、共享内存和Socket套接字。此外,还可以采用本实施例之外的方式实现将所述体感数据包发送至应用程序,在此不作限定。The somatosensory data packet is sent to the application program based on an inter-process communication method, which includes a message queue, shared memory, and a socket. In addition, the somatosensory data packet can be sent to the application program using methods other than this embodiment, which are not limited here.
S105;应用程序接收所述体感数据包。S105: The application receives the somatosensory data packet.
应用程序接收所述通过进程间通信方式发送的体感数据包,接收到所述体感数据包之后,将所述体感数据包解析为标准化设备数据。The application receives the somatosensory data packet sent through the inter-process communication mode, and after receiving the somatosensory data packet, parses the somatosensory data packet into standardized device data.
S106;所述应用程序按照私有协议对所述体感数据包进行解析,获得标准化体感数据。S106: The application parses the body sensing data packet according to a private protocol to obtain standardized body sensing data.
对于体感设备中间件与所述应用程序之间的基于进程间通信的数据通信,为保证体感设备中间件和应用程序双方数据的一致性和有效性,在体感设备中间件和应用程序之间达成数据的统一标准,即:私有协议。For data communication between the somatosensory device middleware and the application based on inter-process communication, in order to ensure the consistency and validity of data between the somatosensory device middleware and the application, a unified data standard is reached between the somatosensory device middleware and the application, namely: a private protocol.
在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够识别体感设备中间件向所述应用程序发送的数据信息,以及体感设备中间件能够识别应用程序向所述体感设备中间件发送的指令信息;Establishing a private protocol between the somatosensory device middleware and the application to ensure that the application can identify data information sent by the somatosensory device middleware to the application, and that the somatosensory device middleware can identify instruction information sent by the application to the somatosensory device middleware;
此外,在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够基于所述私有协议获取所述数据信息当中包含的完整的信息,以及体感设备中间件能够基于所述私有协议获取所述指令信息当中包含的完整的信息,避免了数据丢失。In addition, a private protocol is established between the somatosensory device middleware and the application to ensure that the application can obtain the complete information contained in the data information based on the private protocol, and the somatosensory device middleware can obtain the complete information contained in the instruction information based on the private protocol, thereby avoiding data loss.
根据上述步骤S105所述的应用程序接收所述体感数据包之后,所述应用程序按照所述私有协议对所述体感数据包进行解析,获得标准化设备数据。After the application program in step S105 receives the somatosensory data packet, the application program parses the somatosensory data packet according to the private protocol to obtain standardized device data.
实施例二Example 2
在上述的实施例中,提供了一种智能显示终端与体感设备实现数据交互的方法,与之相对应的,本申请还提供了一种智能显示终端与体感设备实现数据交互的装置。In the above-mentioned embodiment, a method for realizing data interaction between an intelligent display terminal and a somatosensory device is provided. Correspondingly, the present application also provides an apparatus for realizing data interaction between an intelligent display terminal and a somatosensory device.
参照图2,其示出了根据本申请第二实施例提供的一种智能显示终端与体感设备实现数据交互的装置示意图。2 , which shows a schematic diagram of a device for implementing data interaction between a smart display terminal and a somatosensory device according to a second embodiment of the present application.
由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关的部分请参见方法实施例的对应说明即可。下述描述的装置实施例仅仅是示意性的。Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment. The device embodiment described below is only illustrative.
本申请所述智能显示终端与体感设备实现数据交互的装置,包括:The device for realizing data interaction between the intelligent display terminal and the somatosensory device described in this application includes:
设备数据读取单元201,用于基于智能显示终端读取体感设备上传的设备数据;The device data reading unit 201 is used to read the device data uploaded by the somatosensory device based on the intelligent display terminal;
数据转化单元202,用于将所述设备数据转化为标准化体感数据;A data conversion unit 202 is used to convert the device data into standardized body sensing data;
数据调用单元205,用于实现应用程序读取所述标准化体感数据。The data calling unit 205 is used to enable the application to read the standardized body sensing data.
可选的,所述数据转化单元202包括:Optionally, the data conversion unit 202 includes:
数据标准获取子单元202-1,用于获取所述设备数据对应的体感设备采用的数据格式标准;The data standard acquisition subunit 202-1 is used to acquire the data format standard adopted by the somatosensory device corresponding to the device data;
设备数据解析子单元202-1,用于根据所述数据格式标准解析所述设备数据,生成体感数据;The device data parsing subunit 202-1 is configured to parse the device data according to the data format standard to generate somatosensory data;
标准化体感数据生成子单元202-3,用于基于预设的转换算法将所述体感数据转换为标准化体感数据。The standardized body sensing data generating subunit 202 - 3 is configured to convert the body sensing data into standardized body sensing data based on a preset conversion algorithm.
可选的,所述智能显示终端与体感设备实现数据交互的装置,包括:Optionally, the device for realizing data interaction between the intelligent display terminal and the somatosensory device includes:
数据打包单元203,用于将所述标准化体感数据按照私有协议打包,获得体感数据包;A data packaging unit 203 is configured to package the standardized somatosensory data according to a private protocol to obtain a somatosensory data packet;
数据发送单元204,用于将所述体感数据包发送至应用程序。The data sending unit 204 is configured to send the motion sensing data packet to an application.
可选的,所述数据调用单元205,包括:Optionally, the data calling unit 205 includes:
数据接收子单元205-1,应用程序接收所述体感数据包;The data receiving subunit 205-1, the application receives the somatosensory data packet;
数据解析子单元205-2,所述应用程序按照所述私有协议对所述体感数据包进行解析,获得标准化设备数据。Data parsing subunit 205 - 2 , the application parses the somatosensory data packet according to the private protocol to obtain standardized device data.
实施例三Example 3
在上述的实施例中,提供了一种智能显示终端与体感设备实现数据交互的方法,此外,本申请还提供了一种用于智能显示终端与体感设备实现数据交互的体感设备中间件,用于上述的智能显示终端与体感设备实现数据交互的方法中,用于实现将所述设备数据转化为标准化体感数据的步骤;以及用于实现智能显示终端通过所述应用程序编程接口,向所述体感设备发送指令的步骤。In the above-mentioned embodiment, a method for realizing data interaction between a smart display terminal and a somatosensory device is provided. In addition, the present application also provides a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device, which is used in the above-mentioned method for realizing data interaction between a smart display terminal and a somatosensory device to realize the step of converting the device data into standardized somatosensory data; and to realize the step of the smart display terminal sending instructions to the somatosensory device through the application programming interface.
参照图3,其示出了本申请第三实施例提供的一种用于智能显示终端与体感设备实现数据交互的体感设备中间件示意图。3 , which shows a schematic diagram of a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device, provided in a third embodiment of the present application.
本申请中,所述体感设备中间件的作用是将体感设备上传的设备数据转化为具有统一数据格式的标准化体感数据;如果没有所述体感设备中间件,即使应用程序能够直接基于智能显示设备读取到体感设备上传的设备数据,对于不同数据格式标准的设备数据也无法识别,更无法调用;应用程序无法与体感设备之间进行数据交互,所述智能显示终端与体感设备实现数据交互的方法无法实现。综上所述,体感设备中间件对于所述智能显示终端与体感设备实现数据交互的方法的实现具有不可或缺的作用。In this application, the function of the somatosensory device middleware is to convert the device data uploaded by the somatosensory device into standardized somatosensory data with a unified data format. Without the somatosensory device middleware, even if the application can directly read the device data uploaded by the somatosensory device based on the smart display device, it cannot recognize the device data with different data format standards, let alone call it. The application cannot exchange data with the somatosensory device, and the method for realizing data interaction between the smart display terminal and the somatosensory device cannot be realized. In summary, the somatosensory device middleware plays an indispensable role in the implementation of the method for realizing data interaction between the smart display terminal and the somatosensory device.
所述用于智能显示终端与体感设备实现数据交互的体感设备中间件包括:驱动对接单元301、数据标准化单元302、体感设备管理单元303和数据通信单元304。The somatosensory device middleware used for realizing data interaction between the intelligent display terminal and the somatosensory device includes: a driver docking unit 301 , a data standardization unit 302 , a somatosensory device management unit 303 and a data communication unit 304 .
驱动对接单元301,用于基于智能电视终端读取体感设备上传的设备数据,以及发送由应用程序下行的命令;The driver docking unit 301 is used to read the device data uploaded by the somatosensory device based on the smart TV terminal and send commands downloaded by the application;
所述设备数据包括体感设备内置的传感器采集的数据以及设备信息数据,所述设备信息数据包括:体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型等。对于体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型不同的体感设备,所对应的设备数据的数据格式标准也有可能不同。The device data includes data collected by the sensors built into the motion sensing device and device information data, including the device ID, manufacturer ID, device name, and sensor model and type of the motion sensing device. Motion sensing devices with different device IDs, manufacturer IDs, device names, and sensor models and types may have different data format standards for the corresponding device data.
所述驱动对接单元301充当所述体感设备与智能显示终端之间的接口,该接口通过接口驱动实现,所述接口驱动包括:USB驱动、WIFI驱动和蓝牙驱动;此外,还可包括其它驱动,比如红外驱动等,在此不作限定。The driver docking unit 301 acts as an interface between the somatosensory device and the intelligent display terminal. The interface is implemented through an interface driver, which includes: USB driver, WIFI driver and Bluetooth driver; in addition, it can also include other drivers, such as infrared driver, etc., which are not limited here.
若所述体感设备通过USB接口与所述智能显示终端连接时,通过USB驱动提供所述体感设备与所述智能显示终端之间的数据通信;本实施例中,所述体感设备通过USB接口将自身采集的设备数据上传至智能显示终端。此外,所述体感设备通过WIFI驱动和蓝牙驱动上传设备数据至智能显示终端与体感设备通过USB接口将设备数据上传至智能显示终端过程相类似,在此不赘述。If the motion sensing device is connected to the smart display terminal via a USB interface, data communication between the motion sensing device and the smart display terminal is provided via a USB driver. In this embodiment, the motion sensing device uploads its collected device data to the smart display terminal via the USB interface. Furthermore, the process of uploading device data to the smart display terminal via the Wi-Fi driver and the Bluetooth driver is similar to the process of uploading device data to the smart display terminal via the USB interface, and is not further described here.
所述数据标准化单元302,用于将所述设备数据转化为标准化体感数据;The data standardization unit 302 is used to convert the device data into standardized body sensing data;
体感设备中间件基于驱动对接单元301接收体感设备上传的设备数据之后,所述体感设备中间件基于数据标准化单元302读取该设备数据,并且将该设备数据转化为标准化体感数据。所述标准化体感数据是指将不同体感设备对应的不同数据格式标准的设备数据基于统一的数据格式标准转化之后生成的数据。After receiving device data uploaded by the somatosensory device via the driver docking unit 301, the somatosensory device middleware reads the device data via the data standardization unit 302 and converts the device data into standardized somatosensory data. Standardized somatosensory data refers to data generated by converting device data of different data formats corresponding to different somatosensory devices into a unified data format.
所述数据标准化单元302包括:数据格式标准获取子单元302-1、数据解析子单元302-2以及数据转换子单元302-3;The data standardization unit 302 includes: a data format standard acquisition subunit 302-1, a data parsing subunit 302-2 and a data conversion subunit 302-3;
数据格式标准获取子单元302-1,用于获取所述设备数据对应的体感设备采用的数据格式标准;The data format standard acquisition subunit 302-1 is used to acquire the data format standard adopted by the somatosensory device corresponding to the device data;
所述数据标准化单元302要想将所述体感设备上传的设备数据转化为标准化体感数据,一个重要的前提是数据标准化单元302首先能够识别不同体感设备上传的不同数据格式标准的设备数据。本实施例中,所述数据标准化单元302当中的数据格式标准获取子单元302-1获取不同体感设备厂提供的体感设备对应的数据格式标准并存储;获取到所述不同体感设备厂提供的体感设备对应的数据格式标准之后,所述数据标准化单元302才能够识别所述体感设备上传的设备数据,完成将所述设备数据转化为标准化体感数据的数据准备前提。For the data standardization unit 302 to convert the device data uploaded by the somatosensory devices into standardized somatosensory data, a crucial prerequisite is that the data standardization unit 302 first recognizes the device data uploaded by different somatosensory devices in different data format standards. In this embodiment, the data format standard acquisition subunit 302-1 within the data standardization unit 302 acquires and stores the data format standards corresponding to somatosensory devices provided by different somatosensory device manufacturers. Only after acquiring the data format standards corresponding to the somatosensory devices provided by these different somatosensory device manufacturers can the data standardization unit 302 recognize the device data uploaded by the somatosensory devices, completing the data preparation prerequisite for converting the device data into standardized somatosensory data.
数据解析子单元302-2,用于根据所述数据格式标准解析所述设备数据,生成体感数据;The data parsing subunit 302-2 is configured to parse the device data according to the data format standard to generate somatosensory data;
所述体感数据是指能够表征体感设备的运动(即:用户体感动作)特征的数据。所述数据解析子单元302-2基于上述数据格式标准获取子单元302-1获取的体感设备厂提供的体感设备对应的数据格式标准对所述设备数据进行解析,并将该解析之后的设备数据进过分析计算转化为体感数据。需要说明的是,此处,所述体感数据与数据格式标准一一对应,即:一种体感设备对应一种数据格式标准的体感数据,不同体感设备对应的体感数据的数据格式标准互不相同。The somatosensory data refers to data that can characterize the movement characteristics of the somatosensory device (i.e., the user's somatosensory movements). The data parsing subunit 302-2 parses the device data based on the data format standard corresponding to the somatosensory device provided by the somatosensory device manufacturer obtained by the above-mentioned data format standard acquisition subunit 302-1, and converts the parsed device data into somatosensory data through analysis and calculation. It should be noted that here, the somatosensory data and the data format standard correspond one to one, that is, one somatosensory device corresponds to somatosensory data of one data format standard, and the data format standards of the somatosensory data corresponding to different somatosensory devices are different from each other.
数据转换子单元302-3,用于基于预设的转换算法将所述体感数据转换为标准化体感数据。所述标准化体感数据是指基于统一标准的表征体感设备运动特征或者用户体感动作的体感数据,即:将上述数据解析子单元302-2获取到不同数据格式标准的体感数据转换为基于统一标准的体感数据。The data conversion subunit 302-3 is configured to convert the somatosensory data into standardized somatosensory data based on a preset conversion algorithm. Standardized somatosensory data refers to somatosensory data that characterizes the motion characteristics of a somatosensory device or the somatosensory actions of a user based on a unified standard. Specifically, the somatosensory data obtained by the data parsing subunit 302-2 in different data formats is converted into somatosensory data based on a unified standard.
本实施例中,所述数据转换子单元302-3基于预设的转换算法将所述体感数据转换为统一标准额的体感数据,即:标准化体感数据。In this embodiment, the data conversion sub-unit 302 - 3 converts the somatosensory data into somatosensory data of a unified standard, that is, standardized somatosensory data, based on a preset conversion algorithm.
所述转换算法是根据所述体感数据的数据格式标准与标准化体感数据的数据格式标准之间的关系制定的。The conversion algorithm is formulated based on the relationship between the data format standard of the somatosensory data and the data format standard of standardized somatosensory data.
所述体感设备管理单元303,用于管理接入所述智能显示终端的体感设备或者该体感设备对应的设备数据;The somatosensory device management unit 303 is used to manage the somatosensory device connected to the intelligent display terminal or the device data corresponding to the somatosensory device;
所述体感设备管理单元303包括:解析子单元303-1和存储子单元303-2。The somatosensory device management unit 303 includes: an analysis subunit 303-1 and a storage subunit 303-2.
解析子单元303-1,基于所述标准化体感数据进行解析,获得设备特征信息;The parsing subunit 303-1 performs parsing based on the standardized somatosensory data to obtain device feature information;
所述设备数据包括体感设备内置的传感器采集的数据以及设备信息数据,更进一步,所述标准化体感数据也包括传感器采集的数据和设备信息数据;所述设备信息数据包括:体感设备的设备ID、设备厂商ID、设备名称以及传感器型号、类型等。所述设备特征信息是指能够确定体感设备的设备数据信息,比如:体感设备的设备ID。The device data includes data collected by the sensors built into the motion sensing device and device information data. Furthermore, the standardized motion sensing data also includes data collected by the sensors and device information data. The device information data includes the device ID, device manufacturer ID, device name, and sensor model and type of the motion sensing device. Device feature information refers to device data that can identify the motion sensing device, such as the device ID of the motion sensing device.
存储子单元303-2,用于将所述标准化体感数据存储到所述设备特征信息对应的数据存储区域中。The storage subunit 303 - 2 is configured to store the standardized somatosensory data in a data storage area corresponding to the device characteristic information.
所述存储子单元303-2的作用是将不同的标准化体感数据存储到不同的数据存储区域当中;并且,对同一设备特征信息对应的数据存储区域当中存储的标准化体感数据保持更新。The storage subunit 303 - 2 is used to store different standardized somatosensory data in different data storage areas; and to keep the standardized somatosensory data stored in the data storage area corresponding to the same device characteristic information updated.
对于同一体感设备,当有新的标准化体感数据生成时,以所述新的标准化体感数据更新所述数据存储区域中存储的标准化体感数据,实现数据的更新。For the same somatosensory device, when new standardized somatosensory data is generated, the standardized somatosensory data stored in the data storage area is updated with the new standardized somatosensory data to achieve data update.
本实施例中,所述数据存储区域与体感设备的设备ID相对应,一个设备ID对应一个数据存储区域。所述数据存储区域可以是数据库当中的一个储存区域;也可以是其它的数据存储单元,在此不作限定。In this embodiment, the data storage area corresponds to the device ID of the somatosensory device, and one device ID corresponds to one data storage area. The data storage area can be a storage area in a database or other data storage unit, which is not limited here.
所述数据通信单元304,基于进程间通信与所述应用程序之间进行数据通信。The data communication unit 304 performs data communication with the application based on inter-process communication.
所述体感设备中间件运行于独立的进程中;同样,所述应用程序运行于独立的进程中,为了实现所述体感设备中间件与所述应用程序之间的数据通信,采用进程间通信的方式,从而实现所述体感设备中间件与所述应用程序之间的数据交互。所述进程间通信方式包括:消息队列、共享内存和Socket套接字,除此之外,还可以采用其它的方式实现,在此不作限定。The motion sensing device middleware runs in an independent process; similarly, the application runs in an independent process. To enable data communication between the motion sensing device middleware and the application, inter-process communication (IPC) is used, thereby enabling data exchange between the two. This IPC method includes message queues, shared memory, and sockets, but other methods may also be used, which are not limited here.
所述数据通信单元304包括:体感数据包生成子单元304-1、体感数据包发送子单元304-2、指令数据包接收子单元304-3以及指令数据包解析子单元304-4;The data communication unit 304 includes: a body sensing data packet generating subunit 304-1, a body sensing data packet sending subunit 304-2, an instruction data packet receiving subunit 304-3 and an instruction data packet parsing subunit 304-4;
体感数据包生成子单元304-1,用于将所述标准化体感数据按照私有协议打包,获得体感数据包;The somatosensory data packet generating subunit 304-1 is configured to package the standardized somatosensory data according to a private protocol to obtain a somatosensory data packet;
对于所述体感设备中间件与所述应用程序之间的基于进程间通信的数据通信,为保证体感设备中间件和应用程序双方数据的一致性和有效性,在体感设备中间件和应用程序之间达成数据的统一标准,即:私有协议。For the data communication between the somatosensory device middleware and the application based on inter-process communication, in order to ensure the consistency and validity of the data between the somatosensory device middleware and the application, a unified data standard is reached between the somatosensory device middleware and the application, namely: a private protocol.
在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够识别体感设备中间件向所述应用程序发送的数据信息,以及体感设备中间件能够识别应用程序向所述体感设备中间件发送的指令信息;Establishing a private protocol between the somatosensory device middleware and the application to ensure that the application can identify data information sent by the somatosensory device middleware to the application, and that the somatosensory device middleware can identify instruction information sent by the application to the somatosensory device middleware;
此外,在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够基于所述私有协议获取所述数据信息当中包含的完整的信息,以及体感设备中间件能够基于所述私有协议获取所述指令信息当中包含的完整的信息,避免了数据丢失。In addition, a private protocol is established between the somatosensory device middleware and the application to ensure that the application can obtain the complete information contained in the data information based on the private protocol, and the somatosensory device middleware can obtain the complete information contained in the instruction information based on the private protocol, thereby avoiding data loss.
在所述体感设备中间件和应用程序双方达成私有协议之后,体感设备中间件按照所述私有协议将所述标准化数据进行打包,并生成体感数据包;After the somatosensory device middleware and the application program reach a private agreement, the somatosensory device middleware packages the standardized data according to the private agreement and generates a somatosensory data packet;
体感设备中间件获取到所述体感数据包之后,将该体感数据包发送至应用程序;After the somatosensory device middleware obtains the somatosensory data packet, it sends the somatosensory data packet to the application program;
应用程序接收到所述体感数据包之后,按照所述私有协议对该体感数据包进行解析,获得标准化体感数据并进行相关操作;After receiving the somatosensory data packet, the application parses the somatosensory data packet according to the private protocol, obtains standardized somatosensory data and performs relevant operations;
类似的,在所述体感设备中间件和应用程序双方达成私有协议之后,应用程序按照所述私有协议将所述指令数据进行打包,并生成指令数据包;Similarly, after the somatosensory device middleware and the application program reach a private agreement, the application program packages the instruction data according to the private agreement and generates an instruction data packet;
应用程序获取到所述指令数据包之后,将该指令数据包发送至体感设备中间件;After the application obtains the instruction data packet, it sends the instruction data packet to the somatosensory device middleware;
体感设备中间件接收到所述指令数据包之后,按照所述私有协议对该指令数据包进行解析,获得标准化的指令数据。After receiving the instruction data packet, the somatosensory device middleware parses the instruction data packet according to the private protocol to obtain standardized instruction data.
体感数据包发送子单元304-2,用于将所述体感数据包发送至所述应用程序;A somatosensory data packet sending subunit 304-2 is configured to send the somatosensory data packet to the application;
参见上述体感数据包生成子单元304-1的说明即可,此处不再赘述。Please refer to the description of the above-mentioned body sensing data packet generating subunit 304-1, which will not be repeated here.
指令数据包接收子单元304-3,用于接收所述应用程序发送的指令数据包;The instruction data packet receiving subunit 304-3 is used to receive the instruction data packet sent by the application;
参见上述体感数据包生成子单元304-1的说明即可,此处不再赘述。Please refer to the description of the above-mentioned body sensing data packet generating subunit 304-1, which will not be repeated here.
指令数据包解析子单元304-4,用于将所述指令数据包按照私有协议解析为标准化的指令数据。The instruction data packet parsing subunit 304 - 4 is configured to parse the instruction data packet into standardized instruction data according to a proprietary protocol.
所述体感数据包发送子单元304-2、指令数据包接收子单元304-3以及指令数据包解析子单元304-4参见上述体感数据包生成子单元304-1的说明即可,此处不再赘述。The body sensing data packet sending subunit 304 - 2 , the instruction data packet receiving subunit 304 - 3 and the instruction data packet parsing subunit 304 - 4 refer to the description of the body sensing data packet generating subunit 304 - 1 , which will not be repeated here.
现有技术下,应用程序无法兼容体感设备,对于某一设备厂家提供的某一型号的体感设备,只有对应的一款或者一个系列的游戏能够与所述体感设备兼容,除此之外,其它应用程序或者第三方应用程序都无法与所述体感设备兼容;比如任天堂和小霸王游戏机,只能安装对应该游戏机专门开发的游戏程序,市面上的大部分游戏程序无法安装或者无法实现;本实施例提供的所述体感设备中间件,获取不同设备厂商体感设备对应的设备数据采用的数据格式标准,然后根据数据格式标准对应的将设备数据转化为表征体感设备运动特征的体感数据,并且将体感数据按照预设的转换算法转换为具有统一数据格式的标准化体感数据,统一了体感设备的数据传输格式,最后,将所述标准化体感数据向应用程序提供,使应用程序能够兼容不同厂商生产的体感设备。Under the existing technology, applications are not compatible with somatosensory devices. For a certain model of somatosensory device provided by a certain device manufacturer, only the corresponding one or a series of games are compatible with the somatosensory device. In addition, other applications or third-party applications are not compatible with the somatosensory device. For example, Nintendo and Subor game consoles can only install game programs specially developed for the corresponding game consoles, and most game programs on the market cannot be installed or cannot be implemented. The somatosensory device middleware provided in this embodiment obtains the data format standard adopted by the device data corresponding to the somatosensory devices of different device manufacturers, and then converts the device data into somatosensory data that characterizes the motion characteristics of the somatosensory device according to the corresponding data format standard, and converts the somatosensory data into standardized somatosensory data with a unified data format according to a preset conversion algorithm, thereby unifying the data transmission format of the somatosensory device. Finally, the standardized somatosensory data is provided to the application, so that the application can be compatible with somatosensory devices produced by different manufacturers.
实施例四Example 4
在上述的实施例中,提供了一种智能显示终端与体感设备实现数据交互的方法,以及一种用于智能显示终端与体感设备实现数据交互的体感设备中间件,用于上述的智能显示终端与体感设备实现数据交互的方法中,用于实现将所述设备数据转化为标准化体感数据的步骤;以及用于实现智能显示终端通过所述应用程序编程接口,向所述体感设备发送指令的步骤;此外,本申请还提供了一种用于智能显示终端与体感设备实现数据交互的软件开发工具包,用于与上述的用于智能显示终端与体感设备实现数据交互的体感设备中间件相互匹配。In the above-mentioned embodiment, a method for realizing data interaction between a smart display terminal and a somatosensory device, and a somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device are provided, which are used in the above-mentioned method for realizing data interaction between a smart display terminal and a somatosensory device, to realize the step of converting the device data into standardized somatosensory data; and to realize the step of the smart display terminal sending instructions to the somatosensory device through the application programming interface; in addition, the present application also provides a software development kit for realizing data interaction between a smart display terminal and a somatosensory device, which is used to match the above-mentioned somatosensory device middleware for realizing data interaction between a smart display terminal and a somatosensory device.
本申请中,所述体感设备中间件的作用是将体感设备上传的设备数据转化为具有统一数据格式的标准化体感数据;所述软件开发工具包的作用是为软件开发人员提供与体感设备相匹配的软件(应用程序和游戏)的开发标准和依据,并且为所述软件调用所述标准化体感数据提供了接口工具。In this application, the role of the somatosensory device middleware is to convert the device data uploaded by the somatosensory device into standardized somatosensory data with a unified data format; the role of the software development kit is to provide software developers with development standards and basis for software (applications and games) that match the somatosensory device, and provides an interface tool for the software to call the standardized somatosensory data.
参照图4,其示出了根据本申请第四实施例提供的一种用于智能显示终端与体感设备实现数据交互的软件开发工具包示意图。4 , which shows a schematic diagram of a software development kit for implementing data interaction between a smart display terminal and a somatosensory device according to a fourth embodiment of the present application.
所述软件开发工具包包括数据通信单元401、事件管理单元402、体感设备管理单元403和接口封装单元404;The software development kit includes a data communication unit 401, an event management unit 402, a somatosensory device management unit 403 and an interface encapsulation unit 404;
本实施例中,所述软件开发工具包是指监听、读取、操作、管理智能显示终端上体感设备以及体感设备对应数据的一套应用程序开发接口(API),其最终提供的实际形式是若干个应用程序库文件,应用程序(包括游戏)可调用软件开发工具包提供的应用程序开发接口。In this embodiment, the software development kit refers to a set of application development interfaces (APIs) for monitoring, reading, operating, and managing the somatosensory devices and the corresponding data of the somatosensory devices on the smart display terminal. The actual form provided is a number of application library files, and applications (including games) can call the application development interfaces provided by the software development kit.
需要说明的是,本实施例中,所述软件开发工具包本身不作为一个独立的进程运行,仅运行在调用它的应用程序进程当中,所述体感设备中间件运行于独立的进程中,所述体感设备中间件与所述软件开发工具包之间通过进程间通信方式实现数据通信,所述进程间通信方式包括:消息队列、共享内存和Socket套接字。此外,还可以采用其它的方式实现,在此不作限定。It should be noted that in this embodiment, the software development kit itself does not run as an independent process, but only within the calling application process. The somatosensory device middleware runs in an independent process, and data communication between the somatosensory device middleware and the software development kit is achieved through inter-process communication (IPC), which includes message queues, shared memory, and sockets. Other implementation methods are also possible and are not limited here.
所述数据通信单元401,基于进程间通信与体感设备中间件之间进行数据通信;The data communication unit 401 performs data communication with the somatosensory device middleware based on inter-process communication;
所述体感设备中间件运行于独立的进程中;同样,所述应用程序运行于独立的进程中,为了实现所述体感设备中间件与所述应用程序之间的数据通信,采用进程间通信的方式,从而实现所述体感设备中间件与所述应用程序之间的数据交互。所述进程间通信方式包括:消息队列、共享内存和Socket套接字,除此之外,还可以采用其它的方式实现,在此不作限定。The motion sensing device middleware runs in an independent process; similarly, the application runs in an independent process. To enable data communication between the motion sensing device middleware and the application, inter-process communication (IPC) is used, thereby enabling data exchange between the two. This IPC method includes message queues, shared memory, and sockets, but other methods may also be used, which are not limited here.
所述数据通信单元401包括:体感数据包接收子单元401-1、体感数据包解析子单元401-2、指令数据包生成子单元401-3和指令数据包发送子单元401-4;The data communication unit 401 includes: a body sensing data packet receiving subunit 401-1, a body sensing data packet parsing subunit 401-2, an instruction data packet generating subunit 401-3 and an instruction data packet sending subunit 401-4;
体感数据包接收子单元401-1,用于接收所述体感设备中间件发送的体感数据包;The somatosensory data packet receiving subunit 401-1 is configured to receive a somatosensory data packet sent by the somatosensory device middleware;
对于所述体感设备中间件与所述应用程序之间的基于进程间通信的数据通信,为保证体感设备中间件和应用程序双方数据的一致性和有效性,在体感设备中间件和应用程序之间达成数据的统一标准,即:私有协议。For the data communication between the somatosensory device middleware and the application based on inter-process communication, in order to ensure the consistency and validity of the data between the somatosensory device middleware and the application, a unified data standard is reached between the somatosensory device middleware and the application, namely: a private protocol.
在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够识别体感设备中间件向所述应用程序发送的数据信息,以及体感设备中间件能够识别应用程序向所述体感设备中间件发送的指令信息;Establishing a private protocol between the somatosensory device middleware and the application to ensure that the application can identify data information sent by the somatosensory device middleware to the application, and that the somatosensory device middleware can identify instruction information sent by the application to the somatosensory device middleware;
此外,在所述体感设备中间件和应用程序双方建立私有协议,确保应用程序能够基于所述私有协议获取所述数据信息当中包含的完整的信息,以及体感设备中间件能够基于所述私有协议获取所述指令信息当中包含的完整的信息,避免了数据丢失。In addition, a private protocol is established between the somatosensory device middleware and the application to ensure that the application can obtain the complete information contained in the data information based on the private protocol, and the somatosensory device middleware can obtain the complete information contained in the instruction information based on the private protocol, thereby avoiding data loss.
在所述体感设备中间件和应用程序双方达成私有协议之后,体感设备中间件按照所述私有协议将所述标准化数据进行打包,并生成体感数据包;After the somatosensory device middleware and the application program reach a private agreement, the somatosensory device middleware packages the standardized data according to the private agreement and generates a somatosensory data packet;
体感设备中间件获取到所述体感数据包之后,将该体感数据包发送至应用程序;After the somatosensory device middleware obtains the somatosensory data packet, it sends the somatosensory data packet to the application program;
应用程序接收到所述体感数据包之后,按照所述私有协议对该体感数据包进行解析,获得标准化体感数据并进行相关操作;After receiving the somatosensory data packet, the application parses the somatosensory data packet according to the private protocol, obtains standardized somatosensory data and performs relevant operations;
类似的,在所述体感设备中间件和应用程序双方达成私有协议之后,应用程序按照所述私有协议将所述指令数据进行打包,并生成指令数据包;Similarly, after the somatosensory device middleware and the application program reach a private agreement, the application program packages the instruction data according to the private agreement and generates an instruction data packet;
应用程序获取到所述指令数据包之后,将该指令数据包发送至体感设备中间件;After the application obtains the instruction data packet, it sends the instruction data packet to the somatosensory device middleware;
体感设备中间件接收到所述指令数据包之后,按照所述私有协议对该指令数据包进行解析,获得指令数据并进行相关操作。After receiving the instruction data packet, the somatosensory device middleware parses the instruction data packet according to the private protocol, obtains instruction data and performs relevant operations.
体感数据包解析子单元401-2,用于将所述体感数据包按照私有协议进行解析,获得标准化体感数据;The somatosensory data packet parsing subunit 401-2 is configured to parse the somatosensory data packet according to a private protocol to obtain standardized somatosensory data;
参见上述体感数据包接收子单元401-1的说明即可,此处不再赘述。Please refer to the description of the above-mentioned body sensing data packet receiving subunit 401-1, which will not be repeated here.
指令数据包生成子单元401-3,用于将所述指令数据按照私有协议打包,获得指令数据包;The instruction data packet generating subunit 401 - 3 is used to package the instruction data according to a private protocol to obtain an instruction data packet;
参见上述体感数据包接收子单元401-1的说明即可,此处不再赘述。Please refer to the description of the above-mentioned body sensing data packet receiving subunit 401-1, which will not be repeated here.
指令数据包发送子单元401-4,用于将所述指令数据包发送至所述体感设备中间件。The instruction data packet sending subunit 401 - 4 is configured to send the instruction data packet to the somatosensory device middleware.
所述体感数据包解析子单元401-2、指令数据包生成子单元401-3以及指令数据包发送子单元401-4参见上述体感数据包接收子单元401-1的说明即可,此处不再赘述。The body sensing data packet parsing subunit 401 - 2 , the instruction data packet generating subunit 401 - 3 and the instruction data packet sending subunit 401 - 4 refer to the description of the body sensing data packet receiving subunit 401 - 1 , which will not be repeated here.
所述事件管理单元402,基于预设的各类体感事件实现对所述应用程序的操作控制;事件是对象之间通信的一种机制。事件有很多种,常用的事件有鼠标单击事件、鼠标移动事件和按钮单击事件等。事件的作用是帮助用户完成用户想完成的是事;例如:The event management unit 402 implements operational control of the application based on various preset somatosensory events. Events are a mechanism for communication between objects. There are many types of events, and commonly used events include mouse click events, mouse movement events, and button click events. The purpose of events is to help users complete what they want to accomplish; for example:
对于鼠标单击事件,单击鼠标之后,肯定会发生某种动作,比如出窗口、刷新页面或者提交数据等,此时单击鼠标这一操作就触发了鼠标单击事件。事件都是相对应的,对于鼠标单击事件而言,只有单击鼠标这一操作被执行之后,才会触发鼠标单击事件,并且执行该鼠标单击事件当中的方法或者属性。For a mouse click event, after clicking the mouse, some action will definitely occur, such as exiting the window, refreshing the page, or submitting data. At this time, the mouse click operation triggers the mouse click event. Events are all corresponding. For a mouse click event, only after the mouse click operation is performed will the mouse click event be triggered and the methods or properties in the mouse click event be executed.
本实施例中,所述事件管理单元402基于预设的各类体感事件实现对所述应用程序的操作控制的步骤如下:In this embodiment, the event management unit 402 implements the following steps to control the operation of the application based on various preset somatosensory events:
1)根据所述标准化体感数据的数据类型定义不同类型的体感事件;所述体感事件包括:按键事件、传感器事件和/或空鼠事件。1) Different types of somatosensory events are defined according to the data type of the standardized somatosensory data; the somatosensory events include: key events, sensor events and/or air mouse events.
2)通过事件监听器来监听所述体感事件;若所述体感事件被触发,则执行该体感事件对应的操作响应,实现对所述应用程序的操作控制。2) The somatosensory event is monitored through an event listener; if the somatosensory event is triggered, an operation response corresponding to the somatosensory event is executed to implement operational control of the application.
此外,需要说明的是,所述事件管理单元402还可以采用本实施例之外的事件实现方法来实现,比如C#事件的实现,在此不作限定。In addition, it should be noted that the event management unit 402 may also be implemented using event implementation methods other than those in this embodiment, such as implementation of C# events, which is not limited here.
体感设备管理单元403,用于管理接入所述智能显示终端的体感设备或者该体感设备对应的设备数据;A somatosensory device management unit 403 is configured to manage the somatosensory devices connected to the intelligent display terminal or device data corresponding to the somatosensory devices;
所述体感设备管理单元403包括:体感事件解析子单元403-1、体感设备获取子单元403-2和数据存储子单元403-3。The somatosensory device management unit 403 includes a somatosensory event parsing subunit 403 - 1 , a somatosensory device acquiring subunit 403 - 2 and a data storage subunit 403 - 3 .
所述体感事件解析子单元403-1,用于对所述体感事件进行解析,获得设备特征信息和标准化体感数据;The somatosensory event parsing subunit 403-1 is used to parse the somatosensory event to obtain device feature information and standardized somatosensory data;
对于上述事件管理单元402中实现的各类体感事件,若所述体感事件中一体感事件被触发,则体感事件解析子单元403-1该体感事件进行解析,并同时获得该体感事件对应的设备特征信息和标准化体感数据。For various somatosensory events implemented in the event management unit 402 , if a body sense event is triggered among the somatosensory events, the somatosensory event parsing subunit 403 - 1 parses the somatosensory event and simultaneously obtains device feature information and standardized somatosensory data corresponding to the somatosensory event.
所述体感设备获取子单元403-2,用于根据所述设备特征信息从体感设备列表中获取该设备特征信息对应的体感设备;The somatosensory device acquisition subunit 403-2 is configured to acquire, from a somatosensory device list, a somatosensory device corresponding to the device characteristic information according to the device characteristic information;
所述体感设备列表是指所有接入所述智能显示终端的体感设备组成的体感设备列表。The somatosensory device list refers to a somatosensory device list consisting of all somatosensory devices connected to the smart display terminal.
上述体感事件解析子单元403-1通过解析体感事件获得设备特征信息和标准化体感数据,所述体感设备获取子单元403-2基于该设备特征信息从体感设备列表中查询并获取到该设备特征信息对应的体感设备;本实施例中,体感设备获取子单元403-2基于体感设备ID从体感设备列表中查询该ID对应的体感设备。The above-mentioned somatosensory event parsing subunit 403-1 obtains device characteristic information and standardized somatosensory data by parsing the somatosensory event, and the somatosensory device acquisition subunit 403-2 queries and obtains the somatosensory device corresponding to the device characteristic information from the somatosensory device list based on the device characteristic information; in this embodiment, the somatosensory device acquisition subunit 403-2 queries the somatosensory device corresponding to the ID from the somatosensory device list based on the somatosensory device ID.
所述数据存储子单元403-3,用于将所述标准化体感数据存储到所述设备特征信息对应的数据存储区域中。The data storage subunit 403 - 3 is configured to store the standardized somatosensory data in a data storage area corresponding to the device characteristic information.
所述数据存储子单元403-3的作用是将不同的标准化体感数据存储到不同的数据存储区域当中;并且,对同一设备特征信息对应的数据存储区域当中存储的标准化体感数据保持更新。The data storage subunit 403 - 3 is used to store different standardized somatosensory data in different data storage areas; and to keep the standardized somatosensory data stored in the data storage area corresponding to the same device feature information updated.
对于同一体感设备,当有新的体感事件被触发,对该体感事件进行解析获得新的标准化体感数据后,以所述新的标准化体感数据更新所述数据存储区域中存储的标准化体感数据,实现数据的更新。For the same somatosensory device, when a new somatosensory event is triggered, the somatosensory event is parsed to obtain new standardized somatosensory data, and the standardized somatosensory data stored in the data storage area is updated with the new standardized somatosensory data to achieve data update.
本实施例中,所述数据存储区域与体感设备的设备ID相对应,一个设备ID对应一个数据存储区域。所述数据存储区域可以是数据库当中的一个储存区域;也可以是其它的数据存储单元,在此不作限定。In this embodiment, the data storage area corresponds to the device ID of the somatosensory device, and one device ID corresponds to one data storage area. The data storage area can be a storage area in a database or other data storage unit, which is not limited here.
所述数据存储子单元403-3、体感设备获取子单元403-2以及体感事件解析子单元403-1共同维护所述体感设备列表;The data storage subunit 403-3, the somatosensory device acquisition subunit 403-2 and the somatosensory event parsing subunit 403-1 jointly maintain the somatosensory device list;
所述体感事件解析子单元403-1首先对事件管理单元402中被触发的体感事件进行解析,获得该体感事件对应的设备特征信息和标准化体感数据;The somatosensory event parsing subunit 403-1 first parses the somatosensory event triggered in the event management unit 402 to obtain device feature information and standardized somatosensory data corresponding to the somatosensory event;
所述体感设备获取子单元403-2基于该设备特征信息从体感设备列表中查询并获取到该设备特征信息对应的体感设备;The somatosensory device acquisition subunit 403-2 searches and acquires the somatosensory device corresponding to the device characteristic information from the somatosensory device list based on the device characteristic information;
所述数据存储子单元403-3将所述标准化体感数据存储到所述设备特征信息对应的数据存储区域当中,所述数据存储区域可以是数据库当中的一个储存区域;也可以是其它的数据存储单元,在此不作限定。The data storage subunit 403 - 3 stores the standardized somatosensory data in a data storage area corresponding to the device characteristic information. The data storage area may be a storage area in a database; or other data storage units, which is not limited here.
接口提供单元404,用于向应用程序提供应用程序接口。The interface providing unit 404 is configured to provide an application program interface to the application program.
所述接口提供单元404包括接口实现子单元404-1和接口封装子单元404-2;The interface providing unit 404 includes an interface implementing subunit 404-1 and an interface encapsulating subunit 404-2;
接口实现子单元404-1,基于所述体感设备管理单元403实现所述应用程序编程接口;An interface implementation subunit 404 - 1 implements the application programming interface based on the somatosensory device management unit 403 ;
需要说明的是,所述应用程序编程接口可基于不同的编程语言实现,如:Java、C和C++等。接口封装子单元404-2,用于将所述应用程序编程接口打包编译成库文件并输出。It should be noted that the application programming interface can be implemented based on different programming languages, such as Java, C, and C++, etc. The interface packaging subunit 404-2 is used to package and compile the application programming interface into a library file and output it.
对体感设备管理单元403提供的标准化体感数据和设备特征信息等,所述软件开发工具包根据不同的应用程序语言环境进行接口封装,典型的语言环境如:Java、C和C++,并且,所述软件开发工具包最终以应用程序库文件的方式对外提供。The software development kit performs interface encapsulation on the standardized somatosensory data and device feature information provided by the somatosensory device management unit 403 according to different application language environments, typical of which are Java, C, and C++. Furthermore, the software development kit is ultimately provided to the outside in the form of an application library file.
例如:For example:
基于Java语言进行接口封装的过程如下:The process of interface encapsulation based on Java language is as follows:
1)、以Java语言定义体感设备类、体感设备管理类以及体感事件类等;1) Define the somatosensory device class, somatosensory device management class, and somatosensory event class in Java language;
2)、定义所述体感设备类、体感设备管理类以及体感事件类所需要对外公开的应用程序开发接口(API),并根据体感设备管理单元403实现所述应用程序开发接口(API);此外,体感设备管理单元403采用C/C++语言编写,因此,封装成Java语言,需要用到Java的JNI调用;2) Define the application programming interface (API) that needs to be exposed to the public for the somatosensory device class, somatosensory device management class, and somatosensory event class, and implement the application programming interface (API) according to the somatosensory device management unit 403; In addition, the somatosensory device management unit 403 is written in C/C++, so it is encapsulated in Java and requires Java JNI calls;
3)将所述应用程序开发接口(API)打包编译成库文件对外输出,并同时输出软件开发工具包手册文档,供应用程序开发者使用。3) The application programming interface (API) is packaged and compiled into a library file for external output, and a software development kit manual document is simultaneously output for use by application developers.
除此之外,还可以采用其它的编程语言实现所述接口封装单元404完成的用于面向应用软件提供封装为多种语言的应用程序接口的功能,本实施例在此不作限定。In addition, other programming languages may also be used to implement the function of the interface encapsulation unit 404 for providing an application program interface encapsulated in multiple languages for application software, which is not limited in this embodiment.
现有技术下,对于某一厂商或者开发者开发的应用程序,只能与开发该应用程序时所面向的特定的一款或者多款体感设备之间相互兼容,无法兼容其它的体感设备。本实施例中,通过软件开发工具包提供统一的应用程序开发接口供开发人员使用,开发人员利用该软件开发工具包开发的所有应用程序都能够与体感设备兼容。Under existing technologies, applications developed by a particular manufacturer or developer are only compatible with one or more specific motion sensing devices for which the application was developed, and are not compatible with other motion sensing devices. In this embodiment, a unified application development interface is provided through a software development kit for developers to use, and all applications developed by developers using the software development kit are compatible with the motion sensing devices.
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims (17)
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410238796.4A CN105404385B (en) | 2014-05-30 | 2014-05-30 | A kind of method and device of intelligent display terminal and somatosensory device realization data interaction |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1221045A1 HK1221045A1 (en) | 2017-05-19 |
| HK1221045B true HK1221045B (en) | 2019-11-29 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2015180567A1 (en) | Method and device for realizing data exchange between intelligent display terminal and motion apparatus | |
| US11213743B2 (en) | Method, system and electronic device for achieving remote control of computer game by game controller | |
| CN105917613B (en) | Software upgrade method and device | |
| US20140006558A1 (en) | Method and device for resuming file download | |
| CN103974111B (en) | By the method, apparatus of the data transfer on intelligent terminal to television terminal | |
| CN108038231A (en) | log processing method, device, terminal device and storage medium | |
| WO2022135527A1 (en) | Video recording method and electronic device | |
| WO2015127787A1 (en) | Hand gesture recognition method, device, system, and computer storage medium | |
| US20230214243A1 (en) | One-machine multi-control method, apparatus, system and electronic device | |
| CN106101836A (en) | The player method of intelligent television and device | |
| CN105094028B (en) | Abnormal state prompt method and server of sweeping robot | |
| KR20190017143A (en) | Mobile device and method of providing a controller for virtual reality device | |
| WO2017004844A1 (en) | Interactive control system for smart display device | |
| HK1221045B (en) | Method for realizing data interaction between intelligent display terminal and somatosensory device | |
| CN103647818B (en) | A kind of method and system for realizing function setting | |
| CN111541566A (en) | Switch device networking method, switch device and storage medium supporting profinet protocol | |
| CN117012017B (en) | Data transmission method, device, equipment and medium | |
| CN108260003B (en) | Habit data collection method, intelligent terminal and readable storage medium | |
| WO2024169390A1 (en) | Configuration method and configuration device for software system | |
| CN107872727A (en) | Media play control method, media play control device and electronic terminal | |
| KR102506155B1 (en) | Electronic device, application executing system and control methods thereof | |
| CN118331624A (en) | Software development kit tracing method, device, electronic device and storage medium | |
| CN108804088A (en) | protocol processing method and device | |
| CN209496249U (en) | A general-purpose smart home system | |
| CN105100235A (en) | An information sharing method and server for a sweeping robot |