CN103957242B - A kind of things-internet gateway of IP virtualizations conversion - Google Patents

A kind of things-internet gateway of IP virtualizations conversion Download PDF

Info

Publication number
CN103957242B
CN103957242B CN201410153958.4A CN201410153958A CN103957242B CN 103957242 B CN103957242 B CN 103957242B CN 201410153958 A CN201410153958 A CN 201410153958A CN 103957242 B CN103957242 B CN 103957242B
Authority
CN
China
Prior art keywords
module
network
network adapter
data communication
message
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.)
Expired - Fee Related
Application number
CN201410153958.4A
Other languages
Chinese (zh)
Other versions
CN103957242A (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.)
NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
Original Assignee
NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
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 NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY filed Critical NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
Priority to CN201410153958.4A priority Critical patent/CN103957242B/en
Publication of CN103957242A publication Critical patent/CN103957242A/en
Application granted granted Critical
Publication of CN103957242B publication Critical patent/CN103957242B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of things-internet gateway of IP virtualization conversions, connect the live network adapter of network adapter scheduler module simultaneously including two, one of live network adapter is main network adapter, and another live network adapter is standby network adapter;Network adapter scheduler module connects a data memory module and at least two Objunctive network adaptors, each Objunctive network adaptor correspondence one data communication module of connection, wherein at least one data communication module connects signal input module, another data communication module connection signal output module;Signal input module connects sensor, signal output module connection agricultural control facility;Input channel is constituted between signal input module and corresponding Objunctive network adaptor, output channel is constituted between signal output module and corresponding Objunctive network adaptor.

Description

