CN102437951A - Method for managing GPRS communication dynamic IP - Google Patents

Method for managing GPRS communication dynamic IP Download PDF

Info

Publication number
CN102437951A
CN102437951A CN2011103592248A CN201110359224A CN102437951A CN 102437951 A CN102437951 A CN 102437951A CN 2011103592248 A CN2011103592248 A CN 2011103592248A CN 201110359224 A CN201110359224 A CN 201110359224A CN 102437951 A CN102437951 A CN 102437951A
Authority
CN
China
Prior art keywords
message
dtu
port numbers
scada
data
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.)
Pending
Application number
CN2011103592248A
Other languages
Chinese (zh)
Inventor
董金奎
栾桂勇
汪卫东
戚克明
隋永东
张广峰
焦学智
张凤芝
王冠军
孟宪禹
徐玉峰
徐小粝
戴春田
郑平
张忠华
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Gold Mining (laizhou) Co Ltd Jiaojia Gold Mine
Original Assignee
Shandong Gold Mining (laizhou) Co Ltd Jiaojia Gold Mine
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 Shandong Gold Mining (laizhou) Co Ltd Jiaojia Gold Mine filed Critical Shandong Gold Mining (laizhou) Co Ltd Jiaojia Gold Mine
Priority to CN2011103592248A priority Critical patent/CN102437951A/en
Publication of CN102437951A publication Critical patent/CN102437951A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for managing a GPRS communication dynamic IP. Whether a DTU (Data Terminal Unit) is communicated with an SCADA (Supervisory Control And Data Acquisition) by adopting any protocol, an IP and a port number of a corresponding DTU are extracted in a network directly at an SCADA end, six bytes of the IP and the port number are added to a header of a protocol message; the added message is provided for a protocol processing layer, the IP and the port number are stored in an array in the protocol processing layer, the IP and the port number are added to the tail part of the message when a message request is sent, and sent to a sharing memory, and a processing program of a TCP/IP (Transmission Control Protocol) receives the message and then takes the IP and the port number out and then places the IP and the port number to a sent destination address to be sent together. No matter what changing, the IP and the port number can be captured by the method and stored in the array, data loss is not worried, thus security of data is ensured, stability of receiving and transmitting the data is improved, and transmission efficiency is increased.

Description

