Summary of the invention
In order to solve the problem of prior art, integrated use technology of Internet of things of the present invention, embedded technology, acquisition system technology and development of Mobile Internet technology etc., provide a kind of intelligent remote data acquisition system based on Internet of Things.Realize the distributed mobile monitoring that commercial unit is run, also take into account the opening of acquisition system, convenience, versatility.
In order to solve the problems of the technologies described above, the invention provides a kind of intelligent remote data acquisition system based on Internet of Things, it is characterized in that, described system comprises hyperchannel asynchronous data collection module, multi-protocols middleware module, parameter management module, data transmitting module, emergency management module and self diagnosis and power down process module, wherein:
Described hyperchannel asynchronous data collection module, for utilizing acquisition system equipment automatically to gather perceptual parameters in multiple industrial control equipment and control data, described industrial control equipment comprises Universal Digital Collecting Equipment, PLC, industrial computer; By multiple interfaces and consensus standard, related data in IC-card read write line, rfid interrogator, bar code scanner, Quick Response Code scanner can also be gathered;
Described multi-protocols middleware module, for the treatment of the packet that the industrial control equipment of different manufacturers is sent, by resolving and coding protocols data packet signal and dynamic supporting interface method, different protocol conversions is that unified consensus standard and data center carry out exchanges data by the agreement difference of shielding different manufacturers, different times and different industry standard interface; Described industrial control equipment comprises PLC, industrial computer, DCS or CNC; Described different agreement comprises ModBus, Profibus, TCP/IP, PPI and MPI many kinds of industry-standard protocol;
Described parameter management module, for receive and store user in the data the heart to call the configuration parameter table of filled in submission according to the interface specification sum functions of predefined, and according to described configuration parameter table, acquisition system to be configured; No. ID, acquisition system, file directory and filename is included in described configuration parameter table.
Described data transmitting module, for realizing acquisition system equipment to the bi-directional data transmission between data center and data center to acquisition system; By multithreading and data compression technique, intelligent packet is carried out, creation task queue to data characteristic, the transmission priority that need transmit data, realizes the transmission of multi-channel parallel flowing water and the batch processing of data; ; Transmit data acquisition custom protocol packet encoder, utilize multiple internet or mobile Internet transportation protocol, as data transmission and control channel; Described internet or mobile Internet transportation protocol comprise Wifi, or Ethernet, or GPRS, or CDMA, or 3G;
Described emergency management module, the emergency that the industrial control equipment of monitoring for being received acquisition system by acquisition system is occurred or exception, send automatic paging to data center according to described emergency or exception, make data center to described emergency or extremely process;
Described self diagnosis and power down process module, abnormal for detection system self, by self-inspection function, from device power and hardware check, the fault etc. reading configuration file and network, the system failure is processed and repairs.
In one embodiment of the present of invention, described hyperchannel asynchronous data collection module comprises parameter read module, generates protocol package module, sends packet module and receive packet module, wherein:
Described parameter read module, for reading acquisition parameter from memory device, acquisition parameter is provided by parameter management module, and parameter comprises unit type, protocol type, frequency acquisition, baud rate, register, address, data type and data length;
Described generation protocol package module, for device parameter is submitted to multi-protocols middleware module, and obtains the protocol data bag mated with equipment;
Described transmission packet module, for sending to collected equipment, as PLC by the protocol data bag of generation; Collected equipment comprises industrial control equipment and sensor, wherein industrial control equipment comprises PLC, industrial computer, DCS and CNC etc., sensor comprises temperature, humidity, electric current, voltage sensor, and acquisition system, by sending the mode of instruction to collected equipment, obtains equipment operating data;
Described reception packet module, for obtaining the real-time running data of collected equipment, the packet received generates packet with user-defined format after being resolved by protocol algorithm, and passes to data transmitting module.
In one embodiment of the present of invention, described multi-protocols middleware module comprises protocol conversion algoritic module, packet generation module and packet parsing module, wherein:
Described protocol conversion algoritic module, built-in ModBus, Profibus, TCP/IP, PPI and MPI many kinds of industry-standard protocol, by public function for other modules provide protocol conversion function, the opening solving acquisition system, with compatible, realizes the Homogeneous of system under isomerous environment;
Described packet generation module, for generating the packet sending to collected equipment, by comprise data layout, data length information packet by protocol conversion algorithm generate collected equipment support protocol data bag.
Described packet parsing module, for the treatment of the packet received from collected equipment, resolves the packet received, comprises data point, data type, data value, to obtain the data of collection.
In one embodiment of the present of invention, described parameter intelligent configuration module comprises parameter and upgrades administration module, automatically distributes acquisition parameter module; Wherein:
Described parametric distribution administration module, for reading acquisition parameter from storer, and dividing into groups according to cycle, type, quantity to acquisition parameter, improving the efficiency of data acquisition.
Described parameter upgrades administration module automatically, and for automatically upgrading acquisition parameter, acquisition parameter is configured in backstage and completes, acquisition system is by data transmitting module timing scan backstage, alignment parameters modification time, upgrades up-to-date acquisition parameter automatically, ensures the accuracy of acquisition parameter.
In one embodiment of the present of invention, described data transmitting module comprises network protocol management module, SOCKET link block, data encapsulation module and data transmission module, wherein:
Described network protocol management module, for supporting multiple network agreement, comprises wired, WIFI, GPRS, CDMA, to adapt to different network application environments;
Described SOCKET link block, for realizing the communication of acquisition system and background service, the communication mode of acquisition system and background service comprises UDP and TCP, the selection of SOCKET connected mode according to the parameter characteristic of acquisition system as collection period, data package size, reliability requirement, transmission speed are determined;
Described data encapsulation module, for encapsulating the packet collected, data encapsulation adopts user-defined format, and user-defined format comprises address, packet number, data length, check code, and the restriction of data encapsulation length need consider transfer efficiency and Internet Transmission restriction simultaneously;
Described data transmission module, for sending packet to given network address.
In one embodiment of the present of invention, described emergency management module comprises event configuration administration module, event processing module, auto-alarming module;
Described Configuration Manager, for managing acquisition system local emergency allocation list, by backstage regular update, allocation list comprises event identifier and event description;
Described event processing module, in acquisition system operational process, finds emergency or exception, automatically starts emergency processing capacity, searched events allocation list, locating events reason or phenomenon;
Described auto-alarming module, to the emergency that event processing module produces, sends a warning message in real time automatically.
In one embodiment of the present of invention, described self diagnosis and power down process module comprise systems axiol-ogy module and network detection module;
Described systems axiol-ogy module for self-inspection during system cloud gray model, and is the quantitative check function of the system in case of system halt situation setting that anti-locking system causes because of a variety of causes;
Described network detection module, supports timed sending network Heartbeat, for maintaining or judging network-in-dialing state.
Present system, for numerical control device remote data acquisition, proposes a kind of intelligent remote data acquisition system based on Internet of Things.The present invention can realize the remote data acquisition of plurality of devices model, multiple connection and host-host protocol.Specifically, tool of the present invention has the following advantages:
(1) data acquisition adopts multichannel collecting and tranmission techniques, can realize collection and the transmission of big data quantity, sends and receive to adopt asynchronous system, effectively can avoid channel block;
(2) due to the built-in multi-protocols middleware of system, largely improve the extendability of system, multiple industrial standard and agreement can be supported, support the communications protocol of different manufacturers distinct device, the agreement difference of shielding different manufacturers, different times and different industry standard interface;
(3) the automatic renewal upgrade function of systematic parameter administration module, makes system possess very strong adaptivity.
(4) networking mode is flexible, adopts technology of Internet of things, supports that the various ways such as wired, wireless, GPRS, CDMA realize the transmission of data;
(5) good reliability, system possesses automatic detection function and auto-update function, can realize the auto-update of system and the automatic recovery of the system failure, and the normal table of safeguards system runs;
(6) the emergency processing capacity of system, can the anomalous event diagnosis and management ability of effective lifting means.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only for explaining the present invention, being not intended to limit the present invention.In addition, if below in described each embodiment of the present invention involved technical characteristic do not form conflict each other and just can mutually combine.
As shown in Figure 1, the intelligent remote data acquisition system that the present invention is based on Internet of Things comprises: hyperchannel asynchronous data collection module, multi-protocols middleware module, parameter management module, data transmitting module, emergency management module, self diagnosis and power down process module, wherein:
Described hyperchannel asynchronous data collection module, automatically perceptual parameters in multiple industrial control equipment and control data is gathered by hyperchannel asynchronous system for utilizing acquisition system equipment, described industrial control equipment comprises general many data acquisition equipments, programmable logic controller (PLC) (Programmable Logic Controller, PLC), industrial computer; Also for by multiple interfaces and consensus standard, gather related data in IC-card read write line, radio frequency identification (Radio Frequency Identification, RFID) read write line, bar code scanner, Quick Response Code scanner; Data in the multiple industrial control equipment of acquisition module Real-time Collection, by the data summarization of collection, encapsulation; Acquisition system also can perform long-range operational order, authorizes to realize the reading and writing of industrial control equipment, open, the operation such as to stop;
Described multi-protocols middleware, for the treatment of the packet that the industrial control equipment of different manufacturers is sent, by resolving and coding protocols data packet signal and dynamic supporting interface method, different protocol conversions is that unified consensus standard and data center carry out exchanges data by the agreement difference of shielding different manufacturers, different times and different industry standard interface; Described industrial control equipment comprises programmable logic controller (PLC) (Programmable Logic Controller, PLC), industrial computer, dcs (Distributed Control System, or computer digital control machine tool (Computer numerical control, CNC) DCS); Described different agreement comprises ModBus, Profibus, TCP/IP, Siemens's point-to-point communication (Point to Point Interface, and Siemens's multi-point communication (Multi-Point Interface, MPI) multiple industry-standard protocol PPI); Can realize by the mode such as serial ports, Ethernet interface, with industrial control equipment (as PLC, industrial computer, DCS and the CNC etc.) communication of different manufacturers, support collection site several data communication mode (as serial ports RS232/485, Zigbee and Bluetooth etc.)
Described parameter management module, for receive and store user in the data the heart to call the configuration parameter table of filled in submission according to the interface specification sum functions of predefined, and according to described configuration parameter table, acquisition system to be configured; No. ID, acquisition system, file directory and filename is included in described configuration parameter table;
Described data transmitting module, for realizing acquisition system equipment to the bi-directional data transmission between data center and data center to acquisition system; By multithreading and data compression technique, intelligent packet is carried out, creation task queue to data characteristic, the transmission priority that need transmit data, realizes the transmission of multi-channel parallel flowing water and the batch processing of data; Transmit data acquisition custom protocol packet encoder, by multiple internet or mobile Internet transportation protocol, as data transmission and control channel; Described internet or mobile Internet transportation protocol comprise Wireless Fidelity (WIreless-Fidelity, Wifi), Ethernet, general packet radio service technology (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), G mobile communication (3rd-Generation, 3G);
Described emergency management module, the emergency that the industrial control equipment of monitoring for being received acquisition system by acquisition system is occurred or exception, send automatic paging to data center according to described emergency or exception, make data center to described emergency or extremely process;
Described self diagnosis and power down process module, abnormal for detection system self, by self-inspection function, from device power and hardware check, the fault etc. reading configuration file and network, the system failure is processed and repairs.
Be described in further detail for based on each module in the intelligent remote data acquisition system of Internet of Things below.
As shown in Figure 1, described hyperchannel asynchronous data collection module, comprises parameter read module, generates protocol package module, sends packet module and receive packet module; Wherein:
Described parameter read module, for reading acquisition parameter from memory device, acquisition parameter is provided by parameter management module, and parameter comprises unit type, protocol type, frequency acquisition, baud rate, register, address, data type and data length;
Described generation protocol package module, for device parameter is submitted to multi-protocols middleware module, and obtains the protocol data bag mated with equipment;
Described transmission packet module, for sending to collected equipment, as PLC by the protocol data bag of generation; Collected equipment comprises industrial control equipment and sensor, wherein industrial control equipment comprises PLC, industrial computer, DCS and CNC etc., sensor comprises as temperature, humidity, electric current, voltage sensor, and acquisition system, by sending the mode of instruction to collected equipment, obtains equipment operating data;
In actual application environment, collected equipment often has multiple collection address or acquisition parameter, different collection addresses may have different requirements to collection period, as overload, cycle and motor axle temperature, system can according to configuration requirement, and automatically divide into groups to collection address, regulation is often organized at most can not more than 20 addresses, and open acquisition channel thread, each passage has independently thread; And collection address that can be corresponding different, acquisition parameter and collection period, in passage, data acquisition adopts asynchronous collecting pattern, can improve frequency acquisition and response efficiency, also avoid channel block.By 100ms can be reached to the highest frequency acquisition of PLC under the asynchronous mode of test acquisition system;
As shown in Figure 2, example illustrates that acquisition system supports mpi agreement, the flow process of acquisition parameter from PLC, after entering collecting thread, first terminal sends request (request) to PLC, and Request packet voice form is shown in read command presented hereinbefore, and PLC is after receiving Request, bag is judged, and return to terminal check information (Ack Frame), then send Frame to terminal, terminal receives returned packet, successfully resolved send communication module, completes a collection period.After a collection period completes, the sleep interval time (cycle normally set was as 15 minutes), then open next collection period.
Wherein, data acquisition scheme is divided into the passive collection of timing, remote command collection and template configuration collection etc.Wherein the passive collection of timing refers to that acquisition system gathered (as every the fixing collection of 1s once) by the prior predetermined sampling period; Remote command collection refers to first be authorized by data center send collection request instruction, and acquisition system receives instruction and just carries out acquisition operations to industrial control equipment; Template configuration collection refers to the policy template of the user's prior self-defined collection fault monitor of heart end, performance monitor in the data, and acquisition system performs acquisition operations by downloading this template.
As shown in Figure 3, after data acquisition system (DAS) is opened, system will read acquisition configuration parameter, divide into groups according to parameter rule (as adopted the cycle, adopting address etc.) to collection address, often group using unlatching separate threads as acquisition channel, the collection period of each collection group is identical, and in order to carry out batch capture, in group, address does not allow more than 20 addresses, collection group independent operating, be independent of each other, do not complete an acquisition tasks, send data to transport module.Acquisition system provides remote command operating function simultaneously, for collected equipment is carried out simple operations as reading and writing, open, stop, acquisition system opens separately operated from a distance function thread, so that the operational order of real-time listening data center, and respond, remote command operation Inform when done data center performance.
Described reception packet module, for obtaining the real-time running data of collected equipment, the packet received generates packet with user-defined format after being resolved by protocol algorithm, and passes to data transmitting module.
As shown in Figure 1, multi-protocols middleware module comprises protocol conversion algoritic module, packet generation module, packet parsing module.
The multiple industry-standard protocol such as protocol conversion algoritic module built-in ModBus, Profibus, TCP/IP, PPI and MPI, by public function for other modules provide protocol conversion function, the opening solving acquisition system, with compatible, realizes the Homogeneous of system under isomerous environment; Protocol conversion algoritic module provides public function to call to other modules;
Multi-protocols middleware, proposing one can in same acquisition system, by data communication interface (as RS232/RS485, ModBus, Profibus, Ethernet and CANbus etc.) with multiple controllable device (as PLC, industrial computer, CNC, DCS, RTU and DTU etc.) interconnection, by supporting TCP/IP, PPI, the multiple industry-standard protocol such as MPI carries out data interaction, by resolving in set of algorithms, the packet that decoding and process different manufacturers industrial control equipment are sent, solve the opening of acquisition system with compatible, the Homogeneous of multiple equipment and data acquisition under realizing isomerous environment.Form 1 is the definition of device type structure below, in structure can designated equipment type (acquisition system built-in device type dictionary), adopt cycle, interface baud rate, gather address format and address list etc. information.
Table 1
Sequence number |
Title |
Type |
Describe |
1 |
plcProtoType |
short |
Device type |
2 |
samplingPeriod |
int |
The employing cycle |
3 |
plcBaudRate |
Int |
Baud rate |
4 |
addressCount |
Short |
Address number |
5 |
listAddress |
Char[] |
Address list |
Described packet parsing module, for the treatment of the packet received from collected equipment, resolves the packet received, comprises data point, data type, data value, to obtain the data of collection;
Described packet generation module, for generating the packet sending to collected equipment, by comprise data layout, data length information packet by protocol conversion algorithm generate collected equipment support protocol data bag.Form 2, illustrates that MPI agreement reading order structure defines: MPI reading order, and the claim frame form reading host computer during data is as follows, and this frame occupies 38 byte lengths:
Table 2
SD |
LE |
LER |
SD |
DA |
SA |
FC |
DASP |
SSAP |
FS |
UU |
GU |
DU |
FCS |
END |
SD LE LER SD occupies 4 byte lengths, is fixing;
DA SA FC DSAP SSAP FS respectively occupies 7 bytes
UU occupies 6 byte lengths, is fixed value
GU occupies 6 byte lengths, can operate during mixing read-write
DU unit occupies 12 byte lengths from 23 to 26, and this 4 byte is fixed numbers
27 and 28 these 2 bytes represent the data amount check of reading jointly, represent byte number, represent the counter of reading or the number of timer when memory block is C, T when the memory block of reading is I, Q, M, DB
35 is frame check codes, adopts and remainder algorithm
31 represent memory block type
36,37 is end marks, is fixed value, equals 16 E5 respectively.
As shown in Figure 1, described parameter management module comprises parametric distribution administration module and parameter upgrades administration module automatically; Wherein:
Described parametric distribution administration module, for reading acquisition parameter from storer, and dividing into groups according to cycle, type, quantity to acquisition parameter, improving the efficiency of data acquisition.
Described parameter upgrades administration module automatically, for automatically upgrading acquisition parameter, completes because acquisition parameter is configured in backstage, acquisition system is by timing scan backstage, alignment parameters modification time, upgrades up-to-date acquisition parameter automatically, ensures the accuracy of acquisition parameter.
The configuration of acquisition system end correlation parameter is held by data center and is carried out predefined configuration, and configuration parameter comprises the information such as sample devices number, model, sample frequency, collection address, data layout and baud rate.
Data center provides the definition option to various equipment and parameter, as shown in table 3:
Table 3
Sequence number |
Title |
Type |
Describe |
1 |
Register |
Char[4] |
Register |
2 |
dbDatablockNumber |
Int |
Data block number |
3 |
dataLength |
Short |
Data length |
4 |
Address |
Char[10] |
Address |
5 |
dataType |
Short |
Data type |
6 |
samplingPeriod |
Int |
The employing cycle |
As shown in Figure 1, described multi-channel parallel data transmitting module comprises network protocol management module, SOCKET link block, data encapsulation module and data transmission module;
After acquisition system and data center connect, can set up data conveying link, automatically open multi-thread data transfer mode, to realize the multi-channel parallel data transmission of acquisition system and data center, hyperchannel and data center alternately, decrease queuing time.
Described network protocol management module, for supporting multiple network agreement, as wired, WIFI, GPRS, CDMA etc., to adapt to different network application environments, the network communication problem of rugged surroundings particularly can well be solved to the support of mobile network protocol (GPRS, CDMA);
Described SOCKET link block, for realizing the communication of acquisition system and background service, the communication mode of acquisition system and background service mainly contains two kinds, the selection of UDP and TCP, SOCKET connected mode can according to the parameter characteristic of acquisition system as collection period, data package size, reliability requirement, transmission speed etc.; Acquisition system is as required to collection address (or parameter) grouping, data transmission module can be set up corresponding thread and accept integrated data, simultaneously data transmission module also will set up independently equipment operating thread and configuration inspection thread, realizes hyperchannel and data center is mutual.
Described data encapsulation module, for encapsulating the packet collected, data encapsulation adopts user-defined format, and user-defined format comprises address, packet number, data length, check code etc., and the restriction of data encapsulation length must consider transfer efficiency and Internet Transmission restriction simultaneously;
Described data transmission module, for sending packet to given network address.
As shown in Figure 1, described emergency management module comprises event configuration administration module, event processing module and auto-alarming module;
Emergency management module comprises 2 application services, and Terminal Emergency event call TEP and emergency event supervision port ESP manages, and acquisition system is automatic loading service after resetting and starting.When collected equipment generation emergency or exception, as overheated in its CPU or industrial control equipment is abnormal, industrial computer box fan speed is opened lower than cabinet in threshold values, system cloud gray model, acquisition system can look into the configuration mapping code arranged in table by automatic seeking, send automatic paging, and paging code is by the long-range setting of data center and upgrade to distinguish event of different nature, facilitates unified management and operation.
Described Configuration Manager, for managing acquisition system local emergency allocation list, by backstage regular update, allocation list comprises event identifier and event description;
Described event processing module, in acquisition system operational process, finds emergency or exception, automatically starts emergency processing capacity, searched events allocation list, locating events reason or phenomenon;
Described auto-alarming module, to the emergency that event processing module produces, sends a warning message in real time automatically.
As shown in Figure 1, self diagnosis and power down process module comprise systems axiol-ogy module and network detection module;
Described systems axiol-ogy module for self-inspection during system cloud gray model, and is the quantitative check function of the system in case of system halt situation setting that anti-locking system causes because of a variety of causes;
System has the function detecting self exception, by self-inspection function, from device power and hardware check, read configuration file and data check, sampling processing, message tissue, data send with receive, network pair time etc. the fault of links detailed, fast finding failure cause, and process in time, recover normally to run.
Various exceptions in the collection and transmission of system synchronization Real-Time Monitoring, occur first to send to data center extremely, more simple is abnormal as message error, bust this etc., the automatic repetitive operation of terminal, large exception such as RAM leakage, configuration error etc. will cause system to automatically reset, to recover mistake.
Described network detection module, supports timed sending network Heartbeat, for maintaining or judging network-in-dialing state.
Those skilled in the art will readily understand; the foregoing is only preferred embodiment of the present invention; be not limited to the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.