CN107786464A - A kind of method and device for realizing inter-node communication - Google Patents

A kind of method and device for realizing inter-node communication Download PDF

Info

Publication number
CN107786464A
CN107786464A CN201710862582.8A CN201710862582A CN107786464A CN 107786464 A CN107786464 A CN 107786464A CN 201710862582 A CN201710862582 A CN 201710862582A CN 107786464 A CN107786464 A CN 107786464A
Authority
CN
China
Prior art keywords
message
link
queue
bearing
link layer
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.)
Granted
Application number
CN201710862582.8A
Other languages
Chinese (zh)
Other versions
CN107786464B (en
Inventor
刘应江
杨红霞
刘昊
彭正非
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Changjiang Computing Technology Co ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201710862582.8A priority Critical patent/CN107786464B/en
Publication of CN107786464A publication Critical patent/CN107786464A/en
Application granted granted Critical
Publication of CN107786464B publication Critical patent/CN107786464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/527Quantum based scheduling, e.g. credit or deficit based scheduling or token bank
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC

Abstract

The invention discloses a kind of method and device for realizing inter-node communication, it is related to technical field of communication network.This method includes:First communication node is logically layered and carries out tissue, makes the logical layered architecture of communication node include management level, link layer and bearing bed, and is both designed as being associated caching using queue between management level, link layer and bearing bed;Resettle the communication link between local terminal and opposite end;Then, message to be sent is put into the transmission buffering queue of given link by local terminal management level, and message to be sent is put into by link layer to be confirmed in queue and send message to opposite end communication node by bearing bed;Opposite end will receive message by bearing bed and be put into receiving cache queue, and the message received is then put into the upstream queue of link by link layer, and management level obtain the message data of reception from upstream queue, so as to realize inter-node communication.By the above method, the communication efficiency of inter-node communication can be effectively improved when realizing inter-node communication.

Description

A kind of method and device for realizing inter-node communication
Technical field
The present invention relates to technical field of communication network, is specifically a kind of method and device for realizing inter-node communication.
Background technology
In existing communication network, each communication equipment is referred to as a node;Or communication equipment is in itself by multiple industry Business single-deck provides data processing function jointly, and each business single-deck is also referred to as a node.
At present, in the communication between realizing each node, during generally use caches data copy to socket, Ran Houyou The mode that application program is read.But the socket caching of the implementation is cumbersome, reduces communication efficiency;Moreover, also The problems such as in the presence of lock processing and interrupt processing is introduced, so as to add the complexity of system, the efficiency of network portion is not only influenceed, More reduce the communication efficiency of whole system.
Therefore, how when realizing inter-node communication, it is that those skilled in the art are urgently to be resolved hurrily to effectively improve communication efficiency The problem of.
The content of the invention
The invention aims to overcome the shortcomings of above-mentioned background technology, there is provided a kind of method for realizing inter-node communication And device, the communication efficiency of inter-node communication when realizing inter-node communication, can be effectively improved.
To achieve the above objectives, the present invention provides a kind of method for realizing inter-node communication, and this method comprises the following steps:
Step S1, communication node is logically layered and carries out tissue, make the logical layered architecture of communication node include pipe Manage layer, link layer and bearing bed;Wherein:
Management level, for providing a user the operate interface of given link, include the receipts for creating interface and data of link Send out interface;Link layer, for providing the establishment of link to management level, user data sends and receives, and provides to bearing bed Message sends and receives;Bearing bed, it is carried on logical channel, relies on carried logical channel transmitting-receiving message, will connect The message received is reported to link layer, and the transmission of message is provided to link layer, and a bearing bed is responsible for multiple link layer reports The transmission and reception of text;
Also, it is associated between the management level and link layer as local terminal using transmission buffering queue, link layer is with holding It is associated between carrier layer using confirmation queue;Receiving cache queue is used to carry out as between the bearing bed and link layer of opposite end Association, is associated between link layer and management level using upstream queue;
Step S2, the link establishment interface provided by management level, local terminal communication node and opposite end are established using link layer The link to be communicated between communication node;
Step S3, sent and reported to opposite end communication node by the transmission data-interface that local terminal communication node management level provide Text;When sending message, management level are put into message to be sent in the transmission buffering queue of given link and notifying link layer, chain Using segmentation sending method, message to be sent is put into be confirmed in queue and is sent out by bearing bed to opposite end communication node road floor Deliver newspaper text;
Step S4, the reception data-interface provided by the management level of opposite end communication node receives message;When receiving message, Message will be received by bearing bed to be put into the receiving cache queue of link and notifying link layer, link layer will then receive Message be put into the upstream queue of link, management level obtain the message data of reception from upstream queue.
On the basis of above-mentioned technical proposal, in step S2, establish local terminal communication node using link layer and communicated with opposite end The link to be communicated between node, specifically includes following steps:
Step S201, local terminal communication node establishes message using link layer to opposite end communication node transmission link;
Step S202, after opposite end communication node receives link establishment message, transmission link establishes response message, and starts chain Road heartbeat mechanism;
Step S203, after local terminal communication node receives link establishment response message, stop transmission link and establish request message, Link State is set to link setup state, and starts link heartbeat mechanism, completes the foundation of communication link.
On the basis of above-mentioned technical proposal, the link layer is that the data of message to be sent are filled into multiple link reports In the payload of literary burst, and multiple link packet bursts are packaged into a bearing message and are put into confirmation queue.
On the basis of above-mentioned technical proposal, in step S3, link layer is put message to be sent using segmentation sending method Enter into confirmation queue and send message by bearing bed to opposite end communication node, specifically include following steps:
Step S301, link layer inspection confirms whether have space to deposit message to be sent in queue, if so, then being buffered from transmission Message to be sent is obtained in queue, is transferred to step S302;Otherwise, S301 is re-executed;
Step S302, judge currently whether there is bearing message to be sent, if so, being transferred to step S303;Otherwise, it is transferred to step S305;
Step S303, check whether the payload length of current bearing message to be sent exceedes the length of default bearing message Degree, if being not above, is transferred to step S306, if exceeding, is transferred to step S304;
Step S304, being put into current bearing message to be sent confirms in queue, and the bearing message to be sent is clear Remove, be transferred to step S305;
Step S305, a new bearing message to be sent is created, is then transferred to step S302;
Step S306, a link packet burst is distributed from current bearing message to be sent, and is treated what is got The data for sending message are filled into the link packet burst, are transferred to step S307;
Step S307, judge to confirm not confirming whether number exceedes the preset value specified in queue, it is described not confirm number =the dequeue number for confirming queue-has proven to number, and the dequeue number for confirming queue is the sum of the bearing message sent, It is described to have proven to the number that number is the bearing message that have received response;If exceeding, return to step S302, if not exceeded, then It is transferred to step S308;
Step S308, from confirm queue in obtain bearing message, judge opposite end communication node whether congestion, if not congestion, Bearing message is then sent to opposite end communication node by the transmission interface that bearing bed provides, and the dequeue number for confirming queue is passed Increase;If congestion, return to step S307.
On the basis of above-mentioned technical proposal, in step S4, bearing bed delays the reception for receiving message and being put into link Rush in queue and the message received be then put into the upstream queue of link by notifying link layer, link layer, specifically include with Lower step:
Step S401, whether the bearing message that bearing bed inspection receives is legal, if illegal, packet loss;If legal, Bearing message is put into in the receiving cache queue of link simultaneously notifying link layer;
Step S402, link layer checks whether the bearing message in receiving cache queue has received, if not received, turns Enter step S403;If reception is complete, step S411 is transferred to;
Step S403, bearing message is obtained from receiving cache queue, is transferred to step S404;
Whether the type for step S404, checking the bearing message got is data message type, if so, being then transferred to step S405;Otherwise, it is transferred to step S410;
Step S405, check whether the sequence number of bearing message is consistent with the packet receiving sequence of link layer, if unanimously, being transferred to step S406;Otherwise, return to step S402;
Step S406, judge whether the link packet burst contained by bearing message has all recombinated, if so, return to step S402;Otherwise, it is transferred to step S407;
Step S407, the link packet burst of bearing message is obtained, is transferred to step S408;
Step S408, judge whether the sequence number of link packet burst is consistent with the bearing message sequence number of last time, if differing Cause, then after creating a new link packet to be received, be transferred to step S409;If consistent, step S409 is directly transferred to;
Step S409, the link packet burst of same sequence number is re-assembled in link packet to be received, will be to be received Link packet is put into the upstream queue of link, and empties link packet to be received, is transferred to step S406;
Step S410, data answering message is sent to local terminal communication node, and to the bearing message of non-data type of message Handled, return to step S402;
Step S411, data answering message is sent to local terminal communication node.
On the basis of above-mentioned technical proposal, the operate interface that the management level provide a user also includes class Select behaviour Make interface and Link State, the inquiry operation interface of statistics.
On the basis of above-mentioned technical proposal, the link layer also provides the heartbeat mechanism of detecting link state, and supports Congestion control, flow control, the function of largest buffered control.
On the basis of above-mentioned technical proposal, the bearing bed is additionally operable to read the information of logical channel in configuration file, The content of the configuration file includes logical channel type, COM1 information.
On the basis of above-mentioned technical proposal, the bearing bed can be carried on a variety of logical channels, described a variety of to patrol Collecting passage includes UDP, MAC physical layer, I2C buses.
The present invention also provides a kind of device for realizing inter-node communication based on the above method, and the device is located at each communication section In point, including logical layered architecture creation module, communication link establish module, message sends processing module and message reception processing Module;
The logical layered architecture creation module is used for:Communication node is logically layered and carries out tissue, makes communication section The logical layered architecture of point includes management level, link layer and bearing bed;
The communication link is established module and is used for:The link establishment interface provided by management level, is established using link layer The link to be communicated between local terminal communication node and opposite end communication node;
The message sends processing module and is used for:When as local terminal, by management level provide transmission data-interface to Opposite end communication node sends message;When sending message, the transmission that message to be sent is put into given link by management level buffers team In row and message to be sent is put into confirmation queue and by holding by notifying link layer, link layer using segmentation sending method Carrier layer sends message to opposite end communication node;
The message receiving processing module is used for:When as opposite end, the reception data-interface provided by management level connects Receiving text;When receiving message, message will be received by bearing bed and be put into the receiving cache queue of link simultaneously notifying link The message received is then put into the upstream queue of link by layer, link layer, and management level obtain what is received from upstream queue Message data.The beneficial effects of the present invention are:
(1) in the present invention, the logical layered architecture of communication node is designed as management level, link layer and bearing bed.Wherein, Management level, for providing a user the operate interface of given link, including the establishment interface of link and the transceiver interface of data;Chain Road floor, for providing the establishment of link to management level, user data sends and receives, and provides the transmission of message to bearing bed And reception;Bearing bed, it is carried on logical channel, relies on carried logical channel transmitting-receiving message, the message that will be received Be reported to link layer, and the transmission of message be provided to link layer, and a bearing bed be responsible for the transmissions of multiple link layer messages with Receive;Also, it is both designed as being associated caching using queue between management level, link layer and bearing bed so that communication efficiency The problems such as getting a promotion, nor lock processing and interrupt processing occurs, system complexity is low so that the communication of whole system Efficiency high.
(2) in the present invention, link layer is filled into the data of message to be sent in the payload of multiple link packet bursts, And multiple link packet bursts are packaged into a bearing message and are put into confirmation queue;And sender node carries out message Segmentation is sent, and message is carried out restructuring reception, can effectively improve the handling capacity of bearing bed by receiving terminal.
(3) in the present invention, in order to meet the Function Extension demand of inter-node communication so that the function of each communication node is more Powerful, the operate interface that management level provide a user given link also includes class Select operate interfaces and Link State, system The inquiry operation interface of meter;Link layer also provides the heartbeat mechanism of detecting link state, and support congestion control, flow to control, Largest buffered control etc.;Bearing bed is additionally operable to read information of logical channel etc. in configuration file.
(4) in the present invention, bearing bed can be carried on a variety of logical channels, including UDP, MAC physical layer, I2C buses Deng, be applicable scene it is extensive.
(5) in the present invention, because a bearing bed can be responsible for the transmission and reception of multiple link layer datas, therefore it is settable Multiple link layer process tasks carry out transmitting-receiving Message processing, so as to further increase communication efficiency.
Brief description of the drawings
Fig. 1 is the flow chart for the method that inter-node communication is realized in the embodiment of the present invention;
Fig. 2 is the schematic block diagram of the logical layered architecture of communication node in the embodiment of the present invention;
Fig. 3 is the particular flow sheet that communication link is established in the embodiment of the present invention;
Fig. 4 is the encapsulating structure schematic diagram of bearing message in the embodiment of the present invention;
Fig. 5 is the particular flow sheet that link of embodiment of the present invention layer sends message to opposite end communication node;
Fig. 6 be in the embodiment of the present invention bearing bed by message be put into receiving cache queue, link layer message is put into it is up The particular flow sheet of queue;
Fig. 7 is the structured flowchart for the device that inter-node communication is realized in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawings and specific embodiment the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides a kind of method for realizing inter-node communication, and this method includes following step Suddenly:
Step S1, logical layered architecture is created:Tissue is carried out as shown in Fig. 2 communication node is logically layered, makes to lead to The logical layered architecture of letter node includes management level, link layer and bearing bed;Wherein:
Management level, for providing a user the operate interface of given link, include the receipts for creating interface and data of link Send out interface;Link layer, for providing the establishment of link to management level, user data sends and receives, and provides to bearing bed Message sends and receives;It bearing bed, can be carried on a variety of logical channels, rely on carried logical channel and transmit and receive telegrams Text, the message received is reported into link layer, and the transmission of message is provided to link layer, and a bearing bed is responsible for multiple chains The transmission and reception of road layer data;
Also, it is associated between the management level and link layer as local terminal (transmitting terminal) using transmission buffering queue, chain It is associated between road floor and bearing bed using confirmation queue;Used between bearing bed and link layer as opposite end (receiving terminal) Receiving cache queue is associated, and is associated between link layer and management level using upstream queue.
Further, in order to meet the Function Extension demand of inter-node communication so that the function of each communication node is more strengthened Greatly.In the present embodiment, the operate interface that management level provide a user given link also includes class Select operate interfaces and chain The inquiry operation interface of line state, statistics.Link layer also provides the heartbeat mechanism of detecting link state, and support congestion control, Flow control, largest buffered control etc..Bearing bed is additionally operable to read the information of logical channel in configuration file, creates bearing bed simultaneously Message is received, wherein configuration file content includes logical channel type, COM1 information.Also, bearing bed can be carried on more On kind logical channel, a variety of logical channels include UDP (User Datagram Protocol, User Datagram Protocol), MAC (Media Access Control, physical layer address) physical layer, I2C (Inter-Integrated Circuit, inside collection Into circuit) bus etc., it is extensive to be applicable scene.
Step S2, local terminal and the communication link of opposite end are established:The link establishment interface provided by management level, utilizes link Layer establishes the link that local terminal communication node is communicated with opposite end communication node.
Specifically, clicked through as shown in figure 3, establishing local terminal communication node using link layer in step S2 with opposite end communication section The link of row communication, specifically includes following steps:
Step S201, local terminal communication node establishes message using link layer to opposite end communication node transmission link;
Step S202, after opposite end communication node receives link establishment message, transmission link establishes response message, and starts chain Road heartbeat mechanism;
Step S203, after local terminal communication node receives link establishment response message, stop transmission link and establish request message, Link State is set to link setup state, and starts link heartbeat mechanism, so as to complete the foundation of communication link.
Step S3, local terminal communication node sends message:As shown in Fig. 2 user is carried by the management level of local terminal communication node The transmission data-interface of confession sends message to opposite end communication node;When local terminal communication node sends message, management level will be to be sent Message is put into the transmission buffering queue of given link and notifying link layer, and link layer, will be pending using segmentation sending method Text of delivering newspaper, which is put into, to be confirmed in queue and sends message to opposite end communication node by the transmission interface that bearing bed provides.
It is understood that in order to strengthen the handling capacity of bearing bed, communication efficiency is further lifted, in the present embodiment, chain Road floor is filled into the data of message to be sent in the payload of multiple link packet bursts, and multiple link packet bursts are sealed A bearing message is dressed up to be put into confirmation queue.Specifically, multiple link packet bursts are packaged into the lattice of bearing message Formula structure is as shown in figure 4, wherein, bearing message head record local terminal link identification, opposite end link identification, send sequence, link packet Frame number, payload length information etc.;The information such as sequence number, current frame number and the current frame length of link packet head recording carrying message, Link packet burst with same sequence number will re-assembly in receiving terminal.On this basis, as shown in figure 5, in step S3 Message to be sent is put into the transmission interface for confirming to provide in queue and by bearing bed by link layer using segmentation sending method Message is sent to opposite end communication node, specifically includes following steps:
Step S301, link layer inspection confirms whether have space to deposit message to be sent in queue, if so, then being buffered from transmission Message to be sent is obtained in queue, is transferred to step S302;Otherwise, S301 is re-executed;
Step S302, judge currently whether have bearing message to be sent (can be by checking it is pending whether link layer object has Send bearing message), if so, being transferred to step S303;Otherwise, it is transferred to step S305;
Step S303, check whether the payload length of current bearing message to be sent exceedes the length of default bearing message Degree, if being not above, is transferred to step S306, if exceeding, is transferred to step S304;
Step S304, being put into current bearing message to be sent confirms in queue, and the bearing message to be sent is clear Remove, be transferred to step S305;
Step S305, a new bearing message to be sent is created, is then transferred to step S302;
Step S306, a link packet burst is distributed from current bearing message to be sent, and is treated what is got The data for sending message are filled into the link packet burst, are transferred to step S307;
Step S307, judge to confirm not confirming whether number exceedes the preset value (preset value specified specified in queue Can be configured and adjust as the case may be), the dequeue number (carrying sent for not confirming number=confirmation queue The sum of message)-number is had proven to, it is described to have proven to the number that number is the bearing message that have received response;If exceeding, return Step S302 is returned, if not exceeded, being then transferred to step S308;It is understood that opposite end communication node is whenever receiving bearing message Afterwards, corresponding reply data message can be sent, after local terminal communication node have received the corresponding response of the bearing message sent, Then represent that the bearing message is proved, then having proven to number accordingly will be incremented by.Only number is not confirmed in queue is confirmed When being not above the preset value specified, the transmission of bearing message is just carried out, so as to which the transmission reached to bearing message is carried out effectively The purpose of control, improves communication efficiency;
Step S308, from confirm queue in obtain bearing message after, judge opposite end communication node whether congestion, if not gathering around Plug, then bearing message, and the dequeue that will confirm queue are sent to opposite end communication node by the transmission interface that bearing bed provides Number is incremented by;If congestion, return to step S307.
Step S4, opposite end communication node receives message:As shown in Fig. 2 management of the peer user by opposite end communication node The reception data-interface that layer provides receives message;When opposite end communication node receives message, pass through the receiving interface of bearing bed offer Message will be received to be put into the receiving cache queue of link and notifying link layer, the message received is then put into by link layer Into the upstream queue of link, management level obtain the message data of reception from upstream queue.
It can also be appreciated that in the present embodiment, because the message that bearing bed receives is bearing message, and original report The data of text are stored in the payload of multiple link packet bursts, therefore, in order to obtain the data of original message, opposite end Link layer can carry out restructuring reception to the link packet burst in bearing message.On this basis, as shown in fig. 6, in step S4 Bearing bed will receive message and be put into the receiving cache queue of link simultaneously notifying link layer, the report that link layer will then receive Text is put into the upstream queue of link, specifically includes following steps:
Step S401, whether the bearing message that bearing bed inspection receives is legal, if illegal, packet loss;If legal, Bearing message is put into in the receiving cache queue of link simultaneously notifying link layer;
Step S402, link layer checks whether the bearing message in receiving cache queue has received, if not received, turns Enter step S403;Otherwise, it is transferred to step S411;
Step S403, bearing message is obtained from receiving cache queue, is transferred to step S404;
Whether the type for step S404, checking the bearing message got is data message type, if so, being then transferred to step S405;Otherwise, it is transferred to step S410;
Step S405, check whether the sequence number of bearing message is consistent with the packet receiving sequence of link layer, if unanimously, being transferred to step S406;Otherwise, return to step S402;
Step S406, judge whether the link packet burst contained by bearing message has all recombinated, if so, return to step S402;Otherwise, it is transferred to step S407;
Step S407, the link packet burst of bearing message is obtained, is transferred to step S408;
Step S408, judge whether the sequence number of link packet burst is consistent with the bearing message sequence number of last time, if differing Cause, then after creating a new link packet to be received, be transferred to step S409;If consistent, step S409 is directly transferred to;
Step S409, the link packet burst of same sequence number is re-assembled in link packet to be received, will be to be received Link packet is put into the upstream queue of link, and empties link packet to be received, is transferred to step S406;
Step S410, data answering message is sent to local terminal communication node, now, in the confirmation queue of local terminal communication node Have proven to number will be incremented by;And the bearing message of non-data type of message is handled, return to step S402;
Step S411, data answering message is sent to local terminal communication node, now, in the confirmation queue of local terminal communication node Have proven to number will be incremented by.
It is understood that in order to further save communication overhead, lifting communication efficiency.In practical operation, link layer After bearing message has received, it can will confirm that Information encapsulation carries out batch confirmation into a data response message, before representative Bearing message all receive, so as to improve the treatment effeciency of receiving terminal communication node, effectively save communication overhead.
Shown in Figure 7, the embodiment of the present invention also provides a kind of device for realizing inter-node communication based on the above method, The device is in each communication node, including logical layered architecture creation module, communication link establish module, message transmission processing Module and message receiving processing module;
The logical layered architecture creation module is used for:Communication node is logically layered and carries out tissue, makes communication section The logical layered architecture of point includes management level, link layer and bearing bed;
The communication link is established module and is used for:The link establishment interface provided by management level, is established using link layer The link to be communicated between local terminal communication node and opposite end communication node;
The message sends processing module and is used for:When as local terminal, by management level provide transmission data-interface to Opposite end communication node sends message;When sending message, the transmission that message to be sent is put into given link by management level buffers team In row and message to be sent is put into confirmation queue and by holding by notifying link layer, link layer using segmentation sending method Carrier layer sends message to opposite end communication node;
The message receiving processing module is used for:When as opposite end, the reception data-interface provided by management level connects Receiving text;When receiving message, message will be received by bearing bed and be put into the receiving cache queue of link simultaneously notifying link The message received is then put into the upstream queue of link by layer, link layer, and management level obtain what is received from upstream queue Message data.
It is understood that the idiographic flow that each module in realizing the device of inter-node communication carries out practical operation be with Concrete operation step in the above-mentioned method for realizing inter-node communication is corresponding, and here is omitted.
It should be noted that:The device that above-described embodiment provides is when realizing inter-node communication, only with above-mentioned each function mould The division progress of block, can be as needed and by above-mentioned function distribution by different functional modules for example, in practical application Complete, i.e., the internal structure of system is divided into different functional modules, to complete all or part of function described above.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from On the premise of the principle of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as the protection of the present invention Within the scope of.
The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.

Claims (10)

  1. A kind of 1. method for realizing inter-node communication, it is characterised in that this method comprises the following steps:
    Step S1, communication node is logically layered and carries out tissue, make communication node logical layered architecture include management level, Link layer and bearing bed;Wherein:
    Management level, for providing a user the operate interface of given link, including the transmitting-receiving of the establishment interface and data of link connects Mouthful;Link layer, for providing the establishment of link to management level, user data sends and receives, and to bearing bed provides message Send and receive;Bearing bed, it is carried on logical channel, relies on carried logical channel transmitting-receiving message, will receive Message be reported to link layer, and the transmission of message is provided to link layer, and a bearing bed is responsible for multiple link layer messages Send and receive;
    Also, it is associated between the management level and link layer as local terminal using transmission buffering queue, link layer and bearing bed Between using confirm queue be associated;Closed as between the bearing bed and link layer of opposite end using receiving cache queue Connection, is associated between link layer and management level using upstream queue;
    Step S2, the link establishment interface provided by management level, establishes local terminal communication node using link layer and is communicated with opposite end The link to be communicated between node;
    Step S3, message is sent to opposite end communication node by the transmission data-interface that local terminal communication node management level provide;Hair Deliver newspaper text when, message to be sent is put into the transmission buffering queue of given link and notifying link layer by management level, link layer Using segmentation sending method, message to be sent, which is put into, to be confirmed in queue and sends to opposite end communication node by bearing bed to report Text;
    Step S4, the reception data-interface provided by the management level of opposite end communication node receives message;When receiving message, pass through Bearing bed will receive message and be put into the receiving cache queue of link simultaneously notifying link layer, the report that link layer will then receive Text is put into the upstream queue of link, and management level obtain the message data of reception from upstream queue.
  2. 2. the method as claimed in claim 1 for realizing inter-node communication, it is characterised in that:In step S2, built using link layer The vertical link to be communicated between local terminal communication node and opposite end communication node, specifically includes following steps:
    Step S201, local terminal communication node establishes message using link layer to opposite end communication node transmission link;
    Step S202, after opposite end communication node receives link establishment message, transmission link establishes response message, and starts the link heart Jump mechanism;
    Step S203, after local terminal communication node receives link establishment response message, stop transmission link and establish request message, by chain Line state is set to link setup state, and starts link heartbeat mechanism, completes the foundation of communication link.
  3. 3. the method as claimed in claim 1 for realizing inter-node communication, it is characterised in that:The link layer is delivered newspaper pending The data of text are filled into the payload of multiple link packet bursts, and multiple link packet bursts are packaged into a bearing message Being put into confirms in queue.
  4. 4. the method as claimed in claim 3 for realizing inter-node communication, it is characterised in that:In step S3, link layer, which uses, to be divided Section sending method, message to be sent, which is put into, to be confirmed in queue and sends message, tool to opposite end communication node by bearing bed Body comprises the following steps:
    Step S301, link layer inspection confirms whether have space to deposit message to be sent in queue, if so, then from transmission buffering queue It is middle to obtain message to be sent, it is transferred to step S302;Otherwise, S301 is re-executed;
    Step S302, judge currently whether there is bearing message to be sent, if so, being transferred to step S303;Otherwise, it is transferred to step S305;
    Step S303, check whether the payload length of current bearing message to be sent exceedes the length of default bearing message, If being not above, step S306 is transferred to, if exceeding, is transferred to step S304;
    Step S304, being put into current bearing message to be sent is confirmed in queue, and the bearing message to be sent is removed, and is turned Enter step S305;
    Step S305, a new bearing message to be sent is created, is then transferred to step S302;
    Step S306, a link packet burst is distributed from current bearing message to be sent, and it is to be sent by what is got The data of message are filled into the link packet burst, are transferred to step S307;
    Step S307, judge to confirm not confirming whether number exceedes the preset value specified in queue, it is described not confirm number=card The dequeue number of real queue-have proven to number, the dequeue number for confirming queue is the sum of the bearing message sent, described Have proven to the number that number is the bearing message that have received response;If exceeding, return to step S302, if not exceeded, being then transferred to Step S308;
    Step S308, from confirm queue in obtain bearing message, judge opposite end communication node whether congestion, if not congestion, leads to The transmission interface for crossing bearing bed offer sends bearing message to opposite end communication node, and the dequeue number for confirming queue is incremented by; If congestion, return to step S307.
  5. 5. the method as claimed in claim 3 for realizing inter-node communication, it is characterised in that:In step S4, bearing bed will receive It is put into message in the receiving cache queue of link and the message received is then put into link by notifying link layer, link layer Upstream queue in, specifically include following steps:
    Step S401, whether the bearing message that bearing bed inspection receives is legal, if illegal, packet loss;If legal, will hold Carry message and be put into the receiving cache queue of link simultaneously notifying link layer;
    Step S402, link layer checks whether the bearing message in receiving cache queue has received, if not received, is transferred to step Rapid S403;If reception is complete, step S411 is transferred to;
    Step S403, bearing message is obtained from receiving cache queue, is transferred to step S404;
    Whether the type for step S404, checking the bearing message got is data message type, if so, being then transferred to step S405;Otherwise, it is transferred to step S410;
    Step S405, check whether the sequence number of bearing message is consistent with the packet receiving sequence of link layer, if unanimously, being transferred to step S406; Otherwise, return to step S402;
    Step S406, judge whether the link packet burst contained by bearing message has all recombinated, if so, return to step S402; Otherwise, it is transferred to step S407;
    Step S407, the link packet burst of bearing message is obtained, is transferred to step S408;
    Step S408, judge whether the sequence number of link packet burst is consistent with the bearing message sequence number of last time, if inconsistent, After creating a new link packet to be received, step S409 is transferred to;If consistent, step S409 is directly transferred to;
    Step S409, the link packet burst of same sequence number is re-assembled in link packet to be received, by link to be received Message is put into the upstream queue of link, and empties link packet to be received, is transferred to step S406;
    Step S410, data answering message is sent to local terminal communication node, and the bearing message of non-data type of message is carried out Processing, return to step S402;
    Step S411, data answering message is sent to local terminal communication node.
  6. 6. the method for realizing inter-node communication as any one of claim 1 to 5, it is characterised in that:The management level The operate interface provided a user also includes class Select operate interfaces and Link State, the inquiry operation interface of statistics.
  7. 7. the method for realizing inter-node communication as any one of claim 1 to 5, it is characterised in that:The link layer The heartbeat mechanism of detecting link state is also provided, and supports congestion control, flow control, the function of largest buffered control.
  8. 8. the method for realizing inter-node communication as any one of claim 1 to 5, it is characterised in that:The bearing bed It is additionally operable to read the information of logical channel in configuration file, the content of the configuration file includes logical channel type, communication ends Message ceases.
  9. 9. the method for realizing inter-node communication as any one of claim 1 to 5, it is characterised in that:The bearing bed It can be carried on a variety of logical channels, a variety of logical channels include UDP, MAC physical layer, I2C buses.
  10. A kind of 10. device for realizing inter-node communication based on claim 1 methods described, it is characterised in that:The device is located at In each communication node, including logical layered architecture creation module, communication link establish module, message sends processing module and message Receiving processing module;
    The logical layered architecture creation module is used for:Communication node is logically layered and carries out tissue, makes communication node Logical layered architecture includes management level, link layer and bearing bed;
    The communication link is established module and is used for:The link establishment interface provided by management level, local terminal is established using link layer The link to be communicated between communication node and opposite end communication node;
    The message sends processing module and is used for:When as local terminal, the transmission data-interface provided by management level is to opposite end Communication node sends message;When sending message, message to be sent is put into the transmission buffering queue of given link by management level And notifying link layer, for link layer using segmentation sending method, message to be sent, which is put into, confirms in queue and passes through bearing bed Message is sent to opposite end communication node;
    The message receiving processing module is used for:When as opposite end, the reception data-interface provided by management level receives report Text;When receiving message, message will be received by bearing bed and be put into the receiving cache queue of link simultaneously notifying link layer, chain The message received is then put into the upstream queue of link by road floor, and management level obtain the message number of reception from upstream queue According to.
CN201710862582.8A 2017-09-22 2017-09-22 Method and device for realizing communication between nodes Active CN107786464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710862582.8A CN107786464B (en) 2017-09-22 2017-09-22 Method and device for realizing communication between nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710862582.8A CN107786464B (en) 2017-09-22 2017-09-22 Method and device for realizing communication between nodes

Publications (2)

Publication Number Publication Date
CN107786464A true CN107786464A (en) 2018-03-09
CN107786464B CN107786464B (en) 2020-04-21

Family

ID=61433539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710862582.8A Active CN107786464B (en) 2017-09-22 2017-09-22 Method and device for realizing communication between nodes

Country Status (1)

Country Link
CN (1) CN107786464B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922537A (en) * 2019-03-29 2019-06-21 广州邦讯信息系统有限公司 Data link layer and its implementation applied to wireless communication
CN113438182A (en) * 2021-03-30 2021-09-24 南京大学 Flow control system and flow control method based on credit
CN113724485A (en) * 2021-09-03 2021-11-30 重庆邮电大学 Rapid intensive information acquisition method
CN114356825A (en) * 2021-12-17 2022-04-15 郑州信大捷安信息技术股份有限公司 SPI two-way communication method and system based on chip

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009865A (en) * 2007-01-30 2007-08-01 中兴通讯股份有限公司 Data processing method for the packet service transfer link of the wireless communication system of the terminal
CN101252534A (en) * 2008-03-28 2008-08-27 清华大学 Method for improving mobile self-organizing network communication capacity through link layer message combination
CN102014067A (en) * 2010-12-14 2011-04-13 北京星网锐捷网络技术有限公司 Message fragment sending method, device and network equipment
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
US20160352873A1 (en) * 2015-05-29 2016-12-01 Samsung Electronics Co., Ltd. Transmitting apparatus, receiving apparatus, and method for controlling the same
CN106850188A (en) * 2017-01-24 2017-06-13 中国航天系统科学与工程研究院 A kind of data transmission system based on multichannel isomery one-way transmission path

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009865A (en) * 2007-01-30 2007-08-01 中兴通讯股份有限公司 Data processing method for the packet service transfer link of the wireless communication system of the terminal
CN101252534A (en) * 2008-03-28 2008-08-27 清华大学 Method for improving mobile self-organizing network communication capacity through link layer message combination
CN102014067A (en) * 2010-12-14 2011-04-13 北京星网锐捷网络技术有限公司 Message fragment sending method, device and network equipment
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
US20160352873A1 (en) * 2015-05-29 2016-12-01 Samsung Electronics Co., Ltd. Transmitting apparatus, receiving apparatus, and method for controlling the same
CN106850188A (en) * 2017-01-24 2017-06-13 中国航天系统科学与工程研究院 A kind of data transmission system based on multichannel isomery one-way transmission path

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109922537A (en) * 2019-03-29 2019-06-21 广州邦讯信息系统有限公司 Data link layer and its implementation applied to wireless communication
CN109922537B (en) * 2019-03-29 2024-03-15 广州邦讯信息系统有限公司 Wireless module and implementation method thereof
CN113438182A (en) * 2021-03-30 2021-09-24 南京大学 Flow control system and flow control method based on credit
CN113724485A (en) * 2021-09-03 2021-11-30 重庆邮电大学 Rapid intensive information acquisition method
CN114356825A (en) * 2021-12-17 2022-04-15 郑州信大捷安信息技术股份有限公司 SPI two-way communication method and system based on chip
CN114356825B (en) * 2021-12-17 2024-02-13 郑州信大捷安信息技术股份有限公司 SPI two-way communication method and system based on chip

Also Published As

Publication number Publication date
CN107786464B (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN107786464A (en) A kind of method and device for realizing inter-node communication
CN101877604B (en) Method and system for transmitting files
CN102497429B (en) Multi-redundancy processing method for train-ground data transmission in rail transit
CN101932128B (en) Data receiving, transmitting and processing method and equipment for data link layer
CN100461770C (en) Data processing method for the packet service transfer link of the wireless communication system of the terminal
CN101588227A (en) Method for performing buffer status reporting and related communication device
DE19730159B4 (en) Communication method and system
CN101616439A (en) Wireless self-return method in the evolvement network, Apparatus and system
CN108667559A (en) A kind of communication means and equipment
CN106953797A (en) A kind of method and apparatus of the RDMA data transfers based on Dynamic link library
CN102739349A (en) Method and device for frame confirmation
CN102447606A (en) Flow control method and device for data transmission
CN105933325A (en) Kernel mode RPC (Remote Procedure CALL) communication acceleration method based on NFSoRDMA (Network File System over Remote Direct Memory Access)
CN106304188B (en) A kind of AM RLC is for retransmitting the receiving handling method of the optimization of data
CN101854735A (en) Method for processing data of RLC layer and PDCP layer when RRC connection is released under LTE system
CN103442091B (en) Data transmission method and device
CN106572030A (en) Multipath sending control method and multipath sending control system in distributed network
CN107645747A (en) A kind of method and apparatus for sending and receiving data
WO2019015487A1 (en) Data retransmission method, rlc entity and mac entity
CN103346961A (en) Method and system for data packaging exchanging
CN107592361A (en) A kind of data transmission method based on double IB networks, device, equipment
CN100512506C (en) Method for transferring status report
CN103582013B (en) The downlink transmission method of PDCP data
CN105323729B (en) A kind of note transmission method and device
CN206181067U (en) MII interface and GPMC interface data communication system

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200819

Address after: 430000 part of the third floor of cable building, Guandong science and Technology Park, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Address before: 430000 East Lake high tech Development Zone, Hubei Province, No. 6, No., high and new technology development zone, No. four

Patentee before: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for realizing communication between nodes

Effective date of registration: 20210531

Granted publication date: 20200421

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Changjiang Computing Technology Co.,Ltd.

Registration number: Y2021420000031

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230914

Granted publication date: 20200421

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Changjiang Computing Technology Co.,Ltd.

Registration number: Y2021420000031

PC01 Cancellation of the registration of the contract for pledge of patent right