CN103957084A - Cross-platform communication library and communication method thereof - Google Patents

Cross-platform communication library and communication method thereof Download PDF

Info

Publication number
CN103957084A
CN103957084A CN201410211301.9A CN201410211301A CN103957084A CN 103957084 A CN103957084 A CN 103957084A CN 201410211301 A CN201410211301 A CN 201410211301A CN 103957084 A CN103957084 A CN 103957084A
Authority
CN
China
Prior art keywords
message
platform
storehouse
module
communication
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
CN201410211301.9A
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.)
AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd
Original Assignee
AVONACO COMMUNICATION SYSTEMS (SUZHOU) 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 AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd filed Critical AVONACO COMMUNICATION SYSTEMS (SUZHOU) Co Ltd
Priority to CN201410211301.9A priority Critical patent/CN103957084A/en
Publication of CN103957084A publication Critical patent/CN103957084A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention relates to a cross-platform communication library and a communication method thereof, and the cross-platform communication library is a universal software communication library. A universal platform technology is adopted, adopted bottom layer calling is packaged, and the cross-platform communication library is adaptive to software products on different operating system platforms. The cross-platform communication library and the communication method are mainly used for communication between network endpoints in meetings. A UDP message is used for carrying communication information, a heartbeat mechanism is used for guaranteeing normal connection of networks, ACK response is used for guaranteeing an information loss retransmission function, various meeting terminal software on different system platforms can be connected through the same communication library, and the cross-platform communication library can be suitable for various system platforms after development in one time.

Description

