CN110049138B - Method, device and system for starting communication and data transmission of equipment - Google Patents

Method, device and system for starting communication and data transmission of equipment Download PDF

Info

Publication number
CN110049138B
CN110049138B CN201910347362.0A CN201910347362A CN110049138B CN 110049138 B CN110049138 B CN 110049138B CN 201910347362 A CN201910347362 A CN 201910347362A CN 110049138 B CN110049138 B CN 110049138B
Authority
CN
China
Prior art keywords
message
equipment
communication
packet
sent
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.)
Active
Application number
CN201910347362.0A
Other languages
Chinese (zh)
Other versions
CN110049138A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910347362.0A priority Critical patent/CN110049138B/en
Publication of CN110049138A publication Critical patent/CN110049138A/en
Application granted granted Critical
Publication of CN110049138B publication Critical patent/CN110049138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/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

Landscapes

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

Abstract

The present disclosure provides a device start-up communication and data transmission method, apparatus and system, wherein the device start-up method is used for a first device, and includes: receiving a first message, wherein the first message is used for detecting the link state between first equipment and second equipment; judging whether the first message is sent by the second equipment; when the first message is sent by the second equipment, the first equipment starts communication and clears a message timer of the first equipment; and forwarding the first message to the second equipment so that the second equipment starts communication and clears the message timer of the second equipment. By implementing the method and the device, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of physical ports, is eliminated, thereby avoiding the problem of data packet loss caused by large time difference.

Description

