Method and device for detecting connection state of universal port of Sacker bus
By establishing port connections in the Shaq bus and recording the information of detection packets and response packets, the detection problem of the Shaq bus being unable to rely on the status identification of the underlying transmission interface is solved, and the accurate determination and versatility of the port connection status are achieved.
Patent Information
- Application Number
- CN202410797658.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-10
AI Technical Summary
Due to its media-independent nature, the Shack bus cannot use the underlying transmission interface status identification method to determine the port connection validity, making connection validity detection difficult to implement.
By establishing a communication connection between the port to be detected and the target port, continuously sending port detection packets and recording the number of times of sending and receiving packets, using multi-bit registers to record the information of detection packets and response packets, determining the port status based on the number of packets, and realizing port connection. Determination of status.
It realizes port connection validity determination that does not rely on specific interface methods, ensuring the authenticity, accuracy and versatility of detection, and adapting to different media and transmission methods.
Smart Images

Figure CN118631702A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for detecting a port connection status of a Shaker bus. Background Art
[0002] The Shaq bus is a bus system proposed in China in recent years. During its production and testing, it effectively reduced the dependence on foreign bus systems. The bus has the characteristics of being medium-independent. According to the characteristics of the project, LVDS, optical fiber, twisted pair, etc. can be selected as the transmission medium, and even mixed use can be used. It is highly adaptable and can not only be compatible with new high-performance underlying media in the future, but also meet the needs of partial transformation of existing electronic systems.
[0003] Commonly used 1553b bus interfaces and Ethernet network interfaces have their own different interface standards. When conducting information communication, we must first detect whether the interface end is connected normally. We need to cooperate with different interface circuits to determine the validity of the connection. The status flag is clearly set on the interface chip, but the starting point of the Shak bus design is not dependent on specific media, which also makes the bus compatible with optical fiber, LVDS twisted pair, 422 twisted pair, and even Ethernet interface as the underlying transmission method. This makes it impossible to use any underlying transmission interface status identification method as a method for determining the port connection validity of the Shak bus. Summary of the invention
[0004] In view of the above problems, the present application provides a method and device for detecting the connection status of a universal port for a Shaker bus, which achieves the purpose of determining the connection validity without relying on a specific interface mode.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] A method for detecting a universal port connection state of a Shaq bus, the method comprising:
[0007] Establishing a communication connection between the first port to be detected and the second port;
[0008] When the first port sends the port detection packet to the second port multiple times in succession, the number of times the first port sends the port detection packet and the number of times the first port receives the reception response packet are recorded;
[0009] The port state of the first port is determined based on the number of times the port detection packet is sent and the number of times the reception response packet is received.
[0010] Optionally, recording the number of times the first port sends a port detection packet and the number of times the first port receives a reception response packet includes:
[0011] Recording information about the port detection packet sent by the first port in a first register, wherein the first register is a multi-bit register, and each bit of the first register from left to right records the sending flag information of the port detection packet sent by the first port;
[0012] The information of the reception response packet received by the first port is recorded in the second register, the second register is a multi-bit register, and each bit of the second register from left to right records the information of whether the first port successfully receives the reception response packet each time.
[0013] Optionally, determining the port state of the first port based on the number of times the port detection packet is sent and the number of times the reception response packet is received includes:
[0014] If the number of times the receiving response packets are received is equal to the number of times the port detection packets are sent, it is determined that the first port is in a first state, and the first state indicates that the first port is in a well-connected state;
[0015] If the number of times the receiving response packet is received is zero, determining that the first port is in a second state, the second state indicates that the first port is in a disconnected state;
[0016] If the number of successfully received response packets is greater than the first threshold and less than the number of sending port detection packets, it is determined that the first port is in a third state, and the third state indicates that the first port has an acceptable error and interference state;
[0017] If the number of successfully received response packets is not greater than the first threshold, it is determined that the first port is in a fourth state, and the fourth state indicates that the first port has an unacceptable error and interference state.
[0018] Optionally, the first port continuously sending the port detection packet to the second terminal for multiple times comprises:
[0019] The first port periodically and continuously sends port detection packets to the second terminal for multiple times to obtain the real-time port status of the first port.
[0020] Optionally, it also includes:
[0021] Based on the port state of the first port, an application condition of the first port is determined so that the first port is applied to an application scenario matching the application condition.
[0022] Optionally, the determining the application condition of the first port based on the port state of the first port includes:
[0023] Based on the port state of the first port, determining whether the port state of the first port has changed;
[0024] If yes, based on the state transition information, an application condition of the first port is determined, where the application condition includes network reconstruction or continuing to maintain the current network architecture.
[0025] Optionally, if the second node includes a second port, and the first node includes a plurality of first ports, the method further includes:
[0026] Obtaining the communication path length between the second port and each of the first ports, and the port number information of each first port;
[0027] Generate a port selection vector based on the port status of each first port, the communication path length and the port number information of each first port;
[0028] Based on the port selection vector, a target first port is determined in the first ports, so that the first node forwards communication information based on the target first port.
[0029] A method for detecting a universal port connection state of a Shaq bus, the method comprising:
[0030] An establishing unit, used for establishing a communication connection between the first port to be detected and the second port;
[0031] a recording unit, configured to record the number of times the first port sends the port detection packets and the number of times the first port receives the reception response packets when the first port sends the port detection packets to the second port multiple times in a row;
[0032] The determining unit is used to determine the port state of the first port based on the number of times the port detection packet is sent and the number of times the reception response packet is received.
[0033] A storage medium stores one or more programs, which can be executed by one or more processors to implement the universal port connection status detection method for Shaq bus as described in any one of the above.
[0034] A communication node, comprising:
[0035] A memory, used to store applications and data generated by the operation of the applications;
[0036] The processor is used to execute the application program to implement a universal port connection status detection method for a Shaq bus as described in any one of the above.
[0037] Compared with the prior art, the present application provides a universal port connection status detection method and device for Shaq bus, including: establishing a communication connection between a first port to be detected and a second port; when the first port sends a port detection packet to the second port multiple times in a row, recording the number of times the first port sends the port detection packet and the number of times the first port receives a receiving response packet; based on the number of times the port detection packet is sent and the number of times the receiving response packet is received, determining the port status of the first port. The present application does not use any underlying transmission interface status identification method as the port connection validity judgment of the Shaq bus, and realizes the authenticity, accuracy and universality of the connection validity judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0039] Figure 1 A flow chart of a method for detecting a universal port connection status of a Shaq bus provided in an embodiment of the present application;
[0040] Figure 2 A schematic diagram of a port connection scenario provided in an embodiment of the present application;
[0041] Figure 3 A schematic structural diagram of a universal port connection status detection device for a Shaq bus provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] The terms "first" and "second" and the like in the specification and claims of this application and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0044] In an embodiment of the present application, a universal port connection status detection method for the Shak bus is provided, which is mainly a method for determining the connection validity of the Shak bus that does not rely on a specific physical interface method. The Shak bus is an industrial communication network with high dynamic intelligent reconstruction capabilities. Because of its extremely high real-time and accuracy, it can merge the field bus and the instrument bus to produce a new concept of networked instrument bus. The bus has the characteristics of being medium-independent. LVDS, optical fiber, twisted pair, etc. can be selected as the transmission medium according to the characteristics of the project, and can even be used in combination. It is highly adaptable and can meet the needs of local transformation of existing electronic systems.
[0045] See also Figure 1 , is a flow chart of a method for detecting the port connection status of a Shaq bus provided in an embodiment of the present application, the method may include the following steps:
[0046] S101: Establish a communication connection between a first port to be detected and a second port.
[0047] S102: When the first port sends the port detection packet to the second port multiple times in succession, record the number of times the first port sends the port detection packet and the number of times the first port receives the reception response packet.
[0048] S103: Determine the port status of the first port based on the number of times the port detection packets are sent and the number of times the reception response packets are received.
[0049] Among them, the first port can belong to the first node, and the second port can belong to the second node. For example, the first node and the second node can both have multiple ports, and the first node is connected to the second port of the second node through the first port. The first port sends a signal to the second port, and correspondingly, the first port receives the signal sent from the second port. It should be noted that the first port and the second port are only for distinguishing the ports, and there is no order of precedence, nor does it specifically refer to a certain port. In order to detect the connection validity of the port during the communication process, a communication connection is first established between the ports. Among them, the first port is the port to be detected currently, that is, the port whose connection validity needs to be determined. For example, there are n ports connected to each other for full-duplex communication, or a communication connection can be established based on other communication connection methods. The specific communication connection method can be selected according to the actual application scenario. See Figure 2 , a communication connection between the first port and the second port can be established. The first port can perform data transmission with the second port.
[0050] During data transmission, a port can be used to send data as well as to receive data. Therefore, when the first node is used as a node to initiate detection, the first node can send a port detection packet through the first port, and then receive a port detection response packet fed back by the second node through the first port. In the protocol, there are two special packets, which carry the address of the initiating node for the other device to identify the connection object. In the embodiment of the present application, the connection validity of the port is comprehensively determined by sending and receiving signals. Correspondingly, the information of the detection packet sent by the port each time and the information of the port detection response packet received can be stored in a register, and the information stored in the register can be called later to determine the validity of the port connection.
[0051] In one embodiment, recording the number of times the first port sends a port detection packet and the number of times the first port receives a reception response packet includes:
[0052] Recording information about the port detection packet sent by the first port in a first register, wherein the first register is a multi-bit register, and each bit of the first register from left to right records the sending flag information of the port detection packet sent by the first port;
[0053] The information of the reception response packet received by the first port is recorded in the second register, the second register is a multi-bit register, and each bit of the second register from left to right records the information of whether the first port successfully receives the reception response packet each time.
[0054] A corresponding register may be set for each port, and the register is used to store relevant characteristic information of the port during data transmission. For example, the first port may be configured with a first register and a second register, the first register is used to record relevant information when the first port sends a signal, and the second register is used to record relevant information when the first port receives a signal. For example, the sending identification register reg1 has 8 bits, and the receiving identification register reg2 has 8 bits. Without loss of generality, assuming that the value of reg1 at a certain moment is XXXXXXXX, and the value of reg2 is XXXXXXXX, at time t1 A sends a detection packet, reg1 and reg2 are shifted left by 1 bit on the original basis, the lowest position of reg1 is 1 to indicate that the detection packet has been sent, and the lowest position of reg2 is filled with 0; the value of reg1 becomes XXXXXXX1, and the value of reg2 becomes XXXXXXX0. When the port receives a response packet, the lowest position of reg2 is 1, and the value of reg2 becomes XXXXXXX1. Then when the cycle delay arrives and A sends the second detection packet, reg1 and reg2 will shift left by 1 bit at the same time. If the response packet was received normally last time, reg1 will become XXXXXX11 and reg2 will be XXXXXX10; but if the correct response packet was not received last time, reg2 will become XXXXXX00. This process is repeated, and the bold 0 will be retained in the subsequent left shift process until it is finally shifted out of the register.
[0055] Correspondingly, when verifying the connection validity of the second port of the second node, the second node can send a port detection packet to the first node through the second port, and then receive a receiving response packet fed back by the first node through the second port, thereby determining the port state of the second port. Correspondingly, the second port can also include two registers, respectively used to store information of sending the detection packet and information of receiving the detection packet.
[0056] Then, based on the information recorded in the first register and the second register, the port status of the first port can be determined, thereby determining the connection validity information of the first port. The connection validity information can characterize the current connection status of the first port, such as whether it can be used for data transmission, and further can include the degree of its effectiveness, such as whether it is highly effective, whether there is an abnormal connection, etc.
[0057] Specifically, in one implementation of the embodiment of the present application, determining the port state of the first port based on the number of times the port detection packet is sent and the number of times the reception response packet is received includes:
[0058] If the number of times the receiving response packets are received is equal to the number of times the port detection packets are sent, it is determined that the first port is in a first state, and the first state indicates that the first port is in a well-connected state;
[0059] If the number of times the receiving response packet is received is zero, determining that the first port is in a second state, the second state indicates that the first port is in a disconnected state;
[0060] If the number of successfully received response packets is greater than the first threshold and less than the number of sending port detection packets, it is determined that the first port is in a third state, and the third state indicates that the first port has an acceptable error and interference state;
[0061] If the number of successfully received response packets is not greater than the first threshold, it is determined that the first port is in a fourth state, and the fourth state indicates that the first port has an unacceptable error and interference state.
[0062] For example, the status of a port can generally be divided into the following states: good connection (e.g., set this to the first state), acceptable bit errors and interference to a certain extent (e.g., set to the second state), unacceptable bit errors and interference to a certain extent (e.g., set to the third state), and completely disconnected (e.g., set to the fourth state). Specifically, if the number of times the port detection packet is continuously sent is 8 times, it should be noted that it can also be other times, and 8 times in this example is only an example. The first threshold value can be a threshold value set by the user or the default of the network. If a correct response can be received during the 8 times of sending the port detection packet, the port is identified as a good connection; if a correct response is not received for 8 consecutive times, the port is identified as completely disconnected; if it is sent 8 times, but the number of correct responses received is less than the threshold value set by the user or the default of the network, the port is determined to be unacceptable bit errors and interference; if it is sent 8 times, but the number of correct responses received is greater than the threshold value set by the user or the default of the network, the port is determined to be acceptable bit errors and interference.
[0063] In one implementation of the embodiment of the present application, the first port continuously sending a port detection packet to the second terminal for multiple times includes: the first port periodically continuously sending a port detection packet to the second terminal for multiple times to obtain a real-time port status of the first port. In a Shaq network, a port may be transmitting data and messages at any time, but the port will periodically send detection packets and receive response packets so as to be able to detect changes in the port status in a timely manner.
[0064] In the embodiment of the present application, after obtaining the port state of the first port, the application state in the communication process can also be determined based on the port state of the first port. That is, in one implementation, based on the port state of the first port, the application condition of the first port is determined so that the first port is applied to an application scenario matching the application condition.
[0065] Optionally, the determining the application condition of the first port based on the port state of the first port includes: determining whether the port state of the first port has changed based on the port state of the first port; if so, determining the application condition of the first port based on the state change information, the application condition including network reconstruction or continuing to maintain the current network architecture. For the plug-and-play Shaq bus, usually, when a device detects that the state of a port has changed, a series of subsequent operations will be triggered.
[0066] In one implementation of the embodiment of the present application, if the second node includes a second port, and the first node includes multiple first ports, the method also includes: obtaining the communication path length between the second port and each of the first ports, and the port number information of each first port; generating a port selection vector based on the port status of each first port, the communication path length and the port number information of each first port; based on the port selection vector, determining a target first port in the first port, so that the first node forwards communication information based on the target first port.
[0067] When a packet can reach node B through the two ports x1 and x2 of node A, if the Shak bus builds a port selection vector, then directly compares the sizes of the two vectors to determine the forwarding from a port with a better health status, where the port selection vector format can be as follows:
[0068] Vector (unhealthy degree 4 bits, path length 8 bits, port number 5 bits)
[0069] The unhealthy degree can be directly represented by the number of normal response packets received, ranging from 0 to 8, binary 0000-0111. The two vectors are directly compared, and the smaller one is forwarded. The high bit plays a decisive role. The port with the lower unhealthy degree is selected; if the unhealthy degrees are the same, the path lengths are compared again, and the shorter one is selected; if the first two fields are the same, the port with the smaller port number is selected for forwarding.
[0070] In the embodiment of the present application, both the first register and the second register can be 8-bit registers, for example, the number "1" represents successful information, such as successfully sending a port detection packet, or successfully receiving a port detection response packet returned by the other party; the number "0" represents unsuccessful information. The first register is represented by reg1, and the second register is represented by reg2. When the first port sends an instruction, the lowest bit of reg1 of the first port is 1. If the first port receives the instruction, the lowest bit of reg2 is recorded as 1, and the port connection is considered normal; if no instruction is received, reg2 is all 0, and the port connection is considered to have failed. This implementation method can be to determine the validity of the first port by sending and receiving an instruction only once.
[0071] Each time the first port sends an instruction, the first register is a shift register. Each time it is sent, reg1 and reg2 are synchronously shifted left once, and the rightmost bit reg1 is set to 1. Each time it is received, the rightmost bit of reg2 is set to 1. If the rightmost bit of reg2 is still 0 during the next transmission, it indicates that there was no response to the last transmission. The first port successfully sends 8 instructions, and reg1 is 11111111. The port connection validity is judged according to the received instructions. The first port receives the instruction and sets 1 from left to right in the same way. If reg2 is 11111111, the port 1 connection validity is considered to be 100%; if reg2 is 10000000, the port 1 connection validity is considered to be 12.5%, which is very low; the number of 1 bits in reg2 and / or the number of 1 bits in reg1 can quantify the degree of connection validity.
[0072] The embodiment of the present application provides a method for detecting the connection status of a port for a Shaq bus, which can determine the success rate of a port when sending and receiving information through the information recorded in the corresponding register, and is independent of the connection validity determination method of a specific interface mode and a specific medium. The bus can be compatible with optical fiber, LVDS twisted pair, 422 twisted pair, and can even use an Ethernet interface as the underlying transmission mode. No underlying transmission interface status identification method is used as a method for determining the port connection validity of the Shaq bus.
[0073] In the embodiment of the present application, a port connection status detection device for Shaq bus is also provided, see Figure 3 , the device comprises:
[0074] An establishing unit 301 is used to establish a communication connection between a first port to be detected and a second port;
[0075] The recording unit 302 is configured to record the number of times the first port sends the port detection packets and the number of times the first port receives the reception response packets when the first port sends the port detection packets to the second port multiple times in a row;
[0076] The determining unit 303 is configured to determine the port state of the first port based on the number of times the port detection packets are sent and the number of times the reception response packets are received.
[0077] Optionally, the recording unit includes:
[0078] A first recording subunit is used to record information about the port detection packet sent by the first port in a first register, where the first register is a multi-bit register, and each bit of the first register from left to right records the sending flag information of the port detection packet sent by the first port;
[0079] The second recording subunit is used to record the information of the reception response packet received by the first port in a second register, where the second register is a multi-bit register, and each bit of the second register from left to right records the information of whether the first port successfully receives the reception response packet each time.
[0080] Optionally, the determining unit includes:
[0081] A first determining subunit is configured to determine that the first port is in a first state if the number of times the receiving response packets are received is equal to the number of times the port detection packets are sent, wherein the first state indicates that the first port is in a well-connected state;
[0082] A second determining subunit is configured to determine that the first port is in a second state if the number of times the reception response packet is received is zero, wherein the second state indicates that the first port is in a disconnected state;
[0083] A third determination subunit is configured to determine that the first port is in a third state if the number of successfully received reception response packets is greater than a first threshold and less than the number of the sending port detection packets, wherein the third state indicates that the first port has an acceptable error and interference state;
[0084] The fourth determining subunit is configured to determine that the first port is in a fourth state if the number of successfully received response packets is not greater than the first threshold, wherein the fourth state indicates that the first port has an unacceptable bit error and interference state.
[0085] Optionally, the first port continuously sending the port detection packet to the second terminal for multiple times comprises:
[0086] The first port periodically and continuously sends port detection packets to the second terminal for multiple times to obtain the real-time port status of the first port.
[0087] Optionally, it also includes:
[0088] The application determining unit is configured to determine an application condition of the first port based on the port state of the first port, so that the first port is applied to an application scenario matching the application condition.
[0089] Optionally, the application determination unit is specifically used to:
[0090] Based on the port state of the first port, determining whether the port state of the first port has changed;
[0091] If yes, based on the state transition information, an application condition of the first port is determined, where the application condition includes network reconstruction or continuing to maintain the current network architecture.
[0092] Optionally, if the second node includes a second port, and the first node includes a plurality of first ports, the apparatus further includes:
[0093] an acquiring unit, configured to acquire a communication path length between the second port and each of the first ports, and port number information of each first port;
[0094] a vector generating unit, configured to generate a port selection vector based on the port status of each first port, the communication path length and the port number information of each first port;
[0095] The port determination unit is configured to determine a target first port in the first ports based on the port selection vector, so that the first node forwards communication information based on the target first port.
[0096] Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement any of the above methods for detecting a universal port connection for a Shaq bus.
[0097] The present application also provides a communication node, including:
[0098] A memory, used to store applications and data generated by the operation of the applications;
[0099] The processor is used to execute the application program to implement the universal port connection detection method for the Shaq bus as described in any one of the above items.
[0100] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0101] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units. They may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0102] In addition, all functional units in the embodiments of the present application can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units. A person of ordinary skill in the art can understand that all or part of the steps of the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), disks or optical disks, and other media that can store program codes.
[0103] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0104] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0105] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting the connection status of a universal port of a Shaq bus, characterized in that: The method comprises: Establishing a communication connection between the first port to be detected and the second port; When the first port sends the port detection packet to the second port multiple times in succession, the number of times the first port sends the port detection packet and the number of times the first port receives the reception response packet are recorded; The port state of the first port is determined based on the number of times the port detection packet is sent and the number of times the reception response packet is received.
2. The method according to claim 1, characterized in that The recording of the number of times the first port sends a port detection packet and the number of times the first port receives a receiving response packet includes: Recording information about the port detection packet sent by the first port in a first register, wherein the first register is a multi-bit register, and each bit of the first register from left to right records the sending flag information of the port detection packet sent by the first port; The information of the reception response packet received by the first port is recorded in the second register, the second register is a multi-bit register, and each bit of the second register from left to right records the information of whether the first port successfully receives the reception response packet each time.
3. The method according to claim 1, characterized in that The determining the port state of the first port based on the number of times the port detection packet is sent and the number of times the reception response packet is received includes: If the number of times the receiving response packets are received is equal to the number of times the port detection packets are sent, it is determined that the first port is in a first state, and the first state indicates that the first port is in a well-connected state; If the number of times the receiving response packet is received is zero, determining that the first port is in a second state, the second state indicates that the first port is in a disconnected state; If the number of successfully received response packets is greater than the first threshold and less than the number of sending port detection packets, it is determined that the first port is in a third state, and the third state indicates that the first port has an acceptable error and interference state; If the number of successfully received response packets is not greater than the first threshold, it is determined that the first port is in a fourth state, and the fourth state indicates that the first port has an unacceptable bit error and interference state.
4. The method according to claim 1, characterized in that: The first port continuously sending the port detection packet to the second terminal for multiple times comprises: The first port periodically and continuously sends port detection packets to the second terminal for multiple times to obtain the real-time port status of the first port.
5. The method according to claim 1, characterized in that: Also includes: Based on the port state of the first port, an application condition of the first port is determined so that the first port is applied to an application scenario matching the application condition.
6. The method according to claim 5, characterized in that The determining, based on the port state of the first port, an application condition of the first port includes: Based on the port state of the first port, determining whether the port state of the first port has changed; If yes, based on the state transition information, an application condition of the first port is determined, where the application condition includes network reconstruction or continuing to maintain the current network architecture.
7. The method according to claim 3, characterized in that If the second node includes a second port, and the first node includes a plurality of first ports, the method further includes: Obtaining the communication path length between the second port and each of the first ports, and the port number information of each first port; Generate a port selection vector based on the port status of each first port, the communication path length and the port number information of each first port; Based on the port selection vector, a target first port is determined in the first ports, so that the first node forwards communication information based on the target first port.
8. A method for detecting the connection status of a universal port of a Shaq bus, characterized in that: The method comprises: An establishing unit, used for establishing a communication connection between the first port to be detected and the second port; a recording unit, configured to record the number of times the first port sends the port detection packets and the number of times the first port receives the reception response packets when the first port sends the port detection packets to the second port multiple times in a row; The determining unit is used to determine the port state of the first port based on the number of times the port detection packet is sent and the number of times the reception response packet is received.
9. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the universal port connection status detection method for Shaq bus according to any one of claims 1 to 7.
10. A communication node, characterized in that: include: A memory, used to store applications and data generated by the operation of the applications; The processor is used to execute the application program to implement a universal port connection status detection method for a Shaq bus according to any one of claims 1 to 7.
