Ethernet redundancy design method and equipment independent of switch multicast function
By establishing a broadcast message mapping relationship between the sending and receiving ends in Ethernet communication, a redundant design that does not rely on the multicast function of the switch is realized, which solves the problems of resource waste and insufficient reliability in Ethernet communication and improves the efficiency of link information synchronization and redundant data processing.
Patent Information
- Application Number
- CN202511731454.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2025-12-23
AI Technical Summary
Existing Ethernet communication suffers from wasted communication resources and insufficient reliability, especially when link failures occur or the multicast function of switches fails, leading to network paralysis or communication interruption.
By periodically sending and receiving broadcast messages between the sender and receiver, address mapping relationships are established and updated, the first target message is constructed and redundancy processing is performed, and a redundancy design that does not rely on the multicast function of the switch is realized, ensuring communication reliability and efficiency.
It improves the efficiency of link information synchronization, avoids communication interruptions, enhances the reliability of redundant links and the efficiency of redundant data processing, and reduces the waste of communication resources.
Smart Images

Figure CN121193594A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of Ethernet communication technology, and specifically to an Ethernet redundancy design method and device that does not rely on the multicast function of a switch. Background Technology
[0002] Ethernet, as a widely used communication technology in local area networks (LANs), offers advantages such as low cost and abundant compatible software resources for its supporting basic communication equipment. To improve the reliability of Ethernet communication, devices are often connected through multiple physical links.
[0003] However, in existing technologies, in the primary and backup link-based communication method, the switching to the backup link will cause a loss of reliability when a link failure occurs; in the multicast-based communication method, due to the heavy reliance on the multicast function of the switch, once the multicast function of the switch fails, there is a risk of network paralysis, resulting in unreliable communication; in the broadcast-based communication method, a large number of repeated broadcast messages will cause a lot of waste of communication resources.
[0004] Therefore, how to reduce the waste of communication resources and improve the reliability of communication in Ethernet communication is a technical problem that this application urgently needs to solve. Summary of the Invention
[0005] In view of the above-mentioned reduction of communication resource waste and improvement of communication reliability in the prior art, it is desirable to provide an Ethernet redundancy design method and device that does not rely on the multicast function of the switch to solve the above problems.
[0006] This application provides an Ethernet redundancy design method that does not rely on the multicast function of a switch. The method is applied at the transmitting end and includes: The first broadcast message is periodically sent to each non-sending device in the broadcast domain through multiple first network ports, so that the receiving end can determine the first address mapping relationship of the sending end after receiving the first broadcast message; each first broadcast message includes the device identifier of the sending end and the physical address of each first network port, and the first address mapping relationship is used to characterize the correspondence between the device identifier of the sending end and the physical address of each first network port; The receiver receives second broadcast messages sent by each second network port of each non-sending device within the broadcast domain, and determines the second address mapping relationship corresponding to the receiver based on the second broadcast messages. Each second broadcast message includes the device identifier of each non-sending device and the physical address of each second network port. The second address mapping relationship is used to characterize the correspondence between the device identifier of the receiver and the physical address of each second network port in the receiver. The receiving end determines each target network port according to the second address mapping relationship, constructs a first target message according to the device identifier of the receiving end and the device identifier of the sending end, and sends the first target message from each first network port of the sending end to each target network port respectively, so that after the receiving end recognizes the preset digital identifier of the first target message, it performs redundancy processing on the first target message to obtain target data.
[0007] According to the technical solution provided in the embodiments of this application, determining the second address mapping relationship corresponding to the receiving end based on the second broadcast message includes: Obtain the second network port corresponding to the device identifier of each non-sendering device from the second broadcast message; For each device identifier, a correspondence is established between each second network port corresponding to the device identifier and the device identifier to obtain a second address mapping table; The second address mapping relationship corresponding to the receiving end is determined according to the second address mapping table.
[0008] According to the technical solution provided in the embodiments of this application, determining the target address of each target network port in the receiving end based on the second address mapping relationship includes: Based on the second address mapping relationship, determine the update time interval of the physical address of each second network port corresponding to the receiving end; The second network port whose update time interval is less than the preset time interval is determined as the target network port; Obtain the target address corresponding to the target network port from the second address mapping relationship.
[0009] According to the technical solution provided in the embodiments of this application, the step of constructing a first target message based on the device identifier of the receiving end and the device identifier of the sending end includes: Determine the sequence number of the first target message; The first target message is determined based on a preset digital identifier, the device identifier of the sending end, the device identifier of the receiving end, the target data, the message length, the message sequence number, and the checksum. The preset digital identifier is used to mark the message attributes of the first target message, so that the receiving end can perform redundancy processing on the first target message after recognizing the preset digital identifier.
[0010] This application provides an Ethernet redundancy design method that does not rely on the multicast function of a switch. The method is applied at the receiving end and includes: The system receives first broadcast messages periodically sent by each first network port of the sending end through multiple second network ports, and determines the first address mapping relationship of the sending end based on the first broadcast messages. Each first broadcast message includes the device identifier of the sending end and the physical address of each first network port in the sending end. The first address mapping relationship is used to characterize the correspondence between the device identifier of the sending end and the physical address of each first network port. A second broadcast message is sent to each first network port of each sending end, so that the sending end can determine the second address mapping relationship and determine each target network port of the receiving end based on the second broadcast message; each second broadcast message includes the device identifier of the receiving end and the physical address of each second network port in the receiving end, and the second address mapping relationship is used to characterize the correspondence between the device identifier of the receiving end and the physical address of each second network port; The system receives the first target message sent by the sending end through each target network port. If a preset digital identifier is detected in the first target message, the system performs redundancy processing on the first target message to obtain the target data.
[0011] According to the technical solution provided in the embodiments of this application, if a preset digital identifier is detected in the first target message, then redundancy processing is performed on the first target message to obtain target data, including: If a preset numerical identifier is detected in the first target message, the deduplication record corresponding to the sending end is determined according to the device identifier of the sending end corresponding to the first target message; the deduplication record includes the redundancy processing status corresponding to the device identifier; The first target message is subjected to redundancy processing according to the redundancy processing status to obtain target data.
[0012] This application provides an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the method as described in any of the preceding claims.
[0013] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.
[0014] Compared with the prior art, the beneficial effects of this application are as follows: First, this application uses periodic bidirectional broadcast messages, which allows the sending and receiving ends to quickly establish and update address mapping relationships, making link information synchronization more efficient.
[0015] Secondly, by sending the first target message multiple times, this application can improve the reliability of communication, avoid data loss caused by communication interruption, and enhance the reliability of redundant links.
[0016] Third, based on the preset digital identifier, the first target message can be efficiently filtered, which improves the efficiency of subsequent processing of redundant data.
[0017] Fourth, the method provided in this application does not rely on the multicast function of the switch in a single broadcast domain. It does not require the main communication messages to be sent via broadcast. Instead, it utilizes the terminal devices within the broadcast domain to complete the repeated transmission of messages and achieve redundancy processing. Attached Figure Description
[0018] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A schematic diagram of the Ethernet redundancy design method that does not rely on the multicast function of the switch provided in this application; Figure 2 A schematic diagram of the message format of the first target message provided for this application; Figure 3 A schematic diagram of another Ethernet redundancy design method that does not rely on switch multicast functionality provided in this application; Figure 4 A block diagram of the electronic device provided in this application.
[0019] Icon labels: 400. Electronic device; 401. Processor; 402. Input device; 403. Output device; 404. Memory; 405. Communication bus. Detailed Implementation
[0020] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] Please refer to Figure 1 This application provides an Ethernet redundancy design method that does not rely on the multicast function of a switch. This method can be applied to a sending end, which can be used to represent a sending device in a terminal device within a wide area network that sends redundant messages. The sending end can also be used to represent a receiving device in a terminal device within a wide area network that receives the redundant messages. The terminal device can include a mobile terminal, an embedded terminal, a server, etc.
[0023] Step S101: Periodically send first broadcast messages to each non-sendering device in the broadcast domain through multiple first network ports, so that the receiving end can determine the first address mapping relationship of the sending end after receiving the first broadcast message.
[0024] In this embodiment, the sending end can be configured with multiple independent first network ports, and each first network port is configured with a unique MAC address (Media Access Control Address), which can be used to determine the physical address.
[0025] Each sending end can periodically send a first broadcast message to each non-sending end device within the broadcast domain based on each first network interface. The first broadcast message may include the sending end's device identifier and the physical address of each first network interface. The device identifier uniquely identifies the terminal device corresponding to the sending end. When constructing the first broadcast message for each first network interface, it can be constructed based on the sending end's device identifier, the physical address of the first network interface, and a preset broadcast address. The preset broadcast address is used by the first network interface to send the corresponding first broadcast message to each physical network interface of each non-sending end device within the broadcast domain.
[0026] Through the aforementioned periodic transmission operations, each second network port in the receiving end does not need to rely on the multicast function of the switch. It can obtain the physical addresses and device identification information of multiple first network ports of the sending end solely through its own message receiving and parsing capabilities. This allows for the construction of an accurate first address mapping relationship, laying the foundation for the targeted transmission of subsequent redundant messages. Compared to traditional broadcast methods, this embodiment avoids wasting communication resources, ensures the real-time nature of address information, and improves the reliability of the entire Ethernet redundant communication system.
[0027] Step S102: Receive the second broadcast message sent by each second network port in each non-sending device within the broadcast domain, and determine the second address mapping relationship corresponding to the receiving end based on the second broadcast message.
[0028] In this embodiment, after sending the first broadcast message through each of the first network ports, the sending end can also continuously receive the second broadcast messages sent by the second network ports of each terminal device other than the sending end within the broadcast domain through each of the first network ports. The physical network ports of the terminal devices other than the sending end can be designated as the second network ports.
[0029] In this embodiment, the second network ports corresponding to the device identifiers of each terminal device other than the sending end can be obtained based on each second broadcast message. For each device identifier, a correspondence can be established between the corresponding second network ports and the device identifier to obtain a second address mapping table. Specifically, a second address mapping table can be initialized for the receiving end. The device identifier of the terminal device can be determined as the index of the second address mapping table, and the set of physical addresses of each second network port corresponding to the terminal device can be determined as the value corresponding to the index. Furthermore, the update timestamp of each physical address can be recorded. For example, when a second broadcast message corresponding to the second network port A1 of terminal device A is received, and a second broadcast message corresponding to the second network port A2 of terminal device A is received, the system can first check whether the device identifier corresponding to terminal device A exists in the second address mapping table, and whether the second network port A1 and second network port A2 corresponding to the device identifier of terminal device A exist in the second address mapping table. If they do not exist, the corresponding data is added; if they already exist, the timestamps are compared, and the corresponding data is updated with the latest timestamp to ensure that the latest state of the non-sending terminal device network port is recorded.
[0030] The second address mapping table determined through the above process can clearly show the correspondence between each terminal device and its second network port, except for the sending end. This provides an efficient address lookup basis for subsequent redundant communication and further strengthens the independence of multicast function without relying on the switch.
[0031] In this embodiment, a second address mapping relationship corresponding to the receiving end can be determined based on a second address mapping table. Specifically, the physical address set of each second network port corresponding to the receiving end's device identifier can be determined from the second address mapping table based on the receiving end's device identifier, and the second address mapping relationship is determined based on the correspondence between the receiving end's device identifier and the physical address set, as well as the update timestamp of each physical address.
[0032] The second address mapping relationship determined by the above method can reflect the network port address of the receiving end in the broadcast domain in real time and accurately. The whole process does not rely on the multicast function of the switch. Even if the switch fails, the sending end can still maintain basic communication based on the existing second mapping table, which further improves the reliability and independence of the Ethernet redundant communication system.
[0033] Step S103: Determine each target network port of the receiving end according to the second address mapping relationship, construct a first target message according to the device identifier of the receiving end and the device identifier of the sending end, and send the first target message from each first network port of the sending end to each target network port respectively, so that after the receiving end recognizes the preset digital identifier of the first target message, it performs redundancy processing on the first target message to obtain target data.
[0034] In this embodiment, the sending end can determine the target address of each target network port in the receiving end according to the second mapping relationship. Specifically, the update time interval of the physical address of each second network port corresponding to the receiving end can be determined according to the second mapping relationship; if the update time interval is less than a preset time interval, the second network port is determined as the target network port. For example, if the second address mapping relationship records the physical addresses and update timestamps corresponding to the three second network ports of the receiving end C, such as the physical address and latest update timestamp of second network port C1, the physical address and latest update timestamp of second network port C2, and the latest update timestamp of second network port C3, the update time interval of the physical address of each second network port can be determined according to the difference between the current time and the latest update timestamp. The shorter the update time interval, the more reliable the status of the corresponding second network port, indicating that it has recently had valid message interaction. The value of the preset time interval can be determined in conjunction with the sending period of the second broadcast message. If the sending period of the receiving end is 5 seconds, the preset time interval can be set to 15 seconds, which avoids misjudging normal network ports due to network delays and can promptly eliminate faulty network ports that have been unresponsive for a long time. If there are multiple second network interfaces with update intervals shorter than the preset value, then all of these second network interfaces will be designated as the target network interface.
[0035] The process described above for determining the target network interface ensures that the identified target address accurately matches the valid communication link at the receiving end. Compared to directly using all network interface addresses, this method eliminates network interfaces with questionable status through quantitative filtering of update time intervals, reducing the probability of sending packets to faulty links. Simultaneously, by obtaining a second address mapping relationship and using this relationship to quickly extract the target address, the efficiency of packet preparation for transmission is improved.
[0036] In this embodiment, after determining each target network interface and its target address, a first target message can be constructed based on the device identifier of the receiving end and the device identifier of the sending end. Specifically, the message sequence number of the first target message and a preset digital identifier can be determined. The first target message can be determined based on the preset digital identifier, the device identifier of the sending end, the device identifier of the receiving end, the target data, the message length, the message sequence number, and the checksum.
[0037] In this embodiment, the message format of the first target message can be as follows: Figure 2As shown. The preset digital identifier can be used to mark the message attributes of the first target message, and can be used to distinguish the link layer message obtained by applying the solution of this application from the message obtained by applying other technologies, such as network transmission protocols. The preset digital identifier can represent a link layer message that conforms to the redundancy communication specification in this application. After the receiving end receives the first target message, it can identify the preset digital identifier to determine that the message attribute of the first target message is a link layer message obtained by the solution of this application, and perform redundancy deduplication processing on the first target message. The source device identifier is used to represent the device identifier of the sending end. The target device identifier is used to represent the device identifier of the receiving end. The message length is used to represent the length of the entire first target message. The message sequence number can be a binary sequence of a preset number of bits, such as a preset number of bits that can be set to 16 bits. The message sequence number can include the deduplication slot number and the slot number. The deduplication slot number is used to represent the sending batch of the first target message. The first target packets sent from each first network port in the same sending end to each target network port in the receiving end are sent in the same batch; the slot number is used to represent the unique sequence number corresponding to each packet in the same batch of first target packets; the deduplication slot number can be set to a binary number with a width of M, where M is a positive integer, such as 3; the slot number can be set to a binary number with a width of N, where N is a positive integer, such as 13; the deduplication slot number and the slot number can be used together to determine the packet sequence number; the packet content is used to represent the target data sent by the sending end, that is, the service data that needs to be transmitted to the receiving end; the checksum is the checksum corresponding to the entire first target packet, which is the verification basis to ensure the integrity of the transmission of the first target packet. It is used to perform verification after the receiving end receives the first target packet to determine whether there are any errors in the received first target packet during transmission. If there are errors, the first target packet can be discarded directly.
[0038] After the first target message is constructed, the first network interface of the initiating end can send the first target message to the target network interface of the receiving end based on the target address corresponding to the target network interface of the receiving end.
[0039] This embodiment achieves redundant communication without relying on the multicast function of a switch by accurately locating the target address, constructing the first target message, and performing multi-path transmission. The preset digital identifier is the core to ensure effective identification by the receiving end. The combination of multi-path transmission and deduplication processing at the receiving end avoids communication interruptions caused by single-link failures and prevents duplicate data from interfering with service modules, significantly improving the reliability and stability of Ethernet communication.
[0040] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0041] Please refer to Figure 3 This application provides another Ethernet redundancy design method that does not rely on the multicast function of the switch, which can be applied to the receiving end.
[0042] Step 301: Receive the first broadcast messages periodically sent by each of the first network ports of the sending end through multiple second network ports, and determine the first address mapping relationship of the sending end based on the first broadcast messages.
[0043] In this embodiment, all terminal devices in the wide area network (WAN) where the sending end is located, except for the sending end itself, can receive the first broadcast messages periodically sent by the sending end's first network ports through their respective second network ports. These terminal devices, excluding the sending end, include the terminal device corresponding to the receiving end. After receiving the first broadcast messages from the sending end, the receiving end can determine the mapping relationship between the sending end's device identifier and the physical addresses of each first network port through the first broadcast messages, and define this mapping relationship as a first address mapping relationship. Each first broadcast message includes the sending end's device identifier and the physical addresses of each first network port in the sending end; the first address mapping relationship characterizes the correspondence between the sending end's device identifier and the physical addresses of each first network port.
[0044] By determining the first address mapping relationship, the communication status and address information of each first network port of the sending end can be reflected in real time and accurately. Compared with the traditional single network port receiving mode, the redundant receiving mechanism is formed by synchronously listening to multiple second network ports. Even if one second network port fails, other network ports can still capture broadcast messages normally, avoiding the loss of sending end information due to single network port failure and improving the reliability of link awareness.
[0045] Step 302: Send a second broadcast message to each first network port of each sending end, so that the sending end can determine the second address mapping relationship and determine each target network port of the receiving end based on the second broadcast message.
[0046] In this embodiment, all terminal devices in the wide area network (WAN) other than the sending end can periodically send second broadcast messages to each of the first network ports of the sending end through their respective second network ports. Each second broadcast message includes the device identifier of the receiving end and the physical address of each second network port in the receiving end. The second address mapping relationship is used to characterize the correspondence between the device identifier of the receiving end and the physical address of each second network port. The terminal devices other than the sending end include the terminal devices corresponding to the receiving end. The function of the second broadcast message is to transmit the physical address of each physical network port in each terminal device to the sending end, enabling the sending end to determine the second address mapping table based on the second broadcast message, as well as the second address mapping relationship corresponding to the receiving end, and to identify the target network port. This establishes a bidirectional link information synchronization mechanism between the sending end and the receiving end, further improving the reliability and efficiency of service message transmission. In addition, the second broadcast message and the first broadcast message adopt the same frame structure and transmission period, which facilitates engineering implementation and application.
[0047] Step 303: Receive the first target message sent by the sender through each target network port. If a preset digital identifier is detected in the first target message, perform redundancy processing on the first target message to obtain the target data.
[0048] In this embodiment, the receiving end can receive the first target message sent by the sending end through each target network port. After receiving the first target message, it can first identify whether the first target message carries a preset digital identifier. If the first target message includes a preset digital identifier, it is determined that the first target message is a link layer message determined based on the method of this application, that is, a link layer message that conforms to the redundancy communication specification in this application. Then, the device identifier of the sending end corresponding to the first target message is determined as the source device identifier, and redundancy processing is performed on the first target message. Finally, unique and valid target data is output to ensure the accuracy and uniqueness of business data transmission. Since the sending end encapsulates the same target data into multiple first target messages to ensure that data is not lost, and sends them to multiple target network ports corresponding to the receiving end through different first network ports, the receiving end usually receives multiple first target messages. Therefore, after receiving the first target message, redundancy processing needs to be performed on the first target message.
[0049] In this embodiment, the message sequence number and source device identifier in each first target message can be obtained. The deduplication record corresponding to the sending end can be determined based on the source device identifier. This deduplication record includes the redundancy processing status corresponding to the device identifier. The redundancy processing status can include the current active slot number corresponding to the device identifier and the reception status of the slot number corresponding to the current active slot number. The current active slot number can represent the deduplication slot number in the message sequence number corresponding to the message whose redundancy processing was completed in the last time. The reception status of the slot number can represent the reception status of each message corresponding to the current active slot number. If the reception status value is a first value, such as 1, it indicates that the message has been received; if the reception status value is a second value, such as 0, it indicates that the message has not been received. It is possible to determine whether each first target message has been received repeatedly based on each reception status.
[0050] In this embodiment, the first target message can be redundantly processed according to the redundancy processing to obtain target data. Specifically, for each first target message, the message sequence number can be obtained, and the deduplication slot number and slot-specific number corresponding to each first target message can be determined based on the message sequence number. The receiving end can determine the reception status of obtaining the currently active slot number and the slot-specific number corresponding to the currently active slot number from the current deduplication record based on the redundancy processing status. The currently active slot number can be used to mark the deduplication slot number corresponding to the currently receivable first target message. If the deduplication slot number corresponding to the first target message is within the range of the currently active slot number, it indicates that the first target message can undergo redundancy processing. If the currently active slot number corresponding to the source device identifier cannot be received, a new data entry can be initialized, with the default currently active slot number set to 0 and the reception status of all slot-specific numbers configured to 0, before proceeding with subsequent processing.
[0051] For each first target message, if the deduplication slot number of the first target message is equal to the currently active slot number in the deduplication record, the receiving end can further query the reception status of the slot number under the deduplication slot number in the deduplication record. If the value of the reception status is the first value, the first target message is directly discarded, and the last update time of the deduplication record is updated. If the value of the reception status is the second value, the first target message is determined to be a new valid message, and the first target message is retained. Then, the reception status corresponding to the slot number in the deduplication record is updated to the first value, and the last update time of the deduplication record is updated.
[0052] For each first target message, if the deduplication slot number of the first target message is the next slot number of the currently active slot number in the deduplication record, then the first target message is determined to be a target message of a new batch. The system can receive the first target message and extract its corresponding target data; it can update the currently active slot number in the deduplication record to the deduplication slot number of the first target message, clear the reception status of the slot number corresponding to the currently active slot number, and configure the reception status of all slot numbers corresponding to the currently active slot number to the second value, and then configure the reception status of the slot number corresponding to the first target message to the first value.
[0053] For each first target message, if the deduplication slot number of the first target message meets any of the following conditions, the first target message is determined to be an invalid message, directly discarded and the deduplication record is not updated: the deduplication slot number of the first target message is not equal to the current active slot number, and the deduplication slot number of the first target message is not equal to the next slot number of the current active slot number; the deduplication slot number of the first target message exceeds the preset value range. If the deduplication slot number is a three-bit binary value, the value of the deduplication slot number is 0-7.
[0054] After the above processing, the first target message will be received in only two cases, and redundancy processing will be performed on the first target message: one is a message with an unreceived slot number, and the other is a message from a different batch. When generating target data, the receiving end will strip redundant information from the first target message, that is, delete the deduplication slot number, slot number, and other identifier fields in the message, and retain only the target data.
[0055] By querying deduplication records, determining redundancy processing status, and updating deduplication records, the receiving end achieves accurate deduplication of redundant data. Compared to traditional full-message comparison, this method only uses the deduplication slot number and slot number for judgment, improving deduplication efficiency. At the same time, deduplication records classified by device identifier avoid information interference between multiple sending ends, further improving the accuracy and efficiency of deduplication processing and ensuring that the output target data is unique and valid.
[0056] Ultimately, the receiving end uses these rules to filter out the only valid message from multiple redundant first target messages, ensuring the uniqueness of business data and improving the efficiency of deduplication.
[0057] See Figure 4 , Figure 4 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 4The electronic device 400 in this embodiment may include one or more processors 401, one or more input devices 402, one or more output devices 403, and one or more memories 404. The processors 401, input devices 402, output devices 403, and memories 404 communicate with each other via a communication bus 405. The memory 404 stores computer programs, including program instructions. The processor 401 executes the program instructions stored in the memory 404. Specifically, the processor 401 is configured to invoke the program instructions to perform the functions of each module / unit in the above system embodiments.
[0058] It should be understood that, in the embodiments of this application, the processor 401 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0059] Input device 402 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 403 may include a display (LCD, etc.), a speaker, etc.
[0060] The memory 404 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
[0061] In specific implementations, the processor 401, input device 402, and output device 403 described in the embodiments of this application can execute the implementation methods described in the embodiments of the Ethernet redundancy design method that does not rely on the multicast function of the switch provided in the embodiments of this application, or they can execute the implementation methods of the electronic devices described in the embodiments of this application, which will not be repeated here.
[0062] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0063] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0064] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. An Ethernet redundancy design method that does not rely on the multicast function of a switch, characterized in that, The method is applied at the sending end, and the method includes: The first broadcast message is periodically sent to each non-sending device in the broadcast domain through multiple first network ports, so that the receiving end can determine the first address mapping relationship of the sending end after receiving the first broadcast message; each first broadcast message includes the device identifier of the sending end and the physical address of each first network port, and the first address mapping relationship is used to characterize the correspondence between the device identifier of the sending end and the physical address of each first network port; The receiver receives second broadcast messages sent by each second network port of each non-sending device within the broadcast domain, and determines the second address mapping relationship corresponding to the receiver based on the second broadcast messages. Each second broadcast message includes the device identifier of each non-sending device and the physical address of each second network port. The second address mapping relationship is used to characterize the correspondence between the device identifier of the receiver and the physical address of each second network port in the receiver. The receiving end determines each target network port according to the second address mapping relationship, constructs a first target message according to the device identifier of the receiving end and the device identifier of the sending end, and sends the first target message from each first network port of the sending end to each target network port respectively, so that after the receiving end recognizes the preset digital identifier of the first target message, it performs redundancy processing on the first target message to obtain target data.
2. The method according to claim 1, characterized in that, Determining the second address mapping relationship corresponding to the receiving end based on the second broadcast message includes: Obtain the second network port corresponding to the device identifier of each non-sendering device from the second broadcast message; For each device identifier, a correspondence is established between each second network port corresponding to the device identifier and the device identifier to obtain a second address mapping table; The second address mapping relationship corresponding to the receiving end is determined according to the second address mapping table.
3. The method according to claim 1, characterized in that, The step of determining the target address of each target network port in the receiving end according to the second address mapping relationship includes: Based on the second address mapping relationship, determine the update time interval of the physical address of each second network port corresponding to the receiving end; The second network port whose update time interval is less than the preset time interval is determined as the target network port; Obtain the target address corresponding to the target network port from the second address mapping relationship.
4. The method according to claim 1, characterized in that, The step of constructing the first target message based on the device identifier of the receiving end and the device identifier of the sending end includes: Determine the sequence number of the first target message; The first target message is determined based on a preset digital identifier, the device identifier of the sending end, the device identifier of the receiving end, the target data, the message length, the message sequence number, and the checksum. The preset digital identifier is used to mark the message attributes of the first target message, so that the receiving end can perform redundancy processing on the first target message after recognizing the preset digital identifier.
5. An Ethernet redundancy design method that does not rely on the multicast function of a switch, characterized in that, The method is applied at the receiving end, and the method includes: The system receives first broadcast messages periodically sent by each first network port of the sending end through multiple second network ports, and determines the first address mapping relationship of the sending end based on the first broadcast messages. Each first broadcast message includes the device identifier of the sending end and the physical address of each first network port in the sending end. The first address mapping relationship is used to characterize the correspondence between the device identifier of the sending end and the physical address of each first network port. A second broadcast message is sent to each first network port of each sending end, so that the sending end can determine the second address mapping relationship and determine each target network port of the receiving end based on the second broadcast message; each second broadcast message includes the device identifier of the receiving end and the physical address of each second network port in the receiving end, and the second address mapping relationship is used to characterize the correspondence between the device identifier of the receiving end and the physical address of each second network port; The system receives the first target message sent by the sending end through each target network port. If a preset digital identifier is detected in the first target message, the system performs redundancy processing on the first target message to obtain the target data.
6. The method according to claim 5, characterized in that, If a preset numerical identifier is detected in the first target message, the first target message is subjected to redundancy processing to obtain target data, including: If a preset numerical identifier is detected in the first target message, the deduplication record corresponding to the sending end is determined according to the device identifier of the sending end corresponding to the first target message; the deduplication record includes the redundancy processing status corresponding to the device identifier; The first target message is subjected to redundancy processing according to the redundancy processing status to obtain target data.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 4 or the method as described in claim 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 4 or the method as described in claim 5.
