CN108848105A - Establish the method and device of communication connection - Google Patents

Establish the method and device of communication connection Download PDF

Info

Publication number
CN108848105A
CN108848105A CN201810713211.8A CN201810713211A CN108848105A CN 108848105 A CN108848105 A CN 108848105A CN 201810713211 A CN201810713211 A CN 201810713211A CN 108848105 A CN108848105 A CN 108848105A
Authority
CN
China
Prior art keywords
communication connection
hole instrument
data
process control
control server
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
CN201810713211.8A
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.)
Shougang Jingtang United Iron and Steel Co Ltd
Original Assignee
Shougang Jingtang United Iron and Steel Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shougang Jingtang United Iron and Steel Co Ltd filed Critical Shougang Jingtang United Iron and Steel Co Ltd
Priority to CN201810713211.8A priority Critical patent/CN108848105A/en
Publication of CN108848105A publication Critical patent/CN108848105A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The present invention relates to communication technique fields, more particularly to establish the method and device of communication connection, are applied to process control server, the method includes:It monitors with the presence or absence of the trigger event for establishing communication connection with hole instrument;When listening to there are the trigger event, communication connection is established based on socket mode and described hole instrument.The present invention realizes the communication connection between process control server and hole instrument, and connects accurate, efficient and stablize.

Description