Method, device and system for starting communication and data transmission of equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for device startup communication and data transmission.
Background
The whole communication process can be divided into several layers according to the communication function, and the peer-to-peer protocol of each layer provides services by using the service of the lower layer to align with the service of the upper layer. Wherein the data link layer provides a transparent and reliable data transfer service to the network layer on the basis of a service provided by the physical layer. The protocols at the data link layer can be divided into two categories: character-oriented protocols and bit-oriented protocols. The HDLC (High-level DataLink Control) is a data link layer protocol which is widely applied at the present stage in the communication field.
At present, taking an HDLC protocol as an example, to implement data transmission between two ends in an HDLC data link, first, after physical ports of the two ends are started, and after HDLC negotiation, link layer protocols of the two ends are started, so as to implement data transmission between the two ends, however, because a certain time difference exists between the starting of the physical ports of the different ends, after the HDLC negotiation, the time difference can also be inherited when the link layer protocols of the two ends are started, and when forwarding causes a need to start forwarding a data packet strictly after the protocol is started, the time difference between the starting of the two ends protocols can cause a problem of data packet loss.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method, an apparatus, and a system for device startup communication and data transmission, so as to overcome the problem in the prior art that a time difference still exists after a protocol is started due to a time difference existing between two devices due to startup of a physical port, and data packet loss is caused in the time difference.
According to a first aspect, an embodiment of the present disclosure provides a device initiated communication method, for a first device, the method including: receiving a first message, wherein the first message is used for detecting the link state between the first equipment and the second equipment; judging whether the first message is sent by the second equipment; when the first message is sent by the second device, the first device starts communication and clears a message timer of the first device; and forwarding the first message to the second equipment so as to enable the second equipment to start communication and clear a message timer of the second equipment.
Optionally, before the step of receiving the first packet, the method further includes: starting a physical port of the first device; and sending a second message to a second device, wherein the second message is used for detecting the physical port state of the second device.
Optionally, the step of determining whether the first packet is sent by the second device includes determining whether the first packet carries a flag of the second device.
Optionally, before the second device receives the first packet forwarded by the first device, the method further includes: starting a physical port of the second device; receiving a second message sent by the first device, wherein the second message is used for detecting the physical port state of the second device; and sending the first message to the first equipment, wherein the first message is used for detecting the link state between the first equipment and the second equipment.
Optionally, the first packet is a packet with a second device label.
According to a second aspect, an embodiment of the present disclosure further provides a data transmission method, including: establishing a link connection between a first device and a second device by using the method of the first aspect; and starting the first equipment and the second equipment to carry out data transmission.
According to a third aspect, an embodiment of the present disclosure further provides a device-initiated communication apparatus, configured to a first device, where the apparatus includes: a first receiving module, configured to receive a first packet sent by a second device, where the first packet is used to detect a link state between the first device and the second device; the first processing module is used for judging whether the first message is sent by the second equipment; the second processing module is used for enabling the first equipment to start communication and emptying the message timer of the first equipment when the first message is sent by the second equipment; and the first sending module is used for forwarding the first message to the second equipment so as to enable the second equipment to start communication and clear a message timer of the second equipment.
Optionally, the device-initiated communication means further comprises: a sixth processing module, configured to enable a physical port of the first device to be started; and the second sending module is used for sending a second message to the second device, wherein the second message is used for detecting the physical port state of the second device.
Optionally, the first processing module determines whether the first packet is sent by a second device, including determining whether the first packet carries a flag of the second device.
Optionally, the device-initiated communication means further comprises: a seventh processing module, configured to enable a physical port of the second device to be started; a third receiving module, configured to receive a second packet sent by the first device, where the second packet is used to detect a physical port state of the second device; a third sending module, configured to send the first packet to the first device, where the first packet is used to detect a link state between the first device and the second device.
Optionally, the first packet is a packet with a second device label.
According to a fourth aspect, an embodiment of the present disclosure further provides a data transmission apparatus, including: a fourth processing module, configured to establish a link connection between the first device and the second device by using the apparatus in the third aspect; and the fifth processing module is used for starting the first equipment and the second equipment to carry out data transmission.
According to a fifth aspect, an embodiment of the present disclosure further provides a device-initiated communication system, including: the system comprises a first device and a second device, wherein the second device is used for sending a first message to the first device, and the first message is used for detecting the link state between the first device and the second device; the first device is used for receiving the first message, judging whether the first message is sent by the second device or not, and when the first message is sent by the second device, enabling the first device to start communication, clearing the message timer of the first device and forwarding the first message to the second device; the second device is further configured to receive the first packet forwarded by the first device, so that the second device starts communication and clears a packet timer of the second device.
According to a sixth aspect, there is also provided an electronic device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, and the processor executing the computer instructions to perform the device-initiated communication method according to the first aspect or any one of its alternative embodiments, or to perform the data transmission method according to the second aspect.
According to a seventh aspect, an embodiment of the present disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for initiating a communication by an apparatus according to the first aspect, or any optional implementation manner thereof, or execute the method for transmitting data according to the second aspect.
The technical scheme disclosed has the following advantages:
the device start communication method provided by the embodiment of the disclosure is used for a first device, and enables the first device to start communication and clear a message timer of the first device by receiving a first message and judging whether the first message is sent by a second device, and then forwards the first message to the second device to enable the second device to start communication and clear the message timer of the second device. Therefore, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the message timer is emptied synchronously, so that the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of the physical port, is eliminated, and the problem of data packet loss caused by large time difference is avoided.
According to the data transmission method provided by the embodiment of the disclosure, the two device starting communication methods are adopted to establish the link connection between the first device and the second device, and the first device and the second device are started to perform data transmission, so that the starting communication time difference between the first device and the second device, which is caused by asynchronous starting of the physical ports, is eliminated through the device starting method, the problem of data packet loss caused by a large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the safety and the reliability of data transmission are ensured.
The device-initiated communication system provided by the embodiment of the present disclosure includes a first device and a second device, where a first packet is sent to the first device by the second device, and when the first device determines that the first packet is sent by the second device, the first device initiates communication, clears a packet timer of the first device, and forwards the first packet to the second device, so that the second device initiates communication, and clears the packet timer of the second device. Therefore, the starting communication time difference between the first device and the second device caused by asynchronous starting of the physical port is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the safety and the reliability of data transmission are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of an apparatus-initiated communication system according to an embodiment of the present disclosure;
FIG. 1A is a schematic diagram of a device initiated communication interaction, according to an embodiment of the present disclosure;
FIG. 1B is a schematic diagram of another device initiated communication interaction in accordance with an embodiment of the present disclosure;
fig. 2 is a flow chart of a method of device initiated communication according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method of device initiated communication according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a method of data transmission according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus-initiated communication device according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another apparatus-initiated communication device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Technical features mentioned in the different embodiments of the present disclosure described below may be combined with each other as long as they do not conflict with each other.
It should be noted that, in the embodiment provided in the present disclosure, the adopted data link layer protocol is an HDLC protocol, the first device and the second device are two devices that perform data communication through the HDLC protocol, the first and the second are merely used for illustration and do not represent importance, and in practical applications, the first device and the second device may be interchanged.
Fig. 1 shows a schematic diagram of an access device failure handling system according to an embodiment of the present disclosure, as shown in fig. 1, the system includes: the system comprises a first device 401 and a second device 402, wherein the second device 402 is configured to send a first packet to the first device 401, and the first packet is used to detect a link state between the first device 401 and the second device 402; the first device 401 is configured to receive the first message, determine whether the first message is sent by the second device 402, start communication by the first device 401 when the first message is sent by the second device 402, clear a message timer of the first device 401, and forward the first message to the second device 402; the second device 402 is further configured to receive the first packet forwarded by the first device 401, so that the second device 402 starts communication and clears the packet timer of the second device 402.
The interaction process between the first device 401 and the second device 402 is described with reference to the interaction diagram shown in fig. 1A or fig. 1B. In practical application, the first message is a Keepalive message, the Keepalive message has a function of triggering the device to start communication, and when the device receives the corresponding Keepalive message, the device is automatically triggered to start communication. The above determining whether the first packet is sent by the second device 402 specifically includes: and judging whether the Keepalive message is marked by the second device 402, and if the Keepalive message is marked by the second device 402, indicating that the Keepalive message is sent by the first device 401 which needs to perform data communication with the second device 402, and performing subsequent processing.
Through the cooperative cooperation of the above components, the device start communication system provided in the embodiment of the present disclosure sends the first packet to the first device through the second device, and when the first device determines that the first packet is sent by the second device, the first device starts communication, clears the packet timer of the first device, and forwards the first packet to the second device, so that the second device starts communication, and clears the packet timer of the second device. Therefore, the starting communication time difference between the first device and the second device caused by asynchronous starting of the physical port is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the safety and the reliability of data transmission are ensured.
Fig. 2 is a flowchart illustrating a method for starting communication by a device according to an embodiment of the present disclosure, and as shown in fig. 2, the method is applied to a first device, and specifically includes the following steps:
step S101: and receiving a first message, wherein the first message is used for detecting the link state between the first equipment and the second equipment. In practical application, the first message is a Keepalive message, and when a physical port of the second device is started and receives a corresponding Keepalive message sent by the first device, the Keepalive message with the second device mark is sent to the first device in data communication with the first device, so that the first device is informed that the second device has been physically up, and similarly, if the second device sends a Keepalive message to the first device, the second device is informed that the first device has been physically up.
Step S102: and judging whether the first message is sent by the second equipment. In practical application, if the Keepalive message of the first message carries the flag of the second device, it indicates that the first device and the second device are both physically up, and the Keepalive message is sent by the first device that needs to perform data communication with the second device, and step S103 is executed.
Step S103: and when the first message is sent by the second equipment, the first equipment starts communication and clears the message timer of the first equipment. In practical application, if the Keepalive message received by the first device carries the mark of the second device, it indicates that both the first device and the second device are in physical up, and data communication can be prepared, so that the first device starts communication even if the first device protocols up, and simultaneously clears the message timer of the first device, namely the Keepalive message timer of the first device, so that the subsequent clock period and the period of Keepalive message sending between the first device and the second device are kept synchronous, the influence of the physical port starting time difference is eliminated, and the problem of data packet loss is avoided.
Step S104: and forwarding the first message to the second equipment so that the second equipment starts communication and clears the message timer of the second equipment. In practical application, the Keepalive packet with the second device tag is forwarded to the second device while the first device starts communication, the second device is driven to simultaneously protocol up, and the second device synchronously clears a packet timer, so that the influence of the start time difference of a physical port is eliminated, and the problem of data packet loss is avoided.
Through the steps S101 to S104, the device start communication method provided in the embodiment of the present disclosure is used for a first device, and when receiving a first message and determining whether the first message is sent by a second device, the first device starts communication, clears a message timer of the first device, and then forwards the first message to the second device, so that the second device starts communication and synchronizes the message timer. Therefore, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of the physical port, is eliminated, thereby avoiding the problem of data packet loss caused by large time difference.
As an optional implementation manner of the embodiment of the present disclosure, the above-mentioned device-initiated communication method, as shown in fig. 1A, specifically includes, before the step of receiving the first message, the following steps:
step S105: a physical port of the first device is initiated. In practical application, only after the physical port of the first device is started, Keepalive messages sent by other devices can be received.
Step S106: and sending a second message to the second equipment, wherein the second message is used for detecting the physical port state of the second equipment. In practical application, after a physical up of a certain device, if no Keepalive message sent by other devices which need to communicate is received, a second message, that is, a Keepalive message which does not carry any information, is sent to the other devices which need to communicate immediately, the Keepalive message which does not carry any information is used for informing other devices which communicate with the Keepalive message, the device has the physical up, communication can be prepared, when the Keepalive message which does not carry any information is received by the other devices after the physical up, the first message with other device marks is sent to the device to inform that both devices have the physical up, subsequent steps can be carried out, and if the Keepalive message which does not carry any information is sent, the message is not discarded after the Keepalive message which does not carry any information is sent by the other devices.
Through the steps S101 to S106, the device communication start method provided in the embodiment of the present disclosure is used for a first device, and when receiving a first message and determining whether the first message is sent by a second device, the first device starts communication, clears a message timer of the first device, and then forwards the first message to the second device. Therefore, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the message timer of the second equipment is emptied synchronously, so that the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of physical ports, is eliminated, and the problem of data packet loss caused by large time difference is avoided.
Fig. 3 is a flowchart illustrating another method for initiating communication by a device according to an embodiment of the present disclosure, and as shown in fig. 3, the method is applied to a second device, and specifically includes the following steps:
step S201: and receiving a first message forwarded by the first equipment, wherein the first message is used for detecting the link state between the first equipment and the second equipment. In practical application, when the second device receives the Keepalive packet with the second device tag forwarded by the first device, step S202 is immediately executed.
Step S202: the second device starts communication and clears the message timer of the second device. In practical application, when the second device receives a Keepalive message with a second device label forwarded by the first device, it is indicated that the first device and the second device both physically up, and the first device already starts communication, i.e. protocol up, when sending the Keepalive message, simultaneously triggers the second device to start communication, and clears a Keepalive message timer of the second device, thereby ensuring that the first device and the second device start communication simultaneously, at this time, data transmission is performed between the first device and the second device, avoiding the problem of data packet loss caused by the time difference existing between the physical up of the two devices, and the Keepalive message timers of the two devices are cleared simultaneously, further ensuring that the sending of Keepalive messages is always in a synchronous state in the following clock cycle, eliminating the protocol up time difference caused by the difference of physical port up time between the two devices, further preventing the occurrence of data packet loss. It should be noted that, in practical application, the transmission delay of the Keepalive packet between the two devices may be ignored with respect to the timer period of the Keepalive packet, so that it may be considered that the second device and the first device maintain synchronous start communication.
Through the above steps S201 to S202, the device start communication method provided in the embodiment of the present disclosure is used for the second device, and the second device starts communication and clears the message timer of the second device by receiving the first message forwarded by the first device. Therefore, when the first device starts communication, the message timer is emptied and the first message is forwarded to the second device, so that the second device starts communication at the same time, and the message timer is emptied synchronously, so that the starting communication time difference between the first device and the second device, which is caused by asynchronous starting of the physical port, is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the problem of data packet loss is further avoided.
As an optional implementation manner of the embodiment of the present disclosure, before the second device receives the first packet forwarded by the first device, as shown in fig. 1B, the method for starting communication by the device specifically includes the following steps:
step S203: the physical port of the second device is initiated. In practical application, only after the physical port of the second device is started, Keepalive messages sent by other devices can be received.
Step S204: and receiving a second message sent by the first equipment, wherein the second message is used for detecting the physical port state of the second equipment. In practical application, after a certain device is physically up, if the Keepalive message sent by the other device which the certain device needs to communicate is not received, a second message, namely a Keepalive message which does not carry any information, is sent to the other device which the certain device needs to communicate, the Keepalive message which does not carry any information is used for informing the other device which communicates with the certain device, and the certain device is physically up and can prepare for communication.
Step S205: and sending a first message to the first equipment, wherein the first message is used for detecting the link state between the first equipment and the second equipment. In practical application, when the second device receives a Keepalive message which is sent by the first device and does not carry any information after the second device is in a physical up, the first message with the second device mark is sent to the first device, the first device is informed that the two devices are both in the physical up, and subsequent steps can be carried out.
Through the above steps S201 to S205, the device start communication method provided in the embodiment of the present disclosure is used for the second device, and the second device starts communication by receiving the first packet forwarded by the first device, and clears the packet timer of the second device. Therefore, when the first device starts communication, the message timer is emptied and the first message is forwarded to the second device, so that the second device starts communication at the same time, and the message timer is emptied synchronously, so that the starting communication time difference between the first device and the second device, which is caused by asynchronous starting of the physical port, is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the problem of data packet loss is further avoided.
Fig. 4 shows a flowchart of a data transmission method according to an embodiment of the present disclosure, and as shown in fig. 4, the method specifically includes the following steps:
step S301: the device-initiated communication method in the above embodiment is used to establish a link connection between the first device and the second device. By the equipment starting method, the first equipment and the second equipment start communication, namely protocol up, simultaneously, and clear respective message timers simultaneously, so that a link foundation is established for data communication between the two equipment.
Step S302: and starting the first equipment and the second equipment to carry out data transmission. In practical application, after the first device and the second device establish link connection, data sending and receiving can be achieved, and because the two devices start communication at the same time, the problem of data sending packet loss in the process that one device starts communication and the other device does not start communication is avoided.
Through the steps S301 to S302, the data transmission method provided in the embodiment of the present disclosure establishes the link connection between the first device and the second device by using the two device start communication methods, and starts the first device and the second device to perform data transmission, so that the start communication time difference between the first device and the second device, which is caused by asynchronous start of the physical port, is eliminated by using the device start method, thereby avoiding the problem of data packet loss caused by a large time difference, ensuring that the time synchronization of the messages sent by the two devices after the next timer period is ensured, further ensuring the synchronous communication between the two devices, and ensuring the safety and reliability of data transmission.
Fig. 5 is a schematic diagram illustrating an apparatus for initiating communication by a device according to an embodiment of the present disclosure, where as shown in fig. 5, the apparatus is used for a first device, and specifically includes:
the first receiving module 101 is configured to receive a first packet sent by a second device, where the first packet is used to detect a link state between the first device and the second device. For details, refer to the related description of step S101 in the method embodiment.
The first processing module 102 is configured to determine whether the first packet is sent by the second device. For details, refer to the related description of step S102 in the method embodiment.
And a second processing module 103, configured to, when the first packet is sent by the second device, enable the first device to start communication, and clear the packet timer of the first device. For details, refer to the related description of step S103 in the method embodiment.
The first sending module 104 is configured to forward the first packet to the second device, so that the second device starts communication, and clears a packet timer of the second device. For details, refer to the related description of step S104 in the method embodiment.
Through the cooperative cooperation of the above components, the device start communication apparatus provided in the embodiment of the present disclosure starts communication by receiving the first packet and determining whether the first packet is sent by the second device, so that the first device starts communication, clears the packet timer of the first device, and then forwards the first packet to the second device. Therefore, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the message timer of the second equipment is emptied synchronously, so that the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of physical ports, is eliminated, and the problem of data packet loss caused by large time difference is avoided.
As an optional implementation manner of the embodiment of the present disclosure, the above-mentioned device start-up communication apparatus further includes:
and the sixth processing module is used for starting the physical port of the first equipment. For details, refer to the description related to step S105 in the method embodiment.
And the second sending module is used for sending a second message to the second device, and the second message is used for detecting the physical port state of the second device. For details, refer to the related description of step S106 in the method embodiment.
As another optional implementation manner of the embodiment of the present disclosure, the determining, by the first processing module in the device-initiated communication apparatus, whether the first packet is sent by the second device includes determining whether the first packet carries a flag of the second device.
Through the cooperative cooperation of the above components, the device start communication apparatus provided in the embodiment of the present disclosure starts communication by receiving the first packet and determining whether the first packet is sent by the second device, so that the first device starts communication, clears the packet timer of the first device, and then forwards the first packet to the second device. Therefore, when the first equipment starts communication, the message timer is emptied and the first message is forwarded to the second equipment, so that the second equipment starts communication at the same time, and the message timer of the second equipment is emptied synchronously, so that the starting communication time difference between the first equipment and the second equipment, which is caused by asynchronous starting of physical ports, is eliminated, and the problem of data packet loss caused by large time difference is avoided.
Fig. 6 is a schematic diagram illustrating another apparatus for initiating communication according to an embodiment of the present disclosure, where as shown in fig. 6, the apparatus is used for a second apparatus, and specifically includes:
the second receiving module 201 is configured to receive a first packet forwarded by a first device, where the first packet is used to detect a link state between the first device and a second device. For details, refer to the related description of step S201 in the method embodiment.
The third processing module 202 is configured to enable the second device to start communication and clear a message timer of the second device. For details, refer to the related description of step S202 in the method embodiment.
Through the cooperative cooperation of the above components, the device start communication apparatus provided in the embodiment of the present disclosure starts communication by receiving the first packet forwarded by the first device, so that the second device starts communication, and clears the packet timer of the second device. Therefore, when the first device starts communication, the message timer is emptied and the first message is forwarded to the second device, so that the second device starts communication at the same time, and the message timer is emptied synchronously, so that the starting communication time difference between the first device and the second device, which is caused by asynchronous starting of the physical port, is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the problem of data packet loss is further avoided.
As an optional implementation manner of the embodiment of the present disclosure, the above-mentioned device start-up communication apparatus further includes:
and the seventh processing module is used for enabling the physical port of the second device. For details, refer to the related description of step S203 in the method embodiment.
And the third receiving module is used for receiving a second message sent by the first device, and the second message is used for detecting the physical port state of the second device. For details, refer to the related description of step S204 in the method embodiment.
And a third sending module, configured to send the first packet to the first device, where the first packet is used to detect a link state between the first device and the second device. For details, refer to the related description of step S205 in the method embodiment.
As another optional implementation manner of the embodiment of the present disclosure, the first message in the device-initiated communication apparatus is a message with a second device flag.
Through the cooperative cooperation of the above components, the device start communication apparatus provided in the embodiment of the present disclosure starts communication by receiving the first packet forwarded by the first device, so that the second device starts communication, and clears the packet timer of the second device. Therefore, when the first device starts communication, the message timer is emptied and the first message is forwarded to the second device, so that the second device starts communication at the same time, and the message timer is emptied synchronously, so that the starting communication time difference between the first device and the second device, which is caused by asynchronous starting of the physical port, is eliminated, the problem of data packet loss caused by large time difference is avoided, the time synchronization of the messages sent by the two devices after the next timer period is ensured, the synchronous communication between the two devices is further ensured, and the problem of data packet loss is further avoided.
Fig. 7 shows a schematic diagram of a data transmission apparatus according to an embodiment of the present disclosure, and as shown in fig. 7, the apparatus specifically includes:
a fourth processing module 301, configured to use the above-mentioned device-initiated communication apparatus to establish a link connection between the first device and the second device. For details, refer to the related description of step S301 in the method embodiment.
A fifth processing module 302, configured to start the first device to perform data transmission with the second device. For details, refer to the related description of step S302 in the method embodiment.
Through the cooperative cooperation of the above components, the data transmission apparatus provided in the embodiment of the present disclosure establishes the link connection between the first device and the second device by using the above two device start communication methods, and starts the first device and the second device to perform data transmission, so that the start communication time difference between the first device and the second device, which is caused by asynchronous start of physical ports, is eliminated by the above device start method, thereby avoiding the problem of data packet loss caused by a large time difference, and ensuring that the time synchronization of the messages sent by the two devices after the next timer period is ensured, further ensuring the synchronous communication between the two devices, and ensuring the security and reliability of data transmission.
Fig. 8 shows an electronic device according to an embodiment of the present disclosure, and as shown in fig. 8, the electronic device may include a processor 901 and a memory 902, where the processor 901 and the memory 902 may be connected by a bus or by other means, and fig. 8 takes the example of being connected by a bus.
Processor 901 may be a Central Processing Unit (CPU). The Processor 901 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 902, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the device-initiated communication method or the data transmission method in the embodiments of the present disclosure. The processor 901 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 902, that is, implementing the device-initiated communication method or the data transmission method in the above method embodiments.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 901, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 902, and when executed by the processor 901, perform the device initiated communication method or the data transmission method in the above-described method embodiments.
The specific details of the electronic device may be understood by referring to the corresponding related descriptions and effects in the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (11)

