Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of efficient ship connected network communication method, apparatus, calculate
Machine equipment and storage medium.
A kind of ship connected network communication method, which comprises
The data packet to be uploaded that taken-over vessel end terminal is sent, the data packet to be uploaded, which carries, uploads TCP message, ship end
Terminal identity identification marking and purpose bank end terminal identity identification marking;
It is ship end UDP (User Datagram Protocol, User Datagram Protocol by the packet encapsulation to be uploaded
View) packet, send the ship end UDP packet;
The bank end UDP packet that bank end server returns is received, the bank end UDP packet is decapsulated, obtains and returns to TCP message, bank
Hold terminal identity identification marking and purpose ship end identity identification;
The return TCP message and bank end terminal identity identification marking are sent to purpose ship end identity identification
Corresponding ship end terminal.
In one of the embodiments, after the transmission ship end UDP packet, further includes:
Preset duration is waited, data packet is sent and receives success confirmation message, the data packet receives success confirmation message and uses
Whether it is successfully received in the confirmation ship end UDP packet.
The ship connected network communication method in one of the embodiments, further include:
It searches in the received bank end UDP packet and carries identical bank end terminal identity identification marking and the identification of ship end
The bank end UDP packet of mark;
Obtain the return TCP message carried in the bank end UDP packet found;
The return TCP message found is combined, data splitting is obtained;
Verify the integrality of the data splitting.
The data packet to be uploaded of taken-over vessel end terminal transmission includes: in one of the embodiments,
Receive the data upload requests of each ship end terminal transmission;
Search the corresponding preset cache queue priority of each ship end terminal;
According to the corresponding preset cache queue priority sequence of each ship end terminal, each ship end terminal hair is successively received
The data packet to be uploaded sent.
A kind of ship connected network communication method, which comprises
The data packet to be sent that bank end terminal is sent is received, the data packet to be sent, which carries, sends TCP message, bank end
Terminal identity identification marking and purpose ship end terminal identity identification marking;
It is bank end UDP packet by the packet encapsulation to be sent, sends the bank end UDP packet;
The ship end UDP packet of taken-over vessel end server passback, decapsulates the ship end UDP packet, obtains passback TCP message, ship
Hold terminal identity identification marking and purpose bank end terminal identity identification marking;
The passback TCP message and ship end terminal identity identification marking to purpose bank end terminal identity is sent to identify
Identify corresponding bank end terminal.
In one of the embodiments, after the transmission bank end UDP packet, further includes:
Preset time is waited, data packet is sent and receives success confirmation message, the data packet receives success confirmation message and uses
Whether it is successfully received in the confirmation bank end UDP packet.
A kind of ship networked communication device, described device include:
Ship end receiving module, for the data packet to be uploaded that taken-over vessel end terminal is sent, the data packet to be uploaded is carried
Upload TCP message, ship end terminal identity identification marking and purpose bank end terminal identity identification marking;
Ship end package module sends the ship end UDP for being ship end UDP packet by the packet encapsulation to be uploaded
Packet;
Ship end decapsulation module decapsulates the bank end UDP for receiving the bank end UDP packet of bank end server return
Packet obtains and returns to TCP message, bank end terminal identity identification marking and purpose ship end identity identification;
Ship end sending module, for sending the return TCP message and bank end terminal identity identification marking to the purpose
The corresponding ship end terminal of ship end identity identification
A kind of ship networked communication device, described device include:
Bank end receiving module, for receiving the data packet to be sent of bank end terminal transmission, the data packet to be sent is carried
Send TCP message, bank end terminal identity identification marking and purpose ship end terminal identity identification marking;
Bank end package module sends the bank end UDP for being bank end UDP packet by the packet encapsulation to be sent
Packet;
Bank end decapsulation module decapsulates the ship end UDP for the ship end UDP packet of taken-over vessel end server passback
Packet obtains passback TCP message, ship end terminal identity identification marking and purpose bank end terminal identity identification marking;
Bank end sending module, for sending the passback TCP message and ship end terminal identity identification marking to the purpose
The corresponding bank end terminal of bank end terminal identity identification marking.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It realizes when row such as the step of above-mentioned method.
Above-mentioned ship connected network communication method, apparatus and storage medium, ship end server taken-over vessel end terminal are sent to be uploaded
The packet encapsulation to be uploaded is ship end UDP packet, sends the ship end UDP packet to bank end server, bank end by data packet
Server deblocking shipment end UDP packet, and TCP message will be sent and be sent to purpose bank end terminal, bank end server receives bank end
The TCP message that terminal returns is encapsulated as bank end UDP packet, sends bank end UDP packet to ship end server, the decapsulation of ship end server
Bank end UDP packet sends the TCP message of return to ship end terminal.TCP message is encapsulated as UDP during entire ship connected network communication
Packet transmits between ship end server and bank end server, avoids network congestion caused by TCP communication mode, effectively improves net
Network efficiency of transmission.
In addition the application also provides a kind of ship connected network communication system, including Intranet communication module, outbound communication module and
Bank end server, the Intranet communication module are connect with bank end server respectively with the outbound communication module, described interior
Network Communication module is connect with ship end server, and the outbound communication module is connect with bank end terminal;
The ship end UDP packet that the Intranet communication module taken-over vessel end server is sent, sends the ship end UDP packet to institute
Bank end server is stated, bank end server decapsulates the ship end UDP packet, obtains ship end message and target bank end terminal
Identity identification, sends ship end message and target bank end terminal identity identification marking to outbound communication module, described
Outbound communication module is based on TCP communication agreement and sends ship end message to target bank end terminal identity identification marking pair
The bank end terminal answered;
The outbound communication module receives the bank end TCP packet that bank end terminal is sent, and sends the bank end TCP packet to described
Bank end server, bank end server decapsulate the TCP packet, obtain bank end message data and object ship end terminal body
Part identification marking, encapsulates bank end message data and object ship end terminal identity identification marking, generates bank end UDP packet, hair
Send the bank end UDP packet to the Intranet communication module, the Intranet communication module is based on UDP communication protocol and sends the bank
Hold UDP packet to ship end server.
Above-mentioned ship connected network communication system, including Network Communication module, outbound communication module and bank end server, interior Netcom
Believe module taken-over vessel end server send ship end UDP packet, bank end server deblocking shipment end UDP packet, acquisition ship end message with
And target bank end terminal identity identification marking, outbound communication module are based on TCP communication agreement and send ship end message to target bank end
The corresponding bank end terminal of terminal identity identification marking;Outbound communication module receives the bank end TCP packet that bank end terminal is sent, bank end
Server decapsulates TCP packet, obtains bank end message data and object ship end terminal identity identification marking, encapsulates bank end message
Data and object ship end terminal identity identification marking, generate bank end UDP packet, and Intranet communication module is sent out based on UDP communication protocol
Send bank end UDP packet to ship end server.In whole process, the message interacted between ship end and bank end is instant in the networking of above-mentioned ship
Communication device completes transfer, can efficiently realize instant messaging, bring advantage to the user operation.
Specific embodiment
In order to which the objects, technical solutions and advantages of the application are more clearly understood, with reference to the accompanying drawings and embodiments,
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application,
It is not used to limit the application.
Ship connected network communication method provided by the present application, can be applied in application environment as shown in Figure 1.In Fig. 1 application
It mainly include ship end terminal, ship end server, telecommunication satellite, bank end server and bank end terminal, ship end terminal hair in environment
Send TCP message to ship end server, TCP message is encapsulated as ship end UDP packet, sends ship by telecommunication satellite by ship end server
Hold UDP packet to bank end server, server deblocking shipment end UDP packet in bank end obtains TCP message, sends TCP message to bank end
Terminal, to realize that ship end terminal sends TCP message to bank end terminal.Bank end terminal is after receiving TCP message, feedback
Passback TCP message is generated, sends passback TCP message to bank end server, bank end server is encapsulated as bank for TCP message is returned
UDP packet is held, bank end UDP packet is sent to ship end server by telecommunication satellite, ship end server decapsulates bank end UDP packet, obtains
TCP message is returned, TCP message is sent to ship end terminal, completes the interaction between primary complete ship end terminal and bank end terminal
Process.In practical applications, ship end terminal can be smart phone, tablet computer etc..Ship end server can be for satellite
Communication function and the ship end box for having certain data-handling capacity, ship end terminal and single ship in certain area coverage
Box connection is held, it is non-essential, the Openfire plug-in unit for supporting udp protocol can be set on the box of ship end.Bank end server
It can be that Openfire server is realized the Openfire plug-in unit of udp protocol based on mina, propped up simultaneously for open source server
Hold TCP and udp protocol.
In one embodiment, as shown in Fig. 2, providing a kind of ship connected network communication method, it is applied to Fig. 1 in this way
In ship end server for be illustrated, comprising the following steps:
A kind of ship connected network communication method, method include:
S220: the data packet to be uploaded that taken-over vessel end terminal is sent, data packet to be uploaded, which carries, uploads TCP message, ship end
Terminal identity identification marking and purpose bank end terminal identity identification marking.
When ship end terminal needs to send data to bank end terminal, data packet to be uploaded is sent to ship end server (ship end box
Son).It include to upload TCP message ship end terminal identity identification marking and purpose bank end terminal body in data packet to be uploaded
Part identification marking, wherein uploading the data that TCP message, that is, ship end terminal needs to be ultimately routed to bank end terminal, which is supported
Transmission Control Protocol;Ship end terminal identity identification marking for distinguishing upload TCP message is issued by which ship end terminal, specifically
It can be ship end terminal IP, can be understood as the phone number of ship end mobile phone in practical applications;Purpose bank end terminal identity is known
The purpose terminal that Biao Shi do not need to be sent to for confirming the upload TCP message, is specifically as follows bank end terminal IP, is actually answering
With the phone number that can be understood as bank end mobile phone.
S240: it is ship end UDP packet by packet encapsulation to be uploaded, sends ship end UDP packet.
Ship end UDP packet refers to the data packet for supporting udp protocol.Data to be uploaded are encapsulated as ship end UDP by ship end server
Packet sends UDP packet to bank end server.Non-essential, ship end server can send UDP packet bank end clothes by telecommunication satellite
Business device, i.e. communication protocol between ship end server and bank end server are udp protocol, since udp protocol without " holding three times
Hand " confirmation, effectively improves network transmission performance.
S260: the bank end UDP packet that reception bank end server returns, decapsulation bank end UDP packet, acquisition return TCP message,
Bank end terminal identity identification marking and purpose ship end identity identification.
Bank end server can unseal shipment end UDP packet, send TCP in the UDP packet of ship end after receiving ship end UDP packet
Message is to bank end terminal, and after bank end terminal receives TCP message, feedback generates TCP message, and bank end server gives birth to feedback
Bank end UDP packet, ship end clothes are packaged at TCP message, bank end terminal identity identification marking and purpose ship end identity identification
Business device receives the bank end UDP packet that bank end server returns, and obtains and returns to TCP message, bank end terminal identity identification marking and mesh
Ship end identity identification.
S280: it is corresponding to purpose ship end identity identification with bank end terminal identity identification marking to send return TCP message
Ship end terminal.
Ship end server, which is sent, returns to TCP message and bank end terminal identity identification marking to the end identity pair of purpose ship
The ship end terminal answered completes primary complete data interaction between ship end terminal and bank end terminal.
In one embodiment, as shown in figure 3, being answered in this way present invention also provides a kind of ship connected network communication method
For being illustrated for the bank end server in Fig. 1, comprising the following steps:
S320: receiving the data packet to be sent that bank end terminal is sent, and data packet to be sent, which carries, sends TCP message, bank end
Terminal identity identification marking and purpose ship end terminal identity identification marking.
Bank end server can be connect with banks multiple in certain area coverage end terminal.It is whole that bank end server receives bank end
Hold send data packet to be sent, in data packet to be sent include send TCP message, bank end terminal identity identification marking with
And purpose ship end terminal identity identification marking, wherein sending TCP message is the number that bank end terminal needs to be sent to ship end terminal
According to the TCP message that the TCP message can receive ship end terminal for bank end terminal feeds back the TCP message generated later, may be used also
Think that activly request is sent to the TCP message of ship end terminal, bank end terminal and bank end server to bank end terminal itself according to demand
Between carried out data transmission based on Transmission Control Protocol;Bank end terminal identity identification marking is for distinguishing different bank end terminals, specifically
It can be with bank end terminal IP, so that server perception in bank end is currently the data packet sended over by which terminal;Purpose ship end
Terminal identity identification marking is used to confirm the purpose ship end terminal (can be understood as destination) of currently transmitted TCP message, tool
Body can be with purpose ship end terminal IP.Based on bank end terminal identity identification marking and purpose ship end terminal identity identification marking, bank
End server can identify the origin and destination of currently transmitted TCP message.
S340: it is bank end UDP packet by packet encapsulation to be sent, sends bank end UDP packet.
Packet encapsulation to be sent is bank end UDP packet by bank end server, and transmission bank end UDP packet is to ship end server, i.e.,
Data interaction is carried out based on UDP communication protocol between bank end server and ship end server.Non-essential, bank end server can
First to send bank end UDP packet to telecommunication satellite, bank end UDP packet is sent to ship end server by telecommunication satellite.
S360: the ship end UDP packet of taken-over vessel end server passback, deblocking shipment end UDP packet, acquisition passback TCP message,
Ship end terminal identity identification marking and purpose bank end terminal identity identification marking.
Bank end UDP packet is sent to after the server of ship end, and ship end server is decapsulated to obtain TCP message, bank end end
Identity identification and purpose ship end terminal identity identification marking are held, ship end server is whole to purpose ship end by the TCP message
The corresponding ship end terminal of identity identification is held, which receives the TCP message, and feedback generates passback TCP message,
Passback TCP message is sent to ship end server, ship end server will return TCP message, ship end terminal identity identification marking and
Purpose bank end terminal identity identification marking is encapsulated as ship end UDP packet, sends ship end UDP packet to bank end by telecommunication satellite and services
Device, the ship end UDP packet of bank end server taken-over vessel end server passback, decapsulation obtain passback TCP message, ship end terminal body
Part identification marking and purpose bank end terminal identity identification marking.
S380: passback TCP message and ship end terminal identity identification marking are sent to purpose bank end terminal identity identification marking
Corresponding bank end terminal.
Bank end server, which sends passback TCP message and ship end terminal identity identification marking to purpose bank end terminal identity, to be known
Corresponding bank end terminal is not identified, i.e. passback TCP message in epicycle interactive process is sent back to purpose bank end by bank end server
Terminal.
Above-mentioned ship connected network communication method, the data packet to be uploaded that ship end server taken-over vessel end terminal is sent, will be to be uploaded
Packet encapsulation is ship end UDP packet, sends ship end UDP packet to bank end server, and end UDP packet is loaded in server deblocking in bank end onto ship, and
And TCP message will be sent and be sent to purpose bank end terminal, bank end server receives the TCP message that bank end terminal returns, is encapsulated as
Bank end UDP packet sends bank end UDP packet to ship end server, and ship end server decapsulates bank end UDP packet, sends the TCP of return
Message is to ship end terminal.TCP message UDP packet is encapsulated as during entire ship connected network communication to take in ship end server and bank end
It is transmitted between business device, avoids network congestion caused by TCP communication mode, effectively improve network transmission efficiency.
It, below will be with ship for the technical solution and its effect for further explaining in detail the application ship connected network communication method
Terminal 1 is held to send data ABC to bank end terminal 2,2 return data D of bank end terminal to ship end terminal 1 is application example, and is combined
Time diagram Fig. 4 is described in detail.
As shown in figure 4, ship end terminal 1 sends the TCP message of ABC, own identification is known in above-mentioned practical application example
Not Biao Shi 1, purpose bank end terminal identity identification marking 2 to ship end server, ship end server is by the TCP message of ABC, ship end
Identity identification 1 and purpose bank end terminal identity identification marking 2 are encapsulated as ship end UDP packet, and ship end server passes through communication
Ship end UDP packet is sent to bank end server, bank end server taken-over vessel end UDP packet by satellite, and deblocking shipment end UDP packet obtains
TCP message, ship end identity identification 1 and the purpose bank end terminal identity identification marking 2 of ABC, bank end server are sent
The TCP message and ship end identity identification 1 of ABC to bank end terminal 2, bank end terminal 2 receive ABC TCP message it
Feedback generates the TCP message of passback D afterwards, sends the TCP message, bank end terminal recognition mark 2 and purpose ship end body of passback D
Part identification marking 1 to bank end server, the encapsulation of bank end server generates bank end UDP packet, passes through telecommunication satellite and sends bank end UDP
Packet to ship end server, ship end server decapsulates bank end UDP packet, obtains the TCP message of passback D, sends the TCP report of ship end D
Text and bank end terminal identity identification marking 2 complete data between single ship end terminal 1 and bank end terminal 2 to ship end terminal 1
Interaction.
As shown in figure 5, in one of the embodiments, after step S240, further includes:
S250: waiting preset duration, sends data packet and receives success confirmation message, data packet receives success confirmation message
For confirming whether ship end UDP packet is successfully received.
Ship end server is after sending ship end UDP packet, active transmission reception success confirmation message to bank end server,
The reception success confirmation message is for confirming whether bank end server is properly received ship end UDP packet, and when bank end, server is successfully connect
Time receiving, bank end server meeting feedback reception success message to ship end server;When bank end, server is not successfully received, bank end
Server, which can be fed back, does not receive message to ship end server.Ship end server uses active query mode, inquiry as transmitting terminal
Whether receiving end is successfully received the UDP packet sent, can take necessary hand for situation is not successfully received so as to subsequent
Section, such as the step of sending ship end UDP is returned, it retransmits again primary, it is ensured that communication reliability between ship end and bank end.It is non-
Necessary, preset duration can be set according to practical communication situation, it is however generally that, since communication has timeliness,
Preset duration should not be arranged too long.
Ship connected network communication method in one of the embodiments, further include:
It searches and carries identical bank end terminal identity identification marking and ship end identity identification in received bank end UDP packet
Bank end UDP packet;Obtain the return TCP message carried in the bank end UDP packet found;Combine the return TCP report found
Text obtains data splitting;Verify the integrality of data splitting.
The bank end UDP packet for carrying identical bank end terminal identity identification marking Yu ship end identity identification, that is, show this
The TCP message carried in UDP packet is the data when interaction between foreland end terminal and ship end terminal, this part TCP is reported
Text combination, ship end server carry out completeness check to the data after combination, judge whether there is for identical bank end terminal and ship
TCP message between the terminal of end fails reception, takes means to be handled so as to subsequent, it is ensured that communication reliability with it is complete
Whole property.
The data packet to be uploaded that taken-over vessel end terminal is sent in one of the embodiments, includes: to receive each ship end terminal
The data upload requests of transmission;Search the corresponding preset cache queue priority of each ship end terminal;It is corresponding according to each ship end terminal
Preset cache queue priority sequence, successively receive the data packet to be uploaded of each ship end terminal transmission.
Since ship end server is connect with multiple ship ends terminal, it is possible to which at some time ship end, server is received more
The access request of a, a large amount of ships end terminal, and ship end server handling ability is limited, if all accessing simultaneously, it is possible to cause
Network congestion, even ship end server are directly " crash ".Based on this, ship end server is in the number for receiving the transmission of ship end terminal
When according to upload request, the preset cache queue priority that ship end terminal one is answered can be searched, according to buffer queue priority orders,
Once receive the data packet to be uploaded that each ship end is sent, it is ensured that the order and fluency of communication.Specifically, ship end terminal
Ship end terminal IP can be carried in the data upload requests of transmission, and default terminal IP and buffer queue are stored in the server of ship end
Priority orders list, when ship end server receives the data upload requests of some ship end terminal transmission, according to ship end end
IP and default terminal IP and the list of buffer queue priority orders are held, identifies the corresponding priority orders of ship end terminal,
For multiple ship ends terminal that same time receives, corresponding priority orders are based on, each ship end terminal is successively received
The data packet to be uploaded sent.In simple terms, in the present embodiment, ship end terminal upload data stream is asynchronous upload, ship end
The buffer queue situation for the different priorities that terminal needs to report ship end to be uploaded is to ship end server, and ship end server is to institute
Some ship ends terminal carries out United Dispatching, and scheduling information is sent to specified ship end terminal, specified ship end by ship end server
After terminal receives scheduling information, data upload is carried out in window at the appointed time.
As shown in fig. 6, in one of the embodiments, after step S340 further include:
S350: waiting preset time, sends data packet and receives success confirmation message, data packet receives success confirmation message
For confirming whether bank end UDP packet is successfully received.
Bank end server is after sending bank end UDP packet, active transmission reception success confirmation message to ship end server,
The reception success confirmation message is for confirming the whether successful bank end UDP packet of ship end server, when ship end server is properly received
When, ship end server meeting feedback reception success message to bank end server;When ship end, server is not successfully received, ship end clothes
Business device, which can be fed back, does not receive message to bank end server.Bank end server uses active query mode as transmitting terminal, and inquiry connects
Whether receiving end is successfully received the UDP packet sent, can take necessary hand for situation is not successfully received so as to subsequent
Section, such as the step of sending bank end UDP is returned, it retransmits again primary, it is ensured that communication reliability between ship end and bank end.It is non-
Necessary, preset time can be set according to practical communication situation, it is however generally that, since communication has timeliness,
Preset time should not be arranged too long.It should be pointed out that when being preset in preset time and above-described embodiment in the present embodiment
Length can be the identical time, or different time, specific setting can be based on actual conditions, practical application field
Scape set.
Above-mentioned ship connected network communication method in one of the embodiments, further include: search and taken in received ship end UDP packet
Ship end UDP packet with mutually shipmate end terminal identity identification marking Yu bank end identity identification;Obtain the ship end UDP found
The upload TCP message carried in packet;The upload TCP message found is combined, obtains and uploads data splitting;Verification uploads combination
The integrality of data.
In the present embodiment, it is combined for the upload TCP message between mutually shipmate end terminal and bank end terminal, school
The integrality for testing data after combining ensures that UDP packet is all successfully received in receiving end.
Although should be understood that Fig. 2-3 and Fig. 5-6 flow chart in each step according to arrow instruction according to
Secondary display, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless having herein explicitly
Bright, there is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, Fig. 2-
At least part step in 3 and Fig. 5-6 may include multiple sub-steps perhaps these sub-steps of multiple stages or rank
Section is not necessarily mutually to execute completion in the same time, but can execute at different times, these sub-steps or stage
Execution sequence, which is also not necessarily, successively to be carried out, but can be with the sub-step or stage of other steps or other steps
At least part executes in turn or alternately.
As shown in fig. 7, a kind of ship networked communication device, device include:
Ship end receiving module 720, for the data packet to be uploaded that taken-over vessel end terminal is sent, data packet to be uploaded is carried
Upload TCP message, ship end terminal identity identification marking and purpose bank end terminal identity identification marking;
Ship end package module 740 sends ship end UDP packet for being ship end UDP packet by packet encapsulation to be uploaded;
Ship end decapsulation module 760, the bank end UDP packet returned for receiving bank end server, decapsulates bank end UDP packet,
It obtains and returns to TCP message, bank end terminal identity identification marking and purpose ship end identity identification;
Ship end sending module 780 returns to TCP message and bank end terminal identity identification marking to purpose ship end for sending
The corresponding ship end terminal of identity identification.
Ship networked communication device further includes confirmation module in one of the embodiments, for waiting preset duration, is sent out
Data packet is sent to receive success confirmation message, data packet receives success confirmation message for confirming whether ship end UDP packet is successfully connect
It receives.
Ship connected network communication method further includes inspection module in one of the embodiments, for searching received bank end
The bank end UDP packet of identical bank end terminal identity identification marking Yu ship end identity identification is carried in UDP packet;Acquisition is found
Bank end UDP packet in the return TCP message that carries;The return TCP message found is combined, data splitting is obtained;Verification combination
The integrality of data.
The data that ship end receiving module 720 is also used to receive the transmission of each ship end terminal in one of the embodiments, upload
Request;Search the corresponding preset cache queue priority of each ship end terminal;According to the corresponding preset cache queue of each ship end terminal
Priority orders successively receive the data packet to be uploaded of each ship end terminal transmission.
In addition, device includes: as shown in figure 8, the application also provides a kind of ship networked communication device
Bank end receiving module 820, for receiving the data packet to be sent of bank end terminal transmission, data packet to be sent is carried
Send TCP message, bank end terminal identity identification marking and purpose ship end terminal identity identification marking;
Bank end package module 840 sends bank end UDP packet for being bank end UDP packet by packet encapsulation to be sent;
Bank end decapsulation module 860, for the ship end UDP packet of taken-over vessel end server passback, end UDP packet is loaded in deblocking onto ship,
Obtain passback TCP message, ship end terminal identity identification marking and purpose bank end terminal identity identification marking;
Bank end sending module 880, for sending passback TCP message and ship end terminal identity identification marking to purpose bank end
The corresponding bank end terminal of terminal identity identification marking.
Above-mentioned ship networked communication device, the data packet to be uploaded that ship end server taken-over vessel end terminal is sent, will be to be uploaded
Packet encapsulation is ship end UDP packet, sends ship end UDP packet to bank end server, and end UDP packet is loaded in server deblocking in bank end onto ship, and
And TCP message will be sent and be sent to purpose bank end terminal, bank end server receives the TCP message that bank end terminal returns, is encapsulated as
Bank end UDP packet sends bank end UDP packet to ship end server, and ship end server decapsulates bank end UDP packet, sends the TCP of return
Message is to ship end terminal.TCP message UDP packet is encapsulated as during entire ship connected network communication to take in ship end server and bank end
It is transmitted between business device, avoids network congestion caused by TCP communication mode, effectively improve network transmission efficiency.
Specific about ship networked communication device limits the restriction that may refer to above for ship connected network communication method,
Details are not described herein.Modules in above-mentioned ship networked communication device can be fully or partially through software, hardware and combinations thereof
To realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with soft
Part form is stored in the memory in computer equipment, executes the corresponding behaviour of the above modules in order to which processor calls
Make.
In one embodiment, a kind of computer equipment is provided, which can be server, inside
Structure chart can be as shown in Figure 9.The computer equipment includes processor, the memory, network interface connected by system bus
And database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The storage of the computer equipment
Device includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program
And database.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.
The database of the computer equipment is for data such as storage server operating systems.The network interface of the computer equipment is used for
It is communicated with external terminal by network connection.To realize a kind of ship connected network communication when the computer program is executed by processor
Method.
It will be understood by those skilled in the art that structure shown in Fig. 9, only part relevant to application scheme
The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set
Standby may include perhaps combining certain components or with different component cloth than more or fewer components as shown in the figure
It sets.
In one embodiment, it provides a kind of computer equipment, including memory, processor and is stored in memory
Computer program that is upper and can running on a processor, processor perform the steps of when executing computer program
The data packet to be uploaded that taken-over vessel end terminal is sent, data packet to be uploaded, which carries, uploads TCP message, ship end terminal
Identity identification and purpose bank end terminal identity identification marking;
It is ship end UDP packet by packet encapsulation to be uploaded, sends ship end UDP packet;
The bank end UDP packet that bank end server returns is received, bank end UDP packet is decapsulated, acquisition return TCP message, bank end are whole
Hold identity identification and purpose ship end identity identification;
It sends and returns to TCP message and bank end terminal identity identification marking to the corresponding ship of purpose ship end identity identification
Hold terminal.
In one embodiment, it is also performed the steps of when processor executes computer program
Preset duration is waited, data packet is sent and receives success confirmation message, data packet receives success confirmation message for true
Recognize whether ship end UDP packet is successfully received.
In one embodiment, it is also performed the steps of when processor executes computer program
It searches and carries identical bank end terminal identity identification marking and ship end identity identification in received bank end UDP packet
Bank end UDP packet;Obtain the return TCP message carried in the bank end UDP packet found;Combine the return TCP report found
Text obtains data splitting;Verify the integrality of data splitting.
In one embodiment, it is also performed the steps of when processor executes computer program
Receive the data upload requests of each ship end terminal transmission;It is excellent to search the corresponding preset cache queue of each ship end terminal
First grade;According to each ship end terminal corresponding preset cache queue priority sequence, successively receive the transmission of each ship end terminal to upper
Pass data packet.
In one embodiment, it provides a kind of computer equipment, including memory, processor and is stored in memory
Computer program that is upper and can running on a processor, processor perform the steps of when executing computer program
The data packet to be sent that bank end terminal is sent is received, data packet to be sent, which carries, sends TCP message, bank end terminal
Identity identification and purpose ship end terminal identity identification marking;
It is bank end UDP packet by packet encapsulation to be sent, sends bank end UDP packet;
The ship end UDP packet of taken-over vessel end server passback, deblocking shipment end UDP packet, acquisition passback TCP message, ship end are whole
Hold identity identification and purpose bank end terminal identity identification marking;
It is corresponding to purpose bank end terminal identity identification marking with ship end terminal identity identification marking to send passback TCP message
Bank end terminal.
In one embodiment, it is also performed the steps of when processor executes computer program
Preset time is waited, data packet is sent and receives success confirmation message, data packet receives success confirmation message for true
Recognize whether bank end UDP packet is successfully received.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is counted
Calculation machine program performs the steps of when being executed by processor
The data packet to be uploaded that taken-over vessel end terminal is sent, data packet to be uploaded, which carries, uploads TCP message, ship end terminal
Identity identification and purpose bank end terminal identity identification marking;
It is ship end UDP packet by packet encapsulation to be uploaded, sends ship end UDP packet;
The bank end UDP packet that bank end server returns is received, bank end UDP packet is decapsulated, acquisition return TCP message, bank end are whole
Hold identity identification and purpose ship end identity identification;
It sends and returns to TCP message and bank end terminal identity identification marking to the corresponding ship of purpose ship end identity identification
Hold terminal.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Preset duration is waited, data packet is sent and receives success confirmation message, data packet receives success confirmation message for true
Recognize whether ship end UDP packet is successfully received.
In one embodiment, it is also performed the steps of when computer program is executed by processor
It searches and carries identical bank end terminal identity identification marking and ship end identity identification in received bank end UDP packet
Bank end UDP packet;Obtain the return TCP message carried in the bank end UDP packet found;Combine the return TCP report found
Text obtains data splitting;Verify the integrality of data splitting.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Receive the data upload requests of each ship end terminal transmission;It is excellent to search the corresponding preset cache queue of each ship end terminal
First grade;According to each ship end terminal corresponding preset cache queue priority sequence, successively receive the transmission of each ship end terminal to upper
Pass data packet.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is counted
Calculation machine program performs the steps of when being executed by processor
The data packet to be sent that bank end terminal is sent is received, data packet to be sent, which carries, sends TCP message, bank end terminal
Identity identification and purpose ship end terminal identity identification marking;
It is bank end UDP packet by packet encapsulation to be sent, sends bank end UDP packet;
The ship end UDP packet of taken-over vessel end server passback, deblocking shipment end UDP packet, acquisition passback TCP message, ship end are whole
Hold identity identification and purpose bank end terminal identity identification marking;
It is corresponding to purpose bank end terminal identity identification marking with ship end terminal identity identification marking to send passback TCP message
Bank end terminal.
In one embodiment, it is also performed the steps of when computer program is executed by processor
Preset time is waited, data packet is sent and receives success confirmation message, data packet receives success confirmation message for true
Recognize whether bank end UDP packet is successfully received.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can
Completed with instructing relevant hardware by computer program, computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
It may include non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), may be programmed
ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory can
Including random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is in a variety of forms
It can obtain, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram
(DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus
(Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram
(RDRAM) etc..
As shown in Figure 10, the application provides a kind of ship networking immediate communication device, including Intranet communication module 910, outer net
Communication module 920 and bank end server 930, the Intranet communication module 910 and the outbound communication module 920 respectively with
Bank end server 930 connects, and the Intranet communication module 910 is connect with ship end server, the outbound communication module
920 connect with bank end terminal;
The ship end UDP packet that the 910 taken-over vessel end server of Intranet communication module is sent, sends the ship end UDP packet extremely
Bank end server 930, bank end server 930 decapsulate the ship end UDP packet, obtain ship end message and target
Bank end terminal identity identification marking sends ship end message and target bank end terminal identity identification marking to outbound communication
Module 920, the outbound communication module 920 are based on TCP communication agreement and send ship end message to target bank end terminal
The corresponding bank end terminal of identity identification;
The outbound communication module 920 receives the bank end TCP packet that bank end terminal is sent, and sends the bank end TCP packet to institute
Bank end server 930 is stated, bank end server 930 decapsulates the TCP packet, obtains bank end message data and object ship
Terminal identity identification marking is held, bank end message data and object ship end terminal identity identification marking are encapsulated, generates bank end
UDP packet sends the bank end UDP packet to the Intranet communication module 910, and the Intranet communication module 910 is communicated based on UDP
Agreement sends the bank end UDP packet to ship end server.
Identity identification is suitable for distinguishing identity, is specifically as follows IP, i.e. target bank end terminal identity identification marking
It is specifically as follows target bank end IP, object ship end terminal identity identification marking is specifically as follows object ship end IP.
For Intranet communication module 910 for realizing the data interaction with ship end side, Intranet communication module 910 specifically can be with
For Intranet network interface card, Intranet communication module 910 supports UDP communication protocol, Intranet communication module 910 that can be based on ship end side
UDP communication protocol is communicated, and without the shaking hands of similar TCP, is confirmed, window, re-transmission, the mechanism such as congestion control, can effectively be mentioned
High-transmission efficiency.
For outbound communication module 920 for realizing the data interaction with bank end terminal, outbound communication module 920 can be outer
Net network interface card, outbound communication module 920 support TCP communication agreement, and outbound communication module 920 and bank end terminal can be logical based on TCP
Letter agreement is communicated, it is ensured that communication reliability.
Bank end server 930 is used for by the deblocking of ship end UDP packet or by bank end TCP message and purpose ship end identification mark
Knowledge is encapsulated as bank end UDP packet, and bank end server 930 also distributes for Intranet communication module 910 and outbound communication module 920 respectively
Two different IP address.Bank end server 930 is specifically as follows Openfire server, and Openfire server is a kind of
Open source server, can specifically extend Openfire communication protocol, and the Openfire plug-in unit of udp protocol is realized based on mina, is made
Openfire server supports TCP and udp protocol simultaneously.Bank end server 930 can use multiple Openfire server groups
Net is constituted.
Above-mentioned ship networking immediate communication device, including Network Communication module, outbound communication module 920 and bank end server
930, the ship end UDP packet that 910 taken-over vessel end server of Intranet communication module is sent, the deblocking shipment of bank end server 930 end UDP
Packet, obtains ship end message and target bank end terminal identity identification marking, and outbound communication module 920 is sent out based on TCP communication agreement
Send ship end message to the corresponding bank end terminal of target bank end terminal identity identification marking;It is whole that outbound communication module 920 receives bank end
The bank end TCP packet sent is held, bank end server 930 decapsulates TCP packet, obtains bank end message data and object ship end terminal
Identity identification encapsulates bank end message data and object ship end terminal identity identification marking, generates bank end UDP packet, Intranet
Communication module 910 is based on UDP communication protocol and sends bank end UDP packet to ship end server.In whole process, ship end and bank end it
Between interaction message above-mentioned ship networking immediate communication device complete transfer, can efficiently realize instant messaging, be brought to user
Convenient operation.
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
Above embodiments only express the several embodiments of the application, and the description thereof is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art,
Without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection model of the application
It encloses.Therefore, the scope of protection shall be subject to the appended claims for the application patent.