Establish the method and device of communication connection
Technical field
The present invention relates to communication technique fields, more particularly to establish the method and device of communication connection.
Background technique
For sour tandem rolling producing line, acid, which rolls product, has take-away client and Nei for two kinds of finished products ways of rear road producing line reproduction Diameter.Wherein, rear road producing line reproduction process includes continuous annealing, zinc-plated, cover annealing and tin plating, for continuous annealing, due to strip is thin, Power is big, the hole on supplied materials and side are split, therefore unit is easily caused to break band.And the processing of disconnected band needs 8-12 hours outside furnace, furnace Interior disconnected tape handling needs 20 hours or so, therefore will cause greatly to lose to sour tandem rolling producing line.Meanwhile chill volume is through DCR bis- After secondary rolling is tin plating, product thickness specification is 0.12mm-0.30mm, and the strip surface quality requirement rolled to acid is also extremely stringent, Do not allow hole occur, the surface quality problems such as side is split.Therefore, sour tandem rolling producing line increase hole instrument, hole instrument also referred to as Hole defect detection system, hole instrument are typically placed in the rack outlet rear portion of milling train, being capable of real-time detection band using hole instrument Steel side splits, the offset of hole and center line, and provides alarm.
Hole instrument needs accurately to correspond to the supplemental characteristic of strip just in the detection when detecting to strip, for example, band Steel serial number, strip reel number, steel grade, weight, width, thickness and length, and the supplemental characteristic of strip is stored in process control clothes It is engaged in device, therefore, in order to make hole instrument obtain the supplemental characteristic of strip, establishes hole instrument and process control server logical The problem of news are connected to become urgent need to resolve.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State the method and device for establishing communication connection of problem.
The embodiment of the present invention provides a kind of method for establishing communication connection, is applied to process control server, the method Including:
It monitors with the presence or absence of the trigger event for establishing communication connection with hole instrument;
When listening to there are the trigger event, communication connection is established based on socket mode and described hole instrument.
Preferably, described to monitor with the presence or absence of the trigger event for establishing communication connection with hole instrument, including:
Monitor whether strip reaches default trigger position;Or
It monitors whether to receive and establishes connection request from described hole instrument.
Preferably, described that communication connection is established based on socket mode and described hole instrument, including:
Initialize sockets interface program;
The sockets interface program is bound with data communication interface, wherein the data communication interface is used for Data interaction is carried out with described hole instrument;
The data communication interface is monitored with the presence or absence of the transmission request of data from described hole instrument;
When listening to the data communication interface there are the transmission request of data, using starting to read and write close pattern and institute State the transmission that hole instrument carries out data.
Preferably, the data communication interface follows AF_INET protocol suite.
Preferably, it is described the sockets interface program and data communication interface are bound after, and, described The data communication interface is monitored with the presence or absence of before the transmission request of data from described hole instrument, the method also includes:
Accept () function obstruction is called, described hole instrument and the process control server is waited to establish connection.
Preferably, described hole instrument and the process control server are based on ICP/IP protocol and establish connection.
Preferably, before the initialization sockets interface program, the method also includes:
Described hole is added in the service file, hosts file and define file of the process control server The communications parameter of instrument.
Preferably, the communications parameter includes IP address, data exchange interface, port information, Equipment Foundations information, access Password and data send at least one of limitation parameter.
The embodiment of the present invention also provides a kind of device for establishing communication connection, is applied to process control server, the dress Set including:
Module is monitored, for monitoring the trigger event that whether there is for establishing communication connection with hole instrument;
Link block, for being established based on socket mode and described hole instrument when listening to there are the trigger event Communication connection.
Preferably, the monitoring module, including:
First monitoring unit, for monitoring whether strip reaches default trigger position;Or
Second monitoring unit establishes connection request from described hole instrument for monitoring whether to receive.
One or more technical solutions in the embodiment of the present invention, have at least the following technical effects or advantages:
The present invention provides a kind of method for establishing communication connection, be applied to process control server in, by monitor whether In the presence of the trigger event for establishing communication connection with hole instrument, when listening to there are trigger event, based on socket mode with Described hole instrument establishes communication connection, to realize the communication connection between process control server and hole instrument, and even It connects accurate, efficient and stablizes.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, identical component is indicated with identical reference pattern.In the accompanying drawings:
Fig. 1 shows the flow chart that the method for communication connection is established in the embodiment of the present invention;
Fig. 2 shows the flow charts of step 102 in the embodiment of the present invention;
Fig. 3 shows the structure chart that the device of communication connection is established in the embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
The embodiment of the present invention provides a kind of method for establishing communication connection, is applied to process control server, the foundation The method of communication connection is for making process control server and hole instrument establish communication connection, as shown in Figure 1, the method packet It includes:
Step 101:It monitors with the presence or absence of the trigger event for establishing communication connection with hole instrument.
Step 102:When listening to there are trigger event, communication connection is established based on socket mode and hole instrument.
Specifically, for step 101, the triggering of communication is established between trigger process control server and hole instrument Event includes following two:
For the first trigger event, step 101 is specially:Monitor whether strip reaches default trigger position, if Strip reaches default trigger position, then shows the trigger event for having for establishing communication connection with hole instrument, if strip does not arrive Up to default trigger position, then show that there is no the trigger events for establishing communication connection with hole instrument.For example, can be by No. 5 Rack outlet position is set as default trigger position, thus, process control server monitors whether strip reaches No. 5 rack outlets Position reaches No. 5 rack outlet positions when process control server listens to strip, then shows there are trigger event, otherwise table It is bright that trigger event is not present.It should be noted that after strip reaches default trigger position, communication middleware Nexus's Factor will issue trigger request, therefore, can also monitor with the presence or absence of the trigger request in embodiments of the present invention, if It listens to that there are the trigger requests, then shows to listen to that there are trigger events.
For second of trigger event, step 101 is specially:It monitors and whether receives the foundation company from hole instrument Request is connect, when listening to the connection request of establishing from hole instrument, then shows to exist for establishing communication connection with hole instrument Otherwise trigger event shows that there is no the trigger events for establishing communication connection with hole instrument.Wherein, connection request is established For the request for creation data that hole instrument is sent to process control server, institute is lost for example, working as hole instrument and being reset After having data, hole instrument, which will be sent, to be established connection request and gives process control server, to make process control server and hole Hole instrument can establish communication connection, and then process control server can send data to hole instrument, it is ensured that hole instrument is normally thrown Enter to use.
Further, when listening to there are when trigger event, step 102 is executed, as shown in Fig. 2, step 102 includes:
Step 201:Initialize sockets interface program;
Step 202:Sockets interface program is bound with data communication interface, wherein data communication interface is used for Data interaction is carried out with hole instrument.
Step 203:Monitored data communication interface whether there is the transmission request of data from hole instrument.
Step 204:Request of data is sent when listening to data communication interface and existing, using starting to read and write close pattern and hole The transmission of hole instrument progress data.
Specifically, socket mode namely Socket mode first initialize Socket and connect in embodiments of the present invention Mouthful program then binds Socket interface routine and data communication interface, and monitored data communication interface is with the presence or absence of coming from The transmission request of data of hole instrument, when listen to data communication interface exist send request of data, then using start read-write close Mode and hole instrument carry out the transmission of data, wherein start to read and write close pattern to be " open-write/read-close " mould Formula.Meanwhile in embodiments of the present invention, data communication interface follows AF_INET protocol suite, also, process control server base The transmission of data is carried out in ICP/IP protocol and hole instrument.
Further, after being bound sockets interface program and data communication interface, and, it is communicated in monitored data Before interface whether there is the transmission request of data from hole instrument, the method also includes:
Accept () function obstruction is called, hole instrument and process control server is waited to establish connection.
Specifically, accept () function sends request of data for receiving, and the meaning of obstruction is that having data interaction company Accept () function is called to receive data when connecing, process is closed when connecting without data interaction, into dormant state, guarantees system System resource reasonable employment.The embodiment of the present invention is by calling accept () function obstruction, to wait hole instrument to connect, accept () function obstruction is realized using block type IO, since each connection has to open a thread to handle, and has not been handled Thread cannot exit, to ensure that the accuracy of data communication.At this point, hole instrument initialize Socket, then with process Control server establishes connection.
Further, hole instrument and process control server are based on ICP/IP protocol and establish connection, specifically, are establishing connection During, it needs to carry out three-way handshake, that is, three groupings of exchange, including:
Firstly, hole instrument sends each SYNJ to process control server;Then, process control server is rung to hole instrument Each SYNK is answered, and confirmation ACKJ+1 is carried out to SYNJ;Last hole instrument sends out a confirmation ACK+ to process control server again 1.Later, process control server and hole instrument determine the legitimacy of connection status and connection.
After completing establishment of connection, monitored data communication interface is asked with the presence or absence of the transmission data from hole instrument It asks, and after listening to transmission request of data, utilizes the transmission for starting to read and write close pattern and hole instrument progress data.Specifically Ground, process control server are based on sending request of data to hole instrument transmission response data, and hole instrument reads response data, finally Connection is closed, communication interaction terminates.
In embodiments of the present invention, after initializing Socket interface routine, the method also includes:In process control The communications parameter of hole instrument is added in the service file of server, hosts file and define file.Wherein, communications parameter It is sent in limitation at least including IP address, data exchange interface, port information, Equipment Foundations information, access password and data A kind of parameter.Wherein, service file is for storing port information, hosts file for storing IP address information and define File is for storing all procedure indexes.Process control server can be made to carry out in time with hole instrument by adding communications parameter The judgement of data interaction legitimacy and the underlying parameter of data connection is quickly established, had in process control server hundreds and thousands of A data-interface, using these supplemental characteristics, process control server can clearly know which interface is responsible for hole Data instrument and which interface comes are hole instrument, and to be sent out to that interface if transmitting data to hole instrument Send data.
In embodiments of the present invention, before initializing sockets interface program, the method also includes:
The message format of communication data and message content between process control server and hole instrument were added to program-controlled In the SMSG message data structural body of control server.
Specifically, data needed for data and hole instrument needed for process control server are in SMSG message data structural body It defines, process control server and hole instrument, which are known that, send or receive which kind of data avoids what data were likely to occur Abnormal or chaotic problem, more saves system resource, reduces data processing time, promote data-handling efficiency.
In addition, in embodiments of the present invention, external interface procedure index is added in task and process list, and add touching Device is sent out, program automatic running as requested is made.
Using the method for establishing communication connection in the embodiment of the present invention, not only can directly encapsulate calling, interface maintenance and Troubleshooting is simple, and reusability is strong, while efficient stable.
Based on the same inventive concept, the embodiment of the present invention also provides a kind of device for establishing communication connection, is applied to process Control server, as shown in figure 3, described device includes:
Module 301 is monitored, for monitoring the trigger event that whether there is for establishing communication connection with hole instrument;
Link block 302, for being built based on socket mode and described hole instrument when listening to there are the trigger event Vertical communication connection.
Module 301 is monitored, including:
First monitoring unit, for monitoring whether strip reaches default trigger position;Or
Second monitoring unit establishes connection request from described hole instrument for monitoring whether to receive.
One or more technical solutions in the embodiment of the present invention, have at least the following technical effects or advantages:
The present invention provides a kind of method for establishing communication connection, be applied to process control server in, by monitor whether In the presence of the trigger event for establishing communication connection with hole instrument, when listening to there are trigger event, based on socket mode with Described hole instrument establishes communication connection, to realize the communication connection between process control server and hole instrument, and even It connects accurate, efficient and stablizes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method for establishing communication connection, which is characterized in that it is applied to process control server, the method includes:
It monitors with the presence or absence of the trigger event for establishing communication connection with hole instrument;
When listening to there are the trigger event, communication connection is established based on socket mode and described hole instrument.
2. the method for establishing communication connection as described in claim 1, which is characterized in that described to monitor with the presence or absence of being used for and hole Hole instrument establishes the trigger event of communication connection, including:
Monitor whether strip reaches default trigger position;Or
It monitors whether to receive and establishes connection request from described hole instrument.
3. as described in claim 1 establish communication connection method, which is characterized in that it is described based on socket mode with it is described Hole instrument establishes communication connection, including:
Initialize sockets interface program;
The sockets interface program is bound with data communication interface, wherein the data communication interface is used for and institute It states hole instrument and carries out data interaction;
The data communication interface is monitored with the presence or absence of the transmission request of data from described hole instrument;
When listening to the data communication interface there are the transmission request of data, using starting to read and write close pattern and the hole The transmission of hole instrument progress data.
4. the method for establishing communication connection as claimed in claim 3, which is characterized in that the data communication interface follows AF_ INET protocol suite.
5. the method for establishing communication connection as claimed in claim 3, which is characterized in that described by the sockets interface journey After sequence and data communication interface are bound, and, the data communication interface is monitored with the presence or absence of from the hole described Before the transmission request of data of hole instrument, the method also includes:
Accept () function obstruction is called, described hole instrument and the process control server is waited to establish connection.
6. the method for establishing communication connection as claimed in claim 5, which is characterized in that described hole instrument and the process control Server is based on ICP/IP protocol and establishes connection.
7. the method for establishing communication connection as claimed in claim 3, which is characterized in that in the initialization sockets interface journey Before sequence, the method also includes:
Described hole instrument is added in the service file, hosts file and define file of the process control server Communications parameter.
8. as claimed in claim 7 establish communication connection method, which is characterized in that the communications parameter include IP address, Data exchange interface, port information, Equipment Foundations information, access password and data send at least one of limitation parameter.
9. a kind of device for establishing communication connection, which is characterized in that be applied to process control server, described device includes:
Module is monitored, for monitoring the trigger event that whether there is for establishing communication connection with hole instrument;
Link block, for being established and being communicated based on socket mode and described hole instrument when listening to there are the trigger event Connection.
10. establishing the device of communication connection as claimed in claim 9, which is characterized in that the monitoring module, including:
First monitoring unit, for monitoring whether strip reaches default trigger position;Or
Second monitoring unit establishes connection request from described hole instrument for monitoring whether to receive.
CN201810713211.8A 2018-06-29 2018-06-29 Establish the method and device of communication connection Pending CN108848105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810713211.8A CN108848105A (en) 2018-06-29 2018-06-29 Establish the method and device of communication connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810713211.8A CN108848105A (en) 2018-06-29 2018-06-29 Establish the method and device of communication connection