1. A device initiated communication method for a first device, the method comprising:
receiving a first message, wherein the first message is used for detecting the link state between the first equipment and the second equipment;
judging whether the first message is sent by the second equipment;
when the first message is sent by the second device, the first device starts communication and clears a message timer of the first device;
and forwarding the first message to the second equipment so as to enable the second equipment to start communication and clear a message timer of the second equipment.
2. The device-initiated communication method of claim 1, wherein the step of receiving the first message further comprises, prior to:
starting a physical port of the first device;
and sending a second message to a second device, wherein the second message is used for detecting the physical port state of the second device.
3. The method according to claim 1 or 2, wherein the step of determining whether the first packet is sent by a second device comprises determining whether the first packet carries a flag of the second device.
4. The device-initiated communication method according to claim 1, wherein, before receiving the first packet forwarded by the first device, the second device further comprises:
starting a physical port of the second device;
receiving a second message sent by the first device, wherein the second message is used for detecting the physical port state of the second device;
and sending the first message to the first equipment, wherein the first message is used for detecting the link state between the first equipment and the second equipment.
5. The device-initiated communication method of claim 4, wherein the first message is a message with a second device tag.
6. A method of data transmission, comprising:
establishing a link connection between a first device and a second device by using the method of claims 1-5;
and starting the first equipment and the second equipment to carry out data transmission.
7. A device initiated communication apparatus for a first device, the apparatus comprising:
a first receiving module, configured to receive a first packet sent by a second device, where the first packet is used to detect a link state between the first device and the second device;
the first processing module is used for judging whether the first message is sent by the second equipment;
the second processing module is used for enabling the first equipment to start communication and emptying the message timer of the first equipment when the first message is sent by the second equipment;
and the first sending module is used for forwarding the first message to the second equipment so as to enable the second equipment to start communication and clear a message timer of the second equipment.
8. A data transmission apparatus, comprising:
a fourth processing module, configured to establish a link connection between the first device and the second device by using the apparatus of claim 7;
and the fifth processing module is used for starting the first equipment and the second equipment to carry out data transmission.
9. A device initiated communication system, comprising: a first device and a second device, wherein,
the second device is configured to send a first packet to the first device, where the first packet is used to detect a link state between the first device and the second device;
the first device is used for receiving the first message, judging whether the first message is sent by the second device or not, and when the first message is sent by the second device, enabling the first device to start communication, clearing the message timer of the first device and forwarding the first message to the second device;
the second device is further configured to receive the first packet forwarded by the first device, so that the second device starts communication and clears a packet timer of the second device.
10. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the device-initiated communication method of any one of claims 1 to 5 or to perform the data transmission method of claim 6.
11. A computer-readable storage medium storing computer instructions for causing a computer to execute the apparatus-initiated communication method of any one of claims 1-5 or the data transmission method of claim 6.
CN201910347362.0A 2019-04-26 2019-04-26 Method, device and system for starting communication and data transmission of equipment Active CN110049138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910347362.0A CN110049138B (en) 2019-04-26 2019-04-26 Method, device and system for starting communication and data transmission of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910347362.0A CN110049138B (en) 2019-04-26 2019-04-26 Method, device and system for starting communication and data transmission of equipment