A kind of things-internet gateway of IP virtualizations conversion
Technical field
The present invention relates to agriculture Internet of Things, agricultural automation field, particularly a kind of Internet of Things net of IP virtualizations conversion Close.
Background technology
In conventional art, most of agricultural production still uses hand labor.Even the big production of mechanization, is also only The terminal links such as rice transplanting, watering and the harvesting of crops are rested on, lacks the automation solutions of integrated management.
Developing rapidly for technology of Internet of things, also further occurs in agriculture field, but existing agriculture technology of Internet of things In, a kind of mode that only one-to-one manipulation is individually connected, the layout structure of whole agricultural automation Internet of Things is relatively backward, Controlling network imperfection.
The content of the invention
Goal of the invention:The technical problems to be solved by the invention are directed to the deficiencies in the prior art, there is provided a kind of IP is virtual Change the things-internet gateway of conversion.
In order to solve the above-mentioned technical problem, the invention discloses a kind of things-internet gateway of IP virtualization conversions, including two It is individual while connecting the live network adapter of network adapter scheduler module, one of live network adapter is suitable for master network Orchestration, another live network adapter is standby network adapter;Network adapter scheduler module connects a data storage Module and at least two Objunctive network adaptors, each Objunctive network adaptor correspondence one data communication module of connection, its In at least one data communication module connection signal input module, another data communication module connection signal output module;Letter Number input module connection sensor, signal output module connection agricultural control facility;Signal input module and corresponding virtual net Input channel is constituted between network adapter, output channel is constituted between signal output module and corresponding Objunctive network adaptor;
The data communication module is used to dock the signal input module or signal output module of lower floor;Docking signal input During module, data communication module realizes the input data of collection sensor, and is carried out the application layer protocol of TCP/IP transmission Encapsulation;During to signal output module, the application layer protocol that TCP/IP is transmitted is parsed, parse corresponding control and refer to Order, and agricultural control facility is transferred to by signal output module;The data communication module is additionally operable to realize the clothes of TCP/IP The communication of business end pattern or client mode, during using service end pattern, data communication module binds corresponding virtual network Adapter, realizes a service end of TCP or UDP, and the outside platform or host computer application program in IP network are using visitor Family end pattern is accessed;During using client mode, data communication module sets up visitor corresponding with corresponding Objunctive network adaptor Family end, the outside platform in connection IP network or the service end in host computer, while the TCP/UDP links set up ensure data Stream sends or receives from corresponding Objunctive network adaptor;
The Objunctive network adaptor is used to input a signal into passage or signal output channels invent network adapter, The network adapter for fictionalizing has independent IP address, virtual mac address, and is mutually tied up with the live network adapter on upper strata Fixed, when being communicated with IP routing devices, the sensor of all input channel connections and the agricultural of output channel connection control facility Form an IP device with separate tP address;
The data memory module is used to store the network configuration information of each Objunctive network adaptor, network adapter binding Map information between the Objunctive network adaptor and live network adapter of module;Configuration information includes Objunctive network adaptor Device id, separate tP address, virtual mac address, gateway address, dns address, communication work mode, host computer or exterior flat The service end IP address and port information of platform.Objunctive network adaptor and live network adapter mappings relation table include gauge outfit and Literary name section:
Table Header information
Virtual network adapter device ID Live network adapter device ID Whether activate Activationary time
Literary name section explanation
Network adapter scheduler module is used to realize the mapping between Objunctive network adaptor and live network adapter;
The live network adapter is true Ethernet Adaptation Unit, for by gateway accessing IP network, realizing Internet of Things Physical connection and data transfer between the couple in router of gateway and outside IP network.
In the present invention, the signal input module is Analog input mModule or digital quantity input module, for that will pass Analog quantity or the digital quantity signal conversion of sensor are available for the digital information that data communication module is used;The signal output module is Switching value output module or digital output module, the control instruction stream compression for that will receive is turned to can be controlled to agricultural Set up and apply the switching value or digital quantity of implementing control.
In the present invention, Objunctive network adaptor virtualization is comprised the following steps:
The outside IP network of live network adapter connection;
Sensor is docked with corresponding signal input module, by agricultural control facility and corresponding signal output module pair Connect, configure the separate tP address of each self-corresponding Objunctive network adaptor, virtual mac address, gateway address, dns address and logical Letter working method, communication work mode includes service end pattern or client mode;
Data communication module corresponding with signal input module or signal output module is by the communication work mode for configuring Start service end or client;It is set to the data communication module of service end mode of operation, the service of the data communication module Independent IP on the corresponding Objunctive network adaptor of end binding, accesses IP network, for same IP network via live network adapter In other clients accessed with corresponding application layer protocol and transmit data;The data communication module of client is set to, should Data communication module is according in the outside platform of configuration or the service end IP address and corresponding Objunctive network adaptor of host computer Independent IP set up client, client sets up network linking, and IP network is accessed via live network adapter, and is connected to finger Determine the outside platform of IP address or the service end of host computer.
In the present invention, fault detection module, the fault detection module are provided between described two live network adapters Perform following steps:
IP network is accessed by master network adapter when initial, fault detection module timing initiates ping to IP routing devices Detection instruction;After IP routing devices receive ping instructions, in setting time(General setting time is 1~10s, the present invention It is preferred that 4s)Fault detection module ping return informations are replied, then fault detection module judges that master network adapter is working properly;Such as Fruit fault detection module does not receive ping return informations in setting time, then certain interval of time(General setting time is 1 ~10s, the present invention preferably 5s)Ping detection instructions are initiated again, if continuous 3 nothings receive ping return informations, failure Detection module assert that master network adapter breaks down;
Fault detection module sends failover instructions to network adapter scheduler module, and network adapter scheduler module connects I.e. startup separator transfer flow after receiving, comprises the following steps:
Network adapter scheduler module first sends to data memory module and asks, and inquires about the letter of all Objunctive network adaptors Breath(Information includes device id, separate tP address, virtual mac address, gateway address, dns address, communication work mode, host computer Or the service end IP address and port information of outside platform)And mapping relations, data memory module believes Objunctive network adaptor The mapping table for ceasing and being currently at state of activation returns to network adapter scheduler module;Network adapter scheduler module is prohibited Master network adapter is used, while enabling standby network adapter;After waiting standby network adapter to complete to enable, will be all virtual Network adapter is bound with standby network adapter, changes mapping relations, the live network adapter device in change mapping table ID is the device id of standby network adapter, and updates activationary time for current time, mapping relations are state of activation;Complete After mapping relations modification, sent to data memory module and preserve instruction, data memory module preserves amended virtual network and fits Orchestration mapping relations, and return to confirmation message;Network adapter scheduler module sends failure transfer and completes to fault detection module Message, and to data communication module send instruct, it is desirable to restart communication work mode;Pending data communication module restarts end Afterwards, it is all set up with data communication module link, by correspondence Objunctive network adaptor, be connected into by standby network adapter IP network.
Heretofore described things-internet gateway reports sensing data to the system platform or host computer in IP network, including Following steps:
After things-internet gateway starts, the binding of Objunctive network adaptor and live network adapter is carried out;
Data communication module presses configuration information(Configuration information includes separate tP address, gateway address, dns address, communication work Make the service end IP address and port information of mode, host computer or outside platform), start service end or client;
Data communication module timing sends acquisition instructions to signal input module, and signal input module is to data communication module Return to the digital information of respective sensor;
Data communication module carries out application layer protocol encapsulation to digital information, in determining message header according to sensor type Message is instructed, and message numbering is that last message numbering adds 1, using the data message of sensor as message body, by message header and The data block step-by-step of message body composition carries out XOR and is calculated check code, and message header, message body and check code order are spelled Connect, and flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;
Data communication module is by number after the TCP/IP link transmissions encapsulation set up with system platform or host computer According to bag;
After system platform or host computer receive data, carry out application layer protocol parsing, parse message header, message body and Check code, carries out XOR and is calculated check code to the data block step-by-step that message header, message body constitute, and confirms former check code and life Into check code uniformity after, you can message instruction is obtained from message header and obtains sensing data type, from message body To corresponding digital information.
System platform or host computer in the present invention in IP network issue control instruction to things-internet gateway, including following Step:
Start things-internet gateway, carry out the binding of Objunctive network adaptor and live network adapter;
All data communication modules corresponding with signal output channels press configuration information(Configuration information includes independent IP ground The service end IP address and port information of location, gateway address, dns address, communication work mode, host computer or outside platform), open Dynamic service end or client operation pattern;
System platform or host computer control the title of facility or set according to existing IP device information table by agricultural The IP address of standby ID retrievals agricultural control facility and port, are set up by TCP/IP service ends or client and are set with agricultural control The TCP/IP links applied;
IP device information table includes gauge outfit and literary name section:
Table Header information
Device id Device name IP address Port numbers
Literary name section explanation
Field name Type Remarks
Device id Text-type The unique mark of equipment, for distinguishing different equipment
Device name Text-type Equipment literal name
IP address Text-type The IP address of equipment
Port numbers Numeric type The port numbers of equipment
System platform or host computer carry out application layer protocol encapsulation to the control instruction of agricultural control facility, according to agricultural Control establishment type determines the message instruction in message header, and message numbering is that last message numbering adds 1, using control instruction as Message body, carries out the data block step-by-step that message header and message body constitute XOR and is calculated check code, by message header, message Body, check code sequential concatenation, and flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;
System platform or host computer are by after the TCP/IP link transmissions encapsulation set up with agricultural control facility Control instruction data;
After data communication module receives data, application layer protocol parsing is carried out, parse message header, message body and verification Code, carries out XOR and is calculated check code to the data block step-by-step that message header, message body constitute, and confirms former check code and generation After the uniformity of check code, you can message instruction is obtained from message header and obtains agricultural control establishment type, from message body To corresponding control instruction;
The control instruction that data communication module will be parsed is sent to corresponding signal output module;
Control instruction is converted into switching value or digital quantity by signal output module, and is exported and given agricultural control facility, i.e., Realize the control to agricultural control facility.
Beneficial effect:The present invention has the beneficial effect that:
1st, sensing equipment and be transparence during agricultural control facility facing external IP network, with independent IP, convenient pipe Reason, real-time control effect are good.
2nd, shifted with reference to double gateways and failure, improve reliability of the IP device of simulation in overall sensing network.
Brief description of the drawings
The present invention is done with reference to the accompanying drawings and detailed description further is illustrated, it is of the invention above-mentioned And/or otherwise advantage will become apparent.
Fig. 1 is embodiment general illustration.
Fig. 2 normally virtualizes workflow diagram for embodiment.
Fig. 3 is embodiment failure transfer flow figure.
Fig. 4 is embodiment data is activation flow chart.
Fig. 5 is embodiment data receiver flow chart.
Fig. 6 is embodiment gateway configuration flow figure.
Specific embodiment
Embodiment
As shown in Fig. 1 system architecture general illustrations, gateway of the invention by route connection IP network, plateform system or Person's host computer connects IP network simultaneously, and the sensor and agricultural that are connected to gateway of the invention by IP network, route are controlled Facility is inquired about or controlled.
The IP of the present embodiment virtualizes the things-internet gateway of conversion, including two connect network adapter scheduler module simultaneously Live network adapter, one of live network adapter 1 be main network adapter, another live network adapter 2 It is standby network adapter;Network adapter scheduler module connects a data memory module and 4 Objunctive network adaptors, Each Objunctive network adaptor correspondence one data communication module of connection, wherein, Objunctive network adaptor 1 is sequentially connected data and leads to Letter module 1, Analog input mModule and sensors A, it is defeated that Objunctive network adaptor 2 is sequentially connected data communication module 2, digital quantity Enter module and sensor B, Objunctive network adaptor 3 is sequentially connected data communication module 3, digital output module and agricultural control Set up and apply A, Objunctive network adaptor 4 is sequentially connected data communication module 4, switching value output module and agricultural control facility B; Input channel, signal output module and corresponding virtual network are constituted between signal input module and corresponding Objunctive network adaptor Output channel is constituted between adapter;
Analog input, digital quantity input/output module, switching value output module:It is respectively corresponding circuit module, uses Processed in the analog quantity/digital quantity to outside input, be converted into the digital information for being available for data communication module to use, or Digital information to the transmission of data communication mould is converted into the digital quantity or switching value that can implement control to agricultural control facility.
Data communication module:Software module.Major function includes two aspects, and one is the input/output module for docking lower floor. During docking input module, the input data of collection sensor is realized, and carried out the encapsulation of application layer protocol.Docking output mould During block, the application layer protocol that TCP/IP is transmitted is parsed, parsed corresponding control instruction, and transmit by output module Give agricultural control facility.Second function is the communication function of the service end pattern or client mode for realizing TCP/IP.Adopt During with service end pattern, corresponding Objunctive network adaptor is bound, a service end of TCP or UDP is realized, in IP network Outside platform or host computer application program are accessed using client mode.During using client mode, set up and corresponding void Intend the corresponding client of network adapter, the outside platform in connection IP network or the service end in host computer, while setting up TCP/UDP link ensure data flow send or receive from corresponding Objunctive network adaptor.
The present embodiment application layer protocol is as follows:
(1)Full message
Table 1
Flag Message header Message body Check bit Flag
(2)Message header
Table 2
Message is instructed The instruction code of message concrete function is identified, such as temperature is reported, and illumination is reported
Message SN The numbering of order behind mark message pass
Data encryption mode Identify whether encryption, and cipher mode
Message body length Identify the length of message body
(3)Check bit
Table 3
Message header Message body
Above two parts are carried out with step-by-step XOR successively, a check code is ultimately produced.
Objunctive network adaptor:It is responsible for for input and output channel inventing specific Objunctive network adaptor, has it There are the network informations such as independent IP address, virtual mac address.And mutually bound with the live network adapter on upper strata, from IP routes From the point of view of in equipment, the external equipment of all input/output passages is to become an IP device with separate tP address.
Data memory module:Store the network configuration information of each Objunctive network adaptor, Objunctive network adaptor and true Map information between network adapter etc..
Network adapter scheduler module:Reflecting between Objunctive network adaptor and live network adapter is realized by software Penetrate.Coordinate with fault detection module and data memory module, realize the automatic transfer of failure.
The present embodiment Objunctive network adaptor includes with live network adapter mappings relation table:
Table Header information
Virtual network adapter device ID Live network adapter device ID Whether activate Activationary time
Literary name section explanation
Fault detection module:It is responsible for carrying out ping detections to live network adapter, when a fault is found, triggering network is fitted The mapping change of orchestration scheduler module, realizes failover functionality.
Live network adapter:True Ethernet Adaptation Unit and corresponding bottom layer driving.
Plateform system:Software platform or application system under same IP network.
As shown in Fig. 2 the normal virtualization workflow of the present embodiment is comprised the following steps:
The live network adapter of things-internet gateway connects IP network.By sensor or agricultural control facility and Internet of Things The input/output interface docking of gateway(Such as access A1 ports).The configuration flow to A1 ports is completed, after configuration terminates, Internet of Things Net gateway can be started the service end or client of the passage by the communication work mode of configuration.A1 ports are such as set to service After the mode of operation of end, the service end of A1 ports binds the independent IP on corresponding Objunctive network adaptor, via true net Network adapter accesses IP network, and from the point of view of the miscellaneous equipment of IP network, agricultural control facility becomes one has independent IP ground The IP device of location, while run service end, the upper client of the miscellaneous equipment being available in same IP network is specifically applying Layer protocol is accessed and transmits data.
As shown in figure 3, the present embodiment failure transfer flow comprises the following steps:
The application employs double live network adapters, is coordinated using fault detection module and network adapter scheduler module Mode, when upper strata IP routing devices port failure or this things-internet gateway live network adaptor interface or netting twine failure Failure transfer.Key step is as follows:
This gateway accesses IP network by live network adapter 1 when initial, and fault detection module timing sets to IP routes It is standby(Such as IP gateway)Initiate ping detection instructions.Under normal circumstances, after IP routing devices receive ping instructions, the meeting in 4 seconds Postback ping return informations, including byte, duration, TTL information.When the netting twine of the connection of true network adapter 1 breaks down, Fault detection module cannot receive the ping return informations of IP routing devices return in 4 seconds, then ping is initiated in 5 seconds in interval again Detection instruction, if send for continuous 3 times cannot all receive ping replies, fault detection module assert that failure occurs.
Fault detection module sends failover instructions to network adapter scheduler module, and network adapter scheduler module connects I.e. startup separator transfer flow after receiving.First sent to data memory module and asked, it is desirable to inquire about all Objunctive network adaptors Information and mapping relations, data memory module is by Objunctive network adaptor information and the mapping relations for being currently at state of activation Table returns to network adapter scheduler module;Network adapter scheduler module disables master network adapter, while enabling standby net Network adapter;After waiting standby network adapter to complete to enable, all Objunctive network adaptors and standby network adapter are tied up It is fixed, mapping relations are changed, the live network adapter device ID in change mapping table is the device id of standby network adapter, and And activationary time is updated for current time, mapping relations are state of activation.Network adapter scheduler module disabling live network is fitted Orchestration 1, while enabling live network adapter 2.After waiting live network adapter 2 to complete to enable, all virtual networks are changed The configuration information of adapter, it is bound with live network adapter 2.After completing mapping relations renewal, to data memory module Send and preserve instruction, data memory module preserves the Objunctive network adaptor mapping relations of new configuration, and returns to confirmation message.
Network adapter scheduler module sends the message that failure transfer is completed to fault detection module, and to data communication mould Block sends instruction, it is desirable to restart service end or client.
After restarting and terminating, linking for all foundation with data communication module will be by Objunctive network adaptor, by true Real network adapter 2 is connected into IP network.
As shown in figure 4, things-internet gateway described in the present embodiment reports biography to the system platform or host computer in IP network Sense data, comprise the following steps:
Data is activation flow is mainly things-internet gateway and reports sensing number to the system platform or host computer in IP network According to.Assuming that with the service end for thering is operation in a system platform, and system platform to have TCP/UDP in an IP network.
After things-internet gateway starts, the binding of Objunctive network adaptor and live network adapter is completed first.
Data communication module presses configuration information, starts service end or client.Such as by taking client operation pattern as an example, open After dynamic client, the corresponding IP address of Objunctive network adaptor will be bound, now from IP network, input channel by It is modeled to an IP device with separate tP address.Serviced on the client connection system platform that data communication module starts End, sets up TCP/IP links therewith.
Data communication module timing is to input module(By taking Analog input mModule as an example)Acquisition instructions are sent, analog quantity is defeated Enter module after analog-to-digital conversion etc. changes, a digital information is returned to data communication module(Such as temperature value).
Data communication module carries out application layer protocol encapsulation to digital information, in determining message header according to sensor type Message is instructed, and message numbering is that last message numbering adds 1, using the data message of sensor as message body, by message header and The data block step-by-step of message body composition carries out XOR and is calculated check code, and message header, message body and check code order are spelled Connect, and flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;
Data communication module is by number after the TCP/IP link transmissions encapsulation set up with system platform or host computer According to bag;
After system platform or host computer receive data, carry out application layer protocol parsing, parse message header, message body and Check code, carries out XOR and is calculated check code to the data block step-by-step that message header, message body constitute, and confirms former check code and life Into check code uniformity after, you can message instruction is obtained from message header and obtains sensing data type, from message body To corresponding temperature data.
As shown in figure 5, the system platform or host computer in the present embodiment IP network issue control and refer to things-internet gateway Order, comprises the following steps:
The system platform or host computer that data receiver flow is mainly directed towards in IP network issue control to things-internet gateway Instruction.After things-internet gateway starts, the binding of Objunctive network adaptor and live network adapter is completed first.
Assuming that having connect a Fans on the output channel B1 of things-internet gateway.It is corresponding with output channel B1 on things-internet gateway Data communication module press configuration information, start service end or client.By taking service end mode of operation as an example, start service end (S1)Afterwards, the corresponding IP address of Objunctive network adaptor will be bound, now from IP network, corresponding output channel is It is modeled into an IP device with separate tP address.
System platform or host computer control the title of facility by agricultural according to existing IP device information table(Blower fan) Or device id retrieval agricultural control facility IP address and port, and start client set up with controlled device service end S1 it Between TCP/IP links.
The present embodiment IP device information table includes:
Table Header information
Device id Device name IP address Port numbers
Literary name section explanation
Field name Type Remarks
Device id Text-type The unique mark of equipment, for distinguishing different equipment
Device name Text-type Equipment literal name
IP address Text-type The IP address of equipment
Port numbers Numeric type The port numbers of equipment
System platform or host computer carry out application layer protocol encapsulation to the control instruction of agricultural control facility, according to agricultural Control establishment type determines the message instruction in message header, and message numbering is that last message numbering adds 1, using control instruction as Message body, carries out the data block step-by-step that message header and message body constitute XOR and is calculated check code, by message header, message Body, check code sequential concatenation, and flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;System Control instruction data of the system platform after the TCP/IP link transmissions that service end S1 sets up with agricultural control facility are encapsulated;
After data communication module receives data, application layer protocol parsing is carried out, parse message header, message body and verification Code, carries out XOR and is calculated check code to the data block step-by-step that message header, message body constitute, and confirms former check code and generation After the uniformity of check code, you can it is blower fan message instruction to be obtained from message header and obtains controlled agricultural facility, from message body Obtain corresponding control instruction;
Control instruction is converted into switching value by output module, and exports fan, that is, implement the control to blower fan.
The message instruction in message header is determined according to sensor type and agricultural control establishment type:
Message instructs value comparison table:
As shown in fig. 6, the present embodiment gateway configuration flow comprises the following steps:
Device id, separate tP address, virtual mac address, gateway address, the dns address of Objunctive network adaptor are set.Solely Vertical IP, gateway address, dns address can automatically be obtained or set by hand using DHCP.
After setting up the IP information of Objunctive network adaptor, the working method of configuration data communication module, such as using service Hold mode of operation or use client operation pattern, if using client operation pattern, it is necessary to configure host computer or outside The service end IP address and port information of platform.
According to the attribute of input/output module corresponding with Objunctive network adaptor, selection parameter configuration template is set defeated Enter sample frequency, the acquisition interval of module.
Preserve all configuration informations.
After preserving configuration information, by the mode of operation that data communication module sets, the service in log-on data communication module End or client.
The invention provides a kind of things-internet gateway of IP virtualization conversions, method and the way of the technical scheme are implemented Footpath is a lot, and the above is only the preferred embodiment of the present invention, it is noted that for those skilled in the art For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications should also be regarded It is protection scope of the present invention.Each part being not known in the present embodiment can use prior art to be realized.