Publications (1)

Publication Number Publication Date
CN108848105A true CN108848105A (en) 2018-11-20

Family

ID=64200391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810713211.8A Pending CN108848105A (en) 2018-06-29 2018-06-29 Establish the method and device of communication connection

Country Status (1)

Country Link
CN (1) CN108848105A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848152A (en) * 2010-05-07 2010-09-29 华为终端有限公司 Communication method, equipment and system for controlling user equipment (UE) by using terminal equipment (TE)
CN101982955A (en) * 2010-11-19 2011-03-02 深圳华大基因科技有限公司 High-performance file transmission system and method thereof
CN105516087A (en) * 2015-11-26 2016-04-20 首钢京唐钢铁联合有限责任公司 Socket communication interface system based on process control server
US20180070152A1 (en) * 2015-04-07 2018-03-08 Lg Electronics Inc. Broadcast signal transmission apparatus, broadcast signal reception apparatus, broadcast signal transmission method, and broadcast signal reception method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848152A (en) * 2010-05-07 2010-09-29 华为终端有限公司 Communication method, equipment and system for controlling user equipment (UE) by using terminal equipment (TE)
CN101982955A (en) * 2010-11-19 2011-03-02 深圳华大基因科技有限公司 High-performance file transmission system and method thereof
US20180070152A1 (en) * 2015-04-07 2018-03-08 Lg Electronics Inc. Broadcast signal transmission apparatus, broadcast signal reception apparatus, broadcast signal transmission method, and broadcast signal reception method
CN105516087A (en) * 2015-11-26 2016-04-20 首钢京唐钢铁联合有限责任公司 Socket communication interface system based on process control server

