CN102594871B - A kind of data encapsulation method, system, adapter and Internet of things middleware - Google Patents

A kind of data encapsulation method, system, adapter and Internet of things middleware Download PDF

Info

Publication number
CN102594871B
CN102594871B CN201110459162.8A CN201110459162A CN102594871B CN 102594871 B CN102594871 B CN 102594871B CN 201110459162 A CN201110459162 A CN 201110459162A CN 102594871 B CN102594871 B CN 102594871B
Authority
CN
China
Prior art keywords
data
adapter
event
transducer
flow
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.)
Active
Application number
CN201110459162.8A
Other languages
Chinese (zh)
Other versions
CN102594871A (en
Inventor
冷静
王蒴
刘耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANDONG CIVIC SE COMMERCIAL MIDDLEWARE Co.,Ltd.
Original Assignee
CVIC Software Engineering Co Ltd
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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201110459162.8A priority Critical patent/CN102594871B/en
Publication of CN102594871A publication Critical patent/CN102594871A/en
Application granted granted Critical
Publication of CN102594871B publication Critical patent/CN102594871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The embodiment of the present invention discloses a kind of data encapsulation method, system, adapter and Internet of things middleware.A kind of data encapsulation method, comprising: when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers; According to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte; Described data byte is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies; Described ReceiveCycle flow of event is pushed to described Complex event processing engine, thus without the need to for the corresponding software module of any one data mining in Internet of Things, reduces software development cycle and development difficulty, improve portability simultaneously.

Description

A kind of data encapsulation method, system, adapter and Internet of things middleware
Technical field
The present invention relates to technology of Internet of things field, more specifically, particularly relate to a kind of data encapsulation method, system, adapter and Internet of things middleware.
Background technology
Internet of Things is a kind of by information sensing equipment such as radio-frequency (RF) identification, infrared inductor, global positioning system, laser scanners, according to the agreement of agreement, the information data of any article is sent by the Internet, to realize a kind of network of Weigh sensor to article, location, tracking, monitor and managment.
The polytype transducer of magnanimity in Internet of Things deploy, is obtained the information data of article, item information data is sent real-time and accurately by the Internet by transducer.Each item information data due to transducer collection needs to be sent by network, so in process of transmitting, in order to ensure correctness and the promptness of data, must adapt to various heterogeneous network and agreement.
But Internet of Things does not provide unified effective data transmission format, therefore, the transducer that current different vendor produces has different standard pattern datas.And Internet of Things needs to choose the transducer that different vendor provides in actual application, therefore there is data acquisition interface disunity, the multifarious present situation of data pattern.Further, need in Internet of Things for the corresponding software module of any one data mining, thus cause that software development cycle is long, difficulty is large and portability is low.
Summary of the invention
In view of this, the embodiment of the present invention discloses a kind of data encapsulation method, to solve in prior art due to the problem that software development cycle is long, difficulty is large and portability is low that software pattern diversity causes.
The embodiment of the present invention also discloses a kind of data encapsulation system, adapter and Internet of things middleware, in order to ensure said method implementation and application in practice.
Based on the one side of the embodiment of the present invention, disclose a kind of data encapsulation method, comprising:
When adapter is connected with the serial ports of transducer, receive the item information data that described transducer gathers;
According to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte, map according to ascii code;
The data byte mapped according to ascii code is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies;
Described ReceiveCycle flow of event is pushed to described Complex event processing engine.
Preferably, be CONNECTING at the state flag bit status of described adapter, show that adapter is connected with the serial ports of transducer.
Preferably, after the state flag bit status of described adapter is PROCESSING, receive the item information data that described transducer gathers.
Preferably, describedly described data byte is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies and comprises:
Described data byte is packaged into InforsReceiveEvent event by Event Package method;
Described InforsReceiveEvent is packaged into ReceiveCycle flow of event by flow of event method for packing.
Based on the another aspect of the embodiment of the present invention, also disclose a kind of data encapsulation system, comprising:
Receiving element, for when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers;
Resolution unit, for according to data protocol corresponding to described transducer, the item information data received by adapter resolves to data byte;
Encapsulation unit, for being encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies by described data byte;
Push unit, for pushing to described Complex event processing engine by described ReceiveCycle flow of event.
Preferably, described receiving element is CONNECTING at the state flag bit status of described adapter, shows that adapter is connected with the serial ports of transducer.
Preferably, described receiving element, after the state flag bit status of described adapter is PROCESSING, receives the item information data that described transducer gathers.
Preferably, described encapsulation unit comprises:
First encapsulation subelement, for being packaged into InforsReceiveEvent event by described data byte by Event Package method;
Second encapsulation subelement, for being packaged into ReceiveCycle flow of event by described InforsReceiveEvent by flow of event method for packing.
Based on the one side again of the embodiment of the present invention, also disclose a kind of adapter, comprise above-mentioned data encapsulation system.
Based on the one side again of the embodiment of the present invention, also disclose a kind of Internet of things middleware, in described Internet of things middleware, be integrated with above-mentioned adapter.
In the present invention, when adapter is connected with the serial ports of transducer, receive the item information data that described transducer gathers; According to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte; Described data byte is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies; Described ReceiveCycle flow of event is pushed to described Complex event processing engine, thus without the need to for the corresponding software module of any one data mining in Internet of Things, reduces software development cycle and development difficulty, improve portability simultaneously.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the present invention, for those of ordinary skill in the art, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of Fig. 1 data encapsulation method disclosed in the embodiment of the present invention;
The structural representation of Fig. 2 data encapsulation system disclosed in the embodiment of the present invention.
Embodiment
Technical scheme in the present invention is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, all should belong to the scope of protection of the invention.
Refer to Fig. 1, it illustrates the flow chart of a kind of data encapsulation method disclosed in the embodiment of the present invention, can comprise the following steps:
Step 101: when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers.
Wherein, be CONNECTING at the state flag bit status of adapter, show that adapter is connected with the serial ports of transducer.Further, after the state flag bit status of adapter is PROCESSING, adapter starts the item information data receiving the collection of described transducer.Be CLOSED at the state flag bit status of adapter, show that the serial ports of adapter and transducer disconnects, adapter is the item information data that gathers of receiving sensor not.
The setting of adapter state flag bit judges with or without data according to serial ports.
Step 102: according to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte, maps according to ascii code.
In the present embodiment, the data protocol that different sensors is corresponding different, in Data Analysis process, correspondence often plants transducer, and adapter needs to resolve according to the data protocol that this transducer is corresponding the item information data received.
Step 103: the data byte mapped according to ascii code is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies.
The specific implementation process of this step can be: first described data byte is packaged into InforsReceiveEvent event by Event Package method; Secondly described InforsReceiveEvent is packaged into ReceiveCycle flow of event by flow of event method for packing.
Step 104: described ReceiveCycle flow of event is pushed to described Complex event processing engine.
Further, Complex event processing engine can carry out analysis and filter, association polymerization and pattern matching to ReceiveCycle flow of event, thus generates effective service logic data.
Application technique scheme, when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers; According to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte; Described data byte is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies; Described ReceiveCycle flow of event is pushed to described Complex event processing engine, thus without the need to for the corresponding software module of any one data mining in Internet of Things, reduces software development cycle and development difficulty, improve portability simultaneously.
Corresponding with said method embodiment, the embodiment of the present invention also discloses a kind of data encapsulation system, and structural representation as shown in Figure 2, comprising: receiving element 11, resolution unit 12, encapsulation unit 13 and push unit 14.Wherein,
Receiving element 11, for when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers.
In the present embodiment, receiving element 11 is CONNECTING at the state flag bit status of described adapter, shows that adapter is connected with the serial ports of transducer.Further, receiving element 11, after the state flag bit status of described adapter is PROCESSING, receives the item information data that described transducer gathers.
It should be noted that: be CLOSED at the state flag bit status of adapter, show that the serial ports of adapter and transducer disconnects, adapter is the item information data that gathers of receiving sensor not.
Arranging of adapter state flag bit can be arranged according to the dynamic modularity mode of OSGI, also can be arranged with the state flag bit of the mode of configuration file to adapter by the control module of Internet of Things.Adopt these two kinds of modes can realize the dynamic management of the life cycle to adapter, to realize the loading to adapter, start and stop and Unloading Control.
Resolution unit 12, for according to data protocol corresponding to described transducer, the item information data received by adapter resolves to data byte.Wherein, the data protocol that different sensors is corresponding different, in Data Analysis process, correspondence often plants transducer, and adapter needs to resolve according to the data protocol that this transducer is corresponding the item information data received.
Encapsulation unit 13, for being encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies by described data byte.
Above-mentioned encapsulation unit 13 comprises: the first encapsulation subelement and the second encapsulation subelement, and wherein, the first encapsulation subelement is used for described data byte to be packaged into InforsReceiveEvent event by Event Package method.Second encapsulation subelement, for being packaged into ReceiveCycle flow of event by described InforsReceiveEvent by flow of event method for packing.
Push unit 14, for pushing to described Complex event processing engine by described ReceiveCycle flow of event.Further, Complex event processing engine can carry out analysis and filter, association polymerization and pattern matching to ReceiveCycle flow of event, thus generates effective service logic data.
System described in the present embodiment can be integrated in adapter, also can be connected with Internet of things middleware as an entity separately, in addition, it should be noted that, when method of the present invention adopts software simulating, a function that can increase newly as adapter, can write separately corresponding program, the present invention does not limit the implementation of described method or device yet.Above-mentioned adapter can also focus in Internet of things middleware.
For system embodiment, because it is substantially corresponding to embodiment of the method, so relevant part illustrates see the part of embodiment of the method.System embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
In several embodiment provided by the present invention, should be understood that, disclosed system and method, not exceeding in the spirit and scope of the present invention, can realize in other way.Current embodiment is a kind of exemplary example, should as restriction, and given particular content should in no way limit the object of the application.Such as, the division of described unit or subelement, is only a kind of logic function and divides, and actual can have other dividing mode when realizing, and such as multiple unit or multiple subelement combine.In addition, multiple unit can or assembly can in conjunction with or another equipment can be integrated into, or some features can be ignored, or do not perform.
The above is only the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. a data encapsulation method, is characterized in that, comprising:
When adapter is connected with the serial ports of transducer, receive the item information data that described transducer gathers;
According to the data protocol that described transducer is corresponding, the item information data that adapter receives is resolved to data byte, map according to ascii code;
The data byte mapped according to ascii code is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies;
Described ReceiveCycle flow of event is pushed to described Complex event processing engine.
2. data encapsulation method according to claim 1, is characterized in that, is CONNECTING at the state flag bit status of described adapter, shows that adapter is connected with the serial ports of transducer.
3. data encapsulation method according to claim 1, is characterized in that, after the state flag bit status of described adapter is PROCESSING, receives the item information data that described transducer gathers.
4. data encapsulation method according to claim 1, is characterized in that, describedly described data byte is encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies and comprises:
Described data byte is packaged into InforsReceiveEvent event by Event Package method;
Described InforsReceiveEvent is packaged into ReceiveCycle flow of event by flow of event method for packing.
5. a data encapsulation system, is characterized in that, comprising:
Receiving element, for when adapter is connected with the serial ports of transducer, receives the item information data that described transducer gathers;
Resolution unit, for according to data protocol corresponding to described transducer, the item information data received by adapter resolves to data byte;
Encapsulation unit, for being encapsulated as the ReceiveCycle flow of event that Complex event processing engine identifies by described data byte;
Push unit, for pushing to described Complex event processing engine by described ReceiveCycle flow of event.
6. data encapsulation system according to claim 5, is characterized in that, described receiving element is CONNECTING at the state flag bit status of described adapter, shows that adapter is connected with the serial ports of transducer.
7. data encapsulation system according to claim 5, is characterized in that, described receiving element, after the state flag bit status of described adapter is PROCESSING, receives the item information data that described transducer gathers.
8. data encapsulation system according to claim 5, is characterized in that, described encapsulation unit comprises:
First encapsulation subelement, for being packaged into InforsReceiveEvent event by described data byte by Event Package method;
Second encapsulation subelement, for being packaged into ReceiveCycle flow of event by described InforsReceiveEvent by flow of event method for packing.
9. an adapter, is characterized in that, comprises the data encapsulation system as described in claim 5 to 8 any one.
10. an Internet of things middleware, is characterized in that, is integrated with adapter as claimed in claim 9 in described Internet of things middleware.
CN201110459162.8A 2011-12-31 2011-12-31 A kind of data encapsulation method, system, adapter and Internet of things middleware Active CN102594871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110459162.8A CN102594871B (en) 2011-12-31 2011-12-31 A kind of data encapsulation method, system, adapter and Internet of things middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110459162.8A CN102594871B (en) 2011-12-31 2011-12-31 A kind of data encapsulation method, system, adapter and Internet of things middleware

Publications (2)

Publication Number Publication Date
CN102594871A CN102594871A (en) 2012-07-18
CN102594871B true CN102594871B (en) 2016-03-02

Family

ID=46483066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110459162.8A Active CN102594871B (en) 2011-12-31 2011-12-31 A kind of data encapsulation method, system, adapter and Internet of things middleware

Country Status (1)

Country Link
CN (1) CN102594871B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024949B (en) * 2012-11-15 2016-02-03 易程科技股份有限公司 The management method of adapter and device in Internet of Things
CN103024059B (en) * 2012-12-19 2015-08-26 北京时代凌宇科技有限公司 A kind of middleware system for Internet of things
CN103780680B (en) * 2014-01-06 2017-05-24 东南大学 Server real-time pushing system based on JMS message bus and method
US9569290B1 (en) 2015-09-15 2017-02-14 International Business Machines Corporation Utilizing a profile to prevent recurring events from being transmitted to the event processing device that are not necessary to be processed by event processing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957927A (en) * 2010-11-12 2011-01-26 福州联迅信息科技有限公司 Middleware architecture of Internet of things and SOA architecture-based middleware of Internet of things
CN102202093A (en) * 2011-05-12 2011-09-28 南京中兴新软件有限责任公司 Method for realizing sensor adaption and system thereof
CN102279832A (en) * 2011-08-30 2011-12-14 山东中创软件工程股份有限公司 Method and device for determining connection state between serial port and sensing equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100793057B1 (en) * 2006-09-01 2008-01-10 한국전자통신연구원 Usn middleware apparatus for generating information service based on heterogeneous sensor networks and its method, system for providing information service using that
CN102156799A (en) * 2011-01-17 2011-08-17 西安交通大学 Cascadable complex event processing engine and train overhauling automatic recording method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957927A (en) * 2010-11-12 2011-01-26 福州联迅信息科技有限公司 Middleware architecture of Internet of things and SOA architecture-based middleware of Internet of things
CN102202093A (en) * 2011-05-12 2011-09-28 南京中兴新软件有限责任公司 Method for realizing sensor adaption and system thereof
CN102279832A (en) * 2011-08-30 2011-12-14 山东中创软件工程股份有限公司 Method and device for determining connection state between serial port and sensing equipment

Also Published As

Publication number Publication date
CN102594871A (en) 2012-07-18

Similar Documents

Publication Publication Date Title
CN108833459B (en) Data reporting method and terminal equipment
CN102571732B (en) A kind of methods, devices and systems of processes sensor protocol information
CN102594871B (en) A kind of data encapsulation method, system, adapter and Internet of things middleware
CN110166975B (en) Agricultural Internet of things sensor communication method based on wireless network and raspberry-set node
CN202750109U (en) Internet-of-things sensing gateway
CN101902618A (en) Crop disease and insect information diagnosis system and method
CN103095609A (en) Access adaptive method and device based on Internet of things terminals
CN104541282A (en) Unlocking method, apparatus and device
CN103297306A (en) Internet of Things system for agriculture
CN103957198A (en) Sensor data receiving and converting method and system
CN110299167A (en) For guiding the mechanism and programmable circuit that calculate equipment
CN102801818A (en) Universal sensor interface acquisition system based on ZigBee technology
CN202534018U (en) Intelligent inspection management system for oil field
CN104427232A (en) Method, device and system for realizing image acquisition
CN110727420A (en) Serial port compatible method and system
CN114564209A (en) Intelligent automobile data processing method, device and equipment and storage medium
CN105550689A (en) Information processing method, first electronic equipment and second electronic equipment
CN111552268A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
CN105872060A (en) Communication method and system, and data collection end device
CN116669064B (en) Wireless protocol testing method and electronic equipment
CN104156211A (en) Universal data interface used for sensor and data calling method
CN105139053B (en) Radio-frequency identification reader/writer interface protocol debugging apparatus and method
CN108318489A (en) A kind of system and method for the real-time storage of Tunnel testing data
CN116069706A (en) Detection method, system and storage medium for intelligent hygrothermograph product
CN102496035A (en) System for realizing acquisition of data interacted between intelligent card and card terminal and method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211203

Address after: 250014 No. 41-1 Qianfo Shandong Road, Lixia District, Jinan City, Shandong Province

Patentee after: SHANDONG CIVIC SE COMMERCIAL MIDDLEWARE Co.,Ltd.

Address before: 250014 No. 41-1 Qianfo Shandong Road, Jinan City, Shandong Province

Patentee before: SHANDONG CVIC SOFTWARE ENGINEERING Co.,Ltd.

Patentee before: Shandong Zhongchuang software commercial middleware Co., Ltd