A method and related device for determining a connection relationship of a secure real-time bus (SRB)

By using topology discovery packet transmission device information list in the ring topology SRB system, the problem of not being able to effectively determine the connection relationship of the SRB device in the prior art is solved, and efficient and accurate connection relationship identification and computing resource conservation are achieved.

CN118764390BActive Publication Date: 2024-11-08BEIJING ZHONGTIAN STAR CONTROL TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411255809.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-11-08
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

The prior art cannot effectively and efficiently determine the connection relationship between various devices in a secure real-time bus SRB system, and the process is complex and occupies a large amount of computing power resources.

Method used

By using topology discovery messages in a ring topology SRB system, including a list of device information, including a device identification field and a sending port field, it is gradually transmitted and parsed to determine the connection relationship between each SRB device.

Benefits of technology

It realizes accurate and efficient determination of the connection relationship of each device in the SRB system, simplifies the process, and saves computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764390B_ABST
    Figure CN118764390B_ABST
Patent Text Reader

Abstract

The present application discloses a method and related device for determining a secure real-time bus SRB connection relationship. The method is applied to the field of big data technology. A first SRB device sends a first topology discovery message including a device information list of device information to a second SRB device. The second SRB device receives the first topology discovery message. When it is determined that the device information does not include a device identification field of the second SRB device, the second topology discovery message in which the device information of the second SRB device is added to the device information list of the first topology discovery message is forwarded to the next SRB device. When the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field of the next SRB device. The device information list in the topology discovery message is parsed to determine the connection relationship between the SRB devices. In this way, accurate and efficient identification of the connection relationship of each SRB device in the SRB system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method and related device for determining a secure real-time bus (SRB) connection relationship. Background Art

[0002] In the related art, the SRB (Security Real-time Bus) system is composed of multiple SRB devices. In order to ensure the reliability of the SRB system, without the participation of external devices, the SRB system is usually a ring topology structure.

[0003] In some application scenarios, it is necessary to determine the connection relationship between each SRB device in the SRB system. However, in the related art, it is impossible to obtain the connection relationship between all SRB devices in the SRB system, and the process of determining the connection relationship is complicated and occupies a large amount of computing resources.

[0004] Therefore, in order to accurately and efficiently identify the connection relationship of each SRB device in the SRB system, a method for determining the SRB connection relationship is urgently needed. Summary of the invention

[0005] In view of this, an embodiment of the present application provides a secure real-time bus SRB connection relationship determination method and related devices, aiming to achieve accurate and efficient identification of the connection relationship of each SRB device in the SRB system.

[0006] In a first aspect, an embodiment of the present application provides a method for determining an SRB connection relationship, the method being applied to a ring topology SRB system, the ring topology SRB system including a plurality of secure real-time bus SRB devices connected in a ring, the method comprising:

[0007] A first topology discovery message is sent by the first SRB device to the second SRB device, wherein the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify a sending port of the first topology discovery message;

[0008] In response to the second SRB device receiving the first topology discovery message, when it is determined that the device information does not include the device identification field of the second SRB device, forwarding the second topology discovery message to the next SRB device, where the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message;

[0009] When the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices.

[0010] Optionally, the SRB device includes a first port and a second port, and the sending of the first topology discovery message by the first SRB device to the second SRB device includes:

[0011] The first port of the first SRB device sends the first topology discovery message to the second SRB device, where the first topology discovery message includes a device identification field identifying the first SRB device and the first port;

[0012] The next SRB device is the first SRB device, and when the next SRB receiving device receives the second topology discovery message, determining that the device identification field includes the device identification field and the sending port field of the next SRB receiving device, and the next SRB device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices, including:

[0013] In response to the second port of the first SRB device receiving the second topology discovery message, it is determined that the second topology discovery message includes a device identification field and a sending port field of the first SRB device, and the first SRB device parses the device information list of the second topology discovery message to determine the connection relationship between the SRB devices.