Similar Documents

Publication Publication Date Title
EP2437456B1 (en) Method and system for realizing concurrent access of multi-kinds of bearer protocols on machine-to-machine (m2m) platform
CA2449927C (en) Method of providing packet data service in a wireless telecommunication system
CN101977199A (en) Ip telephone system and ip telephone terminal register method
CN108667672A (en) A kind of automatic adaptation method and router of LAN interface and wan interface
CN109600721A (en) A kind of communication means and device
CN101981871B (en) Monitoring system
CN108769101A (en) A kind of information processing method, client and system
CN108391295A (en) Communicate hot change-over method, communication device, intelligent door lock and intelligent socket
CN102333081A (en) Authentication method, equipment and system
CN111010443A (en) Internet of things broken line continuous transmission system and internet of things broken line continuous transmission method thereof
CN109151082A (en) A kind of multi-connection method for building up, device and system
US20110075829A1 (en) Method and apparatus for controlling a conference bridge
US7908367B2 (en) Call processing system and method
CN108848105A (en) Establish the method and device of communication connection
CN108462984A (en) A kind of method and terminal carrying out access network management
CN101184134A (en) Method and system for processing billing of including qos information
CN104104554B (en) The life cycle methodology and device of detection data access request
CN108512820A (en) The method and apparatus of server response request message in a kind of communication system
CN106210362B (en) Call method and device
CN108024306A (en) A kind of TCP connection managements method and gateway device
CN109474670A (en) A kind of information interacting method and system
CN108551460A (en) A kind of SOCKET communication establishing methods under complex network environment
CN107743304A (en) A kind of device identification method and relevant device
JP2000194627A (en) Operating method and operating state monitoring device for network system and information communication device
CN107249194A (en) Manage method, device and the equipment of wireless network connection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181120

RJ01 Rejection of invention patent application after publication