Publications (2)

Publication Number Publication Date
CN110049138A CN110049138A (en) 2019-07-23
CN110049138B true CN110049138B (en) 2021-09-28

Family

ID=67279822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910347362.0A Active CN110049138B (en) 2019-04-26 2019-04-26 Method, device and system for starting communication and data transmission of equipment

Country Status (1)

Country Link
CN (1) CN110049138B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403542B1 (en) * 2002-07-19 2008-07-22 Qlogic, Corporation Method and system for processing network data packets

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6868466B2 (en) * 2001-09-27 2005-03-15 Intel Corporation Apparatus and method for packet ingress interrupt moderation
CN102164056B (en) * 2011-03-17 2013-07-24 杭州华三通信技术有限公司 Stacked link aggregation fault detection method and stacked devices
CN102355479B (en) * 2011-07-19 2014-05-07 杭州华三通信技术有限公司 Method and equipment for forwarding traffic of multi-NAT (network address translation) gateway
CN108173757B (en) * 2017-12-26 2020-08-11 新华三技术有限公司 Port state setting method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403542B1 (en) * 2002-07-19 2008-07-22 Qlogic, Corporation Method and system for processing network data packets

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无线传感器网络的RPL路由协议研究;朱琳等;《计算机技术与发展》;20120810;全文 *