[0014] Optionally, when the device information list includes multiple pieces of device information, the first SRB device parsing the device information list of the second topology discovery message to determine the connection relationship between the SRB devices includes:

[0015] The first SRB device parses the device information list of the second topology discovery message to obtain the multiple pieces of device information;

[0016] Based on the device identification field and the sending port field of each of the plurality of device information, a connection relationship between the SRB devices in the ring topology SRB system is determined.

[0017] Optionally, the SRB device includes a sending port and a receiving port, the multiple device information includes first device information of the first SRB device and second device information of the second SRB device, and determining the connection relationship between the SRB devices in the ring topology SRB system based on the device identification field and the sending port field of each of the multiple device information includes:

[0018] Determine a sending port and a receiving port of each of the first SRB device and the second SRB device based on the first device information and the second device information;

[0019] A connection relationship between the SRB devices in the ring topology SRB system is determined according to the first device information, the second device information, the sending port, and the receiving port.

[0020] Optionally, the method for obtaining the second topology discovery message is:

[0021] After the device information corresponding to the first SRB device in the device information list of the first topology discovery message, the device identification field and the sending port field of the second SRB device are sequentially added.

[0022] Optionally, the format of the first topology discovery message is an Ethernet message.

[0023] Optionally, the first topology discovery message includes a protocol type field, and the protocol type field is identified as an SRB type message.

[0024] In a second aspect, an embodiment of the present application provides an SRB connection relationship determination device, the device is applied to a ring topology SRB system, the ring topology SRB system includes multiple SRB devices connected in a ring, the device includes: a sending module, a forwarding module and a parsing module;

[0025] The sending module is configured to send a first topology discovery message from the first SRB device to the second SRB device, wherein the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify a sending port of the first topology discovery message;

[0026] The forwarding module is configured to, in response to the second SRB device receiving the first topology discovery message, forward the second topology discovery message to the next SRB device when it is determined that the device information does not include the device identification field of the second SRB device, wherein the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message;

[0027] The parsing module is used to determine that when the next SRB device receives the second topology discovery message, the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices.

[0028] In a third aspect, the present application provides an electronic device, the device comprising: a processor, a memory, and a system bus;

[0029] The processor and the memory are connected via the system bus;

[0030] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the SRB connection relationship determination method described in the first aspect.

[0031] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, the device executing the code implements the SRB connection relationship determination method described in any one of the first aspects above.

[0032] The present application provides a method and a related device for determining a connection relationship of a secure real-time bus SRB. When executing the method, first, a first SRB device sends a first topology discovery message to a second SRB device. The first topology discovery message includes a device information list. The device information list includes device information. The device information includes a device identification field and a sending port field. The device identification field is used to identify the first SRB device. The sending port field is used to identify the sending port of the first topology discovery message. Then, in response to the second SRB device receiving the first topology discovery message, when it is determined that the device information does not include the device identification field of the second SRB device, the second topology discovery message is forwarded to the next SRB device. The second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message. Finally, when the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB device. The next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices. In this way, by setting a device information list in the first topology discovery message, including a device identification field and a sending port field, when the first SRB device sends the first topology discovery message to the second SRB device, the second SRB device can obtain the device identification field of the first SRB device and the sending port of the first topology discovery message. That is, each time a topology discovery message is sent, the device that sends the topology discovery message and the corresponding sending port will be added to the topology discovery message and recorded through the device information list. Since the SRB devices in the ring topology SRB system are connected in a ring, the corresponding topology discovery message is also transmitted in a ring manner. When each SRB device receives a topology discovery message, it will determine whether there is a device identification field corresponding to the SRB device itself in the device information list. When it is determined that its own device identification field exists, it means that the topology discovery message has completed the transmission between all SRB devices in the ring connection. At this time, the device information list of the received topology discovery message will record the device identification fields of all SRB devices and the corresponding sending ports. The SRB device can parse the device information list and determine the connection relationship between all SRB devices in the SRB system based on the device identification fields of all SRB devices and the corresponding sending ports. By setting the device information list and adding information to the topology discovery message during the transmission process, the connection relationship of all SRB devices in the SRB system can be accurately determined. The efficiency is high and the determination process is relatively simple, which can save a lot of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in this embodiment or 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flowchart of a method for determining a connection relationship provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of a topology discovery message provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of a method for determining a connection relationship provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of the structure of a connection relationship determination device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0039] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0040] In the study of related technologies, it was found that the SRB system includes multiple SRB devices, and in order to ensure the reliability of the SRB system, without the participation of external devices, the SRB system is usually a ring topology, that is, the SRB devices in the SRB system are connected in a ring. In some application scenarios, it is necessary to determine the connection relationship between the SRB devices in the SRB system. However, the connection relationship between all SRB devices cannot be obtained in the related technology, and the process of determining the connection relationship is complicated, which will occupy a large amount of computing resources.