A kind of Overpassing Platform by Using storehouse and communication means thereof
Technical field
The present invention relates to a kind of general meeting audio frequency and video software communication storehouse, it goes for the conference software of different system platform, for the mutual reliable communication between network endpoint.
Background technology
At the net environment based on TCP/IP, Overpassing Platform by Using storehouse can be used for the communication between terminal and the server of different system platform.It is between terminal and server under the collaborative platform of handling official business, and communication function between server.In order to adapt to different system platforms, Overpassing Platform by Using storehouse has adopted general platform library technology.Make terminal and server software application that it can be in different system.
Therefore, the details that Overpassing Platform by Using storehouse makes terminal and server no longer need consideration to communicate by letter, also without the different communication pool of the software development that is different system platform.In addition, Overpassing Platform by Using storehouse has also been used heartbeat and has replied retransmission mechanism, ensures that different network endpoints guarantees to know the reliable of the whether abnormal and communication of network.
In Chinese invention patent " a kind of cross-platform communication method and system " (CN 102571939), adopt Communication hiding details, the message of different platform is done to the technical scheme of changing, to solve the otherness of different platform message, be convenient to upper strata realization and needn't consider communication details.But how to guarantee the reliability of communication, Shortcomings in a lot of applied environments.
Summary of the invention
Problem to be solved by this invention is the deficiency existing for prior art, and a kind of cost that can reduce exploitation communication function in different system platform is provided, and improves software development efficiency, strengthens Overpassing Platform by Using storehouse and the communication means thereof of stability and reliability.
To achieve the above object of the invention, the technical solution used in the present invention is: a kind of Overpassing Platform by Using storehouse is provided, and it comprises interface module, network process module, and receipt message module, sends message module, Frame encapsulation and parsing module, log management module; In the interface module of described communication pool and network process module, be packaged with the system level call of each applicable system platform; Described communication pool adopts UDP message carrying communication information, uses heartbeat and ACK to reply the automatic Sampling network of repeat mechanism extremely and realizes and lose retransmitting function.
Applicable system platform of the present invention comprises Windows, Linux, IOS, Android.
The communication means in Overpassing Platform by Using as above storehouse, its content comprises:
Described Overpassing Platform by Using storehouse arranges heartbeat mechanism between transport module, the mutual timed sending heartbeat message of each end points of the communication pool connecting; Reply after receiving heartbeat immediately opposite end, and transmitting terminal point judges that the other side is normal condition after receiving and replying message; After the contact of both sides' end points is overtime, twocouese upper layer software (applications) report contact is interrupted;
Described Overpassing Platform by Using storehouse judges the size of the required inner capacities that initiates a message, if message content is excessive, message is carried out to burst processing, and excessive message content is arranged to burst sequence number, and the message that is packaged into small pieces is sent; The communication pool of opposite end reassembles into former message content according to burst sequence number, and to upper strata software report;
After described Overpassing Platform by Using storehouse initiates a message, wait opposite end is returned to ACK message authentication and is received, if do not receive the ACK message of opposite end, retransmit original message, until receive ACK or overtime, if overtime, confirm as that opposite end goes wrong or Network Abnormal, to upper strata software report;
Inner produce abnormal of message and Overpassing Platform by Using storehouse that described Overpassing Platform by Using storehouse adopts call back function method to receive to upper strata software report; The call back function that each module of upper layer software (applications) oneself is concerned about to the registration of Overpassing Platform by Using storehouse, and receive the corresponding message oneself needing.
Overpassing Platform by Using of the present invention storehouse messaging specifically comprises the steps:
(1) message that the transmission message module of transmitting terminal is sent upper layer software (applications) is analyzed, judge the size of message content amount, if message content is excessive, message is carried out to burst processing, be inserted into again and send in messaging list, and sending times and the time-out count of message are set;
(2) transmitting terminal is assembled into network data frame the message sending in Frame assembling parsing module, and excessive message content is arranged to burst sequence number, is packaged into the message of small pieces, initiates a message by network process module;
(3) transmitting terminal is received after internal timing message at every turn, and the retransmission count and the time-out count that send every message in messaging list are subtracted to 1, and then resend message is to receiving terminal, until retransmission count is kept to 0; In the time that time-out count is kept to 0, to confirm to send unsuccessfully, readjustment upper layer software (applications) carries out failure handling;
(4) transmitting terminal is received after the ack message of receiving terminal response, from send messaging list, deletes corresponding message;
(5) receiving terminal is received after message in network process module, and Frame assembling and parsing module are resolved;
(6) receiving terminal judges whether it is heartbeat message in receipt message module: be to proceed to heartbeat message processing; Otherwise be transferred to next step;
(7) receiving terminal determines whether the ack message of sending opposite end, is to forward in sending module corresponding message in clear to send message queue to, otherwise is transferred to next step;
(8) receiving terminal judges whether it is the message that need to respond ack message, is to send ack message to respond, otherwise proceeds to next step;
(9) receiving terminal determines whether fragmental messages, is to enter merge the processing of fragmental messages and adjust back to upper layer software (applications) processing after merging completes, otherwise directly adjusts back to upper layer software (applications).A kind of communication pool based on general-purpose system platform
In order to guarantee to use in different system platforms.Communication pool of the present invention has encapsulated all system level calls completely in interface module and network process module.Communication pool just need not be concerned about the operating system environment of low layer like this.And whole Overpassing Platform by Using storehouse can be according to the difference of system environments, use different compiling files and compile option, be compiled into the communication pool that varying environment is used.Applicable system platform comprises Windows, Linux, IOS, Android etc.
Described Overpassing Platform by Using storehouse ensures that with heartbeat mechanism the network endpoint (between terminal and server, between server and server) connecting remains contact.Heartbeat between transport module, the mutual timed sending heartbeat message of communication pool end points connecting.Reply after receiving heartbeat immediately opposite end, and after the former receives reply message, handle can judge that the other side is normal condition; When both sides' end points out of touch overtime after, both sides are interrupted to upper strata report contact.
Possible packet loss problem when UDP communication is guaranteed to avoid by ACK acknowledgement mechanism in described Overpassing Platform by Using storehouse.After every message is sent, all to wait for that opposite end returns to ACK message authentication and receive.If do not receive the ACK message of opposite end, retransmit original message, until receive ACK or overtime.If overtime, confirm that opposite end goes wrong or Network Abnormal, and report to upper strata.
Described Overpassing Platform by Using storehouse is used burst mechanism.To excessive message the message of image content (as include), automatically carry out burst, the message that is packaged into small pieces is sent.The communication pool of opposite end is according to the original message of automatically recombinating back of the sequence number on burst, then reports to upper layer software (applications).Upper layer software (applications) can need not be concerned about this, only need messaging.Avoid so the Bao Tai great of each UDP, and cause makeing mistakes in the middle of transmitting procedure.
The message that receive to upper strata software report by the mode of call back function in described Overpassing Platform by Using storehouse.Inner abnormal (as communication pool finds that opposite end is out of touch, the network interruption etc.) report producing in Overpassing Platform by Using storehouse also completes by the mode of call back function.Each module of upper layer software (applications) can, by the call back function of oneself being concerned about to the registration of Overpassing Platform by Using storehouse, be guaranteed the message of receiving that oneself needs.To unwanted message, can not adjust back upper strata.
Compared with prior art, Overpassing Platform by Using provided by the invention storehouse can greatly reduce the development amount of software, does not need the details of considering communication realization also without the different communication pool of software development under different system platform.Both can ensure the development quality of communication software, also can ensure the reliability of communication.
Brief description of the drawings
Fig. 1 is the system configuration schematic diagram in the Overpassing Platform by Using storehouse that provides of the embodiment of the present invention;
Fig. 2 is the structural representation in the Overpassing Platform by Using storehouse that provides of the embodiment of the present invention;
Fig. 3 is the flow chart that request is initiated in the heartbeat in the Overpassing Platform by Using storehouse that provides of the embodiment of the present invention;
Fig. 4 is the flow chart of the reception heartbeat response in the Overpassing Platform by Using storehouse that provides of the embodiment of the present invention;
Fig. 5 is the flow chart of the general message of transmission in the Overpassing Platform by Using storehouse that provides of the embodiment of the present invention;
The Overpassing Platform by Using storehouse that when Fig. 6, the embodiment of the present invention provides receives the flow chart of general message.
Embodiment
Below in conjunction with drawings and Examples, the invention will be further described.
Embodiment mono-:
Referring to accompanying drawing 1, it is the system configuration schematic diagram in the Overpassing Platform by Using storehouse that provides of the present embodiment.As seen from Figure 1, upper layer software (applications) receives by registered callbacks function the message that receive in Overpassing Platform by Using storehouse.The connection of lower floor on Ethernet is responsible in Overpassing Platform by Using storehouse.In the present embodiment, carry out the message of two end points of bearer network with UDP message.
Referring to accompanying drawing 2, it is the structural representation in the Overpassing Platform by Using storehouse that provides of the present embodiment, and as seen from Figure 2, it mainly comprises interface module, network process module, and receipt message module, sends message module, Frame encapsulation and parsing module, log management module.
Referring to accompanying drawing 3, it is the heartbeat request flow chart in the Overpassing Platform by Using storehouse that provides of the present embodiment, and as seen from Figure 3, after Overpassing Platform by Using storehouse starts, timer is also activated.And make communication pool to send heartbeat message with identical interval by timed message.
Referring to accompanying drawing 4, it is the heartbeat responding process figure in the Overpassing Platform by Using storehouse that provides of the present embodiment, and as seen from Figure 4, Overpassing Platform by Using storehouse receiving after heartbeat response message, checks and whether has corresponding heartbeat message sending in message history list.If any, from send history list, delete, remove Heart rate meters.According to timed message, Heart rate meters successively decreases simultaneously.In the time of Heart rate meters zero clearing, readjustment heartbeat timeout function.
Referring to accompanying drawing 5, it is the transmission message flow chart in the Overpassing Platform by Using storehouse that provides of the present embodiment, and as seen from Figure 5, Overpassing Platform by Using storehouse requires to initiate a message according to upper strata, and the message sending is counted and sent in history lists, and sending times and time-out count are set.After each timed message comes, check and send message history table.Sending times is not 0 message, again retransmits and the sending times that successively decreases.Time-out count is 0 message, proceeds to timeout treatment.
Referring to accompanying drawing 6, it is the receipt message flow chart in the Overpassing Platform by Using storehouse that provides of the present embodiment, and as seen from Figure 6, is receiving after message in Overpassing Platform by Using storehouse, checks whether be heartbeat message.In this way, proceed to heartbeat message processing.Otherwise, check whether be ACK response message, in this way, from send message history list, delete the corresponding message that sends, no longer retransmit and remember overtime.Whether be the message that need to respond ACK, in this way, respond ACK to opposite end if reexamining.After allowing, whether be the message of burst processing.Finally complete message is put into readjustment and give upper strata processing.
According to Fig. 5 and Fig. 6.The flow process of Overpassing Platform by Using storehouse messaging is as follows:
1, the message that the transmission message module of transmitting terminal is sent upper layer software (applications) is analyzed, judge the size of message content amount, if message content is excessive, message is carried out to burst processing, be inserted into again and send in messaging list, and sending times and the time-out count of message are set;
2, transmitting terminal is assembled into network data frame the message sending in Frame assembling parsing module, and excessive message content is arranged to burst sequence number, is packaged into the message of small pieces, initiates a message by network process module;
3, transmitting terminal is received after internal timing message at every turn, and the retransmission count and the time-out count that send every message in messaging list are subtracted to 1, and then resend message is to receiving terminal, until retransmission count is kept to 0; In the time that time-out count is kept to 0, to confirm to send unsuccessfully, readjustment upper layer software (applications) carries out failure handling;
4, transmitting terminal is received after the ack message of receiving terminal response, from send messaging list, deletes corresponding message;
5, receiving terminal is received after message in network process module, and Frame assembling and parsing module are resolved;
6, receiving terminal judges whether it is heartbeat message in receipt message module: be to proceed to heartbeat message processing; Otherwise be transferred to next step;
7, receiving terminal determines whether the ack message of sending opposite end, is to forward in sending module corresponding message in clear to send message queue to, otherwise is transferred to next step;
8, receiving terminal judges whether it is the message that need to respond ack message, is to send ack message to respond, otherwise proceeds to next step;
9, receiving terminal determines whether fragmental messages, is to enter merge the processing of fragmental messages and adjust back to upper layer software (applications) processing after merging completes, otherwise directly adjusts back to upper layer software (applications).

