Summary of the invention
The objective of the invention is to propose the Internet of Things communication system that a kind of construction cost is low, the deployment ability is strong, to satisfy the communication requirement of processing of farm products transportation.
The Internet of Things communication system that the present invention proposes is based on the wide area network-sensor network hierarchical communication system of main and subordinate node pattern, and its framework can be divided into server, host node, from node.Wherein, host node has mobile communication module, can pass through mobile communication and server exchange data; Host node has the short-range communication module, can with set up low-power consumption, short-range communication link from node; Host node has the GPS communication module, can carry out the positioning action of master-slave system.The inventive method is compared the system architecture of traditional server-gateway-sensor node can save system's construction cost, improves the system deployment ability.
The present invention adopts the network model of bilayer, duplex: (1) wide area stratum reticulare, and it is made up of a central server and many host nodes; (2) sensor network layer comprise a host node and many from node.Compare with traditional fixation application layer gateway-flat surface sensor network plan, this scheme is through host node and remove the mode of residential gateway, and wide area network and sensor network are combined together, makes wide area network and sensor network more closely be combined togather.Host node not only serves as only coordinator in the sensor network layer, simultaneously also as sensor node (Fig. 1) independently in the wide area stratum reticulare.According to the difference of networking formula business model, the wireless wide-area stratum reticulare can use the operating guidance of the available network infrastructure of all commerce, such as GSM/GPRS, and HSPA and WiMAX etc., these networks often have huge coverage and data communication services.The huge scope of these network coverages has been liberated the spatial constraints of system deployment, thereby makes all the sensors node can both be deployed in any place that can be connected to the wireless wide area network basis instrument.When wide area network was unavailable, the large-scale local memory device in host node can be used to storage data, to guarantee the continuity of system works.This characteristic has further improved the deployment ability of system.
Because the common ratio sensor network layer of wide area stratum reticulare more needs energy, thereby the duty factor of wan communication needs between the real-time capacity of host node and battery life, to weigh.Actual battery life accepted and wide area network response time can be realized through striding a layer optimization, suffered because wide area network and sensor network protocol all are integrated into single processor chips.
Internet of Things communication system based on the main and subordinate node pattern can avoid the use of complicated ALG, avoid the routing cost of flat surface sensor network, thereby reduce the cost of system significantly, and the system that makes has better expansibility and mobility.
Shown in Figure 1 is the overall system framework.The present invention includes a plurality of host node equipment, a plurality of from node device, at least one station server equipment and software service.This cover system will apply monitoring to production, processing, transportation and the retail of agricultural product, and image data and record supply user inquiring in real time.
Specifically, the Internet of Things logistics communication system based on the main and subordinate node pattern that the present invention proposes comprises:
A plurality of Internet of Things are from node, and each comprises some kinds of sensor assemblies and the wireless radio frequency modules and the battery module that are used for communicating by letter with host node from node;
A plurality of Internet of Things host nodes; Each host node comprises power supply module, be used for and from the wireless radio frequency modules of node communication; Be used for the GPRS module of communicating by letter with far-end server, and the GPS module that is used to locate, sensor network protocol communication used between the main and subordinate node;
One or more servers, each server comprises the service software that is used to receive the host node data, user interface and data library device use the wan communication protocol communication between server and the host node;
Use server and host node in the communication link of system of the present invention, host node and hierarchy, and be connected through Wide Area Network between server and the host node from node, host node be connected through sensor network between the node.
Among the present invention, be connected through public wide area network between said host node and server, and can be available wan technology arbitrarily.
Among the present invention, said host node equipment comprises: the wan communication module is used to accept the data that server transmits through wide area network; Also comprise the sensor network module, be used for from node through short-range sensors network service.
Among the present invention; Use wide area network node communication agreement, method between said host node equipment and the server; Comprise that server passes through the short message form and initiates the order connection to host node; Host node is confirmed to the server replying short message with the short message form then, and host node sends data and state information through the GPRS form to server.
Among the present invention, said host node equipment and from using sensor network communication agreement, method between the node device comprises host node to sending configuration order from node, and sends data message from node to host node.
Among the present invention, said host node pools the wan communication Frame with a plurality of from node data.
Among the present invention, use based on hypotactic location algorithm and from node positioning service is provided for each.
Among the present invention, the node speed of transmission and acceleration information use the compression method based on DISCHARGE PULSES EXTRACTION.
Among the present invention, user interface provides the original producton location of product and position, the state information in the processing transportation.
Among the present invention, the said concentration data that inflammable gases such as ambient oxygen, carbon dioxide, ethene methane are provided from node device; Product longitude and latitude, height above sea level and should be from the distance of node and nearest host node equipment room be provided, and data such as product movement rate, acceleration; Temperature, the humidity of product place environment also are provided.
Among the present invention, said perhaps the packing at the product environment change from node device provides warning when being damaged.
Among the present invention, also comprise a cover server data stores, analyzing software system, be used to collect the data of main and subordinate node collection, transmission, and obtain monitor message analyzing data.Described server data stores, analyzing software system, the logistics link information that can the analyte sensors data obtains.
Among the present invention, a plurality of from node device and a host node equipment composition sensor network, use sensor network protocol to organize short-range local area network (LAN) in the network.Network communication method may be selected to be: it is first-class that FSK is modulated at the 2.4GHz frequency.When needed through above-mentioned channel radio Frame, host node is monitor channel constantly, when Frame is looked in detection, accepts data from node, and all the other preserve data content at buffer memory.
When node sent data simultaneously, channel will conflict, and causes host node to take defeat when a plurality of.In this case, host node broadcast collision announcement information, when receiving information from node, and confirm relevant with self after, will send once more by the rollback random time, thereby the assurance communication process can continue.
Said host node receives a plurality of from node data, perhaps receives timer expiry after some data, will upload data through wide area network to server.Wan communication agreement regulation wan communication method and process specification.The wan communication process comprises mobile network GPRS, SMS or fixed-line network based on the existing network technology.Data format and concrete network technology have nothing to do, and can be used as offered load through any reliable network technical transmission.
Send data for what make that host node can be correct to server, before host node is normally started working, need be configured host node.Server is at first informed order to the host node send server, makes host node know the server address port information, and the consultation parameter of communication.Host node returns confirmation to server, and notification server communication connects sets up.After this host node can pool long message or short message from the Frame of node, selects according to concrete data traffic burden.
Advantage of the present invention:
1, used host node based on the Internet of Things communication system of main and subordinate node pattern, and removed gateway server, therefore can reduce the construction cost of system with wide area network access capability.
2, adopt Radio Link to communicate by letter between host node and the server, therefore, have more autgmentability having reduced the difficulty of disposing.
3, host node can insert a plurality ofly from node, compares the plane mode of Internet of Things, can simplify function from node, reduces cost and power consumption, and life-saving helps improving the practicality of system.
4, therefore host node negligible amounts can equip the GPS positioning equipment with lower cost, and is that each provides positioning function from node.Help reducing the node locating expense, improve positioning accuracy.
Embodiment
The part description of system
Shown in Figure 2 is host node device framework figure.Host node equipment is used for connecting wan and sensor network among the present invention, collects, transmits wide area network and sensor network data.Host node equipment comprises a cover embedded system mainboard, the sensor cable interface of a group network adapter and some expansions.The embedded system mainboard comprises flush bonding processor, battery and corresponding battery Management Unit, and real-time controller and docking station are used to connect various adapters and sensor data interface.Network adapter comprises a cover 2.4GHz sensor network adapter, a cover GPS locating module, and a cover wide area network adapter can be GSM/GPRS module and the optional IR-UWB module of a cover in concrete realization system.The sensor cable interface of expansion is used for connecting transducer through cable, to support the big transfer of data of part.
2.4G the baseband signal that the sensor network adapter is handled the device generation with embedded system is modulated to method transmissions such as 2.4GHz frequency through FSK, and receives modulation signal accordingly and be demodulated into baseband signal.
The GPS locating module is used for receiving and sending gps signal, and this module is used for the actuating equipment location, comprises position, speed and the time adjustment of host node equipment.Positioning result will be used for the aiding sensors network positions from node location as the anchor node address.
The wide area network adapter is used for receiving and sending wide area network data, in the specifically realization system, can be the GSM sending module.The base band data that the GSM sending module sends processor is packed in GPRS Frame or the SMS messaging, sends to network through general gsm module, and is transmitted to the IP address or the SIM number of appointment in GPRS, the SMS frame by operator.
In the realization system, can use Short Message Service to send order and confirmation, send Frame with the GPRS service.Short message is a kind of service that Mobile Network Operator provides, and can send one section relatively shorter Word message and give the mobile device designated number.Number is provided by the subscriber card that operator provides, such as the SIM of China Mobile.Need server and host node to be equipped with mobile number simultaneously and could realize short message communication.
GPRS is the service that the mobile network runs to be provided, can be through the data of mobile device transmitting-receiving IP network through GPRS APN.Server at first sends note to host node, informs host node effective service device number and IP address.Because the host node mobile number is that system is known, therefore need only host node in network, this process total energy realizes.Host node has obtained just can send note and GPRS packet to server behind server number and the IP address.
When the growth data port was used for host node and directly connects transducer, transducer transmitted data to host node.Data represent that with voltage form the ECP Extended Capabilities Port module is directly carried out analog-to-digital conversion to data, 0~255 numeral voltage condition.
Embedded system is used for control flow to host node equipment being provided.Embedded device uses U/C-OS operating system, uses software executing transmitting-receiving, framing and the logic control function of definition voluntarily.
In addition, also has the optional IR-UWB module of a cover.IR-UWB, pulse UWB are a kind of short-range wireless communication technologys, through the pulsing information of extremely short duration.This technological advantage be can be very low power consumption obtain than higher message transmission rate, and precise time information is provided.Utilize UWB technique computes location can obtain accurate location.
Fig. 3 has provided host node outward appearance diagram.Host node externally provides some interfaces among the present invention, comprises gps antenna, GPRS antenna, 2.4G antenna, a Micro-SD card slot and 4 growth data ports.4 connectors use the SMA interface standard, and Fig. 4 has provided the surface structure and the opering characteristic of electric apparatus of interface.Port data will directly use as simulation signal generator.
Host node uses external power supply, needs 220V voltage so that enough power supplys to be provided.
Fig. 5 has provided from node device and has illustrated.Comprise one group of two battery and be integrated in flush bonding processor and a plurality of sensor assembly on the circuit board from node among the present invention; 2.4GHz Deng radio-frequency module; The optional IR-UWB module of one cover, and necessary real-time control assembly, control assembly comprises the crystal oscillator sum counter in real time.
Said sensor assembly comprises humidity temperature pickup, acceleration transducer, inflammable gas gas density transducers such as oxygen, carbon dioxide, ethene methane, corresponding respectively environmental index.Various transducers are optional, select the different sensor aggregate erection on circuit board corresponding to different application needs.For unwanted assembly, on circuit board, leave a blank.
Said real-time control assembly regularly to processor transmitting time signal, informs that the new transmission cycle of processor arrives.In the new transmission cycle, processor is collected the data of each transducer, data is formed the sensor network data frame according to described mode, and broadcast to host node.
Said flush bonding processor sends to radio-frequency modules such as 2.4GHz with complete Frame.2.4GHz will do modulation to Frame Deng radio-frequency module, and increase corresponding frame head information and check code.
Said IR-UWB module is used for short-range radio communication.
Fig. 6 has provided the function of wide area network server among the present invention.This server comprises two parts, is used for the TCP server of communicating by letter with host node, and is used for the Web server with telex network.
Among the present invention, the wan communication agreement is irrelevant with the concrete communication technology, can adopt the GPRS or the SMS of mobile communication, also can adopt the WiFi or the Ethernet transmission of computer network.Implementation is that all Frame unifications are encapsulated as the TCP message format, and command frame can adopt the TCP message format, also can adopt the SMS messaging form.Use short message service to send order and can better support mobility.
Among the present invention, the wide area network server system comprises the gsm module identical with host node, receives the short message of all host nodes through the binding SIM card number.Encapsulated the data message of the wan communication agreement defined that provides among the present invention in the short message.
Among the present invention, the wide area network server system comprises the TCP server of writing voluntarily, is used to monitor given tcp port.This server program is used to receive the uplink frame that all host node equipment send, and comprises data, state and configuration information.Server address sends to host node through order, so the appointment receiver address that host node equipment can be correct, thereby the assurance data can be passed common wide area network arrival server.
Among the present invention, the wide area network server background system has comprised the data necessary library component, is used to deposit the data message that host node sends.Therefore the user can obtain the open user's data information of giving through the accessing Web services device.
Web server is used to receive user's http visit.Because the http visit meets the http standard, therefore uses existing network server program, and write necessary server to support user capture.
The wide area network server background system is preserved sensing data in the bag database, and the data in the database in cycle do analysis, and the overall condition of the informix place environment of collecting according to each transducer is optimized producing to transport with logistics.
The communication protocol explanation
Adopt the Zigbee agreement of simplifying to communicate between main and subordinate node.
Host node also needs GPRS service and GPS location between support simultaneously and the server except that support and the simplification Zigbee agreement between node.For this reason, need to use three cover antenna equipments, with glitch-free communication between guaranteeing mutually.
Except three cover wireless devices, host node self has been expanded four limited interfaces, in order to connect the sensing equipment of more complicated, sensing data is directly inserted in the host node Frame.
Be used for sending the data that the self-sensor device collects from node to host node.Since will use in a large number from node, therefore, fairly simple from the functions of the equipments of node in order to reduce cost and weight, volume, can't support complicated protocol function.The radio-frequency module that has comprised a cover 2.4GHz from node is sending required signal.
(1) main and subordinate node communication means
Its physical layer is divided two kinds of wired and wave points.The electrical characteristic of wireline interface is that input range is 0-3.3V, and input impedance is 2kOhm, input capacitance: the 100pF sampling interval: >=1.0 minutes, by the SENSOR-SETTINGS command configuration.ADC converter resolution: 12 bits.And the physical layer parameter of wave point is following: frequency band range is 2400 ~ 2483.5MHz, and the acquiescence centre frequency is 2410 KHz, adopts modulation systems such as FSK or GFSK, and data transfer rate is 50kbps, and receiver sensitivity is 102dBm.
Mac-layer protocol uses the addressing scheme of 32 bit address to indicate each node.Communication link is two-way, and following behavior host node arrives from node.Because down direction only has equipment of host node, so down link is controlled by host node fully.Host node through write in frame that 32 bit address specify to receive from node.Up direction is from the node to the host node.Owing to exist a plurality ofly from node simultaneously, so up direction might clash, and cause data correctly to receive.For this reason additional designs anti-collision mechanism, to avoid taking place the situation that loss of data can't obtain.Generally in application, fewer from number of nodes, it is shorter to send period ratio, and the probability that therefore conflicts is very low, and the cost of conflict even possibly be lower than the cost of conflict antagonism mechanism.But, still designed special conflict antagonism mechanism in order to guarantee that some critical data can obtain reliable communication capacity.Here use the control that conflicts of the method become CSMA/ALOHA.In this mechanism, each sends the data of oneself randomly from node.Because communication distance is shorter, data transfer rate is not high, so host node will be perceived the transmission situation from node at once.If in certain process of transmitting, another has also sent data from node, leads to a conflict, and host node will send interior each of conflict notification information notification communication distance from node, with approach avoidance conflict.After receiving conflict notification from node, random back retransmits after a period of time.
Packet structure in the link layer from the node to the host node is as shown in Figure 7.Mainly comprise physical layer frame head and physical layer load, the physical layer load comprises destination address, source address, the load of MAC layer and cyclic check code again.Table 1 is seen in concrete each several part definition.
Wherein the load of MAC layer sends to server through the data message of up link then by the host node collection.MAC layer load correspondence some bytes in data message.Because it is that forward direction is transparent that host node is not changed MAC layer loading section, so the implication of MAC layer load can be by user definition.
(2) host node and server communications method
Use GPRS as underlying protocol between host node and the server, and utilized GPRS service carrier Transmission Control Protocol, realized the reliable communication between server and the host node.Host node is collected from the node data sent; To be organized into the frame of protocol compliant standard and send to server from node data through the GPRS service; In addition, host node is accepted from the order of server and according to corresponding command-execution operation.Specific operation process is following: at first open the GPRS/TCP server, AD-DC power matching device is connected to the host node module, the power cable of attention+9V should be connected with the SMA5 of host node.Open the host node module then, server sends an initial configuration order (SKIBAR-SYS) to host node, with the IP and the port of notification server.Server waits for the GPRS/TCP of autonomous node to divide into groups.If needed, can check sensor states at any time.In addition, server can be to the host node transmitting control commands to begin road monitoring or to stop road monitoring.
Set up handshake procedure through downlinlc message in advance between server and the host node, server waits for that host node is through ul transmissions data and node status information then.Complete message process is as shown in Figure 8.
Down link is order and the feedback that is used to dispose the control host node between server and the host node; It is based on the Short Message Service among the GSM standard ETSI-TS100-585; In native system, only be used in the Text Mode that every mobile phone can use, the most general basic pattern among a kind of SMS.
Completely shake hands and be used for down link; Be that server sends the order short message; Receive that forwarding, host node send one and confirm short message accordingly if host node is errorless, because the host node that upgrades in time is very important for server; The parameter of using in the host node is comprised in to be confirmed in the short message, with the time of day of announcement server host node.
If server is not supported Short Message Mobile Terminated, he can neglect the affirmation short message, and this simplification can be not directly exert an influence to the operation of host node, but can the robustness of system be exerted an influence.
Have only when the local password of allocation of code in the order short message and host node is complementary; This order short message is only legal and can passes through; Otherwise this order short message can be dropped, and this helps to prevent because the generation of the configuration loss that the leakage short-message sending of malicious attack and mobile phone causes and other interference.More than two kinds short message maximum length be 140 ascii characters.
Up link is that host node sends to the data in server transmission in the backbone network; The TCP specification is abideed by in the link attended operation; Be that server only need be provided with tcp port; And send IP address and port numbers with the form of short message to host node through down link, the connection of breaking of host node Connection Service device when transfer of data, end of transmission.
Data content is with the UDP mode transfer, and load is specified with ASCII fromat, and maximum length is 1400 bytes.Upload average data rate and in real network, determine, far below theoretical value by the GPRS network data transfer rate.By experience in the past, consider server end budget program, 1Kbps more reasonably sets.Upload UDP bag kind divided data message and state bag, every intersegmental ', ' separation that has, the segment length is based on its content.
Other supplementary technology contents
The present invention adopts the data extraction method based on compression.This method is not directly to handle initial data but from initial data, extract the composition with clear and definite practical significance and decompose again then, and each several part compresses respectively according to different characteristic separately then, to realize higher compression efficiency.
Owing to from node, adopting the accelerator of 3 reference axis to measure and write down mechanical failure information, so the core of data reduction is the expedited data compression.The squeeze operation of expedited data is following: initial data generates D-waveform through DC filter; On waveform, show the straight line that amplitude is constant; Be illustrated in the container that the ideal state lower sensor adheres to and should be in a stable environment, this part is predictable.Initial data produces A-waveform through exchanging separator, in the uncertain waveform that is shown as a change on by a small margin on the waveform, the irregular variation owing to different environment of its amplitude and frequency.Initial data produces P-waveform through pulse separator, is a burst pulse on waveform, and amplitude is big, and the time is short.A-waveform synthesizes bag with D-waveform and P-waveform after adaptive quantizing and Variable Length Code and ERROR CONTROL, form coded frame and also send.
The present invention adopts double-deck targeting scheme, and its navigation system is made up of two layer system, (1) global positioning system (GPS); By GPS and wide area network unit ID location host node; (2) local positioning system (LPS), by RFID, IR-UWB and inertia prediction location are from node.Compare the LPS location, the GPS location needs long period and big power consumption, needs the wide area network signal, and it is available that GPS serves.But LPS location is to carry out on the basis after GPS accomplishes, and the location has real-time, can reference time length at interval, with the most succinct method new target location more, avoided the waste of resource.
Can realize to expand the location through being connected in series GPS navigation system and LPS navigation system adaptively.Only use a GPS device can locate in host node and the sensor network all roughly from node.Then on the basis of GPS positioning result, use the LPS location can obtain host node with each from node high-precision location information more.
The Internet of Things logistics communication system that the present invention proposes based on the main and subordinate node pattern, the practical implementation step is following:
1,, guarantees that each equipment is all within network and communication range with host node, be installed to suitable position from node.Connect the host node device power supply (DPS).All the time be in mode of operation from node.
2, open the GPRS/TCP server.
3, the information such as host node number of server in the host node facility information table of setting up according to realization; Host node sends an initial configuration order (SKIBAR-SYS); With the IP and the port of notification server, such as: #PWD#SKIBAR-SYS#PWD, online.telia.se,130.237.239.251,10000,,,,,,,,,,,, the # server will wait for the affirmation information of autonomous node.If in official hour, do not wait until confirmation, host node will retransmit automatically.Obtain the affirmation information of host node when server after, host node equipment will be activated, receive, in the identification communication scope from node data, and to server forwards.This process will be accomplished automatically.
4, server waits for the GPRS/TCP of autonomous node to divide into groups, and the data that receive are deposited in the database.The user is through network entry data base querying data.
If needed, the user can check sensor states, sends querying command through requiring server to host node:
#PWD#START-SMS#SENSOR#
6, if needed, the user can require server to the host node transmitting control commands, such as beginning road monitoring:
#PWD#ROAD-MONI#1,120,30,25#
Perhaps stop road monitoring:
#PWD#ROAD-MONI#0,120,30,25#?。
The explanation of table 1 sensor network data message field (MFLD)