[0041] Based on this, the present application proposes a method and related device for determining the connection relationship of a secure real-time bus SRB. By setting the device information list and adding information to the topology discovery message during transmission, the connection relationship of all SRB devices in the SRB system can be accurately determined. The process of determination is relatively simple and efficient, which can save a lot of computing resources.

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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] Figure 1 A flowchart of a method for determining a connection relationship provided in an embodiment of the present application is provided in Figure 1 As shown, an SRB connection relationship determination method provided by an embodiment of the present application is applied to a ring topology SRB system, wherein the ring topology SRB system includes a plurality of secure real-time bus SRB devices connected in a ring, and the method includes:

[0044] S11: The first SRB device sends a first topology discovery message to the second SRB device.

[0045] SRB devices refer to devices that implement the requirements of the Security Real-time Bus (SRB), and an SRB system refers to a collection of devices that are composed of multiple SRB devices and communicate with each other through the SRB bus to implement specific functions. Ring topology refers to a network topology in which all devices are connected to form a ring and data is transmitted in one direction in the ring. The method provided in the embodiment of the present application is applied to a ring topology SRB system composed of multiple SRB devices connected to form a ring.

[0046] The aforementioned first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify the sending port of the first topology discovery message.

[0047] Figure 2 A schematic diagram of a topology discovery message provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the topology discovery message includes a message header. In the embodiment of the present application, the message header is an Ethernet message header, which includes a destination MAC address, a source MAC address and a protocol type field. The protocol type field is identified as an SRB type message. The Ethernet message header is schematically shown as 14 bytes. The SRB type message can be identified by 0x8907. The SRB device will perform special processing on this type of message. It also includes a sub-protocol type field, which is used to further distinguish SRB messages. 0x01 indicates that this is a topology discovery message for SRB. Each SRB device will also perform special processing on the topology discovery message. In addition, a device information list field is provided. The device information list may include multiple device identification fields and sending port fields, and the arrangement order is as follows: Figure 2 It may be shown as: device 1 identifier, device 1 sending port, device 2 identifier, device 2 sending port... device n identifier, device n sending port.

[0048] That is, in the embodiment of the present application, the format of the topology discovery message can be an Ethernet message, and of course it can also be other formats, which are not limited here. The specific format can be selected by those skilled in the art according to the actual situation and application scenario, which is not limited here. In addition, the topology discovery message includes a protocol type field, which can be used to identify the type of message. When the protocol type field is identified as an SRB type message, the SRB device will perform special processing on the topology discovery message.

[0049] In an embodiment of the present application, the SRB device includes a first port and a second port. When the SRB devices are connected in a ring, one of the two ports of the SRB device is a receiving port and the other is a sending port. The method of "sending a first topology discovery message from the first SRB device to the second SRB device" mentioned in the aforementioned S11 is: sending the first topology discovery message from the first port of the first SRB device to the second SRB device, and the first topology discovery message includes a device identification field identifying the first SRB device and the first port. That is, in an embodiment of the present application, the first SRB device is used as the starting device to send the first topology discovery message, and the first port is the sending port. At this time, it can be determined that the second port of the first SRB device is the receiving port.