Claims (4)

1. an Overpassing Platform by Using storehouse, is characterized in that: it comprises interface module, network process module, and receipt message module, sends message module, Frame encapsulation and parsing module, log management module; In the interface module of described communication pool and network process module, be packaged with the system level call of each applicable system platform; Described communication pool adopts UDP message carrying communication information, uses heartbeat and ACK to reply the automatic Sampling network of repeat mechanism extremely and realizes and lose retransmitting function.
2. a kind of Overpassing Platform by Using according to claim 1 storehouse, described applicable system platform comprises Windows, Linux, IOS, Android.
3. the communication means in Overpassing Platform by Using as claimed in claim 1 storehouse, is characterized in that:
Described Overpassing Platform by Using storehouse arranges heartbeat mechanism between transport module, the mutual timed sending heartbeat message of each end points of the communication pool connecting; Reply after receiving heartbeat immediately opposite end, and transmitting terminal point judges that the other side is normal condition after receiving and replying message; After the contact of both sides' end points is overtime, twocouese upper layer software (applications) report contact is interrupted;
Described Overpassing Platform by Using storehouse judges the size of the required inner capacities that initiates a message, if message content is excessive, message is carried out to burst processing, and excessive message content is arranged to burst sequence number, and the message that is packaged into small pieces is sent; The communication pool of opposite end reassembles into former message content according to burst sequence number, and to upper strata software report;
After described Overpassing Platform by Using storehouse initiates a message, wait opposite end is returned to ACK message authentication and is received, if do not receive the ACK message of opposite end, retransmit original message, until receive ACK or overtime, if overtime, confirm as that opposite end goes wrong or Network Abnormal, to upper strata software report;
Inner produce abnormal of message and Overpassing Platform by Using storehouse that described Overpassing Platform by Using storehouse adopts call back function method to receive to upper strata software report; The call back function that each module of upper layer software (applications) oneself is concerned about to the registration of Overpassing Platform by Using storehouse, and receive the corresponding message oneself needing.
4. the communication means in Overpassing Platform by Using according to claim 3 storehouse, is characterized in that: the flow process of Overpassing Platform by Using storehouse messaging comprises the steps:
(1) message that the transmission message module of transmitting terminal is sent upper layer software (applications) is analyzed, judge the size of message content amount, if message content is excessive, message is carried out to burst processing, be inserted into again and send in messaging list, and sending times and the time-out count of message are set;
(2) transmitting terminal is assembled into network data frame the message sending in Frame assembling parsing module, and excessive message content is arranged to burst sequence number, is packaged into the message of small pieces, initiates a message by network process module;
(3) transmitting terminal is received after internal timing message at every turn, and the retransmission count and the time-out count that send every message in messaging list are subtracted to 1, and then resend message is to receiving terminal, until retransmission count is kept to 0; In the time that time-out count is kept to 0, to confirm to send unsuccessfully, readjustment upper layer software (applications) carries out failure handling;
(4) transmitting terminal is received after the ack message of receiving terminal response, from send messaging list, deletes corresponding message;
(5) receiving terminal is received after message in network process module, and Frame assembling and parsing module are resolved;
(6) receiving terminal judges whether it is heartbeat message in receipt message module: be to proceed to heartbeat message processing; Otherwise be transferred to next step;
(7) receiving terminal determines whether the ack message of sending opposite end, is to forward in sending module corresponding message in clear to send message queue to, otherwise is transferred to next step;
(8) receiving terminal judges whether it is the message that need to respond ack message, is to send ack message to respond, otherwise proceeds to next step;
(9) receiving terminal determines whether fragmental messages, is to enter merge the processing of fragmental messages and adjust back to upper layer software (applications) processing after merging completes, otherwise directly adjusts back to upper layer software (applications).
CN201410211301.9A 2014-05-20 2014-05-20 Cross-platform communication library and communication method thereof Pending CN103957084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410211301.9A CN103957084A (en) 2014-05-20 2014-05-20 Cross-platform communication library and communication method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410211301.9A CN103957084A (en) 2014-05-20 2014-05-20 Cross-platform communication library and communication method thereof

