Method for establishing redundant link, storage medium, electronic device and program product
By receiving access approval messages and performing real-time fault detection, redundant links in the wireless network are automatically re-established, solving the problems of low efficiency and high cost caused by manual configuration in wireless networking, and improving the reliability and efficiency of the links.
Patent Information
- Application Number
- CN202510684840.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2026-11-27
AI Technical Summary
In wireless networking, due to the instability of wireless links, the central gateway cannot automatically distinguish the data affiliation of multiple wireless gateways, requiring manual configuration. This results in low efficiency and high cost when redundant links are broken and need to be re-established.
By receiving access approval messages, recording the status of redundant links, and detecting faults in real time, access request messages are sent to the central gateway to automatically re-establish redundant links, reducing communication interruption time.
It enables automatic recording of redundant link status without human intervention, rapid response to link failures, improved reliability and efficiency of redundant links, and reduced communication interruption time.
Smart Images

Figure CN123185631A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a method for establishing redundant links, a storage medium, an electronic device, and a program product. Background Technology
[0002] Industrial communications demand extremely high network reliability. To improve the reliability of wireless communication, redundant wireless links are often used to transmit data. This involves the wireless gateway device copying the same data multiple times and sending it from multiple modules to the base station. The central gateway device at the base station then deduplicates the received data before continuing transmission. Wireless redundancy improves the reliability of wireless communication and reduces latency.
[0003] However, if multiple wireless gateway devices are connected to the same central gateway device at the back end of a base station, they will face challenges such as... Figure 1 The problem shown is that wireless gateway A copies user data A into two separate streams, which are then transmitted via... Figure 1 The two modules shown are sent to the central gateway. Wireless gateway B will copy user data B into three paths and transmit them through... Figure 1 The three modules shown are sent to the central gateway. At this point, the central gateway will experience confusion during deduplication because, without manual configuration, it cannot distinguish which of the five data streams belong to the same wireless gateway. Therefore, in... Figure 1 In the network scenario shown, the central gateway often needs to manually configure the wireless link relationship so that the central gateway can divide the 5 data streams into 2 groups of tunnels (i.e., ueip1 / 2 belongs to the tunnel of wireless gateway A, and ueip3 / 4 / 5 belongs to the tunnel of wireless gateway B). Each group of tunnels performs duplicate packet elimination independently, and different tunnels do not affect each other.
[0004] In traditional wired networks, the network link is relatively stable, so the IP and tunnel association only needs to be manually configured once during initial deployment. However, in wireless networks, due to factors such as distance, obstruction, and interference, the air interface may experience disconnections, and the UEIP often changes after reconnection. In this case, the IP and tunnel relationship needs to be manually updated; otherwise, the redundant link function of the central gateway will not work properly. Summary of the Invention
[0005] This application provides a method for establishing redundant links, a storage medium, an electronic device, and a program product, to at least solve the problem in the related art that the efficiency of re-establishing redundant links is low and the cost is high because manual intervention is required after a redundant link is broken.
[0006] According to one embodiment of this application, a method for establishing a redundant link is provided, comprising: receiving an access approval message and recording the establishment status of the redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established; determining that the redundant link has been disconnected based on the fault detection result of the redundant link, and sending an access request message to the central gateway, wherein the access request message is used to request the re-establishment of the redundant link.
[0007] According to another embodiment of this application, a method for establishing a redundant link is provided, comprising: sending an access approval message to a wireless gateway to enable the wireless gateway to record the establishment status of the redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established; and receiving an access request message sent by the wireless gateway, wherein the access request message is used to request the re-establishment of the redundant link.
[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0009] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0010] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0011] The embodiments described above in this application record the establishment status of redundant links in response to access approval messages from the central gateway, enabling automatic recording of redundant link status without manual intervention. By detecting redundant link faults in real time and sending access request messages to the central gateway when a link break is detected to request the re-establishment of the redundant link, a rapid response can be made when a link failure occurs, reducing communication interruption time and improving the reliability of redundant links. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of a networking scenario in related technologies;
[0013] Figure 2 This is a hardware structure block diagram of a computer terminal for establishing a redundant link according to an embodiment of this application;
[0014] Figure 3 This is a flowchart of a method for establishing redundant links according to an embodiment of this application;
[0015] Figure 4 This is a flowchart of a method for establishing redundant links according to another embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the application environment for the method of establishing redundant links according to an embodiment of this application;
[0017] Figure 6 This is a schematic diagram of a redundant link establishment system according to an embodiment of this application;
[0018] Figure 7 This is a schematic diagram of information interaction in a method for establishing redundant links according to an embodiment of this application;
[0019] Figure 8 This is a flowchart of a method for establishing redundant links according to another embodiment of this application;
[0020] Figure 9 This is a schematic diagram of the application environment for a method of establishing redundant links according to another embodiment of this application;
[0021] Figure 10 This is a schematic diagram of the application environment for a method of establishing redundant links according to another embodiment of this application;
[0022] Figure 11 This is a schematic diagram of the application environment for a method of establishing redundant links according to another embodiment of this application. Detailed Implementation
[0023] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0025] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 2 This is a hardware structure block diagram of a computer terminal according to the method for establishing redundant links in an embodiment of this application. For example... Figure 2 As shown, a mobile terminal may include one or more ( Figure 2 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 2The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the redundant link establishment method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0028] Figure 3 This is a flowchart of a method for establishing redundant links according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps:
[0029] Step S302: Receive access approval message and record the establishment status of redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established;
[0030] In an exemplary embodiment of this application, before receiving the access approval message, the method further includes: sending an access request message to the central gateway via the 4G / 5G communication module, wherein the access request message includes the Internet Protocol IP address of the 4G / 5G communication module and the characteristic information of the wireless gateway.
[0031] In one embodiment, if the redundant link protocol stack of the wireless gateway receives an access rejection message through the 4G / 5G communication module, it means that the central gateway has rejected the redundant link establishment process, and the wireless gateway needs to resend the access request message to try to establish a redundant link with the central gateway.
[0032] In an exemplary embodiment of this application, recording the establishment status of redundant links includes updating the device name column and redundant link status column in the redundant link status table according to the name of the wireless gateway and the status of the redundant link. The device name column includes the name of the wireless gateway, and the redundant link status column includes whether the 4G / 5G communication module redundant link is established or disconnected.
[0033] In one embodiment, the wireless gateway is wireless gateway A, and the 4G / 5G communication module is 4G / 5G communication module A-1. If the redundant link protocol stack of wireless gateway A receives an Access Accept message through 4G / 5G communication module A-1, then wireless gateway A has successfully established a redundant wireless link. At this time, wireless gateway A will establish a redundant link status table, which indicates that 4G / 5G communication module A-1 (module A-1 in Table 1) has successfully established a redundant link with the central gateway. Subsequent packets requiring redundant transmission and reception can be sent and received through the 4G / 5G communication module A-1 link. (Since the wireless gateway only has one link at this time, packets will not be copied into multiple redundant copies for transmission).
[0034] Table 1 Redundancy Link Status Table
[0035] equipment Redundant link status Wireless Gateway A Module A-1 established
[0036] Step S304: Based on the fault detection results of the redundant link, it is determined that the redundant link has been disconnected, and an access request message is sent to the central gateway. The access request message is used to request the re-establishment of the redundant link.
[0037] In an exemplary embodiment of this application, determining that a redundant link has been disconnected based on the fault detection result of the redundant link includes: sending a heartbeat message to the central gateway; if no heartbeat confirmation message is received within a first preset time threshold, the wireless gateway confirms that the redundant link has been disconnected and updates the redundant link status table.
[0038] In one embodiment, after sending a heartbeat message to the central gateway, the method further includes: if a heartbeat confirmation message is received from the central gateway within a first preset time threshold, the wireless gateway confirms that the redundant link is normal.
[0039] In one embodiment, an anomaly occurs on the redundant link where the 4G / 5G communication module A-1 in Table 1 is located, causing the uplink (or downlink) message link between the wireless gateway and the central gateway to be disconnected. At this time, neither the wireless gateway A nor the central gateway can detect the link anomaly, so they cannot actively attempt link recovery. However, since the link failure results in the loss of heartbeat messages and heartbeat acknowledgment messages on the redundant link where the 4G / 5G communication module A-1 is located, if no heartbeat acknowledgment message is received within a first preset time threshold, the wireless gateway confirms that the redundant link has been broken and changes the redundant link status of the wireless gateway A in Table 1 from "established by 4G / 5G communication module A-1" to "disconnected by 4G / 5G communication module A-1".
[0040] In an exemplary embodiment of this application, after sending a heartbeat message to the central gateway, the method further includes: if a heartbeat confirmation message is received from the central gateway within a first preset time threshold, the wireless gateway confirms that the redundant link is normal.
[0041] In an exemplary embodiment of this application, determining that a redundant link has been disconnected based on the fault detection result of the redundant link includes: monitoring the IP address of the 4G / 5G communication module, confirming that the redundant link has been disconnected when the IP address changes, and updating the redundant link status table.
[0042] In one embodiment, the 4G / 5G communication module A-1 in Table 1 experienced a reconnection due to an air interface issue. After the reconnection, the IP address of the 4G / 5G communication module A-1 changed from IP1 to IP1-1. At this time, the redundant link protocol stack of the wireless gateway detected the change in the IP address of the 4G / 5G communication module 1, confirmed that the redundant link had been broken, and updated the redundant link status of the wireless gateway A in Table 1. The updated redundant link status table is the same as that in Table 2.
[0043] In an exemplary embodiment of this application, after sending an access request message to the central gateway, the method further includes: if an access approval message is received within a second preset time threshold, recording the establishment status of the redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established; if no access approval message is received within the second preset time threshold, reconnecting or restarting the 4G / 5G communication module.
[0044] In one embodiment, if the redundant link is lost, after the wireless gateway sends an access request message to the central gateway, if it does not receive an access approval message within a second preset time threshold, it means that the wireless gateway and the central gateway have been unable to establish a link for a long time. The wireless gateway then reconnects or restarts the 4G / 5G communication module and tries to rebuild the redundant link again.
[0045] Figure 4This is a flowchart of a method for establishing redundant links according to another embodiment of this application, as shown below. Figure 4 As shown, the process includes the following steps:
[0046] Step S402: Send an access approval message to the wireless gateway so that the wireless gateway records the establishment status of the redundant link. The access approval message is used to indicate that the redundant link has been successfully established.
[0047] In an exemplary embodiment of this application, before sending an access approval message to the wireless gateway, the method further includes: receiving an access request message sent by the wireless gateway through the 4G / 5G communication module, wherein the access request message includes the Internet Protocol IP address of the 4G / 5G communication module and the characteristic information of the wireless gateway, wherein the characteristic information includes the name of the wireless gateway.
[0048] In an exemplary embodiment of this application, after sending an access approval message to the wireless gateway, the method further includes: updating the link relationship table according to the access request message, wherein the link relationship table includes a device name column, a tunnel information column, and a redundant link relationship information column, the device name column includes the name of the central gateway, the tunnel information column includes the name of the wireless gateway, and the redundant link relationship information column includes the IP address of the 4G / 5G communication module.
[0049] Step S404: Receive an access request message sent by the wireless gateway, wherein the access request message is used to request the re-establishment of the redundant link.
[0050] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0051] To facilitate understanding of the technical solutions provided in the application embodiments, the following description is based on specific scenario embodiments.
[0052] Figure 5 This is a schematic diagram of the application environment for the method of establishing redundant links according to embodiments of this application, such as... Figure 5As shown, the Frame Replication and Elimination for Reliability (FRER) module in the wireless gateway is connected to external devices. The FRER module in the wireless gateway is connected to the FRER module in the central gateway through n 4G / 5G communication modules. The FRER module in the central gateway is connected to external devices.
[0053] Figure 6 This is a schematic diagram of a redundant link establishment system according to an embodiment of this application, as shown below. Figure 6 As shown, the system includes a wireless gateway and a central gateway.
[0054] The wireless gateway hardware has n 4G / 5G communication modules, and its functions include the following modules: redundant link protocol stack, redundant link status module, redundant link monitoring module, module control module, and FRER function module.
[0055] The redundant link protocol stack is used to complete the redundant link interaction process and heartbeat keep-alive function between the wireless gateway and the central gateway. After detecting module access or reconnection, this module will actively initiate the redundant link establishment process and perform heartbeat keep-alive function after the redundant link is established.
[0056] The redundant link status module, controlled by the redundant link protocol stack, is used to maintain the wireless link status information of the wireless gateway. When the redundant link protocol stack completes the redundant link establishment process, it notifies the module that the redundant link has been successfully established; when the redundant link protocol stack detects a module reconnection or keep-alive failure, it notifies the module that the redundant link has been lost.
[0057] The redundant link monitoring module is used to monitor the status of redundant links. When a redundant link of a module in the gateway cannot be established for a long time, the redundant link monitoring module will report an alarm and operate the module to reconnect (or restart) through the module control module.
[0058] The module control module is used to control the module reconnection or restart. This module is controlled by the redundant link monitoring module (the redundant link monitoring module may not be the only control source; other functions in the gateway may also control the module through this module).
[0059] The FRER function module, in accordance with the 802.1CB protocol, controls the number of packet copies and how to eliminate duplicate packets based on the status information in the redundant link status module.
[0060] The central gateway includes a redundant link protocol stack, a redundant link relationship maintenance module, and a FRER function module.
[0061] The redundant link protocol stack is used to complete the redundant link interaction process and heartbeat keep-alive function between the wireless gateway and the central gateway. That is, it passively receives the tunnel establishment process initiated by the wireless gateway and ultimately decides whether to allow the wireless gateway to establish a redundant link.
[0062] The redundant link relationship maintenance module, controlled by the redundant link protocol stack, primarily updates and maintains the link relationships between UEIP and the gateway tunnel according to the redundant link establishment process. Specifically, if a module of the wireless gateway successfully establishes a link through the redundant link protocol stack, this module adds a record. If a kept-alive operation of an established channel in the redundant link protocol stack fails, this module deletes the corresponding record.
[0063] The FRER function module, which follows the 802.1CB protocol, determines which UEIP packets belong to the same wireless gateway based on information from the redundant link relationship maintenance module, and uses the 802.1CB protocol to deduplicate packets belonging to the same wireless gateway.
[0064] Figure 7 This is a schematic diagram of information interaction according to the method for establishing redundant links in an embodiment of this application, such as... Figure 7 As shown, the process includes the following:
[0065] Step S701: The wireless gateway sends an access request message to the central gateway.
[0066] Specifically, once a module device of the wireless gateway successfully connects, the wireless gateway actively sends an Access Request to the central gateway through that module. Access Request messages sent by different modules of the same wireless gateway must contain the same gateway device characteristics (the device characteristics must be unique and can be the device's serial number) and the respective UEIP of each module. This allows the central gateway to determine which wireless gateway the newly established wireless link belongs to.
[0067] Step S702: The wireless gateway receives the authentication request message sent by the central gateway.
[0068] Specifically, after receiving an Access Request, the central gateway responds with a Challenge Request (authentication request) to authenticate the redundant link establishment process of the wireless gateway. This message contains information such as an authentication random code and an authentication ID. The purpose of the authentication process is to prevent unauthorized devices from launching network attacks after establishing a tunnel with the central gateway.
[0069] In step S703, after receiving the authentication request message, the wireless gateway performs the authentication process and replies with an authentication response message.
[0070] Specifically, the authentication process generally involves the wireless gateway using its local key to calculate the authentication random code and obtain the authentication response code. The Challenge Response message contains the authentication response code and the authentication ID.
[0071] Step S704: After receiving the authentication response, the central gateway verifies the authentication response code.
[0072] Specifically, if the verification passes, the central gateway replies with an Access Accept message to notify the wireless gateway that a wireless redundant link has been successfully established. In addition, the central gateway will maintain and update the link relationship based on the device characteristic value and ueip in the Access Request message. After receiving the Access Accept message, the wireless gateway marks the current module redundant link as successfully established.
[0073] If the verification fails, an Access Reject response will be sent to reject the current link establishment process.
[0074] In step S705, the wireless gateway and the central gateway send heartbeat messages and heartbeat message confirmation messages to each other.
[0075] Specifically, the wireless gateway sends a heartbeat message (Hello) to the central gateway, and the central gateway replies with a heartbeat acknowledgment message (Hello Ack). For successfully established redundant wireless links, a keep-alive mechanism is also required to monitor the current status of the redundant links in real time. For redundant links that time out, both the wireless gateway and the central gateway mark the link as disconnected.
[0076] Figure 8 This is a flowchart of a method for establishing redundant links according to another embodiment of this application, such as... Figure 8 As shown, the process includes the following:
[0077] Step S801: The wireless gateway sends an access request message to the central gateway.
[0078] In step S802, the wireless gateway receives the authentication request message sent by the central gateway.
[0079] In step S803, the wireless gateway replies with an authentication response message.
[0080] In step S804, after receiving the authentication response, the central gateway verifies the authentication response code to determine whether the authentication is successful. If the result is yes, proceed to step S805; otherwise, proceed to step S806.
[0081] In step S805, the central gateway replies with an access approval message to the wireless gateway.
[0082] In step S806, the central gateway replies with an access rejection message to the wireless gateway.
[0083] In step S807, the wireless gateway and the central gateway send heartbeat messages and heartbeat message confirmation messages to each other.
[0084] Step S808: Determine whether a heartbeat confirmation message has not been received for a long time. If the determination result is yes, proceed to step S809; if the determination result is no, proceed to step S807.
[0085] Scenario Example 1
[0086] In this scenario embodiment, as Figure 9 As shown, wireless gateway A and wireless gateway B have completed the power-on startup process. Wireless gateway A includes a FRER module, 4G / 5G communication modules A-1 and A-2, and wireless gateway B includes a FRER module, 4G / 5G communication modules B-1 and B-2. The 4G / 5G communication modules of the wireless gateways are connected to the access point (AP) via wireless signals. The AP converts the wireless signals into wired signals and transmits them to the FRER module in the central gateway. Figure 9 AP1 is the access point for modules A-1 and B-1, and AP2 is the access point for modules A-2 and B-2. Each module can also be flexibly connected to any AP.
[0087] This scenario illustrates how the four modules of these two wireless gateways complete the dynamic establishment of redundant links. The specific process is as follows:
[0088] In step S901, the redundant link monitoring module of wireless gateway A detects that neither module A-1 nor module A-2 has established a redundant link, so it notifies the module control module to control modules A-1 and A-2 to access the network. Assume that only module A-1 successfully accesses base station AP1 at this time. After access, module A-1 obtains an IP address assigned to it by the core network, denoted as ueip1. When the redundant link protocol stack of wireless gateway A detects that module A-1 has successfully accessed the network, it sends an Access Request message through that module. The Access Request message includes at least one of the following: ueip1 information after module A-1 accesses the network, and characteristic information of wireless gateway A.
[0089] In step S902, after receiving the Access Request message, the redundant link protocol stack of the central gateway records the ueip1 and feature information in the message, and then sends a Challenge Request message to the module to perform the authentication process. The Challenge Request message includes at least one of the following: chapId used to mark the authentication ID of this authentication, and authentication random code used for authentication.
[0090] In step S903, after receiving the Challenge Request message through module A-1, the redundant link protocol stack of wireless gateway A performs encrypted calculation of the authentication random code based on its own key and other information, and replies with a Challenge Response message. The Challenge Response message includes at least one of the following: a chapId identical to that in the Challenge message used to mark this authentication process, and an encrypted authentication response code used in the authentication process.
[0091] In step S904, after receiving the Challenge Response message from module A-1, the redundant link protocol stack of the central gateway verifies whether the authentication response code is valid.
[0092] If the received authentication response code fails to verify, it means that the device that initiated the connection establishment process is illegitimate. The device will reply with an AccessReject message to notify the wireless gateway that access is rejected, and no tunnel information will be added.
[0093] If the received authentication response code is successfully verified, an Access Accept message is sent to notify the wireless gateway of successful access. Simultaneously, the redundant link relationship maintenance module of the central gateway adds redundant link relationship information as shown in Table 2. This relationship indicates that redundant packets originating from ueip1 belong to wireless gateway A. At this time, the central gateway can identify redundant packets belonging to wireless gateway A through the source IP of the packets and perform FRER deduplication processing. (Since the central gateway only has one redundant link at this time, deduplication processing is not performed).
[0094] Table 2 Link Relationship Table
[0095] equipment Tunnel Information Redundant link relationship information Central Gateway Wireless Gateway A IP address 1 assigned after module A-1 is connected
[0096] In step S905, the wireless gateway determines the subsequent action to be performed based on the received message.
[0097] Suppose that the redundant link protocol stack of wireless gateway A receives an Access Reject message through module A-1. This indicates that the central gateway has rejected the tunnel establishment process, and the wireless gateway needs to return to step S901 to send an AccessRequest message to attempt to establish a redundant link with the central gateway.
[0098] Assume that the redundant link protocol stack of wireless gateway A receives an Access Accept message through module A-1. This indicates that wireless gateway A has successfully established a redundant wireless link. At this time, the redundant link status module of wireless gateway A will automatically maintain the link status as shown in Table 3. This status indicates that module A-1 has successfully established a redundant link with the central gateway, and subsequent messages requiring redundant transmission and reception can be sent and received through the link of module A-1. (Since the wireless gateway only has one link at this time, the messages will not be copied into multiple redundant copies for transmission.)
[0099] Table 3 Link Status Table
[0100] equipment Redundant link status Wireless Gateway A Module A-1 established
[0101] In step S906, after the redundant link is established, the redundant link protocol stacks of the wireless gateway and the central gateway begin to send Hello and Hello Ack messages to each other to keep the link alive, so as to ensure that the current redundant link is in normal condition.
[0102] In step S907, module B-1 of wireless gateway B repeats the operations of steps S901-S906 above to complete the redundant link establishment process of module B-1. At this time, the redundant link relationship maintenance module (i.e., relationship maintenance module) of the central gateway updates and generates Table 4. Table 4 indicates that the central gateway maintains a redundant link for wireless gateway A, associated with IP1 assigned after module A-1 accesses, and maintains a redundant link for wireless gateway B, associated with IP3 assigned after module B-1 accesses. The redundant link status module (i.e., link status module) of the wireless gateway updates Table 3 to generate Table 5. Table 5 indicates that module A-1 of wireless gateway A has successfully established a redundant link with the central gateway, and module B-1 of wireless gateway B has successfully established a redundant link with the central gateway. In other words, when module A-1 of wireless gateway A establishes a redundant link with the central gateway, the central gateway will also record the link relationship between IP1 of module A-1 and the tunnel in the link relationship table (Table 4), and at the same time, the wireless gateway will record that the link of the module is established in the link status table (Table 5); when module B-1 of wireless gateway B establishes a redundant link with the central gateway, the central gateway will also record the link relationship between IP3 of module B-1 and the tunnel in the link relationship table (Table 4), and at the same time, the wireless gateway will record that the link of the module is established in the link status table (Table 5).
[0103] Table 4 Link Relationship Table
[0104]
[0105] Table 5 Link Status Table
[0106] equipment Redundant link status Wireless Gateway A Module A-1 established Wireless Gateway B Module B-1 established
[0107] In step S908, if module A-2 of wireless gateway A and module B-2 of wireless gateway B complete the access under the instructions of their respective module control modules, the redundant link protocol stacks of the two wireless gateways will repeat operations similar to steps S901-S906 above. At this time, the relationship maintenance module will update Table 4 to generate Table 6. Table 6 indicates that the central gateway maintains a redundant link for wireless gateway A, associated with IP2 assigned after module A-2 accesses, and maintains a redundant link for wireless gateway B, associated with IP4 assigned after module B-1 accesses. The link status module will update Table 5 to generate Table 7. Table 7 indicates that module A-2 of wireless gateway A and the central gateway have successfully established a redundant link, and module B-2 of wireless gateway B and the central gateway have successfully established a redundant link. In other words, when module A-2 of wireless gateway A establishes a redundant link with the central gateway, the central gateway will also record the link relationship between IP2 of module A-2 and the tunnel in the link relationship table (Table 6), and at the same time, the wireless gateway will record that the link of the module is established in the link status table (Table 7); when module B-2 of wireless gateway B establishes a redundant link with the central gateway, the central gateway will also record the link relationship between IP4 of module B-2 and the tunnel in the link relationship table (Table 6), and at the same time, the wireless gateway will record that the link of the module is established in the link status table (Table 7).
[0108] Table 6 Link Relationship Table
[0109]
[0110] Table 7 Link Status Table
[0111]
[0112] In step S909, all four modules of wireless gateway A and wireless gateway B have completed the process of dynamically establishing redundant links. At this time, if wireless gateway A / B needs to send redundant messages, the FRER function module will copy the user message into two copies according to the link status and send them from the two redundant links.
[0113] The FRER function module of the central gateway will also distinguish the packets belonging to wireless gateways A and B based on the relationship maintenance module and the source IP of the received packets. The FRER function module will put the packets belonging to wireless gateway A together for duplicate frame elimination operation, and put the packets belonging to wireless gateway B together for duplicate frame elimination operation.
[0114] Scenario Example 2
[0115] In this scenario embodiment, as Figure 10As shown, wireless gateway A has completed the power-on startup process. Wireless gateway A includes a FRER module and 4G / 5G communication modules A-1, A-2 and A-3. The three 4G / 5G communication modules are connected to access points AP1-AP3 via wireless signals. The APs convert the wireless signals into wired signals and transmit them to the FRER module in the central gateway. Figure 10 AP1 is the access point for 4G / 5G communication module A-1, AP2 is the access point for 4G / 5G communication module A-2, and AP3 is the access point for 4G / 5G communication module A-3. Each 4G / 5G communication module can also flexibly connect to any AP. The wireless gateway and the central gateway have completed the dynamic establishment process of redundant links as described in Scenario Example 1. Assuming that module 1 reconnects due to a wireless link issue, this scenario example will illustrate how to establish a new redundant link and delete the old redundant link when the module reconnects.
[0116] This scenario illustrates how the three modules of the wireless gateway complete the dynamic establishment process of redundant links. The specific process is as follows:
[0117] In step S1001, the 4G / 5G communication modules A-1 / A-2 / A-3 of wireless gateway A respectively execute steps S901-S906 in scenario embodiment one to complete the dynamic establishment process of three redundant links. After successfully establishing the three redundant links, the relationship maintenance module updates and generates Table 8, which indicates that the central gateway maintains three redundant links for wireless gateway A and is associated with IP1 assigned after module A-1 accesses, IP2 assigned after module A-2 accesses, and IP3 assigned after module A-3 accesses. The link status module updates and generates Table 9, which indicates that modules A-1, A-2, and A-3 of wireless gateway A have successfully established redundant links with the central gateway. In other words, when modules A-1, A-2, and A-3 of wireless gateway A establish redundant links with the central gateway, the central gateway will also record the link relationship between IP1 of module A-1 and the tunnel, the link relationship between IP2 of module A-2 and the tunnel, and the link relationship between IP3 of module A-3 and the tunnel in the link relationship table (Table 8). At the same time, wireless gateway A will record the redundant link status of modules A-1, A-2, and A-3 as established in the link status table (Table 9).
[0118] Table 8 Link Relationship Table
[0119]
[0120] Table 9 Link Status Table
[0121]
[0122] In step S1002, if module A-1 experiences a reconnection due to an air interface issue, and its IP address changes from ip1 to ip1-1 after the reconnection, the redundant link protocol stack of the wireless gateway detects the IP change of module 1. It then notifies the link status module that the redundant link of module 1 has been broken and resends an Access Request message to attempt to re-establish the redundant tunnel. At this time, the link relationship table (Table 10) in the relationship maintenance module is identical to Table 8; the link status module updates Table 9 to generate Table 11. The difference between Table 11 and Table 9 is that the redundant link status of module A-1 has been updated from established to disconnected.
[0123] Table 10 Link Relationship Table
[0124]
[0125] Table 11 Link Status Table
[0126]
[0127] Step S1003: If module 1 of the wireless gateway uses the information of IP1-1 to complete steps 1 to 6 in Example 1 with the central gateway, the redundant link of module 1 can be restored. At this time, the relationship maintenance module updates Table 10 to generate Table 12. The difference between Table 12 and Table 10 is that Table 12 adds the redundant link relationship information after module A-1 reconnects, indicating that the IP of module A-1 after reconnection is IP1-1; the link status module updates Table 11 to Table 13. The difference between Table 13 and Table 11 is that the redundant link status of module A-1 is updated from disconnected to established.
[0128] Table 12 Link Relationship Table
[0129]
[0130] Table 13 Link Status Table
[0131]
[0132] It should be noted that if module 1 of the wireless gateway fails to establish a link with the central gateway for an extended period of time using the information from IP1-1, the redundant link monitoring module of the wireless gateway will reconnect (or restart) module 1 through the module control module and then attempt to rebuild the redundant link again.
[0133] In step S1004, since the UEIP changes to IP1-1 after module 1 reconnects, the redundant link protocol stack of the central gateway can no longer receive heartbeat keep-alive messages from IP1. At this time, the aging mechanism of the protocol stack controls the relationship maintenance module of the central gateway to delete the redundant link information of IP1. The relationship maintenance module updates Table 12 to Table 14. The difference between Table 14 and Table 12 is that Table 14 deletes "the later-assigned IP1 after module A-1 access". The link status table (Table 15) in the link status module is no different from Table 13. Thus, the automatic link recovery function after module reconnection is completed.
[0134] Table 14 Link Relationship Table
[0135]
[0136] Table 15 Link Status Table
[0137]
[0138] Scenario Example 3
[0139] In this scenario embodiment, as Figure 11 As shown, wireless gateway A has completed the power-on startup process. Wireless gateway A includes a FRER module and 4G / 5G communication modules A-1 and A-2. 4G / 5G communication modules A-1 and A-2 are connected to access points AP1-AP2 via wireless signals. APs convert wireless signals into wired signals and transmit them to the FRER module in the central gateway. Figure 11 AP1 is the access point for 4G / 5G communication module A-1, and AP2 is the access point for 4G / 5G communication module A-2. Each 4G / 5G communication module can also flexibly connect to any AP. In this scenario embodiment, the wireless gateway and the central gateway have completed the redundant link dynamic establishment process described in Scenario Embodiment 1. It is assumed that the wireless link where module A-2 is located is down due to a wireless link issue. This scenario embodiment will illustrate how to automatically control the module to reconnect (or restart) and re-establish the redundant link when the module's service is down.
[0140] This scenario illustrates how the two modules of the wireless gateway complete the dynamic establishment process of redundant links. The specific process is as follows:
[0141] In step S1101, modules A-1 and A-2 of wireless gateway A respectively execute steps S901-S906 in scenario embodiment one to complete the dynamic establishment process of two redundant links. After successfully establishing two redundant links, the relationship maintenance module updates and generates Table 16, which indicates that the central gateway maintains two redundant links for wireless gateway A, associated with IP1 assigned after module A-1 accesses and IP2 assigned after module A-2 accesses. The link status module updates and generates Table 17, which indicates that modules A-1 and A-2 of wireless gateway A have successfully established redundant links with the central gateway. That is, when modules A-1 and A-2 of wireless gateway A establish redundant links with the central gateway, the central gateway will also record the link relationship between IP1 of module A-1 and the tunnel, and the link relationship between IP2 of module A-2 and the tunnel in the link relationship table (Table 16). At the same time, wireless gateway A will record the redundant link status of modules A-1 and A-2 as established in the link status table (Table 17).
[0142] Table 16 Link Relationship Table
[0143]
[0144] Table 17 Link Status Table
[0145]
[0146] Step S1102: Suppose that the redundant link where module 2 is located experiences an anomaly, causing the uplink (or downlink) message link between the wireless gateway and the central gateway to be unreachable. Unlike Scenario Example 2, neither the wireless gateway nor the central gateway can detect the wireless link anomaly, so they cannot actively attempt link recovery. However, since the link failure will cause the Hello and Hello Ack heartbeat keep-alive messages of the link where module 2 is located to be lost, it will eventually trigger the keep-alive message failure of the central gateway and the wireless gateway to delete the redundant link information of the link where module 2 is located. At this time, the relationship maintenance module updates Table 16 to Table 18. The difference between Table 18 and Table 16 is that Table 18 deletes "the post-assigned IP2 of module A-2 access"; the link status module updates Table 17 to Table 19. The difference between Table 19 and Table 17 is that the redundant link status of module A-2 is updated from established to disconnected.
[0147] Table 18 Link Relationship Table
[0148] equipment Tunnel Information Redundant link relationship information Central Gateway Wireless Gateway A IP address 1 assigned after module A-1 is connected
[0149] Table 19 Link Status Table
[0150]
[0151] In step S1103, after the central gateway deletes the redundant link information of module A-2, it takes no further action. After deleting the redundant link of module 2, the wireless gateway's protocol stack will proactively initiate an Access Request process again to attempt to re-establish a link with the central gateway.
[0152] Step S1104, the chain establishment process initiated again will have two results:
[0153] If the wireless gateway initiates the Access Request process again and successfully establishes the link, the redundant link is successfully restored, and the process ends. At this time, the relationship maintenance module updates Table 18 to Table 20. The difference between Table 20 and Table 18 is that the redundant link relationship information of module A-2 is added, along with the IP address 2 assigned to module A-2 after its access. The link status module updates Table 19 to Table 21. The difference between Table 21 and Table 19 is that the redundant link status of module A-2 is updated from disconnected to established.
[0154] Table 20 Link Relationship Table
[0155]
[0156] Table 21 Link Status Table
[0157]
[0158] If the wireless gateway fails to restore the redundant link for an extended period, the redundant link monitoring module will trigger module A-2 to reconnect (or restart) through the module control module. After reconnection (or restart), the IP address of module A-2 will change to IP2-1. At this time, the wireless gateway will use IP2-1 to repeat step 4 until module A-2 completes the redundant link establishment process with the central gateway.
[0159] Industrial equipment has extremely high requirements for network transmission. To replace the original wired connection with a wireless gateway device, redundant transmission and reception of the wireless link must be implemented to improve network transmission stability. The technical effects achieved by dynamically establishing wireless redundant links in this application embodiment include: the wireless redundant link relationship of the central gateway is obtained through interaction with the wireless gateway, eliminating the need for manual configuration; after the wireless gateway detects that the module has automatic reconnection or manual restart, it actively initiates the link reconstruction process, and the central gateway can update the configuration information in real time; heartbeat messages can ensure that the module is actively controlled to reconnect / restart and initiate link reconstruction when a wireless link problem occurs, giving the redundant link a certain degree of self-healing capability; when using the dynamic establishment process described in this application embodiment, user-defined content can be added to the interaction messages to extend the FRER function, for example: a) adding an FRER prohibition list function to the Access Request message to inform the central gateway of the message characteristics that do not perform FRER function; b) adding a timestamp to the Hello / Hello Ack message to evaluate the transmission latency of the current link.
[0160] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0161] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0162] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0163] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0164] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0165] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular hardware and software combination.
[0166] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for establishing redundant links, characterized in that, include: Receive an access approval message and record the establishment status of the redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established; Based on the fault detection results of the redundant link, it is determined that the redundant link has been disconnected, and an access request message is sent to the central gateway, wherein the access request message is used to request the re-establishment of the redundant link.
2. The method according to claim 1, characterized in that, Before receiving the access approval message, the method further includes: The 4G / 5G communication module sends an access request message to the central gateway, wherein the access request message includes the Internet Protocol IP address of the 4G / 5G communication module and the characteristic information of the wireless gateway.
3. The method according to claim 2, characterized in that, The establishment status of the recorded redundant links includes: The device name column and redundant link status column in the redundant link status table are updated according to the name of the wireless gateway and the status of the redundant link. The device name column includes the name of the wireless gateway, and the redundant link status column includes whether the 4G / 5G communication module redundant link is established or disconnected.
4. The method according to claim 3, characterized in that, The step of determining that the redundant link has been broken based on the fault detection result of the redundant link includes: Send a heartbeat message to the central gateway; If no heartbeat confirmation message is received within a first preset time threshold, the wireless gateway confirms that the redundant link has been disconnected and updates the redundant link status table.
5. The method according to claim 3, characterized in that, The step of determining that the redundant link has been broken based on the fault detection result of the redundant link includes: The IP address of the 4G / 5G communication module is monitored. If the IP address changes, it is confirmed that the redundant link has been disconnected, and the status table of the redundant link is updated.
6. The method according to claim 1, characterized in that, After sending the access request message to the central gateway, the method further includes: If an access approval message is received within a second preset time threshold, the establishment status of the redundant link is recorded, wherein the access approval message is used to indicate that the redundant link has been successfully established. If the access approval message is not received within the second preset time threshold, the 4G / 5G communication module will be reconnected or restarted.
7. A method for establishing redundant links, characterized in that, include: Send an access approval message to the wireless gateway so that the wireless gateway records the establishment status of the redundant link, wherein the access approval message is used to indicate that the redundant link has been successfully established; The system receives an access request message sent by the wireless gateway, wherein the access request message is used to request the re-establishment of a redundant link.
8. The method according to claim 7, characterized in that, Before sending the access approval message to the wireless gateway, the method further includes: The system receives an access request message sent by the wireless gateway through the 4G / 5G communication module. The access request message includes the Internet Protocol (IP) address of the 4G / 5G communication module and the characteristic information of the wireless gateway, wherein the characteristic information includes the name of the wireless gateway.
9. The method according to claim 8, characterized in that, After sending the access approval message to the wireless gateway, the method further includes: The link relationship table is updated according to the access request message. The link relationship table includes a device name column, a tunnel information column, and a redundant link relationship information column. The device name column includes the name of the central gateway, the tunnel information column includes the name of the wireless gateway, and the redundant link relationship information column includes the IP address of the 4G / 5G communication module.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to any one of claims 7 to 9.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 6, or the steps of the method described in any one of claims 7 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 6, or the steps of the method described in any one of claims 7 to 9.