[0050] When the first SRB device is used as the starting device, if the second port of the first SRB device receives the topology discovery message sent by other SRB devices, it proves that all SRB devices in the SRB system have completed the sending of the topology discovery message. At this time, the first SRB device can determine the connection relationship between the SRB devices based on the device information list in the obtained topology discovery message.

[0051] That is, when the next SRB device mentioned in S13 is the first SRB device, the implementation method of "when the next SRB receiving device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB receiving device, and the next SRB device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices" in S13 is: in response to the second port of the first SRB device receiving the second topology discovery message, it is determined that the second topology discovery message includes the device identification field and the sending port field of the first SRB device, and the first SRB device parses the device information list of the second topology discovery message to determine the connection relationship between the SRB devices.

[0052] It can be known from the above description of the device information list that the device information list may include device identification fields and sending port fields corresponding to multiple SRB devices. When the topology discovery message is transmitted between various SRB devices, each time the topology discovery message is sent, the device identification field and sending port field corresponding to the SRB device that sends the topology discovery message will be added to the device information list. When the starting device is the first SRB device and the next device is the first SRB device, the second port of the first SRB device receives the second topology sending message sent by the second SRB device, and the second topology sending message will include the device identification field and sending port field corresponding to the first SRB device, and the device identification field and sending port field corresponding to the second SRB device. The connection relationship between the SRB devices can be determined based on each device identification field and sending port field.

[0053] S12: In response to the second SRB device receiving the first topology discovery message, when it is determined that the device information does not include the device identification field of the second SRB device, forwarding the second topology discovery message to the next SRB device.

[0054] The second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message.

[0055] When the second SRB device receives the first topology discovery message sent by the first SRB device, and when it is determined that the first topology discovery message does not include the device identification field of the second SRB device, the second topology discovery message with the device identification field and the sending port field of the second SRB device added thereto will be forwarded to the next SRB device. It should be noted that in order to ensure that the connection relationship of all SRB devices in the ring topology SRB system can be determined in the embodiment of the present application, it is necessary to ensure that the device identification field and the sending port field corresponding to all SRB devices are included in the topology sending message. The way to ensure this is: until the SRB device that has completed the sending of the topology discovery message includes its own device identification field in the received topology discovery message, it proves that the sending of the topology discovery message has been completed once between each SRB device in the ring connection, so that it can be ensured that the device identification field and the sending port field corresponding to all SRB devices are included in the topology discovery message.

[0056] S13: When the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices.

[0057] The second topology discovery message includes a device identification field and a sending port field corresponding to the first SRB device, and a device identification field and a sending port field corresponding to the second SRB device. That is, the device information list of the second topology discovery message received by the next SRB device includes multiple device information (device information includes a device identification field and a sending port field). When the next SRB device is the first SRB device, the aforementioned implementation method of "the first SRB device parses the device information list of the second topology discovery message to determine the connection relationship between the SRB devices" is: first, the first SRB device parses the device information list of the second topology discovery message to obtain the multiple device information. Then, based on the device identification field and the sending port field of each of the multiple device information, the connection relationship between the SRB devices in the ring topology SRB system is determined.

[0058] At this time, the first SRB device parses the device information list of the second topology discovery message and can obtain multiple device information, including: the device identification field and the sending port field corresponding to the first SRB device, and the device identification field and the sending port field corresponding to the second SRB device. Based on the obtained device identification fields and sending port fields, the connection relationship between the SRB devices in the ring topology SRB system can be determined.