Publications (1)

Publication Number Publication Date
CN103957084A true CN103957084A (en) 2014-07-30

Family

ID=51334318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410211301.9A Pending CN103957084A (en) 2014-05-20 2014-05-20 Cross-platform communication library and communication method thereof

Country Status (1)

Country Link
CN (1) CN103957084A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790728A (en) * 2017-03-30 2017-05-31 北京深思数盾科技股份有限公司 information push method and system
CN108183842A (en) * 2018-01-15 2018-06-19 郑州云海信息技术有限公司 The superior and the subordinate's management platform connection system and method in a kind of server hierarchy management
CN107483280B (en) * 2016-06-07 2021-03-09 阿里巴巴集团控股有限公司 Method and device for monitoring service node device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532948A (en) * 2013-10-11 2014-01-22 苏州新海宜通信科技股份有限公司 Binary system communication structure

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532948A (en) * 2013-10-11 2014-01-22 苏州新海宜通信科技股份有限公司 Binary system communication structure

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483280B (en) * 2016-06-07 2021-03-09 阿里巴巴集团控股有限公司 Method and device for monitoring service node device
CN106790728A (en) * 2017-03-30 2017-05-31 北京深思数盾科技股份有限公司 information push method and system
CN108183842A (en) * 2018-01-15 2018-06-19 郑州云海信息技术有限公司 The superior and the subordinate's management platform connection system and method in a kind of server hierarchy management