The management method of GPRS communication dynamic IP
Technical field
The management method of dynamic IP when the present invention relates to carry out communication with GPRS belongs to the industrial control automation field.
Background technology
GPRS is that the English of GPRS (General Packet Radio Service) is called for short, and is that a kind of new packet data bearers is professional.The circuit switched data load mode of the dial mode of original relatively GSM, GPRS is a packet-switch technology, has the advantage of " real-time online ", " chargeing according to quantity ", " quick login ", " high-speed transfer ", " switching freely ".It has broken through the GSM net can only provide the Circuit-switched mode of thinking; Only through increasing the function corresponding entity and existing base station system being carried out the part transformation realize packet switching; The input of this transformation is also little comparatively speaking, but the user data rate that obtains is considerable.
GPRS is a kind of data transmission technology that is the basis with global cell phone system (GSM), the continuity of the GSM that can say so.GPRS is continuously different in the mode of channel transmission with in the past, is to transmit with package (Packet) formula, so the expense that the user bore is to calculate with its data transmission unit, is not its whole channel of use, and is comparatively cheap in theory.
Another characteristics of GPRS are exactly that its transmission rate can be promoted to 56 even 114Kbps.And, because no longer need the needed intermediary of existing wireless application transducer, all can be more convenient easy so connect and transmit.The GPRS mobile data services can provide abundant application service for the user, as: (1) Mobile business: comprise mobile banking, move financing, move transaction (stock, lottery ticket) etc.(2) mobile information service: information on demand, weather, tourism, service, Yellow Page, news and advertisement etc.(3) mobile Internet business: web page browsing, Email etc.(4) centrex service: mobile office chamber, portable medical etc.(5) location-based business: position enquiring, restaurant and the navigation of similar service industry etc.(6) multimedia service: video telephone, multimedia messages transmission, network gaming, music, look screen program request etc.(7) utilize the GPRS platform development to go out the wireless information terminal product of much more more remote controls of serving every profession and trade, remote measurement, transfer of data.
The GPRS mechanics of communication is adopted in the place that disperses in collection points such as gas ductwork, mine, harbour, integrated mills, can be with data upload such as ammeter, flowmeter, temperature, pressure on the SCADA system; But because the difference of the communication modes that adopts; The processing mode of SCADA system is also different, generally adopt the mode of DTU distribution dynamic IP, but this mode just need have individual data service centres (DSC) at dispatching terminal; This data service center will with dynamic IP be transformed into fixedly IP again with the SCADA system communication; This communication modes is very big to the DSC dependence, in case DSC goes wrong, then the communication meeting is interrupted; Therefore the collection of data depends on reliable, the stable communication of GPRS, during with the GPRS communication management of dynamic IP is played important effect to the operational efficiency and the reliability of system.The following mode of the general employing of prior art:
Adopt data service center: because the IP of DTU is dynamic change, so increase a data service centre software at dispatching terminal, this data service center is responsible for receiving with udp protocol the data of DTU, and with ICP/IP protocol and SCADA communication.To configure with the udp port of DTU communication at data service center; Port numbers with the SCADA communication also need be set ID number of each DTU, such as ID number of DTU be 13812345678 and the port of SCADA communication be made as 50001; All ports all are unique, can not be identical.
After data service center sets, the parameter among the DTU is set again, one 11 ID will be set among each DTU, this ID is unique in the whole network, and the port numbers of data service center also is arranged among the DTU.Can be initiatively after DTU powers on send heartbeat message to the port of data service center, IP, the port numbers with public network arranged in this message ID number of DTU, data service center can be handled message after receiving the heartbeat frame of DTU, and shows that this DTU reaches the standard grade.
Data service center is as the server end of TCP/IP, and the SCADA system is as client, and the SCADA system can send communication packet to the corresponding port after carrying out successful connection with data service center; After data service center receives the message of SCADA; According to port that is provided with and the relation of ID, with being dealt on the DTU after this message packing, DTU handles after receiving message again; Data are re-send to data service center; The message that data service center will receive is delivered on the corresponding port according to the incidence relation of ID and port numbers and is sent, and SCADA receives data and handles, and accomplishes reception, the process of transmitting of one whole.
This processing method more complicated, many failsafe links, and also efficient is also low.The main forwarding that relies on data service center, bad or withdraw from unusually if the data service center program is compiled, then data can not receive fully.Such processing mode makes data can not upload to the SCADA system in real time, apace, if the on-the-spot problem that anomalous event is arranged or need fast processing then can not in time be reflected on the supervisory control system, can have a negative impact to the production of safety and stability.
Industrial automation system is a real-time system, and the data of control points such as gas ductwork, mine, harbour are delivered to the SCADA system on needing accurately, and trouble signal more should be sent in the active, improves transmission stability as far as possible.Existing mode is being sent data, can occurred the phenomenon stagnating, delay time when receiving data, and many processing links, and safety in production is formed potential risk.
Summary of the invention
Technical problem to be solved by this invention is; A kind of management method of GPRS communication dynamic IP is provided; In the process of SCADA system and the communication of GPRS mode, GPRS communication dynamic IP is directly managed GPRS mode communication stable higher; Safety of data is better, and efficiency of transmission is higher.
In order to address the above problem, the present invention has adopted following technical scheme.
The management method of GPRS communication dynamic IP; It is characterized in that: no matter DTU adopts what stipulations and SCADA communication; Directly in network, extract IP and the port numbers of corresponding DTU at SCADA end, and with this IP address and port numbers totally six bytes be added to the head of stipulations message; Message after the increase offers the stipulations processing layer again; In the stipulations processing layer, IP and port are saved in the array; When sending message request this IP and port numbers be added to the afterbody of message, send in the shared drive, the handling procedure of TCP/IP receives behind this group message IP and port numbers taking-up; And be put in the destination address of transmission, send together.
Good effect of the present invention is: no matter DTU adopts what stipulations and SCADA communication; Do not use the mode of data service center; Directly in network, extract IP and the port numbers of corresponding DTU at SCADA end, and with this IP and port numbers totally six bytes be added to the head of stipulations message.Message after the increase offers the stipulations processing layer again; In the stipulations processing layer, IP and port are saved in the array, when sending message request this IP and port numbers are added to the afterbody of message, send in the shared drive; The handling procedure of TCP/IP after receiving this group message takes out IP and port numbers; And be put in the destination address of transmission, send together, take a kind of dynamic IP of efficient stable, the way to manage of port numbers; Improve the stability of GPRS mode communication, also got rid of hidden danger.
For adopting the GPRS communication modes, concerning each DTU, IP and port numbers are dynamic changes; Send or receive actual message after can add a layer again or subtract a layer, so no matter how IP and port numbers change, the present invention can capture; And can be saved in the array, not worry that data can lose, guarantee safety of data; Improve data and sent out the stability of receipts, thereby improved efficiency of transmission.
Description of drawings
Fig. 1 handles to adopt the message of GPRS mode communication dynamic IP to send, receive schematic flow sheet.
Embodiment
Further specify the present invention below in conjunction with accompanying drawing and specific embodiment.
Like Fig. 1, one 11 ID is set among the DTU, this ID is unique in the whole network; And the port of setting and SCADA communication, after reaching the standard grade, sends DTU a heartbeat frame earlier, and the TCP/IP treatment progress of the SCADA of main website calls recvfrom () function in the corresponding port; Call inet_ntoa () again with the source address taking-up after receiving the heartbeat frame, source address is exactly the public network IP of DTU and the port numbers of dynamic assignment, and the IP of taking-up and port numbers are added to the head of heartbeat message; And then all deliver in the shared drive; The stipulations process is all taken out the data that receive from shared drive, and six bytes taking-ups of head are put in the array, when sending the request msg message; IP and port numbers are amounted to six bytes to be put into the afterbody that sends message again and to deliver in the shared drive; The TCP/IP treatment progress takes out the message that will send from shared drive, six bytes of afterbody are taken out, and these six bytes just will send to the IP and the port numbers of destination; Call inet_addr () function and become network byte order, call sendto () function again request message is sent among the DTU;
After DTU received the request message of SCADA, according to the different message datas of transmission such as function of message, these messages can be received and handle by SCADA once more, and processing mode is the same with handling the heartbeat frame.
Message for each GPRS communication sends, and its step is following:
(1) the stipulations process will be kept at IP and the port numbers taking-up in the array;
(2) the stipulations process is put into IP and port numbers on the head of request message;
(3) if allow to send, the stipulations process then sends to the message after this combination in the shared drive;
(4) the TCP/IP process is taken out data from shared drive, and the IP and the port numbers of head are taken out;
(5) the TCP/IP process is put into the IP and the port numbers of taking out in the destination address;
(6) call sendto () and send request message.
Then get into the processing that receives message after having sent behind the request message:
(1) the TCP/IP treatment progress calls readfrom () function, if return value, is explained the number that receives greater than 0
Certificate;
(2) call public network IP and the port numbers that inet_ntoa () takes out DTU;
(3) IP and port numbers are added to the head that receives message;
(4) message after will making up is put in the shared drive of reception;
(5) the stipulations process is taken out data from shared drive;
(6) take out six bytes of head, if with array in preserved repeat then do not deposit, otherwise be saved in array
In;
(7) message that receives is handled;
(8) request message of redispatching after the stipulations process is handled the message that receives, accomplish once send, receiving course.
For adopting the GPRS communication modes, concerning each DTU, IP and port numbers are dynamic changes; Send or receive actual message after can add a layer again or subtract a layer, so no matter how IP and port numbers change, the present invention can capture; And can be saved in the array, not worry that data can lose, guarantee safety of data; Improve data and sent out the stability of receipts, thereby improved efficiency of transmission.