Claims (5)

1. the things-internet gateway that a kind of IP virtualizations are changed, it is characterised in that connect network adapter scheduling simultaneously including two The live network adapter of module, one of live network adapter is main network adapter, another live network adaptation Device is standby network adapter;Network adapter scheduler module connects a data memory module and at least two virtual networks Adapter, each Objunctive network adaptor correspondence one data communication module of connection, wherein at least one data communication module connects Connect signal input module, at least one data communication module connection signal output module;Signal input module connects sensor, letter Number output module connection agricultural control facility;Input is constituted between signal input module and corresponding Objunctive network adaptor logical Road, output channel is constituted between signal output module and corresponding Objunctive network adaptor;
The data communication module is used to dock the signal input module or signal output module of lower floor;Docking signal input module When, data communication module realizes the input data of collection sensor, and is carried out the envelope of the application layer protocol of TCP/IP transmission Dress;During docking signal output module, the application layer protocol that TCP/IP is transmitted is parsed, is parsed corresponding control instruction, And agricultural control facility is transferred to by signal output module;The data communication module is additionally operable to realize the service end of TCP/IP The communication of pattern or client mode, during using service end pattern, data communication module binds corresponding virtual network adaptation Device, realizes a service end of TCP or UDP, and outside system platform or host computer application program are used in IP network TCP/UDP client modes are accessed;During using client mode, data communication module is set up and corresponding Objunctive network adaptor Corresponding client, the outside platform in connection IP network or the TCP/UDP service ends in host computer, while the TCP/ for setting up UDP links ensure that data flow sends or receive from corresponding Objunctive network adaptor;
The Objunctive network adaptor is used to input a signal into passage or signal output channels invent network adapter, virtually The network adapter for going out has independent IP address, virtual mac address, and is mutually bound with the live network adapter on upper strata, When being communicated with IP routing devices, the sensor of each input channel connection and the agricultural control facility of output channel connection form one The individual IP device with separate tP address;
The data memory module is used to storing the network configuration information of each Objunctive network adaptor, Objunctive network adaptor with it is true Map information between real network adapter;
Network adapter scheduler module is used to realize the mapping between Objunctive network adaptor and live network adapter;
The live network adapter is true Ethernet Adaptation Unit, for by gateway accessing IP network, realizing things-internet gateway And physical connection and data transfer between the couple in router of outside IP network;
The signal input module is Analog input mModule or digital quantity input module, for by the analog quantity of sensor or Digital quantity signal conversion is available for the digital information that data communication module is used;The signal output module is switching value output module Or digital output module, the control instruction stream compression for that will receive is turned to can implement control to agricultural control facility Switching value or digital quantity.
2. the things-internet gateway that a kind of IP virtualizations according to claim 1 are changed, it is characterised in that virtual network is adapted to Device virtualization is comprised the following steps:
The outside IP network of live network adapter connection;
Sensor is docked with corresponding signal input module, agricultural control facility is docked with corresponding signal output module, Configure separate tP address, virtual mac address, gateway address, dns address and the communication work of each self-corresponding Objunctive network adaptor Make mode, communication work mode includes service end pattern or client mode;
Data communication module corresponding with signal input module or signal output module is started by the communication work mode of configuration Service end or client;The data communication module of service end mode of operation is set to, the service end of the data communication module is tied up Independent IP on fixed corresponding Objunctive network adaptor, accesses IP network, in same IP network via live network adapter Other clients are accessed with corresponding application layer protocol and transmit data;The data communication module of client is set to, the data Communication module is according to only in the outside platform of configuration or the service end IP address and corresponding Objunctive network adaptor of host computer Vertical IP sets up client, and client sets up network linking, accesses IP network via live network adapter, and be connected to specified IP The outside platform of address or the service end of host computer.
3. the things-internet gateway that a kind of IP virtualizations according to claim 2 are changed, it is characterised in that described two true Fault detection module is provided between network adapter, the fault detection module performs following steps:
IP network is accessed by master network adapter when initial, fault detection module timing is initiated ping and detected to IP routing devices Instruction;After IP routing devices receive ping instructions, fault detection module ping return informations are replied in setting time, then event Barrier detection module judges that master network adapter is working properly;If fault detection module does not receive ping in setting time and returns Complex information, then initiate ping detection instructions again after certain interval of time, if continuous 3 nothings receive ping return informations, Fault detection module assert that master network adapter breaks down;
Fault detection module sends failover instructions to network adapter scheduler module, and network adapter scheduler module is received It is afterwards startup separator transfer flow, comprises the following steps:
Network adapter scheduler module first sends to data memory module and asks, inquire about all Objunctive network adaptors information and Mapping relations, data memory module returns to Objunctive network adaptor information with the mapping table for being currently at state of activation Network adapter scheduler module;Network adapter scheduler module disables master network adapter, while enabling standby network adapter; After waiting standby network adapter to complete to enable, all Objunctive network adaptors and standby network adapter are bound, modification is reflected Relation is penetrated, the live network adapter device ID in change mapping table is the device id of standby network adapter, and updates sharp Live time is current time, mapping relations are state of activation;After completing mapping relations modification, sent to data memory module and preserved Instruction, data memory module preserves amended Objunctive network adaptor mapping relations, and returns to confirmation message;Network adapter Scheduler module sends the message that failure transfer is completed to fault detection module, and sends instruction to data communication module, it is desirable to weight Working method is believed in unblank;After pending data communication module restarts end, it is all set up with data communication module link, by correspondingly Objunctive network adaptor, IP network is connected into by standby network adapter.
4. the things-internet gateway that a kind of IP virtualizations according to claim 3 are changed, it is characterised in that the Internet of Things net Close and report sensing data to the system platform or host computer in IP network, comprise the following steps:
After things-internet gateway starts, the binding of Objunctive network adaptor and live network adapter is carried out;
Data communication module presses configuration information, starts service end or client operation pattern;
Data communication module timing sends acquisition instructions to signal input module, and signal input module is returned to data communication module The digital information of respective sensor;
Data communication module carries out application layer protocol encapsulation to digital information, and the message in message header is determined according to sensor type Instruction, message numbering is that last message numbering adds 1, using the data message of sensor as message body, by message header and message The data block step-by-step of body composition carries out XOR and is calculated check code, by message header, message body and check code sequential concatenation, and And flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;
Data communication module is by packet after the TCP/IP link transmissions encapsulation set up with system platform or host computer;
After system platform or host computer receive data, application layer protocol parsing is carried out, parse message header, message body and verification Code, carries out XOR and is calculated check code to the data block step-by-step that message header, message body constitute, and confirms former check code and generation After the uniformity of check code, you can message instruction is obtained from message header and obtains sensing data type, phase is obtained from message body The digital information answered.
5. the things-internet gateway that a kind of IP virtualizations according to claim 3 are changed, it is characterised in that be in IP network System platform or host computer issue control instruction to things-internet gateway, comprise the following steps:
Start things-internet gateway, carry out the binding of Objunctive network adaptor and live network adapter;
All data communication modules corresponding with signal output channels press configuration information, start service end or client operation mould Formula;
System platform or host computer control the title or device id of facility by agricultural according to existing IP device information table The IP address of retrieval agricultural control facility and port, are set up and agricultural control facility by TCP/IP service ends or client TCP/IP links;
System platform or host computer carry out application layer protocol encapsulation to the control instruction of agricultural control facility, according to agriculture control Establishment type determines the message instruction in message header, and message numbering is that last message numbering adds 1, using control instruction as message Body, carries out the data block step-by-step that message header and message body constitute XOR and is calculated check code, by message header, message body, school A yard sequential concatenation is tested, and flag is added before and after spliced data block, that is, complete application layer protocol encapsulation;
System platform or host computer are by the control after the TCP/IP link transmissions encapsulation set up with agricultural control facility Director data;
After data communication module receives data, application layer protocol parsing is carried out, parse message header, message body and check code, it is right Message header, the data block step-by-step of message body composition carry out XOR and are calculated check code, confirm the verification of former check code and generation After the uniformity of code, you can message instruction is obtained from message header and obtains agricultural control establishment type, phase is obtained from message body The control instruction answered;
The control instruction that data communication module will be parsed is sent to corresponding signal output module;
Control instruction is converted into switching value or digital quantity by signal output module, and is exported to agriculture control facility, that is, realize Control to agricultural control facility.
CN201410153958.4A 2014-04-16 2014-04-16 A kind of things-internet gateway of IP virtualizations conversion Expired - Fee Related CN103957242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410153958.4A CN103957242B (en) 2014-04-16 2014-04-16 A kind of things-internet gateway of IP virtualizations conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410153958.4A CN103957242B (en) 2014-04-16 2014-04-16 A kind of things-internet gateway of IP virtualizations conversion