Also Published As

Publication number Publication date
CN110049138A (en) 2019-07-23

Similar Documents

Publication Publication Date Title
US7940678B2 (en) Method for triggering failure detection in bidirectional forwarding detection
US8576698B2 (en) Connectivity fault management timeout period control
CN106789638B (en) Method for processing route and network equipment
US20190394129A1 (en) Method And Apparatus For Datacenter Congestion Control Based On Software Defined Network
US20200204401A1 (en) Method and device for automatically implementing ioam encapsulation and storage medium
EP3073698A1 (en) Method for processing address resolution protocol message, forwarder and controller
CN110912759B (en) Automatic connection method and system for VPN network abnormity
RU2678715C2 (en) Data transmission protocol with protocol exception state
KR102631618B1 (en) mesh network
CN110505220A (en) Support the method, apparatus and communication terminal of the two-node cluster hot backup of OPC protocol realization
CN112491492A (en) Method and device for time slot negotiation
WO2016086890A1 (en) Method and device for detecting connectivity
CN111130982B (en) Message forwarding method and device, gateway equipment and readable storage medium
CN107529229B (en) Data transmission method, device and system
CN106657299A (en) Method and system for online reminding of concerned anchor
EP3528438B1 (en) Packet forwarding
CN107888434B (en) Network equipment configuration synchronization method and device
CN111224895B (en) Time-sensitive message transmission method, device and equipment in HSR network
CN110049138B (en) Method, device and system for starting communication and data transmission of equipment
CN111385068B (en) Data transmission method, device, electronic equipment and communication system
EP2445160A1 (en) Method for automatically negotiating type of service and aggregation apparatus therefor
US20140244726A1 (en) Assignment of Point-to-Point Over Ethernet (PPPoE) Session IDs
WO2017000438A1 (en) Method and apparatus for improving service detection reliability in a switched network link
JP7305882B2 (en) Slot negotiation methods and devices
CN103607311B (en) System and method for reestablishing TCP connection seamlessly

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