Wired carrier communication abnormity monitoring method and related device
In the wired carrier communication system, the master node sends link training frames to the slave nodes and monitors the response frames, which solves the problem of lack of active abnormality monitoring in the existing system, realizes real-time monitoring of communication status and fault early warning, and improves the system's reliability. reliability.
Patent Information
- Application Number
- CN202411461790.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-21
AI Technical Summary
The existing wired carrier communication systems lack active abnormality monitoring methods, resulting in the inability to promptly warning of potential communication risks and failures, affecting the reliability of the system.
Real-time monitoring of the wired carrier communication status is achieved by the master node simultaneously sending link training frames to each slave node and determining whether the correct link response frame can be received within the corresponding response time slot of each slave node.
It realizes active monitoring of the wired carrier communication system, promptly detects potential communication risks, and issues early warnings before failures occur, thus improving the reliability of the system.
Smart Images

Figure CN119341693A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data communication, and in particular relates to a wired carrier communication abnormality monitoring method and related devices. Background Art
[0002] Wired carrier communication technology transmits information in the form of waves in a wired channel. Compared with traditional wired communication technology, it can improve the channel bandwidth and transmission rate of the medium, thereby greatly improving the data throughput of the system. This feature makes wired carrier communication technology widely used in various scenarios that require high-speed data transmission, such as data centers and industrial control systems. The transmission media of wired carrier communication technology are diverse, including but not limited to twisted pair, coaxial cable, and AC and DC power supply networks. The selection of these media provides great flexibility for the application of wired carrier communication technology.
[0003] In the network architecture of wired carrier communication technology, the bus network structure is a common and effective layout method. This structure consists of a master node and several slave nodes. The master node is responsible for controlling the data transmission of the entire bus network and managing the communication activities of each slave node through time-sharing scheduling. The network topology is as follows: Figure 1 shown.
[0004] Although wired carrier communication technology has advantages in improving transmission rate and channel bandwidth, its abnormality monitoring mechanism is relatively backward in practical applications. At present, most wired carrier communication systems lack active abnormality monitoring means, and can only detect problems passively when communication abnormalities or failures occur. This lagging method not only fails to timely warn of potential communication risks, but also makes it difficult to effectively prevent and repair failures before they occur, thus affecting the reliability of the entire communication system. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a wired carrier communication anomaly monitoring method and related devices, which aim to realize active monitoring of wired carrier communication anomalies and ensure the reliability of wired carrier communication.
[0006] In order to solve the above technical problems, the present invention is implemented by the following technical solutions: According to a first aspect of the present invention, there is provided a method for monitoring abnormality of wired carrier communication, comprising: The master node sends a link training frame to each slave node simultaneously; wherein each slave node has a different number, and the link training frame includes a time mark, and different response time slots corresponding to slave nodes with different numbers with reference to the time mark; Determine whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes the slave node number; If the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an erroneous slave node number, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0007] In a possible implementation manner of the first aspect, the link training frame further includes a link training frame sequence number, and the link response frame of each slave node further includes a link response frame sequence number; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, it continues to determine whether the link training frame sequence number corresponding to the master node and the link response frame sequence number corresponding to each slave node are the sequence numbers corresponding to the same round of communication; If the link response frame sequence number corresponding to a slave node and the link training frame sequence number corresponding to the master node are not sequence numbers corresponding to the same round of communication, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0008] In a possible implementation manner of the first aspect, the link response frame of each slave node further includes a slave node local error flag, where the slave node local error flag is a result obtained by each slave node performing self-inspection on its own link response frame, and if a slave node performs self-inspection on its link response frame and finds an error, the slave node local error flag of the slave node is set to 1, otherwise it is set to 0; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, then continue to determine the slave node local error flag setting value corresponding to each slave node; If the slave node local error flag setting value corresponding to a certain slave node is 1, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0009] In a possible implementation manner of the first aspect, the link response frame of each slave node further includes a link response frame check; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, it will continue to determine whether the link response frame check corresponding to each slave node is consistent with the frame check calculated by the master node based on the link response frame; If they are inconsistent, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0010] In a possible implementation manner of the first aspect, before the master node sends the link training frame to each slave node, the method further includes: The master node generates a slave node status table according to the wired carrier communication network topology, wherein the number of elements contained in the slave node status table is the same as the number of slave nodes in the wired carrier communication network topology, and the elements correspond to the slave nodes one by one; if the element value is 0, it indicates that the communication of the slave node corresponding to the element is abnormal; if the element value is 1, it indicates that the communication of the slave node corresponding to the element is normal; After determining that the wired carrier communication between the master node and the slave node is abnormal, the master node sets the value of the element corresponding to the abnormal slave node in the slave node status table to 0.
[0011] In a possible implementation of the first aspect, the master node chooses to periodically send link training frames to each slave node when communication is idle, and the communication idle refers to an idle time not less than 100 times T, where T is equal to NxM, M is the time required for the master node to communicate with a slave node, and N is the number of slave nodes.
[0012] In a possible implementation manner of the first aspect, after the master node simultaneously sends the link training frame to each slave node, the method further includes: The master node performs self-check on the sent link training frame. If the self-check finds that the link training frame is abnormal, it determines whether the error count exceeds 3. If it does not exceed 3, it reinitializes after T time and increases the error count by 1. Otherwise, it turns off the sending enable after T time and reports the error.
[0013] In a possible implementation manner of the first aspect, the link response frame of each slave node further includes a local time of the slave node; After determining that there is no abnormality in the wired carrier communication between the master node and each slave node, the master node updates the response time slot of the slave node according to the local time of the slave node, specifically: Select the maximum response time of all slave nodes; The maximum response time of the set multiple is used as the new response time slot, and the response time slot of each slave node is updated.
[0014] According to a second aspect of the present invention, there is provided a wired carrier communication abnormality monitoring device, comprising: A sending module, configured for the master node to simultaneously send a link training frame to each slave node; wherein each slave node has a different number, and the link training frame includes a time mark, and different response time slots corresponding to slave nodes with different numbers with reference to the time mark; A response judgment module, used to judge whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes the slave node number; The abnormality determination module is used to determine that the wired carrier communication between the master node and the slave node is abnormal if the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an incorrect slave node number.
[0015] In a possible implementation manner of the second aspect, the link response frame of each slave node further includes a slave node local error flag, where the slave node local error flag is a result obtained by each slave node performing self-inspection on its own link response frame, and if a slave node performs self-inspection on its link response frame and finds an error, the slave node local error flag of the slave node is set to 1, otherwise it is set to 0; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, then continue to determine the slave node local error flag setting value corresponding to each slave node; If the slave node local error flag setting value corresponding to a certain slave node is 1, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0016] In a possible implementation manner of the second aspect, the link response frame of each slave node further includes a link response frame check; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, it will continue to determine whether the link response frame check corresponding to each slave node is consistent with the frame check calculated by the master node based on the link response frame; If they are inconsistent, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0017] In a possible implementation manner of the second aspect, before the master node sends the link training frame to each slave node, the method further includes: The master node generates a slave node status table according to the wired carrier communication network topology, wherein the number of elements contained in the slave node status table is the same as the number of slave nodes in the wired carrier communication network topology, and the elements correspond to the slave nodes one by one; if the element value is 0, it indicates that the communication of the slave node corresponding to the element is abnormal; if the element value is 1, it indicates that the communication of the slave node corresponding to the element is normal; After determining that the wired carrier communication between the master node and the slave node is abnormal, the master node sets the value of the element corresponding to the abnormal slave node in the slave node status table to 0.
[0018] In a possible implementation of the first aspect, the master node chooses to periodically send link training frames to each slave node when communication is idle, and the communication idle refers to an idle time not less than 100 times T, where T is equal to NxM, M is the time required for the master node to communicate with a slave node, and N is the number of slave nodes.
[0019] In a possible implementation manner of the second aspect, after the master node simultaneously sends the link training frame to each slave node, the method further includes: The master node performs self-check on the sent link training frame. If the self-check finds that the link training frame is abnormal, it determines whether the error count exceeds 3. If it does not exceed 3, it reinitializes after T time and increases the error count by 1. Otherwise, it turns off the sending enable after T time and reports the error.
[0020] In a possible implementation manner of the second aspect, the link response frame of each slave node further includes a local time of the slave node; After determining that there is no abnormality in the wired carrier communication between the master node and each slave node, the master node updates the response time slot of the slave node according to the local time of the slave node, specifically: Select the maximum response time of all slave nodes; The maximum response time of the set multiple is used as the new response time slot, and the response time slot of each slave node is updated.
[0021] According to a third aspect of the present invention, there is provided a device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for monitoring abnormalities in wired carrier communications when executing the computer program.
[0022] Compared with the prior art, the present invention has at least the following beneficial effects: The present invention provides a wired carrier communication abnormality monitoring method, which has achieved improvements and enhancements in abnormality monitoring compared to the existing wired carrier communication technology. Specifically, the traditional wired carrier communication system lacks active abnormality monitoring means and can only discover problems in a passive way when the communication is abnormal or fails. The method of the present invention simultaneously sends link training frames to each slave node through the master node, and determines whether the correct link response frame can be received in the response time slot corresponding to each slave node, thereby realizing real-time monitoring of the wired carrier communication state. This method can timely discover potential communication risks and issue an early warning before the failure occurs, thereby improving the reliability of the entire wired carrier communication system. More specifically, the present invention ensures that the link response frames of each slave node can reach the master node in an orderly and accurate manner by allocating different response time slots to each slave node and synchronizing according to the time mark. The master node can accurately determine the communication status between the master node and each slave node based on the content of the received link response frame. This precise abnormality monitoring mechanism not only improves the accuracy of monitoring, but also shortens the time of abnormal discovery and improves the monitoring efficiency.
[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the specific implementation modes of the present invention, the drawings required for use in the description of the specific implementation modes will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 It is a schematic diagram of the topological structure of a wired carrier communication network; Figure 2 This is a flow chart of a wired carrier communication abnormality monitoring method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the wired carrier communication topology structure of embodiment 1553 of the present invention; Figure 4 A schematic diagram of an abnormality monitoring method for wired carrier communication according to embodiment 1553 of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] like Figure 2 As shown, an embodiment of the present invention provides a wired carrier communication abnormality monitoring method. In order to overcome the deficiency of abnormality monitoring lag in the prior art, an active monitoring mechanism is used to timely discover potential communication risks, thereby improving the reliability of the communication system. In this embodiment, a wired carrier communication abnormality monitoring method specifically includes the following steps: Step 1: The master node sends a link training frame to each slave node simultaneously; wherein each slave node has a different number, and the link training frame includes a time stamp, and different response time slots corresponding to slave nodes with different numbers with reference to the time stamp.
[0028] Specifically, in the bus network structure of the wired carrier communication system, the master node first performs a link training process. The process involves the master node sending a link training frame to all slave nodes at the same time. The link training frame is a specially made data packet. In this embodiment, the link training frame contains two key information: a time mark and a response time slot corresponding to the slave nodes with different numbers.
[0029] Specifically, the time stamp is used to provide a unified time reference for the entire link training process, ensuring that all slave nodes can accurately calculate their response time slots based on this time stamp; That is to say, after receiving the correct link training frame, the slave node will update the local time of the slave node according to the time stamp.
[0030] Regarding the response time slot, a specific time window, namely the response time slot, is allocated to each slave node according to the slave node number. Each slave node needs to send a link response frame in its corresponding response time slot. Therefore, when the master node constructs the link training frame, it will pre-calculate and allocate the response time slot of each slave node according to the number and number of slave nodes in the system.
[0031] Step 2: Determine whether the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes a slave node number, and the slave node number is used to identify the slave node sending the response frame.
[0032] That is, after receiving the link training frame, each slave node will parse out the time stamp and its own response time slot. Then, the slave node will construct and send a link response frame in its corresponding response time slot. The link response frame is a simple data packet. In this embodiment, the link response frame at least contains the serial number information of the slave node so that the master node can identify which slave node sent the response.
[0033] Step 3: If the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an incorrect slave node number, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0034] That is to say, after sending the link training frame, the master node will enter the listening state and wait to receive the link response frame from each slave node. The master node will check the response of each slave node one by one according to the response time slot defined in the link training frame. Specifically, if the master node successfully receives the link response frame in the response time slot corresponding to a slave node, and the frame contains the correct slave node number, then it can be considered that the wired carrier communication between the master node and the slave node is normal. If the master node does not receive any link response frame in the response time slot corresponding to a slave node, or the received link response frame contains an incorrect slave node number, then it can be determined that there is an abnormality in the wired carrier communication between the master node and the slave node.
[0035] Preferably, once the master node determines that the wired carrier communication with a slave node is abnormal, the master node can attempt to resend the link training frame to verify whether the abnormality persists; alternatively, the master node can trigger an alarm mechanism to notify the system administrator to perform further troubleshooting and repair.
[0036] In summary, the wired carrier communication anomaly monitoring method provided by the present invention realizes active monitoring of the wired carrier communication system by having the master node send link training frames to each slave node at the same time and judging whether the master node can receive link response frames in the response time slots corresponding to each slave node. The method can timely discover and warn of potential communication risks, thereby improving the reliability of the entire communication system.
[0037] In one implementable manner, the link training frame further includes a link training frame sequence number, and the link response frame of each slave node further includes a link response frame sequence number. After determining whether the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node, the step further includes: If the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node, it will continue to determine whether the link training frame sequence number corresponding to the master node and the link response frame sequence number corresponding to each slave node are the sequence numbers corresponding to the same round of communication; if the link response frame sequence number corresponding to a slave node and the link training frame sequence number corresponding to the master node are not the sequence numbers corresponding to the same round of communication, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0038] To elaborate, in this embodiment, in the bus network structure of the wired carrier communication system, the master node first performs a link training process. The process involves the master node sending a link training frame to all slave nodes at the same time. The link training frame contains a time stamp, a response time slot corresponding to slave nodes with different numbers, and a link training frame sequence number, wherein the link training frame sequence number is used to identify the round of the current link training frame to ensure the synchronization of communication. Each round of link training will have a unique sequence number. Exemplarily, when constructing a link training frame, the master node will pre-calculate and allocate the response time slot of each slave node according to the number and number of slave nodes in the system, and embed the link training frame sequence number into a suitable position such as the frame header or frame tail.
[0039] After receiving the link training frame, each slave node will parse out the time stamp, its own response time slot, and the link training frame sequence number. Then, the slave node will construct and send a link response frame in its corresponding response time slot. The link response frame contains at least the following information: the slave node number and the link response frame sequence number, where the link response frame sequence number is used to identify the round of the current link response frame to ensure that it matches the sequence number of the link training frame. When sending a response frame, the slave node will use the link training frame sequence number as its own link response frame sequence number to ensure the synchronization of communication.
[0040] After sending the link training frame, the master node will enter the listening state and wait to receive the link response frame from each slave node. The master node will check the response of each slave node one by one according to the response time slot defined in the link training frame. The specific monitoring process is: if the master node successfully receives the link response frame in the response time slot corresponding to a slave node, and the frame contains the correct slave node number, then it can be considered that the wired carrier communication between the master node and the slave node is normal in the response time slot. After confirming that the link response frames of all slave nodes have been successfully received, the master node will further compare the link training frame sequence number with the link response frame sequence number corresponding to each slave node. If the link response frame sequence number corresponding to a slave node is inconsistent with the link training frame sequence number corresponding to the master node, it means that the slave node may not have correctly received the link training frame of this round, or its response frame has an abnormality during the transmission process. Therefore, it can be determined that the wired carrier communication between the master node and the slave node is abnormal in this round of communication.
[0041] Preferably, once the master node determines that the wired carrier communication with a slave node is abnormal, the following measures can be taken to deal with this situation: the master node can try to resend the link training frame and add some redundant information or check codes to improve the reliability of the transmission. Then, monitor the response of the slave node again to verify whether the abnormality persists. If the problem cannot be solved after resending the link training frame, the master node can trigger an alarm mechanism to notify the system administrator to perform further troubleshooting and repair. Exemplarily, the alarm information can include information such as the abnormal slave node number and the time when the abnormality occurred.
[0042] The wired carrier communication anomaly monitoring method provided in this embodiment further enhances the accuracy of communication by introducing link training frame sequence numbers and link response frame sequence numbers.
[0043] In one implementable manner, the link response frame of each slave node also includes a slave node local error flag, and the slave node local error flag is the result obtained by each slave node self-checking its own link response frame. If a slave node self-checks its link response frame and finds an error, the slave node local error flag of the slave node is set to 1, otherwise it is set to .
[0044] After determining whether the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node, the method also includes: if the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node, then continue to determine the slave node local error mark setting value corresponding to each slave node; if the slave node local error mark setting value corresponding to a slave node is 1, then it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0045] Regarding this embodiment, specifically, the master node simultaneously sends a link training frame including a time stamp, response time slots corresponding to slave nodes with different numbers, and a link training frame sequence number to all slave nodes. After receiving the link training frame, each slave node will parse out the time stamp, its own response time slot, and the link training frame sequence number. Then, the slave node will construct and send a link response frame in its corresponding response time slot. In addition to including the slave node number and the link response frame sequence number, the link response frame of this embodiment also adds a slave node local error flag. The slave node local error flag is the result obtained after the slave node performs a self-check on its own link response frame. Exemplarily, the self-check process may include checks on the data integrity, format correctness, check code matching, etc. of the link response frame. If the self-check finds that there is an error in the link response frame, the slave node sets the local error flag to 1; if the self-check passes, the local error flag is set to 0.
[0046] After sending the link training frame, the master node will enter the listening state and wait to receive the link response frame from each slave node. The master node will check the response of each slave node one by one according to the response time slot defined in the link training frame. If the master node successfully receives the link response frame in the response time slot corresponding to a slave node, and the frame contains the correct slave node number and link response frame sequence number, then it can be considered that the wired carrier communication between the master node and the slave node is normal in the response time slot (from the receiving level). After confirming that the link response frames of all slave nodes have been successfully received and the sequence numbers match, the master node will further check the slave node local error flag in the link response frame corresponding to each slave node. If the local error flag of a slave node is set to 1, it means that the slave node detected an error when constructing or sending a link response frame, so it can be determined that the wired carrier communication between the master node and the slave node is abnormal in this round of communication.
[0047] It can be seen that the wired carrier communication anomaly monitoring method provided in this embodiment further enhances the reliability of communication by introducing a local error marking mechanism of the slave node.
[0048] In one implementable manner, by introducing a link response frame check mechanism, the accuracy of communication link status monitoring is improved, that is, the link response frame of each slave node also includes a link response frame check.
[0049] After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node, it will continue to determine whether the link response frame check corresponding to each slave node is consistent with the frame check calculated by the master node based on the link response frame; if inconsistent, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0050] To elaborate, after successfully receiving the link response frame, the master node checks whether the link response frame has been successfully received in the response time slots of all slave nodes. If the link response frame of a slave node fails to be received, it is preliminarily determined that there may be an abnormality in the wired carrier communication between the slave node and the master node. For the successfully received link response frame, the master node further verifies its link response frame check field. The master node calculates an expected frame check value based on the content of the link response frame and compares it with the link response frame check field sent by the slave node. If the two are inconsistent, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
[0051] The wired carrier communication anomaly monitoring method provided in this embodiment further enhances the reliability of communication by introducing a link response frame check mechanism.
[0052] In one implementable manner, before the master node sends a link training frame to each slave node, it also includes: the master node generates a slave node status table according to the wired carrier communication network topology, the number of elements contained in the slave node status table is the same as the number of slave nodes in the wired carrier communication network topology, and the elements correspond to the slave nodes one by one; if the element value is 0, it indicates that the communication of the slave node corresponding to the element is abnormal; if the element value is 1, it indicates that the communication of the slave node corresponding to the element is normal; the N elements in the status table correspond to the status of all N slave nodes in the network, and the corresponding position of the element is 1 to indicate that the node is valid, and the corresponding position of the element is 0 to indicate that the node is abnormal. At the time of initialization, the status of all N nodes is valid, and the node status table is represented as {1, 1, 1, ..., 1}, and the table contains N 1s; after determining that the wired carrier communication between the master node and the slave node is abnormal, the master node sets the value of the element corresponding to the abnormal slave node in the slave node status table to 0.
[0053] Specifically, the master node first generates a slave node status table based on the topological structure of the wired carrier communication network. The table is an array or list, and the number of its elements is the same as the number of slave nodes in the wired carrier communication network, that is, the N elements correspond to the status of all N slave nodes in the network. Each element corresponds to a slave node one by one. If the element value is 1, it means that the slave node corresponding to the element communicates normally, that is, the node is valid; if the element value is 0, it means that the slave node corresponding to the element communicates abnormally, that is, the node is invalid or abnormal. In the initialization phase, the status of all N nodes is set to a valid state, that is, the slave node status table is represented as {1, 1, 1, …, 1}, and the table contains N 1s.
[0054] After completing the initialization of the slave node status table, the master node will send a link training frame to each slave node. The link training frame contains a time stamp, a response time slot corresponding to different numbered slave nodes, a link training frame sequence number, and necessary verification information. The purpose of the link training frame is to allow the slave node to confirm its own status and prepare to send a link response frame to the master node. After receiving the link training frame, each slave node will parse out the time stamp, its own response time slot, the link training frame sequence number, and the verification information. The slave node will construct and send a link response frame to the master node based on its own status (normal or abnormal) and the information in the link training frame. After sending the link training frame, the master node will enter the listening state and wait to receive the link response frame from each slave node. The master node will check the response of each slave node one by one according to the response time slot defined in the link training frame. If the master node successfully receives the link response frame in the response time slot corresponding to a slave node, and the verification information in the frame matches the verification information in the link training frame, then it can be considered that the wired carrier communication between the master node and the slave node is normal. If the master node fails to receive a link response frame from a slave node within the specified time, or the verification information in the received link response frame does not match the verification information in the link training frame, then it can be determined that the wired carrier communication between the master node and the slave node is abnormal. After determining that the wired carrier communication between the master node and a slave node is abnormal, the master node will immediately update the slave node status table. The master node will set the value of the element corresponding to the abnormal slave node to 0, indicating that the current communication of the slave node is abnormal or invalid. In this way, the slave node status table can reflect the communication status of each slave node in the network in real time.
[0055] It can be seen that the wired carrier communication anomaly monitoring method provided in this embodiment realizes real-time tracking and recording of the communication status of each slave node in the network by introducing a slave node status table management mechanism.
[0056] In one implementable manner, the master node chooses to periodically send link training frames to each slave node when communication is idle, where communication idle refers to an idle time not less than 100 times T, where T is equal to NxM, where M is the time required for the master node to communicate with a slave node, and N is the number of slave nodes.
[0057] Specifically, before the master node performs abnormal monitoring of wired carrier communication, it is first necessary to determine the communication idle time. The communication idle time is defined as the idle time not less than 100 times T, where T is equal to NxM. M is the time required for the master node to communicate with a slave node, and N is the number of slave nodes in the wired carrier communication network. Depending on the actual application scenario, the idle time is generally set to 2 seconds or longer. The master node monitors the communication status of the wired carrier communication network in real time, including the communication activities of each slave node and its own communication tasks. When the master node detects that the communication activity in the network is reduced to below a preset threshold and the duration reaches or exceeds the communication idle time determined above, the master node considers that it is currently in a communication idle state. After confirming that it is currently in a communication idle state, the master node sends a link training frame to all slave nodes.
[0058] The wired carrier communication anomaly monitoring method provided in this embodiment avoids communication conflicts and data loss problems by ensuring that link training frames are sent when communication is idle.
[0059] In one implementable method, after the master node simultaneously sends the link training frame to each slave node, it also includes: the master node performs a self-check on the sent link training frame. If the self-check finds that the link training frame is abnormal, it determines whether the error count exceeds 3. If it does not exceed 3, it reinitializes after T time and increases the error count by 1. Otherwise, it turns off the sending enable after T time and reports the error.
[0060] Specifically, after sending the link training frame, the master node will immediately perform a self-check on the sent link training frame. The content of the self-check includes but is not limited to whether the verification information is correct, whether the frame format complies with the specification, whether the sequence number is continuous, etc. If the self-check finds that the link training frame is abnormal, the master node will perform error processing: that is, the master node will maintain an error counter to record the number of abnormalities found by the link training frame self-check. If the value of the error counter does not exceed 3 (that is, the number of abnormalities found by the self-check does not exceed 3 times), the master node will reinitialize after T time, and the reinitialization includes regenerating the link training frame, resetting the error counter, etc. After reinitialization, the master node will try to send the link training frame again and continue to perform self-check and error processing. If the value of the error counter exceeds 3 (that is, the number of abnormalities found by the self-check exceeds 3 times), the master node will believe that there is a serious problem in the sending of the link training frame. At this time, the master node will turn off the sending enable after T time, that is, stop sending the link training frame and other possible communication frames. At the same time, the master node will report the error to the system administrator or other related modules, prompting further troubleshooting and repair.
[0061] The wired carrier communication anomaly monitoring method provided in this embodiment further enhances the reliability of communication by introducing a link training frame self-check mechanism. When the self-check finds that the link training frame is abnormal, the master node will perform corresponding error processing according to the value of the error counter, including reinitialization and error reporting, etc., so that not only communication anomalies can be discovered and processed in a timely manner, but also communication failures caused by continuous sending of abnormal frames can be avoided.
[0062] In an implementable manner, the link response frame of each slave node also includes the local time of the slave node. After determining that there is no abnormality in the wired carrier communication between the master node and each slave node, the master node updates the response time slot of the slave node according to the local time of the slave node, specifically: selecting the maximum response time of all slave nodes; using the maximum response time of the set multiple as the new response time slot, and updating the response time slot of each slave node. Exemplarily, the value of the set multiple is 1.2 times.
[0063] This embodiment can avoid conflicts in communication between the slave nodes and the master node by updating the response time slots of the slave nodes.
[0064] The method of the present invention is applicable to various wired carrier communication media, including but not limited to twisted pair, coaxial cable and AC / DC power supply network, and provides flexibility for the application of wired carrier communication technology. Since the method manages the communication activities of each slave node by time-sharing scheduling, the number of slave nodes in the bus network structure can be flexibly expanded without affecting the stability of the communication system. The method of the present invention can effectively reduce the occurrence of communication failures, reduce the maintenance costs caused by failures, and enable the system to continuously and stably provide data transmission services, thereby improving the availability of the system.
[0065] In a specific implementation case, the 1553 wired carrier communication network is used as an example for explanation. The 1553 wired carrier communication technology is a technical upgrade of the 1553 bus. It can increase the communication rate to 100Mpbs without changing the transmission medium and topology, and has broad application prospects. The 1553 wired carrier communication adopts a protocol and message format similar to that of 1553B, works asynchronously in a command / response mode, and has three terminal modes: bus controller BC (i.e., master node), remote terminal RT (i.e., slave node), and message monitor MT. There is only one bus controller BC master node in the bus network. The BC master node controls the flow of information on the bus, sends bus instructions and participates in data transmission, receives status responses from RT, and monitors the status of the system. There can be several remote terminal RT slave nodes and a bus monitor MT in the bus network. RT participates in data transmission as a terminal, and MT monitors messages transmitted on the bus and selectively saves them.
[0066] The 1553 wired carrier communication network of this embodiment includes one master node BC and four slave nodes RT. The network topology is as follows: Figure 3 As shown. This embodiment realizes the identification, isolation and recovery of abnormal nodes through the link frame interaction between the master node BC and the four slave nodes RT, which can improve the stability of the system. The specific steps are as follows: When the S1 and BC master nodes are initialized, they generate the slave node status table and link training frame according to the network topology planning. The network contains 4 RT slave nodes. When initialized, the slave node status table is represented as {1, 1, 1, 1}, and the link training frame definition is shown in Table 1 below.
[0067] Table 1
[0068] Frame check CRC uses X 8 +X 2 +X+1, calculated from all the information in the link training frame.
[0069] A specific example is shown in Table 2 below: Table 2
[0070] Among them, 0x07 means that the ID of this link training frame is 0x07, the number of communication nodes is 4, the time mark is 0x5500, of which 0x01, 0x02, 0x03, and 0x04 slave node response status are required, the command is 0x00, the time slot interval is 0xFF, and the check code is 0x18.
[0071] Another specific example is shown in Table 3 below: Table 3
[0072] Among them, 0x12 means that the ID of this link training frame is 0x12, the number of communication nodes is 3, the time mark is 0xA600, of which 0x01, 0x04, and 0x03 are required from the node response status, the command is 0x00, the time slot interval is 0x80, and the check code is 0xAB.
[0073] Another specific example is shown in Table 4 below: Table 4
[0074] Among them, 0x15 means that the ID of this link training frame is 0x15, the number of communication nodes is 1, the time mark is 0xA700, the 0x02 slave node response status is required, the command 0x01 means to reset the node, the time slot interval is 0x60, and the check code is 0x6E.
[0075] S2, BC master node sends link training frame and performs detection when communication is idle; in one embodiment, the link frame transmission overhead is 20us, then the time overhead of traversing 4 nodes is 80us, and the total communication time overhead T is 100us. In this network, the idle time ratio is not less than 10ms. In order to avoid occupying too much network bandwidth, the idle time can be selected as 2s.
[0076] S3, RT slave node receives the link training frame sent by BC master node, parses the information of link training frame, updates local time mark, and records time slot related information. If the received time mark is 0x5500, the local time mark is updated to 0x5500 and accumulated according to the configured time precision.
[0077] S4. The RT slave node sends a link response frame and detects it in the time slot planned by the BC master node.
[0078] The link response frame format is shown in Table 5 below: Table 5
[0079] A specific example is shown in Table 6 below: Table 6
[0080] Among them, 0x07 indicates that the link training frame ID corresponding to the response frame is 0x07, the communication node number is 4, the time stamp of the response moment is 0x5540, the status information is 0x00, and the check code is 0xCE.
[0081] Another specific example is shown in Table 7 below: Table 7
[0082] Among them, 0x12 indicates that the link training frame ID corresponding to the response frame is 0x12, the communication node number is 2, the time mark of the response moment is 0x5640, the status information 0x01 indicates that the error mark is set, and the check code is 0xDF.
[0083] The communication between the master node and the slave node is as follows Figure 4 As shown. The BC master node divides 4 reply time slots, and the 4 RT slave nodes reply with response frames in the divided time slots in turn. A specific RT slave node replies with a response frame in the divided time slot and receives and detects it at the same time. If an error is detected or it does not match the sent response frame, it is judged to be abnormal, and the local error flag is set to 1 until the data link frame is correctly responded to and the position is set to 0.
[0084] S5. The BC node receives the link response frame and determines the slave node status accordingly. The BC master node determines the RT slave node status based on whether the RT slave node responds within the specified time slot, whether the response frame content is abnormal, whether the sequence number meets expectations, and whether the error flag is set; The BC master node updates the time slot interval according to the time marker information in the link response frame replied by the RT slave node.
[0085] If the time stamp in the link training frame is 0x5500, the time interval is 0xFF, the time stamps in the RT response frame are 0x5630, 0x5731, 0x5830, and 0x5931, respectively, and the received times are 0x5659, 0x5760, 0x5860, and 0x5960, respectively, it can be determined that the maximum time overhead of the link training frame is 0x31 and the maximum time overhead of the link response frame is 0x30. To ensure a reliable safety boundary, the time slot interval can be updated to 0x70.
[0086] S6. The BC master node identifies and recovers the abnormal RT slave node, and sends a reset command to the abnormal node to reinitialize it. If a specific slave node detects an abnormality three times in a row, it is determined that the slave node has an unrecoverable error, and the characteristic position of the slave node status table is marked as 0. The slave node status table is initialized to {1, 1, 1, 1}. If RT3 detects an abnormality three times in a row, the node status table is updated to {1, 1, 0, 1}, the information is reported, and the updated node status table is used in subsequent communications to isolate the faulty node.
[0087] In yet another embodiment of the present invention, there is provided a wired carrier communication abnormality monitoring device, comprising: The sending module is used for the master node to send link training frames to each slave node at the same time; wherein each slave node has a different number, and the link training frame includes a time mark, and different response time slots corresponding to the slave nodes with different numbers with reference to the time mark.
[0088] The response judgment module is used to judge whether the master node can receive the link response frame of each slave node within the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes the slave node number.
[0089] The abnormality determination module is used to determine that the wired carrier communication between the master node and the slave node is abnormal if the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an incorrect slave node number.
[0090] All relevant contents of each step involved in the aforementioned embodiment of a wired carrier communication anomaly monitoring method can be referred to the functional description of a functional module corresponding to a wired carrier communication anomaly monitoring device in an embodiment of the present invention, and will not be repeated here. The division of modules in the embodiment of the present invention is schematic, which is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present invention can be integrated into a processor, or it can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules.
[0091] In another embodiment of the present invention, a computer device is provided, the computer device including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in a computer storage medium to implement a corresponding method flow or a corresponding function; the processor described in the embodiment of the present invention can be used for the operation of a wired carrier communication abnormality monitoring method.
[0092] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a wired carrier communication abnormality monitoring method in the above embodiment.
[0093] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] In the present invention, the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0098] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A wired carrier communication abnormality monitoring method, characterized in that: include: The master node sends a link training frame to each slave node simultaneously; wherein each slave node has a different number, and the link training frame includes a time mark, and different response time slots corresponding to slave nodes with different numbers with reference to the time mark; Determine whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes the slave node number; If the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an erroneous slave node number, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
2. A wired carrier communication abnormality monitoring method according to claim 1, characterized in that: The link training frame also includes a link training frame sequence number, and the link response frame of each slave node also includes a link response frame sequence number; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, it continues to determine whether the link training frame sequence number corresponding to the master node and the link response frame sequence number corresponding to each slave node are the sequence numbers corresponding to the same round of communication; If the link response frame sequence number corresponding to a slave node and the link training frame sequence number corresponding to the master node are not sequence numbers corresponding to the same round of communication, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
3. A wired carrier communication abnormality monitoring method according to claim 1, characterized in that: The link response frame of each slave node also includes a slave node local error flag, which is a result obtained by each slave node performing self-check on its own link response frame. If a slave node performs self-check on its link response frame and finds an error, the slave node local error flag of the slave node is set to 1, otherwise it is set to 0; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, then continue to determine the slave node local error flag setting value corresponding to each slave node; If the slave node local error flag setting value corresponding to a certain slave node is 1, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
4. The method for monitoring abnormality of wired carrier communication according to claim 1, characterized in that: The link response frame of each slave node also includes a link response frame check; After determining whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, the method further includes: If the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node, it will continue to determine whether the link response frame check corresponding to each slave node is consistent with the frame check calculated by the master node based on the link response frame; If they are inconsistent, it is determined that the wired carrier communication between the master node and the slave node is abnormal.
5. A wired carrier communication abnormality monitoring method according to any one of claims 1 to 4, characterized in that: Before the master node sends a link training frame to each slave node, the method further includes: The master node generates a slave node status table according to the wired carrier communication network topology, wherein the number of elements contained in the slave node status table is the same as the number of slave nodes in the wired carrier communication network topology, and the elements correspond to the slave nodes one by one; if the element value is 0, it indicates that the communication of the slave node corresponding to the element is abnormal; if the element value is 1, it indicates that the communication of the slave node corresponding to the element is normal; After determining that the wired carrier communication between the master node and the slave node is abnormal, the master node sets the value of the element corresponding to the abnormal slave node in the slave node status table to 0.
6. The method for monitoring abnormality of wired carrier communication according to claim 1, characterized in that: The master node chooses to periodically send link training frames to each slave node when communication is idle. The communication idle refers to an idle time that is not less than 100 times T, where T is equal to NxM, M is the time required for the master node to communicate with one slave node, and N is the number of slave nodes.
7. A wired carrier communication abnormality monitoring method according to claim 6, characterized in that: After the master node sends the link training frame to each slave node simultaneously, the method further includes: The master node performs self-check on the sent link training frame. If the self-check finds that the link training frame is abnormal, it determines whether the error count exceeds 3. If it does not exceed 3, it reinitializes after T time and increases the error count by 1. Otherwise, it turns off the sending enable after T time and reports the error.
8. The method for monitoring abnormality of wired carrier communication according to claim 1, characterized in that: The link response frame of each slave node also includes the local time of the slave node; After determining that there is no abnormality in the wired carrier communication between the master node and each slave node, the master node updates the response time slot of the slave node according to the local time of the slave node, specifically: Select the maximum response time of all slave nodes; The maximum response time of the set multiple is used as the new response time slot, and the response time slot of each slave node is updated.
9. A wired carrier communication abnormality monitoring device, characterized in that: include: A sending module, configured for the master node to simultaneously send a link training frame to each slave node; wherein each slave node has a different number, and the link training frame includes a time mark, and different response time slots corresponding to slave nodes with different numbers with reference to the time mark; A response judgment module, used to judge whether the master node can receive the link response frame of each slave node in the response time slot corresponding to each slave node; wherein the link response frame of each slave node includes the slave node number; The abnormality determination module is used to determine that the wired carrier communication between the master node and the slave node is abnormal if the master node does not receive a link response frame in a response time slot corresponding to a slave node, or the received link response frame contains an incorrect slave node number.
10. A device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a wired carrier communication abnormality monitoring method as described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Multi-node carrier communication fault detection method and system
CN121711280A