Publications (2)

Publication Number Publication Date
CN103957242A CN103957242A (en) 2014-07-30
CN103957242B true CN103957242B (en) 2017-06-20

Family

ID=51334465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410153958.4A Expired - Fee Related CN103957242B (en) 2014-04-16 2014-04-16 A kind of things-internet gateway of IP virtualizations conversion

Country Status (1)

Country Link
CN (1) CN103957242B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528289B (en) * 2015-09-15 2020-10-23 南京中兴软件有限责任公司 Resource operation processing method and device
CN105245387A (en) * 2015-10-26 2016-01-13 华为技术有限公司 Method and system for processing message
CN106533700B (en) * 2016-10-31 2021-03-02 新华三技术有限公司 Method and device for realizing interface function
CN111049823B (en) * 2019-12-10 2022-08-30 浩云科技股份有限公司 Physical isolation transmission equipment and method based on two-dimension code
CN112165735B (en) * 2020-09-26 2021-06-11 杭州雅观科技有限公司 Cloud-integrated Wi-Fi device ad hoc network method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009029774A1 (en) * 2007-08-31 2009-03-05 Andrew Corporation System and method for management and administration of repeaters and antenna systems
CN101867530A (en) * 2010-05-31 2010-10-20 西安电子科技大学 Things-internet gateway system based on virtual machine and data interactive method
CN103326936A (en) * 2012-03-21 2013-09-25 刘广勤 Multi-protocol gateway of Internet of Things allowing unified access of various heterogeneous sensing layer networks
CN103391325A (en) * 2013-07-30 2013-11-13 李想 Network operating system device and method for Internet of Things

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8761050B2 (en) * 2011-10-04 2014-06-24 Advanergy, Inc. Network integration system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009029774A1 (en) * 2007-08-31 2009-03-05 Andrew Corporation System and method for management and administration of repeaters and antenna systems
CN101867530A (en) * 2010-05-31 2010-10-20 西安电子科技大学 Things-internet gateway system based on virtual machine and data interactive method
CN103326936A (en) * 2012-03-21 2013-09-25 刘广勤 Multi-protocol gateway of Internet of Things allowing unified access of various heterogeneous sensing layer networks
CN103391325A (en) * 2013-07-30 2013-11-13 李想 Network operating system device and method for Internet of Things