[0059] The above introduction mentioned that the SRB device includes two ports, which are a sending port and a receiving port respectively. The second topology discovery message includes the first device information of the first SRB device and the second device information of the second SRB device. At this time, the implementation method of the above-mentioned "determining the connection relationship between the SRB devices in the ring topology SRB system based on the device identification field and the sending port field of each of the multiple device information" is: first determine the sending port and receiving port of each of the first SRB device and the second SRB device based on the first device information and the second device information, and then determine the connection relationship between the SRB devices in the ring topology SRB system according to the first device information, the second device information, the sending port and the receiving port.

[0060] The sending port and receiving port of each of the first SRB device and the second SRB device are determined according to the first device information and the second device information. For example, the first device information includes a device identification field and a sending port field of the first SRB device, and the sending port field corresponds to the sending port of the first SRB device. Since the SRB device has two ports, the receiving port of the first SRB device is the port other than the sending port. When the sending port and the receiving port are determined, the transmission direction of the topology discovery message between the SRB devices can be clarified, and then the connection relationship between the various SRB devices can be clarified.

[0061] It should also be noted that in order to ensure that the connection relationship between each SRB device can be accurately determined based on the device information list of the topology discovery message, when each SRB device adds the device identification field and the sending port field, it is necessary to add them in sequence, so that the identified order can be consistent with the connection order of each SRB device. For example, the method for obtaining the second topology discovery message is: after the device information corresponding to the first SRB device in the device information list of the first topology discovery message, the device identification field and the sending port field of the second SRB device are sequentially added. At this time, the order of the device information in the device information list is {device identification field of the first SRB device, sending port field of the first SRB device, device identification field of the second SRB device, sending port field of the second SRB device}.

[0062] Figure 3 A schematic diagram of a method for determining a connection relationship provided in an embodiment of the present application is provided. Taking four SRB devices including a ring connection in a ring topology SRB system as an example, a method for parsing the device information list in a topology discovery message and determining the connection relationship between SRB devices is introduced below.

[0063] See also Figure 3 As shown, the SRB system includes SRB device 1, SRB device 2, SRB device 3 and SRB device 4, and each SRB device has port 1 and port 2. Taking SRB device 1 as the starting device, the topology discovery message is sent in the process, and the device identification field and the sending port field corresponding to each SRB device are attached to the topology sending message. At this time, the device list information in the topology discovery message is parsed to calculate the topology (that is, the connection relationship between each SRB device). The calculation process is as follows:

[0064] Parse the first device information in the device information list to obtain SRB device 1 and send port 1.

[0065] Parse the second device information in the device information list and get SRB device 2 and sending port 1. Because the SRB device has only two ports, and since port 1 of SRB device 2 is the sending port, it can be known that port 2 of SRB device 2 is the receiving port. Therefore, port 1 of SRB device 1 is connected to port 2 of SRB device 2, and the connection relationship is {SRB device 1, port 1, SRB device 2, port 2}.

[0066] Parse the third device information in the device information list and get SRB device 3 and sending port 1. Since port 1 of SRB device 3 is the sending port, it can be known that port 2 of SRB device 3 is the receiving port. Therefore, port 1 of SRB device 2 is connected to port 2 of SRB device 3, and the connection relationship is {SRB device 2, port 1, SRB device 3, port 2}.

[0067] Parse the fourth device information in the device information list and get SRB device 4 and sending port 1. Since port 1 of SRB device 3 is the sending port, it can be known that port 2 of SRB device 4 is the receiving port. Therefore, port 1 of SRB device 3 is connected to port 2 of SRB device 4, and the connection relationship is {device 3, port 1, device 4, port 2}.

[0068] Since SRB device 1 receives the topology discovery message sent by itself from port 2, it can be known that port 2 of SRB device 1 is connected to port 1 of SRB device 4, and the connection relationship is {SRB device 1, port 2, SRB device 4, port 1}.

[0069] From the above connection relationship, we can calculate Figure 3 The connection relationship of the ring topology is shown.