Similar Documents

Publication Publication Date Title
US9832681B2 (en) Higher layer compression with lower layer signaling
CN103036904B (en) A kind of udp protocol that uses in a communication network carries out the method for reliable data transmission
US10284340B2 (en) Multicast sending apparatus, multicast receiving apparatus, and multicast transmission determining method
US7813745B2 (en) Method for implementing a push service
CN102480575B (en) VOIP recording control method and system thereof
CN103973414B (en) A kind of data transmission method and device
KR101567292B1 (en) Interface between restful web services and packet-switched networks for text messaging
CN107567107A (en) A kind of method and device for transmitting data
CN105743865A (en) Multimedia file data transmission system and transmission method
CN104618007B (en) A kind of synchronous satellite Transmission Control Protocol segmentation connection optimization method
CN105681160A (en) Methods and apparatuses for correcting session message disorder in instant communication system
CN103957084A (en) Cross-platform communication library and communication method thereof
CN102769520A (en) Wireless network congestion control method based on stream control transmission protocol (SCTP)
US7995517B2 (en) System and method for transmitting units of messages in a mobile communication system
CN104427551A (en) A business message transmitting method and apparatus
CN105792147A (en) Short message delivery failure processing method, device and system
US20230353685A1 (en) Device and method for recovering lost information in wireless communication system
CN117040692A (en) Method and device for transmitting service data, electronic equipment and storage medium
CN116599953A (en) File uploading method, device, system, equipment and readable storage medium
WO2017049934A1 (en) Single call method in dmo communication and terminal
CN101729436B (en) Method for acquiring messages and convergence message service system
CN116963175A (en) Data transmission method, device and system
CN103532948A (en) Binary system communication structure
WO2012155703A1 (en) Link parameter autonegotiation method, terminal and system based on hdlc protocol
US11582353B2 (en) Voice signaling transmission method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: Avonaco Communication Systems (Suzhou) Co., Ltd.

Document name: Notification that Application Deemed to be Withdrawn

DD01 Delivery of document by public notice
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140730

WD01 Invention patent application deemed withdrawn after publication