Claims (2)

1.GPRS the management method of communication dynamic IP; It is characterized in that: no matter DTU adopts what stipulations and SCADA communication; Directly in network, extract IP and the port numbers of corresponding DTU at SCADA end, and with this IP address and port numbers totally six bytes be added to the head of stipulations message; Message after the increase offers the stipulations processing layer again; In the stipulations processing layer, IP and port are saved in the array; When sending message request this IP and port numbers be added to the afterbody of message, send in the shared drive, the handling procedure of TCP/IP receives behind this group message IP and port numbers taking-up; And be put in the destination address of transmission, send together.
2. the management method of GPRS communication dynamic IP as claimed in claim 1 is characterized in that: one 11 ID is set among the DTU, and this ID is unique in the whole network; And the port of setting and SCADA communication, after reaching the standard grade, sends DTU a heartbeat frame earlier, and the TCP/IP treatment progress of the SCADA of main website calls recvfrom () function in the corresponding port; Call inet_ntoa () again with the source address taking-up after receiving the heartbeat frame, source address is exactly the public network IP of DTU and the port numbers of dynamic assignment, and the IP of taking-up and port numbers are added to the head of heartbeat message; And then all deliver in the shared drive; The stipulations process is all taken out the data that receive from shared drive, and six bytes taking-ups of head are put in the array, when sending the request msg message; IP and port numbers are amounted to six bytes to be put into the afterbody that sends message again and to deliver in the shared drive; The TCP/IP treatment progress takes out the message that will send from shared drive, six bytes of afterbody are taken out, and these six bytes just will send to the IP and the port numbers of destination; Call inet_addr () function and become network byte order, call sendto () function again request message is sent among the DTU;
After DTU received the request message of SCADA, according to the different message datas of transmission such as function of message, these messages can be received and handle by SCADA once more, and processing mode is the same with handling the heartbeat frame.
CN2011103592248A 2012-01-29 2012-01-29 Method for managing GPRS communication dynamic IP Pending CN102437951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103592248A CN102437951A (en) 2012-01-29 2012-01-29 Method for managing GPRS communication dynamic IP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103592248A CN102437951A (en) 2012-01-29 2012-01-29 Method for managing GPRS communication dynamic IP