[0070] Each SRB device repeats the above process, and each SRB device can obtain Figure 3 The connection relationship shown.

[0071] In this embodiment, a method for determining an SRB connection relationship is proposed. The method firstly sends a first topology discovery message from a first SRB device to a second SRB device. The first topology discovery message includes a device information list. The device information list includes device information. The device information includes a device identification field and a sending port field. The device identification field is used to identify the first SRB device. The sending port field is used to identify the sending port of the first topology discovery message. Then, in response to the second SRB device receiving the first topology discovery message, when it is determined that the device information does not include the device identification field of the second SRB device, the second topology discovery message is forwarded to the next SRB device. The second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message. Finally, when the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB device. The next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices. In this way, by setting a device information list in the first topology discovery message, including a device identification field and a sending port field, when the first SRB device sends the first topology discovery message to the second SRB device, the second SRB device can obtain the device identification field of the first SRB device and the sending port of the first topology discovery message. That is, each time a topology discovery message is sent, the device that sends the topology discovery message and the corresponding sending port will be added to the topology discovery message, and the device information list is recorded. Since the SRB devices in the ring topology SRB system are connected in a ring, the corresponding topology discovery message is also transmitted in a ring manner. When each SRB device receives a topology discovery message, it will determine whether there is a device identification field corresponding to the SRB device itself in the device information list. When it is determined that its own device identification field exists, it means that the topology discovery message has completed the transmission between all SRB devices in the ring connection. At this time, the device information list of the received topology discovery message will record the device identification fields of all SRB devices and the corresponding sending ports. The SRB device can parse the device information list and determine the connection relationship between all SRB devices in the SRB system based on the device identification fields of all SRB devices and the corresponding sending ports. By setting the device information list and adding information to the topology discovery message during the transmission process, the connection relationship of all SRB devices in the SRB system can be accurately determined. The efficiency is high and the determination process is relatively simple, which can save a lot of computing resources.

[0072] Figure 4 A schematic diagram of a connection relationship determination device provided in an embodiment of the present application is shown in FIG. Figure 4As shown, a device for determining an SRB connection relationship specifically includes: a sending module 100, a forwarding module 200 and a parsing module 300;

[0073] The sending module 100 is configured to send a first topology discovery message from a first SRB device to a second SRB device, wherein the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify a sending port of the first topology discovery message;

[0074] The forwarding module 200 is configured to, in response to the second SRB device receiving the first topology discovery message, forward the second topology discovery message to the next SRB device when it is determined that the device information does not include the device identification field of the second SRB device, wherein the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message;

[0075] The parsing module 300 is used to determine that the device identification field includes the device identification field and the sending port field of the next SRB device when the next SRB device receives the second topology discovery message, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices.

[0076] In a possible implementation, the SRB device includes a first port and a second port, and the sending module 100 is used to:

[0077] The first port of the first SRB device sends the first topology discovery message to the second SRB device, where the first topology discovery message includes a device identification field identifying the first SRB device and the first port;

[0078] The next SRB device is the first SRB device, and the parsing module 300 is used to:

[0079] In response to the second port of the first SRB device receiving the second topology discovery message, it is determined that the second topology discovery message includes a device identification field and a sending port field of the first SRB device, and the first SRB device parses the device information list of the second topology discovery message to determine the connection relationship between the SRB devices.

[0080] In a possible implementation, when the device information list includes multiple pieces of device information, the parsing module 300 is used to:

[0081] The first SRB device parses the device information list of the second topology discovery message to obtain the multiple pieces of device information;

[0082] Based on the device identification field and the sending port field of each of the plurality of device information, a connection relationship between the SRB devices in the ring topology SRB system is determined.

[0083] In a possible implementation, the SRB device includes a sending port and a receiving port, the multiple pieces of device information include first device information of the first SRB device and second device information of the second SRB device, and the parsing module 300 is used to:

[0084] Determine a sending port and a receiving port of each of the first SRB device and the second SRB device based on the first device information and the second device information;

[0085] A connection relationship between the SRB devices in the ring topology SRB system is determined according to the first device information, the second device information, the sending port, and the receiving port.

[0086] In a possible implementation, the apparatus further includes a message obtaining module, and the message obtaining module is used to:

[0087] After the device information corresponding to the first SRB device in the device information list of the first topology discovery message, the device identification field and the sending port field of the second SRB device are sequentially added.

[0088] In a possible implementation, the format of the first topology discovery message is an Ethernet message.

[0089] In a possible implementation, the first topology discovery message includes a protocol type field, and the protocol type field is identified as an SRB type message.

[0090] In this embodiment, a device for determining an SRB connection relationship is proposed. The device is applied to a ring topology SRB system. The ring topology SRB system includes multiple SRB devices connected in a ring. The device includes: a sending module, a forwarding module, and a parsing module. The sending module is used to send a first topology discovery message from the first SRB device to the second SRB device, the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify the sending port of the first topology discovery message; the forwarding module is used to respond to the second SRB device receiving the first topology discovery message, and when it is determined that the device information does not include the device identification field of the second SRB device, forward the second topology discovery message to the next SRB device, the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message; the parsing module is used when the next SRB device receives the second topology discovery message, determines that the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices. In this way, by setting a device information list in the first topology discovery message, including a device identification field and a sending port field, when the first SRB device sends the first topology discovery message to the second SRB device, the second SRB device can obtain the device identification field of the first SRB device and the sending port of the first topology discovery message. That is, each time a topology discovery message is sent, the device that sends the topology discovery message and the corresponding sending port will be added to the topology discovery message, and the device information list is recorded. Since the SRB devices in the ring topology SRB system are connected in a ring, the corresponding topology discovery message is also transmitted in a ring manner. When each SRB device receives a topology discovery message, it will determine whether there is a device identification field corresponding to the SRB device itself in the device information list. When it is determined that its own device identification field exists, it means that the topology discovery message has completed the transmission between all SRB devices in the ring connection. At this time, the device information list of the received topology discovery message will record the device identification fields of all SRB devices and the corresponding sending ports. The SRB device can parse the device information list and determine the connection relationship between all SRB devices in the SRB system based on the device identification fields of all SRB devices and the corresponding sending ports. By setting the device information list and adding information to the topology discovery message during the transmission process, the connection relationship of all SRB devices in the SRB system can be accurately determined. The efficiency is high and the determination process is relatively simple, which can save a lot of computing resources.

[0091] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the device and method according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0092] The embodiments of the present application also provide corresponding devices and computer-readable storage media for implementing the solutions provided by the embodiments of the present application.

[0093] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes a method for determining an SRB connection relationship described in any embodiment of the present application.

[0094] In practical applications, the computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0095] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0096] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0097] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0098] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application 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.

Claims

1. A method for determining an SRB connection relationship, It is characterized in that The method is applied to a ring topology SRB system, wherein the ring topology SRB system includes a plurality of safety real-time bus SRB devices connected in a ring, and the method includes: A first topology discovery message is sent by the first SRB device to the second SRB device, wherein the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify a sending port of the first topology discovery message; In response to the second SRB device receiving the first topology discovery message, when it is determined that the device information does not include the device identification field of the second SRB device, forwarding the second topology discovery message to the next SRB device, where the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message; When the next SRB device receives the second topology discovery message, it is determined that the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices; The SRB device includes a first port and a second port, and the sending of a first topology discovery message by the first SRB device to the second SRB device includes: The first port of the first SRB device sends the first topology discovery message to the second SRB device, where the first topology discovery message includes a device identification field identifying the first SRB device and the first port; The next SRB device is the first SRB device, and when the next SRB receiving device receives the second topology discovery message, determining that the device identification field includes the device identification field and the sending port field of the next SRB receiving device, and the next SRB device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices, including: In response to the second port of the first SRB device receiving the second topology discovery message, determining that the second topology discovery message includes a device identification field and a sending port field of the first SRB device, and the first SRB device parsing the device information list of the second topology discovery message to determine the connection relationship between the SRB devices; When the device information list includes multiple pieces of device information, the first SRB device parsing the device information list of the second topology discovery message to determine the connection relationship between the SRB devices includes: The first SRB device parses the device information list of the second topology discovery message to obtain the multiple pieces of device information; Based on the device identification field and the sending port field of each of the plurality of device information, a connection relationship between the SRB devices in the ring topology SRB system is determined.