Also Published As

Publication number Publication date
CN103957242A (en) 2014-07-30

Similar Documents

Publication Publication Date Title
CN103957242B (en) A kind of things-internet gateway of IP virtualizations conversion
CN103166858B (en) A kind of message transmitting method and equipment
CN104243265B (en) A kind of gateway control method, apparatus and system based on virtual machine (vm) migration
CN106161248B (en) Message forwarding method and device in a kind of VXLAN network
CN105159256B (en) A kind of intelligent home control system based on Web service
CN102739541B (en) The method, apparatus and system of a kind of routing function startup and transfer of data
CN103401754A (en) Stack link establishing method, equipment and system
CN103685006A (en) Packet forwarding method for edge device and edge device
CN109005562A (en) Transmit the methods, devices and systems of data
CN101001196A (en) Method and device for setting pseudo-line tunnel and transmitting message using it
CN105025044A (en) Device control method and device control system
CN110519075A (en) The communication system and method for physical host and virtual cloud host based on SDN
CN105591868A (en) Virtual private network VPN access method and device
CN106549790A (en) A kind of update method of mapping table and device for tracing to the source
CN110460684A (en) The broadcast domain partition method and device of VXLAN same network segment
CN107241255A (en) A kind of network merging method and system and router
CN104202398B (en) The method of remote control, apparatus and system
CN106131028A (en) A kind of data transmission method of Free-port communication gateway
CN106993066A (en) A kind of method for transmitting data, apparatus and system
CN106443166A (en) Meter reading system based on IoT (Internet of Things) platform
CN103685007B (en) A kind of mac learning method when edge device message forwards and edge device
CN111683371A (en) Intelligent household appliance network distribution method, intelligent household appliance, mobile terminal and medium
CN102045233B (en) Method and device for controlling message forwarding in network communication
CN206313803U (en) A kind of router for realizing network game acceleration
CN105933235B (en) Data communications method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170620

Termination date: 20210416

CF01 Termination of patent right due to non-payment of annual fee