Publications (1)

Publication Number Publication Date
CN102437951A true CN102437951A (en) 2012-05-02

Family

ID=45985834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103592248A Pending CN102437951A (en) 2012-01-29 2012-01-29 Method for managing GPRS communication dynamic IP

Country Status (1)

Country Link
CN (1) CN102437951A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412946A (en) * 2013-08-26 2013-11-27 深圳市德传技术有限公司 DTU parameter configuration method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412987A (en) * 2001-10-15 2003-04-23 华为技术有限公司 Quick retransmission processing method of GTP data packet
WO2006088947A2 (en) * 2005-02-15 2006-08-24 Nphase, Llc Methods and apparatus for machine-to-machine communications
CN201136528Y (en) * 2007-11-23 2008-10-22 谢步明 Train wireless monitoring system based on GPRS
CN101753531A (en) * 2008-12-19 2010-06-23 上海安达通信息安全技术股份有限公司 Method utilizing https/http protocol to realize encapsulation of IPsec protocol
CN101815017A (en) * 2010-03-08 2010-08-25 国电南瑞科技股份有限公司 Online bidirectional monitoring and analysis method of power system full channel based on promiscuous mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412987A (en) * 2001-10-15 2003-04-23 华为技术有限公司 Quick retransmission processing method of GTP data packet
WO2006088947A2 (en) * 2005-02-15 2006-08-24 Nphase, Llc Methods and apparatus for machine-to-machine communications
CN201136528Y (en) * 2007-11-23 2008-10-22 谢步明 Train wireless monitoring system based on GPRS
CN101753531A (en) * 2008-12-19 2010-06-23 上海安达通信息安全技术股份有限公司 Method utilizing https/http protocol to realize encapsulation of IPsec protocol
CN101815017A (en) * 2010-03-08 2010-08-25 国电南瑞科技股份有限公司 Online bidirectional monitoring and analysis method of power system full channel based on promiscuous mode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412946A (en) * 2013-08-26 2013-11-27 深圳市德传技术有限公司 DTU parameter configuration method and system

Similar Documents

Publication Publication Date Title
CN100508489C (en) System and method for dynamic interface management
CN110300050A (en) Information push method, device, computer equipment and storage medium
CN102790798B (en) Transparent proxy implementation, equipment and system in a kind of content distributing network
CN102209302A (en) System and method for realizing information push of mobile terminal
CN101986648A (en) Negotiation method, device and network device of TCP option
CN203151742U (en) A short message intercommunicating system between network clients and Beidou RDSS terminals
CN101510793A (en) Method for implementing a plurality of Bluetooth device networking through Bluetooth server, software program and server
CN103618667A (en) Information transfer method, access gateway and system
CN107342934A (en) A kind of mixed mode Mobile solution real-time messages method for pushing and system based on WebSocket
WO2016090995A1 (en) Method of communication between page and long-connection server, and client end
CN107579925A (en) Message forwarding method and device
CN104821909A (en) Peer-to-peer data transmission method and system
CN101018349A (en) A method for sending the SMS of the mobile phone number to the Internet program
CN105607080A (en) Forest fire prevention information communication method and device based on Beidou short message
CN103702352B (en) Business channel-based network capacity opening method and device thereof
CN114900496B (en) Communication method and related equipment
CN101557354A (en) Method for sending picture by client service personnel on line
CN103701626B (en) The preparation method of bandwidth information and the equipment for obtaining bandwidth information
CN102056195A (en) Quality of service (QoS) etermination method and radio access network equipment
CN102437951A (en) Method for managing GPRS communication dynamic IP
CN101106754B (en) A method for transmitting SMS to gateway in mobile network
CN104798397A (en) Method and device for hosting application by access node
CN107370665A (en) A kind of instant text communications method of low-power consumption suitable for LoRa networks
CN104980509A (en) Data transmission method under the condition without fixed public network IP based on wireless data transmission terminals
CN201985907U (en) Sensor network system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120502