2. The method according to claim 1, It is characterized in that The SRB device includes a sending port and a receiving port, the multiple device information includes first device information of the first SRB device and second device information of the second SRB device, and determining the connection relationship between the SRB devices in the ring topology SRB system based on the device identification field and the sending port field of each of the multiple device information includes: Determine a sending port and a receiving port of each of the first SRB device and the second SRB device based on the first device information and the second device information; A connection relationship between the SRB devices in the ring topology SRB system is determined according to the first device information, the second device information, the sending port, and the receiving port.

3. The method according to claim 1, It is characterized in that The method for obtaining the second topology discovery message is: After the device information corresponding to the first SRB device in the device information list of the first topology discovery message, the device identification field and the sending port field of the second SRB device are sequentially added.

4. The method according to claim 2, It is characterized in that The format of the first topology discovery message is an Ethernet message.

5. The method according to claim 3, It is characterized in that The first topology discovery message includes a protocol type field, and the protocol type field is identified as an SRB type message.

6. A device for determining an SRB connection relationship, It is characterized in that The device is applied to a ring topology SRB system, wherein the ring topology SRB system includes a plurality of SRB devices connected in a ring, and the device includes: a sending module, a forwarding module and a parsing module; The sending module is configured to send a first topology discovery message from the first SRB device to the second SRB device, wherein the first topology discovery message includes a device information list, the device information list includes device information, the device information includes a device identification field and a sending port field, the device identification field is used to identify the first SRB device, and the sending port field is used to identify a sending port of the first topology discovery message; The forwarding module is configured to, in response to the second SRB device receiving the first topology discovery message, forward the second topology discovery message to the next SRB device when it is determined that the device information does not include the device identification field of the second SRB device, wherein the second topology discovery message is obtained by adding the device identification field of the second SRB device and the sending port field of the second SRB device to the device information list of the first topology discovery message; The parsing module is used for, when the next SRB device receives the second topology discovery message, determining that the device identification field includes the device identification field and the sending port field of the next SRB device, and the next SRB receiving device parses the device information list in the topology discovery message to determine the connection relationship between the SRB devices; The SRB device includes a first port and a second port, and the sending module is used to: The first port of the first SRB device sends the first topology discovery message to the second SRB device, where the first topology discovery message includes a device identification field identifying the first SRB device and the first port; The next SRB device is the first SRB device, and the parsing module is used to: In response to the second port of the first SRB device receiving the second topology discovery message, determining that the second topology discovery message includes a device identification field and a sending port field of the first SRB device, and the first SRB device parsing the device information list of the second topology discovery message to determine the connection relationship between the SRB devices; When the device information list includes multiple pieces of device information, the parsing module is used to: The first SRB device parses the device information list of the second topology discovery message to obtain the multiple pieces of device information; Based on the device identification field and the sending port field of each of the plurality of device information, a connection relationship between the SRB devices in the ring topology SRB system is determined.

7. An electronic device, It is characterized in that The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, and the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the SRB connection relationship determination method according to any one of claims 1 to 5.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores an implementation program for implementing the SRB connection relationship determination method. When the implementation program for implementing the SRB connection relationship determination method is executed by a processor, the steps of the SRB connection relationship determination method according to any one of claims 1 to 5 are implemented.