Disclosure of Invention
The application provides a network communication method, a device, equipment and a storage medium, which are used for solving the problems in the prior art.
In a first aspect, the present application provides a network communication method, which is applied to a central user configuration CUC in a time-sensitive network TSN, where the TSN includes the CUC, a first central network configuration CNC, a second CNC, and a network bridge, and information synchronization is implemented between the first CNC and the second CNC, and the method includes:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a first preset signal to the first CNC;
judging whether a first response signal sent by the first CNC based on a first preset signal is received;
and if the first response signal is not received, determining that the first CNC has a fault.
In some embodiments, switching to communicate with the second CNC comprises:
sending a first query message to the second CNC, wherein the first query message is used for querying whether the second CNC breaks down currently;
and when receiving a first feedback message that the second CNC does not have a fault currently, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In a second aspect, the present application provides a network communication method, which is applied to a bridge in a TSN, where the TSN includes a CUC, a first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the method includes:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a second preset signal to the first CNC;
judging whether a second response signal sent by the first CNC based on a second preset signal is received;
and if the second response signal is not received, determining that the first CNC fails.
In some embodiments, switching to communicate with the second CNC comprises:
sending a second query message to the second CNC, wherein the second query message is used for querying whether the second CNC has a fault currently;
and when a second feedback message that the second CNC does not have a fault currently is received, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In a third aspect, the present application provides a network communication method, applied to a first CNC in a TSN, where the TSN includes a CUC, the first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the method includes:
communicating with the CUC and the bridge;
in the communication process, if a first preset signal sent by the CUC is received, a first response signal is sent to the CUC based on the first preset signal, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to communicate with the second CNC when the first CNC fails;
and if a second preset signal sent by the network bridge is received, sending a second response signal to the network bridge based on the second preset signal, wherein the second response signal is used for assisting the network bridge to judge whether the first CNC fails or not, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
In some embodiments, further comprising:
and synchronizing the communication data communicated with the CUC and the network bridge to the second CNC in the communication process.
In some embodiments, further comprising:
and if the fault occurs, after the fault is recovered, sending a fault recovery message to the CUC, the second CNC and the network bridge, wherein the fault recovery message is used for instructing the second CNC to synchronize communication data communicated with the CUC and the network bridge to the first CNC and instructing the CUC and the network bridge to be switched to communicate with the first CNC.
In a fourth aspect, the present application provides a network communication method, applied to a second CNC in a TSN, where the TSN includes a CUC, a first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the method includes:
when a first query message sent by the CUC is received, if the current failure does not occur, sending a first feedback message of the second CNC, which does not occur the failure currently, to the CUC; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
when a second query message sent by the network bridge is received, if the current failure does not occur, sending a second feedback message of the second CNC without the current failure to the network bridge; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
In some embodiments, further comprising:
and receiving and storing communication data sent by the first CNC, wherein the communication data is communication data of the first CNC which is communicated with the CUC and the network bridge when the first CNC does not have a fault.
In some embodiments, further comprising:
when the CUC and the bridge are switched to communicate with the second CNC, the CUC and the bridge communicate with each other based on the latest communication data stored therein.
In some embodiments, further comprising:
and after receiving the fault recovery message sent by the first CNC, stopping communication with the CUC and the network bridge, and sending the latest communication data communicated with the CUC and the network bridge to the first CNC.
In a fifth aspect, the present application provides a network communication device, which is applied to a central user configuration CUC in a time-sensitive network TSN, where the TSN includes the CUC, a first central network configuration CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the device includes:
the communication module is used for communicating with the first CNC;
the judging module is used for judging whether the first CNC breaks down or not in the communication process;
and the switching module is used for switching to communicate with the second CNC if the first CNC is determined to have a fault.
In a sixth aspect, the present application provides a network communication device, applied to a bridge in a TSN, where the TSN includes a CUC, a first CNC, a second CNC and the bridge, and information synchronization is implemented between the first CNC and the second CNC, and the device includes:
the communication module is used for communicating with the first CNC;
the judging module is used for judging whether the first CNC breaks down or not in the communication process;
and the switching module is used for switching to communicate with the second CNC if the first CNC is determined to have a fault.
In a seventh aspect, the present application provides a network communication device, applied to a first CNC in a TSN, where the TSN includes a CUC, the first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the device includes:
the communication module is used for communicating with the CUC and the network bridge;
the first response module is used for sending a first response signal to the CUC based on the first preset signal if the first preset signal sent by the CUC is received in the communication process, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to be in communication with the second CNC when the first CNC fails;
and the second response module is used for sending a second response signal to the network bridge based on the second preset signal if the second preset signal sent by the network bridge is received, and the second response signal is used for assisting the network bridge to judge whether the first CNC fails or not, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
In an eighth aspect, the present application provides a network communication device, applied to a second CNC in a TSN, where the TSN includes a CUC, a first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC, and the device includes:
the first feedback module is used for sending a first feedback message that the second CNC does not have a fault currently to the CUC if the first query message sent by the CUC does not have a fault currently; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
the second feedback module is used for sending a second feedback message that the second CNC does not have a fault currently to the network bridge if the second query message sent by the network bridge is not currently in fault; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
In a ninth aspect, the present application provides a CUC device, comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In a tenth aspect, the present application provides a bridge device comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In an eleventh aspect, the present application provides a CNC device comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with the CUC and the bridge;
in the communication process, if a first preset signal sent by the CUC is received, a first response signal is sent to the CUC based on the first preset signal, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to communicate with the second CNC when the first CNC fails;
and if a second preset signal sent by the network bridge is received, sending a second response signal to the network bridge based on the second preset signal, wherein the second response signal is used for assisting the network bridge to judge whether the first CNC fails or not, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
In a twelfth aspect, the present application provides a CNC device comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
when a first query message sent by the CUC is received, if the current failure does not occur, sending a first feedback message of the second CNC, which does not occur the failure currently, to the CUC; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
when a second query message sent by the network bridge is received, if the current failure does not occur, sending a second feedback message of the second CNC without the current failure to the network bridge; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
In a thirteenth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions, which when executed by a processor, are used for implementing the network communication method described above.
The application provides a network communication method, a device, equipment and a storage medium, wherein the method comprises the following steps: the CUC communicates with the first CNC; in the communication process, judging whether the first CNC has a fault; and if the first CNC is determined to have a fault, switching to communicate with the second CNC. In this application, whether CUC is out of order with first CNC's in-process, judgement first CNC, if appear, then switch over into and communicate with second CNC, because information synchronization before first CNC and the second CNC, consequently CUC can continue to carry out normal communication with second CNC to guarantee the continuity and the stability of communication, improve TSN's stability.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the embodiments of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
With the continuous integration of information technology and operation technology, the demand for a unified network architecture becomes urgent. Time Sensitive Network (TSN) is a new industrial communication technology that is being actively promoted by the international industry at present. The time sensitive network allows periodic and aperiodic data to be transmitted in the same network, so that the standard ethernet has the advantage of deterministic transmission and has become a key technology of wide focus through a vendor independent standardization process.
Fig. 1 is a schematic diagram of a Configuration model of a TSN defined by Institute of Electrical and Electronics Engineers (IEEE) 802.1Qcc, and as shown in fig. 1, the TSN mainly includes a Central Network Configuration (CNC), a Central User Configuration (CUC), a bridge (Bridges), and a terminal (End Station). The CNC is mainly responsible for discovering the network topology through a link discovery protocol according to user requirements transmitted by the CUC, then calculating an optimal configuration, and issuing the optimal configuration to all bridges through a related protocol (such as a NETCONF protocol).
However, once the CNC fails, the configuration of the whole network cannot be updated, so that new user requirements cannot be met, and the reliability of the TSN is reduced.
The application provides a network communication method, a device, equipment and a storage medium, which aim to solve the above technical problems in the prior art.
The main conception of the scheme of the application is as follows: for the structure of the existing TSN, a standby second CNC is additionally deployed on the basis of the existing first CNC, and when the CUC or the bridge detects that the first CNC fails, the second CNC can be switched to communicate with the CUC, so that the network configuration can be timely updated according to user requirements, and the stability and reliability of the TSN are guaranteed.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic structural diagram of a TSN in an embodiment of the present application, and as shown in fig. 2, the TSN includes a CUC, a first CNC, a second CNC, a bridge and a terminal, where the CUC may communicate with the first CNC, the second CNC and the terminal, respectively, the first CNC may communicate with the CUC, the second CNC and the bridge, respectively, the second CNC may communicate with the CUC, the first CNC and the bridge, and the bridge may communicate with the first CNC, the second CNC and the terminal, respectively.
Wherein, realize information synchronization between first CNC and the second CNC to when CUC/bridge communicates between first CNC and second CNC and switches, first CNC/second CNC still can communicate with CUC/bridge according to latest communication data, thereby guarantee the continuity and the stability of communication, improve TSN's stability.
It will be appreciated that normally the CUC/bridge communicates with the first CNC; when the first CNC fails and can not work normally, the CUC/bridge is switched to communicate with the second CNC, so that the TSN is stable and reliable.
Optionally, the first CNC and the second CNC may be distinguished by different Identities (IDs), so that the CUC and the bridge may communicate with the corresponding CNC according to the IDs.
The following explains a processing flow of the network communication method according to the present application from the viewpoint of each configuration in the TSN.
In some embodiments, a network communication method is provided, which is applied to a Central User Configuration (CUC) in a time-sensitive network (TSN), where the TSN includes the CUC, a first Central Network Configuration (CNC), a second CNC, and a network bridge, and information synchronization is implemented between the first CNC and the second CNC.
Fig. 3 is a schematic diagram of a network communication method applied to a CUC according to an embodiment of the present application, and as shown in fig. 3, the method mainly includes the following steps:
a1, communicating with a first CNC;
specifically, the CUC is mainly used for collecting user requirements, and when the CUC communicates with the first CNC, the collected user requirements are sent to the first CNC, so that the first CNC executes subsequent processing according to the user requirements.
A2, judging whether the first CNC has a fault or not in the communication process;
the CUC determines whether the first CNC has a failure during communication with the first CNC, and the determination process may be continuously performed or periodically performed.
And A3, if the first CNC is determined to have a fault, switching to the communication with the second CNC.
If the CUC judges that the first CNC breaks down, the first CNC cannot normally work at the moment, therefore, the CUC is switched to be communicated with the second CNC, the user requirement to be collected is sent to the second CNC to be processed, and therefore stability and reliability of the TSN are guaranteed.
Correspondingly, if the CUC judges that the first CNC does not have a fault, the first CNC can normally work at the moment, and therefore the CUC can continue to communicate with the first CNC, and user requirements to be collected are sent to the first CNC to be processed.
The embodiment provides a network communication method, wherein a CUC determines whether a first CNC fails in a communication process with the first CNC, if so, the CUC switches to communicate with a second CNC, otherwise, the CUC continues to communicate with the first CNC, so that user requirements collected by the CUC can be timely processed, and stability and reliability of a TSN are ensured.
In some embodiments, a2, comprises:
a21, sending a first preset signal to the first CNC;
a22, judging whether a first response signal sent by the first CNC based on the first preset signal is received;
and A23, if the first response signal is not received, determining that the first CNC has a fault.
Specifically, the CUC may continuously/periodically send a first preset signal to the first CNC, the first preset signal being similar to the dog feeding signal.
If the first CNC is in a normal working state, the first CNC returns a corresponding first response signal to the CUC after receiving the first preset signal, so that the CUC knows that the first CNC is in the normal working state according to the first response signal.
Correspondingly, if the first CNC is in a failure state, the first CNC may not receive the first preset signal or return a corresponding first response signal to the CUC, and therefore, if the CUC does not receive the first response signal, the CUC may determine that the first CNC has a failure.
In this embodiment, the CUC may send a first preset signal to the first CNC, and determine whether the first CNC has a fault by determining whether the corresponding first response signal is received, so as to accurately obtain a working state of the first CNC.
In some embodiments, a3, comprises:
a31, sending a first query message to the second CNC, wherein the first query message is used for querying whether the second CNC breaks down currently;
and A32, when a first feedback message that the second CNC does not fail currently is received, switching to communication with the second CNC.
Specifically, after the CUC determines that the first CNC is in a fault, before switching to communicate with the second CNC, it is first determined whether the second CNC is in a normal operating state, specifically, the second CNC sends a first query message to the second CNC, after receiving the first query message, if the second CNC is not in a fault currently, the second CNC sends a first feedback message that the second CNC is not in a fault currently to the CUC, and thus, after knowing that the second CNC is in a normal operating state, the CUC switches to communicate with the second CNC.
In this embodiment, before the CUC performs the handover, it is first determined whether the second CNC is in a normal operating state, so as to ensure that the CUC can perform normal communication with the second CNC after the handover.
In some embodiments, further comprising:
and A4, after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
Specifically, after the failure of the first CNC is recovered, the first CNC broadcasts a failure recovery message, and the CUC switches to communicate with the first CNC again after receiving the failure recovery message.
In this embodiment, the CUC is set to preferentially communicate with the first CNC, so that the situation that the CUC and the bridge communicate with different CNC at the same time can be avoided, that is, communication confusion (for example, the CUC communicates with the first CNC, and the bridge communicates with the second CNC) is avoided, and the stability and reliability of the TSN are ensured.
In some embodiments, a network communication method is provided, which is applied to a bridge in a TSN, where the TSN includes a CUC, a first CNC, a second CNC, and the bridge, and information synchronization is implemented between the first CNC and the second CNC.
Fig. 4 is a schematic diagram of a network communication method applied to a network bridge according to an embodiment of the present application, and as shown in fig. 4, the method mainly includes the following steps:
b1, communicating with the first CNC;
specifically, the network bridge is mainly used for acquiring network configuration information from the first CNC, and the network configuration information is determined and obtained by the first CNC according to the user requirement sent by the CUC.
B2, judging whether the first CNC has a fault or not in the communication process;
the bridge determines whether the first CNC has a failure during communication with the first CNC, and the determination may be performed continuously or periodically.
And B3, if the first CNC is determined to have a fault, switching to the communication with the second CNC.
If the bridge judges that the first CNC fails, the first CNC cannot work normally at the moment, and therefore the bridge is switched to communicate with the second CNC, namely network configuration information is obtained from the second CNC, and therefore stability and reliability of the TSN are guaranteed.
Correspondingly, if the bridge determines that the first CNC does not have a fault, it indicates that the first CNC can normally operate at this time, and therefore, the bridge can continue to communicate with the first CNC, i.e., obtain the network configuration information from the first CNC.
The embodiment provides a network communication method, wherein a network bridge judges whether a first CNC fails in a communication process with the first CNC, if so, the first CNC is switched to communicate with a second CNC, otherwise, the first CNC continues to communicate with the network bridge, so that the network bridge can accurately acquire network configuration information, and the stability and reliability of a TSN are further ensured.
In some embodiments, B2, comprises:
b21, sending a second preset signal to the first CNC;
b22, judging whether a second response signal sent by the first CNC based on a second preset signal is received;
and B23, if the second response signal is not received, determining that the first CNC has a fault.
In particular, the bridge may continuously/periodically send a second preset signal to the first CNC, which second preset signal is similar to the dog feed signal.
If the first CNC is in a normal working state, the first CNC returns a corresponding second response signal to the bridge after receiving the second preset signal, so that the bridge knows that the first CNC is in the normal working state according to the second response signal.
Correspondingly, if the first CNC is in a failure state, the first CNC may not receive the second preset signal or may not return a corresponding second response signal to the bridge, and therefore, if the bridge does not receive the second response signal, the bridge may determine that the first CNC has a failure.
In this embodiment, the network bridge may send the second preset signal to the first CNC, and determine whether the first CNC has a fault by determining whether the corresponding second response signal is received, so as to accurately obtain the operating state of the first CNC.
In some embodiments, B3, comprises:
sending a second query message to the second CNC, wherein the second query message is used for querying whether the second CNC has a fault currently;
and when a second feedback message that the second CNC does not have a fault currently is received, switching to communication with the second CNC.
Specifically, after determining that the first CNC is in a failure, the network bridge first determines whether the second CNC is in a normal operating state before switching to communicate with the second CNC, and specifically, the network bridge sends a second query message to the second CNC, and after receiving the second query message, if the second CNC is not in a failure, the second CNC sends a second feedback message that the second CNC is not in a failure, so that the network bridge switches to communicate with the second CNC after knowing that the second CNC is in a normal operating state.
In this embodiment, before the network bridge performs the handover, it is first determined whether the second CNC is in a normal operating state, so as to ensure that the network bridge can perform normal communication with the second CNC after the handover.
In some embodiments, further comprising:
and B4, after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
Specifically, after the failure of the first CNC is recovered, the first CNC broadcasts a failure recovery message, and the network bridge switches to communicate with the first CNC again after receiving the failure recovery message.
In this embodiment, the bridge is set to preferentially communicate with the first CNC, so that the situation that the CUC and the bridge communicate with different CNC at the same time can be avoided, that is, communication confusion (for example, the CUC communicates with the first CNC, and the bridge communicates with the second CNC) is avoided, and the stability and reliability of the TSN are ensured.
In some embodiments, a network communication method is provided, which is applied to a first CNC in a TSN, where the TSN includes a CUC, the first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC.
Fig. 5 is a schematic diagram of a network communication method applied to a first CNC according to an embodiment of the present application, and as shown in fig. 5, the method mainly includes the following steps:
c1, communicating with the CUC and the bridge;
specifically, the first CNC may acquire a user requirement from the CUC, discover a network topology through a link discovery protocol, then calculate optimal network configuration information, and issue the optimal network configuration information to each network bridge through a NETCONF protocol.
C2, in the communication process, if a first preset signal sent by the CUC is received, sending a first response signal to the CUC based on the first preset signal, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to communicate with the second CNC when the first CNC fails;
the first CNC continuously/periodically receives a first preset signal sent by the CUC in the communication process with the CUC, wherein the first preset signal is similar to a dog feeding signal, and if the first CNC is in a normal working state, the first CNC returns a corresponding first response signal to the CUC after receiving the first preset signal, so that the CUC knows that the first CNC is in the normal working state according to the first response signal.
Correspondingly, if the first CNC is in a failure state, the first CNC may not receive the first preset signal or return a corresponding first response signal to the CUC, and therefore, if the CUC does not receive the first response signal, the CUC may determine that the first CNC has a failure.
And C3, if a second preset signal sent by the network bridge is received, sending a second response signal to the network bridge based on the second preset signal, wherein the second response signal is used for assisting the network bridge to judge whether the first CNC fails, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
And if the first CNC is in a normal working state, the first CNC returns a corresponding second response signal to the bridge after receiving the second preset signal, so that the bridge knows that the first CNC is in the normal working state according to the second response signal.
Correspondingly, if the first CNC is in a failure state, the first CNC may not receive the second preset signal or may not return a corresponding second response signal to the bridge, and therefore, if the bridge does not receive the second response signal, the bridge may determine that the first CNC has a failure.
In the network communication method, a first CNC feeds back a corresponding first response signal/second response signal based on a first preset signal/second preset signal sent by a CUC/bridge in a process of communicating with the CUC/bridge, so that the CUC/bridge can timely judge whether the first CNC has a fault, and thus, the first CNC can be switched to communicate with a second CNC when the first CNC has the fault, and the stability and reliability of a TSN can be further ensured.
In some embodiments, further comprising:
and synchronizing the communication data communicated with the CUC and the network bridge to the second CNC in the communication process.
Specifically, in the process of communication between the first CNC and the CUC/bridge, the first CNC continuously/periodically synchronizes communication data communicated with the CUC and the bridge to the second CNC, so that when the CUC/bridge is switched to communicate with the second CNC, the second CNC can still communicate with the CUC/bridge according to the latest communication data, thereby ensuring the continuity and stability of communication and improving the stability of the TSN.
In some embodiments, further comprising:
and if the fault occurs, after the fault is recovered, sending a fault recovery message to the CUC, the second CNC and the network bridge, wherein the fault recovery message is used for instructing the second CNC to synchronize communication data communicated with the CUC and the network bridge to the first CNC and instructing the CUC and the network bridge to be switched to communicate with the first CNC.
Specifically, after the first CNC fails and recovers, the first CNC broadcasts a failure recovery message to the CUC, the second CNC and the bridge, and the CUC and the bridge switch to communicate with the first CNC again after receiving the failure recovery message; and after receiving the fault recovery message, the second CNC synchronizes the latest communication data to the first CNC, so that when the CUC/bridge is switched to communicate with the first CNC, the first CNC can still communicate with the CUC/bridge according to the latest communication data.
In this embodiment, the CUC/bridge is set to preferentially communicate with the first CNC, so that the situation that the CUC and the bridge communicate with different CNC at the same time can be avoided, that is, communication confusion (for example, the CUC communicates with the first CNC, and the bridge communicates with the second CNC) is avoided, and the stability and reliability of the TSN are ensured.
In some embodiments, a network communication method is provided, which is applied to a second CNC in a TSN, where the TSN includes a CUC, a first CNC, a second CNC, and a bridge, and information synchronization is implemented between the first CNC and the second CNC.
Fig. 6 is a schematic diagram of a network communication method applied to a second CNC according to an embodiment of the present application, and as shown in fig. 6, the method mainly includes the following steps:
d1, when receiving the first query message sent by the CUC, if the fault does not occur currently, sending a first feedback message that the fault does not occur currently to the CUC by the second CNC; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
specifically, when first CNC breaks down, the CUC switches to communicate with the second CNC, at this moment, the CUC firstly sends first inquiry message to the second CNC in order to inquire about the current operating condition of second CNC, the second CNC is after receiving this first inquiry message, if the second CNC does not break down at present, then the second CNC sends the first feedback message that the second CNC did not break down at present to the CUC, thereby, the CUC switches to communicate with the second CNC after knowing that the second CNC is in normal operating condition.
D2, when receiving a second query message sent by the network bridge, if the current failure does not occur, sending a second feedback message of the second CNC, which does not occur the failure currently, to the network bridge; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
Specifically, when the first CNC breaks down, the network bridge switches to communicate with the second CNC, at this moment, the network bridge firstly sends a second query message to the second CNC to query the current working state of the second CNC, and after the second CNC receives the second query message, if the second CNC does not break down currently, the second CNC sends a second feedback message that the second CNC does not break down currently to the network bridge, so that the network bridge switches to communicate with the second CNC after knowing that the second CNC is in a normal working state.
In the network communication method, during the communication process between the CUC/bridge and the first CNC, if the first CNC has a fault, the CUC/bridge queries the second CNC for the current working state, and if the second CNC has no fault, the CUC/bridge switches to communicate with the second CNC, so as to ensure the stability and reliability of the TSN.
In some embodiments, further comprising:
and receiving and storing communication data sent by the first CNC, wherein the communication data is communication data of the first CNC which is communicated with the CUC and the network bridge when the first CNC does not have a fault.
Specifically, in the process of communication between the first CNC and the CUC/bridge, the first CNC continuously/periodically synchronizes communication data communicated with the CUC and the bridge to the second CNC, and the second CNC receives and stores the communication data sent by the first CNC. Therefore, when the CUC/bridge is switched to communicate with the second CNC, the second CNC can still communicate with the CUC/bridge according to the latest communication data, so that the continuity and stability of communication are guaranteed, and the stability of the TSN is improved.
In some embodiments, further comprising:
when the CUC and the bridge are switched to communicate with the second CNC, the CUC and the bridge communicate with each other based on the latest communication data stored therein.
In this embodiment, when the first CNC fails to cause the CUC/bridge to switch to communicate with the second CNC, the second CNC communicates with the CUC/bridge according to the latest communication data, thereby ensuring continuity and stability of communication and improving stability of the TSN.
In some embodiments, further comprising:
and after receiving the fault recovery message sent by the first CNC, stopping communication with the CUC and the network bridge, and sending the latest communication data communicated with the CUC and the network bridge to the first CNC.
Specifically, after the first CNC recovers from the fault, the first CNC broadcasts a fault recovery message to the CUC, the second CNC and the bridge, and the second CNC stops communicating with the CUC and the bridge after receiving the fault recovery message and synchronizes the latest communication data to the first CNC, so that when the CUC/bridge switches to communicate with the first CNC, the first CNC can still communicate with the CUC/bridge according to the latest communication data.
In this embodiment, the second CNC performs information synchronization with the first CNC, so that when the CUC/bridge is switched to communicate with the first CNC, the first CNC can still communicate with the CUC/bridge according to the latest communication data, thereby ensuring continuity and stability of communication and improving stability of the TSN.
Fig. 7 is a schematic diagram of a network communication method provided in an embodiment of the present application, and as shown in fig. 7, the method mainly includes the following steps:
s1, when the first CNC works normally, the CUC collects user requirements and sends the collected user requirements to the first CNC;
s2, the first CNC receives user requirements sent by the CUC, discovers network topology through a link discovery protocol, then calculates optimal network configuration information, and sends the optimal network configuration information to each network bridge through a NETCONF protocol;
s3, synchronizing communication data communicated with the CUC and the network bridge to the second CNC by the first CNC in the communication process;
s4, after the first CNC breaks down, the CUC is switched to be communicated with the second CNC, namely user requirements are sent to the second CNC; in addition, the bridge also switches to communicate with the second CNC;
s5, the second CNC receives user requirements sent by the CUC, discovers network topology through a link discovery protocol, then calculates optimal network configuration information, and sends the optimal network configuration information to each network bridge through a NETCONF protocol;
s6, when the first CNC fault is recovered, the first CNC broadcasts a fault recovery message to the CUC, the second CNC and the bridge;
s7, switching the CUC to communicate with the first CNC, namely sending the user requirement to the first CNC; in addition, the bridge also switches to communicate with the first CNC;
s8, the second CNC synchronizes the latest communication data communicated with the CUC and the network bridge to the first CNC;
s9, the first CNC receives the user requirement sent by the CUC, discovers the network topology through the link discovery protocol, then calculates the optimal network configuration information, and sends the optimal network configuration information to each bridge through the NETCONF protocol.
Based on the above processing flow, according to the network communication method provided by this embodiment, when the CUC or the bridge detects that the first CNC fails, the CUC or the bridge may switch to communicate with the second CNC, so as to ensure that the network configuration can be updated in time according to the user requirement, and ensure the stability and reliability of the TSN.
It should be understood that, although the respective steps in the flowcharts in the above-described embodiments are sequentially shown as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, in different orders, and may be performed alternately or at least partially with respect to other steps or sub-steps of other steps.
In some embodiments, there is provided a network communication device for use in a Central User Configuration (CUC) in a time-sensitive network (TSN), the TSN comprising the CUC, a first Central Network Configuration (CNC), a second CNC, and a bridge, the first CNC and the second CNC implementing information synchronization therebetween, the device comprising:
the communication module is used for communicating with the first CNC;
the judging module is used for judging whether the first CNC breaks down or not in the communication process;
and the switching module is used for switching to communicate with the second CNC if the first CNC is determined to have a fault.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a first preset signal to the first CNC;
judging whether a first response signal sent by the first CNC based on a first preset signal is received;
and if the first response signal is not received, determining that the first CNC has a fault.
In some embodiments, switching to communicate with the second CNC comprises:
sending a first query message to the second CNC, wherein the first query message is used for querying whether the second CNC breaks down currently;
and when receiving a first feedback message that the second CNC does not have a fault currently, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In some embodiments, a network communication device is provided for a bridge in a TSN, the TSN including a CUC, a first CNC, a second CNC, and the bridge, the first CNC and the second CNC implementing information synchronization therebetween, the device comprising:
the communication module is used for communicating with the first CNC;
the judging module is used for judging whether the first CNC breaks down or not in the communication process;
and the switching module is used for switching to communicate with the second CNC if the first CNC is determined to have a fault.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a second preset signal to the first CNC;
judging whether a second response signal sent by the first CNC based on a second preset signal is received;
and if the second response signal is not received, determining that the first CNC fails.
In some embodiments, switching to communicate with the second CNC comprises:
sending a second query message to the second CNC, wherein the second query message is used for querying whether the second CNC has a fault currently;
and when a second feedback message that the second CNC does not have a fault currently is received, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In some embodiments, there is provided a network communication device for a first CNC applied in a TSN, the TSN including a CUC, the first CNC, a second CNC, and a bridge, the first CNC and the second CNC implementing information synchronization therebetween, the device comprising:
the communication module is used for communicating with the CUC and the network bridge;
the first response module is used for sending a first response signal to the CUC based on the first preset signal if the first preset signal sent by the CUC is received in the communication process, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to be in communication with the second CNC when the first CNC fails;
and the second response module is used for sending a second response signal to the network bridge based on the second preset signal if the second preset signal sent by the network bridge is received, and the second response signal is used for assisting the network bridge to judge whether the first CNC fails or not, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
In some embodiments, further comprising:
and synchronizing the communication data communicated with the CUC and the network bridge to the second CNC in the communication process.
In some embodiments, further comprising:
and if the fault occurs, after the fault is recovered, sending a fault recovery message to the CUC, the second CNC and the network bridge, wherein the fault recovery message is used for instructing the second CNC to synchronize communication data communicated with the CUC and the network bridge to the first CNC and instructing the CUC and the network bridge to be switched to communicate with the first CNC.
In some embodiments, there is provided a network communication device for use in a second CNC in a TSN, the TSN including a CUC, a first CNC, a second CNC, and a bridge, the first CNC and the second CNC implementing information synchronization therebetween, the device comprising:
the first feedback module is used for sending a first feedback message that the second CNC does not have a fault currently to the CUC if the first query message sent by the CUC does not have a fault currently; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
the second feedback module is used for sending a second feedback message that the second CNC does not have a fault currently to the network bridge if the second query message sent by the network bridge is not currently in fault; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
In some embodiments, further comprising:
and receiving and storing communication data sent by the first CNC, wherein the communication data is communication data of the first CNC which is communicated with the CUC and the network bridge when the first CNC does not have a fault.
In some embodiments, further comprising:
when the CUC and the bridge are switched to communicate with the second CNC, the CUC and the bridge communicate with each other based on the latest communication data stored therein.
In some embodiments, further comprising:
and after receiving the fault recovery message sent by the first CNC, stopping communication with the CUC and the network bridge, and sending the latest communication data communicated with the CUC and the network bridge to the first CNC.
For specific limitations of the network communication device, reference may be made to the above limitations of the network communication method, which are not described herein again. The modules in the network communication device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In some embodiments, a CUC device is provided that includes a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a first preset signal to the first CNC;
judging whether a first response signal sent by the first CNC based on a first preset signal is received;
and if the first response signal is not received, determining that the first CNC has a fault.
In some embodiments, switching to communicate with the second CNC comprises:
sending a first query message to the second CNC, wherein the first query message is used for querying whether the second CNC breaks down currently;
and when receiving a first feedback message that the second CNC does not have a fault currently, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In some embodiments, a bridge device is provided, comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with a first CNC;
in the communication process, judging whether the first CNC fails;
and if the first CNC is determined to have a fault, switching to be communicated with a second CNC.
In some embodiments, determining whether the first CNC is malfunctioning includes:
sending a second preset signal to the first CNC;
judging whether a second response signal sent by the first CNC based on a second preset signal is received;
and if the second response signal is not received, determining that the first CNC fails.
In some embodiments, switching to communicate with the second CNC comprises:
sending a second query message to the second CNC, wherein the second query message is used for querying whether the second CNC has a fault currently;
and when a second feedback message that the second CNC does not have a fault currently is received, switching to communication with the second CNC.
In some embodiments, further comprising:
and after receiving the failure recovery message sent by the first CNC, switching to communicating with the first CNC.
In some embodiments, there is provided a CNC device comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
communicating with the CUC and the bridge;
in the communication process, if a first preset signal sent by the CUC is received, a first response signal is sent to the CUC based on the first preset signal, wherein the first response signal is used for assisting the CUC to judge whether the first CNC fails or not, so that the CUC is switched to communicate with the second CNC when the first CNC fails;
and if a second preset signal sent by the network bridge is received, sending a second response signal to the network bridge based on the second preset signal, wherein the second response signal is used for assisting the network bridge to judge whether the first CNC fails or not, so that the network bridge is switched to communicate with the second CNC when the first CNC fails.
In some embodiments, further comprising:
and synchronizing the communication data communicated with the CUC and the network bridge to the second CNC in the communication process.
In some embodiments, further comprising:
and if the fault occurs, after the fault is recovered, sending a fault recovery message to the CUC, the second CNC and the network bridge, wherein the fault recovery message is used for instructing the second CNC to synchronize communication data communicated with the CUC and the network bridge to the first CNC and instructing the CUC and the network bridge to be switched to communicate with the first CNC.
In some embodiments, there is provided a CNC device comprising a memory, a transceiver, a processor:
a memory for storing a computer program; a transceiver for transceiving data under the control of the processor; a processor for reading the computer program in the memory and performing the following operations:
when a first query message sent by the CUC is received, if the current failure does not occur, sending a first feedback message of the second CNC, which does not occur the failure currently, to the CUC; the first query message is a message sent by the CUC after the first CNC fails, and the first feedback message is used for indicating the CUC to be switched to communicate with the second CNC;
when a second query message sent by the network bridge is received, if the current failure does not occur, sending a second feedback message of the second CNC without the current failure to the network bridge; the second query message is a message sent by the network bridge after the first CNC fails, and the second feedback message is used for indicating the network bridge to switch to communicate with the second CNC.
In some embodiments, further comprising:
and receiving and storing communication data sent by the first CNC, wherein the communication data is communication data of the first CNC which is communicated with the CUC and the network bridge when the first CNC does not have a fault.
In some embodiments, further comprising:
when the CUC and the bridge are switched to communicate with the second CNC, the CUC and the bridge communicate with each other based on the latest communication data stored therein.
In some embodiments, further comprising:
and after receiving the fault recovery message sent by the first CNC, stopping communication with the CUC and the network bridge, and sending the latest communication data communicated with the CUC and the network bridge to the first CNC.
In the above devices, the memory and the processor are electrically connected, directly or indirectly, to enable transmission or communication of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines, such as a bus. The memory stores computer-executable instructions for implementing the data access control method, and includes at least one software functional module which can be stored in the memory in the form of software or firmware, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like. The memory is used for storing programs, and the processor executes the programs after receiving the execution instructions. Further, the software programs and modules within the aforementioned memories may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In some embodiments, a computer-readable storage medium having stored thereon computer-executable instructions for performing the steps of the method embodiments of the present application when executed by a processor is provided.
In some embodiments, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of the method embodiments of the present application.
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, which can be stored in a non-volatile computer-readable storage medium, and when executed, the computer program can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.