A method, apparatus, device, medium and product for dynamic switching of dual links
By identifying the status of the AGV communication link and processing data packets, dynamic switching from the first link to the second link is realized, solving the problem of discontinuous data transmission in the existing technology and improving the reliability and efficiency of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE GRP GUANGDONG CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies cannot achieve dynamic and seamless data switching in AGV communication links, especially in high data traffic scenarios, and cannot guarantee the continuity and reliability of data transmission.
By identifying the status of the communication link, the status identification module determines that the first link is unavailable and the second link is available. When this happens, the data transmission is switched from the first link to the second link. During the switching process, the data packet is buffered by the signal processing unit, a UDP header is added, and the packet is sent to the internal logical node for processing. Finally, the data packet is sent to the target address.
It achieves data transmission continuity during link switching, improves data transmission reliability and efficiency, avoids data loss, and ensures a cost-effective data transmission solution.
Smart Images

Figure CN122227339A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method, apparatus, device, medium and product for dynamic switching of dual links. Background Technology
[0002] As key automated equipment in industrial manufacturing, especially in high-precision manufacturing, AGVs (Automated Guided Vehicles) place high demands on communication reliability during operation. In some AGV applications involving high data traffic, critical data requiring high real-time performance and reliability is often transmitted via 5G (5th Generation Mobile Communication Technology) networks to improve data transmission reliability; while lower-priority but high-traffic non-critical data is transmitted via Wi-Fi (Wireless Local Area Network) to reduce communication costs and alleviate the burden on the 5G link.
[0003] However, current technologies still primarily rely on independent transmission via 4G, 5G, or Wi-Fi, achieving link robustness mainly through link pooling and redundant data transmission. However, this approach cannot perform dynamic data switching or maintain data continuity. While a few existing technologies involve link switching, their link identification depends solely on signal quality, resulting in poor switching identification and an inability to achieve seamless data continuity. Summary of the Invention
[0004] To address the above technical issues, this application provides a method, apparatus, device, medium, and product for dynamic switching of dual links, which can realize dynamic data switching and improve the continuity of data transmission.
[0005] This application provides a dynamic switching method for dual links, including: Status identification is performed on the communication link; the communication link includes a first link and a second link; When the first link is unavailable and the second link is available, the data transmission of the first link is switched from the first link to the second link. During the link switching process, the signal processing unit corresponding to the first link performs buffering processing on the received first data packet; After the link switch is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, and sends the second data packet to a pre-allocated internal dedicated logical node. After receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
[0006] As an improvement to the above scheme, sending the first data packet to the target address according to the target address contained in the UDP packet header includes: If the target address is the address of the terminal device, based on the target address contained in the UDP header, the first data packet is sent to the terminal device through a preset first interface. If the target address is the address of the server, then the first data packet is sent to the server through a preset second interface.
[0007] As an improvement to the above solution, the state identification of the communication link includes: Obtain alarm information, network quality information, latency, and network congestion status corresponding to the communication link; Based on the alarm information, the network quality information, the latency, and the network congestion status, the state of the communication link is identified.
[0008] As an improvement to the above solution, the acquisition of alarm information, network quality information, latency, and network congestion status corresponding to the communication link includes: By sending query information to the communication module corresponding to the communication link, the alarm information and network quality information corresponding to the communication link can be obtained; A connection request is initiated to the server through the communication link, so that the server returns synchronization confirmation information after receiving the connection request; Upon receiving the synchronization confirmation information, the latency and network congestion status of the communication link are determined based on the synchronization confirmation information.
[0009] As an improvement to the above scheme, the step of determining the latency and network congestion of the communication link based on the synchronization confirmation information includes: The latency of the communication link is determined based on the synchronization confirmation information and the timestamp in the connection request; Obtain the window length information from several recently received synchronization confirmation messages, and determine the network congestion situation based on the changing trend of the window length information.
[0010] As an improvement to the above solution, the step of identifying the state of the communication link based on the alarm information, the network quality information, the latency, and the network congestion status includes: Determine whether the alarm information is an alarm that affects the use of the link; if so, determine that the communication link is in an unavailable state. If not, then in the order of the network quality information, the latency, and the network congestion status, determine whether the network quality information, the latency, or the network congestion status are within the corresponding preset threshold range. If the network quality information, the latency, or the network congestion is outside the corresponding preset threshold range, then the communication link is determined to be in an unavailable state. If the network quality information, the latency, and the network congestion are all within the corresponding preset threshold ranges, then the communication link is determined to be in an available state.
[0011] As an improvement to the above solution, the step of switching the data transmission of the first link from the first link to the second link includes: A handover request is sent to the signal processing unit corresponding to the first link, so that the signal processing unit returns response information after receiving the handover request; Upon receiving the response information, the interface address for data transmission in the routing table is changed from the interface address corresponding to the first link to the interface address corresponding to the second link, so as to switch from the first link to the second link.
[0012] This application also provides a dual-link dynamic switching device, comprising: A status identification module is used to identify the status of the communication link; the communication link includes a first link and a second link. The link switching module is used to switch the data transmission of the first link from the first link to the second link when the first link is unavailable and the second link is available. The data caching module is used to cache the first data packet received by the signal processing unit corresponding to the first link during the link switching process. The data transmission module is used so that, after the link switch is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, and sends the second data packet to a pre-allocated internal dedicated logical node; after receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
[0013] This application also provides a computer device, including a processor and a memory, wherein the memory stores a computer program and the computer program is configured to be executed by the processor, wherein the processor, when executing the computer program, implements the dual-link dynamic switching method described in any of the preceding claims.
[0014] This application also provides a computer-readable storage medium storing a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the dual-link dynamic switching method described above.
[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the dynamic switching method for dual links as described in any of the above claims.
[0016] Compared to existing technologies, the beneficial effects of the dual-link dynamic switching method, apparatus, device, medium, and product provided in this application are as follows: By identifying the status of the communication links, when the first link is unavailable and the second link is available, the data transmission of the first link is switched from the first link to the second link; during the link switching process, the signal processing unit corresponding to the first link buffers the received first data packet; after the link switching is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, which is then sent to a pre-allocated internal dedicated logical node; after receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header, thus ensuring the continuity of data transmission during the communication link switching process and effectively improving the reliability and efficiency of data transmission. Furthermore, by establishing an internal dedicated logical node to independently operate the switching process data, data loss is avoided, further improving reliability. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a dynamic switching method for dual links provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a gateway device provided in an embodiment of this application; Figure 3 This is a schematic diagram of a dual-network structure provided in an embodiment of this application; Figure 4 This is a schematic diagram of a link switching process provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a dual-link dynamic switching device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0019] Please see Figure 1 , Figure 1 This is a flowchart illustrating a dynamic switching method for dual links provided in an embodiment of this application. The dynamic switching method for dual links includes: S1: Perform status identification on the communication link; the communication link includes a first link and a second link; S2: When the first link is unavailable and the second link is available, switch the data transmission of the first link from the first link to the second link; S3: During the link switching process, the signal processing unit corresponding to the first link performs buffering processing on the received first data packet; S4: After the link switch is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, and sends the second data packet to a pre-allocated internal dedicated logical node; after receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
[0020] Specifically, the embodiments of this application apply to gateway devices, which are computer systems or devices used for data conversion between different networks to ensure smooth communication between them. The structure of a gateway device is as follows: Figure 2As shown, the interface unit is used to complete information exchange between the gateway device and external devices, ensuring effective data communication and interaction between different devices; the network unit is used to maintain and manage internal routing, process network data, and maintain internal dedicated logical nodes; the 5G processing unit is used to exchange information with external 5G communication modules, handle handover control processes, and process data related to the handover process; the WIFI processing unit is used to exchange information with external WIFI communication modules, handle handover control processes, and process data related to the handover process. Specifically, the terminal device communicates with the server through the gateway device. For the gateway device, its network unit communicates with external terminal devices through the interface unit, communicates with the external server via the 5G processing unit through 5G mobile network communication, and communicates with the external server via WIFI network communication through the WIFI processing unit.
[0021] This application specifically applies to dual-networked AGVs (Automated Guided Vehicles), such as... Figure 3 As shown, the dual-network configuration includes AGV terminal equipment, gateway equipment, 5G communication module, mobile communication network, WIFI communication module, WIFI network, AGV control system server, and other units.
[0022] The AGV terminal equipment includes the AGV vehicle and the AGV networking equipment. The AGV control system server, which is the server for the AGV vehicle and the AGV networking equipment, is used for remote management of the AGV vehicle and the AGV networking equipment.
[0023] The network elements for a 5G link include: AGV terminal equipment, gateway equipment, 5G communication modules, mobile communication networks, and AGV control system servers. The 5G communication modules are used to enable 5G access and air interface data exchange. The mobile communication network, or 5G mobile network, is a communication network composed of 5G base stations, 5G core networks, and other network elements, providing access for 5G terminals and related services.
[0024] The networking elements for a Wi-Fi link include: AGV terminal equipment, gateway equipment, Wi-Fi communication modules, Wi-Fi network, and AGV control system server. The Wi-Fi communication module enables Wi-Fi access and air interface data exchange. The Wi-Fi network, composed of devices such as APs (Access Points) and ACs (Access Controllers), provides Wi-Fi terminal access and related services.
[0025] In step S1, the network unit of the gateway device performs status identification on the communication link to detect whether the communication link is available. The communication link includes a first link and a second link, specifically a 5G link or a WIFI link. The status identification of the communication link can be achieved by detecting signal strength, uplink and downlink rates, transmission latency, or sending heartbeat packets. If the set monitoring indicators exceed the preset threshold range, the link is determined to be unavailable; otherwise, the link is determined to be available.
[0026] In step S2, based on the status detection results of the first and second links, if the first link is unavailable while the second link is available, the data transmission corresponding to the first link is switched to the second link to ensure the reliability of data transmission on the first link. In this embodiment, the communication network before the link switch can be: all data is transmitted through the first link, and when the first link is abnormal, the transmission network is switched from the first link to the second link; or, both the first and second links are responsible for part of the data transmission, and when the first link is abnormal, in order to ensure the reliability of the data transmission corresponding to the first link, the data transmission handled by the first link is switched to the second link in a timely manner.
[0027] For example, the first link is a 5G link and the second link is a WIFI link. The data transmitted by the 5G link is high-priority data. In order to maintain the reliability and stability of its data transmission, when it is detected that the 5G link is unavailable and the WIFI link is available, the data transmitted by the 5G link is switched to the WIFI link for transmission, so as to ensure the reliability of the 5G link data transmission.
[0028] Furthermore, when switching from the first link to the second link, data transmission remains normal before and after the switch, ensuring the effectiveness of the transmission process. During and after the switch, the data processing unit corresponding to the first link may receive uplink and downlink data packets. In this case, for the data during the switch control process, the data processing unit corresponding to the first link buffers the first uplink and downlink data packets received by the network unit during the link switch, so that the buffered first data packets can be forwarded to the target address after the switch is completed. Each communication link corresponds to a data processing unit; for example, a 5G link corresponds to a 5G processing unit, and a WIFI link corresponds to a WIFI processing unit.
[0029] After the link switch is completed, uplink data from the terminal device is forwarded by the network unit to the data processing unit corresponding to the second link, and then sent to the target server through the communication module corresponding to the second link. The switched data no longer passes through the data processing unit and communication module corresponding to the first link.
[0030] Furthermore, due to potential network jitter and latency, the communication module corresponding to the first link may still receive data after the switch. However, the original node resources and routing information change after the switch, and the data may not be processed normally. To ensure reliable processing of this data, this embodiment employs an internal dedicated logical node for special handling. Therefore, to ensure the continuity of data transmission, an internal dedicated logical node is pre-configured in the network unit and activated during link switching.
[0031] Furthermore, due to the differences in data protocols between 5G communication modules, WIFI communication modules, and AGV equipment terminals, using the UDP protocol for transmission offers better compatibility and timeliness. Therefore, the network equipment's internal transmission protocol uses the UDP protocol. The signal processing unit corresponding to the first link processes the buffered first data packet, first encapsulating it into a UPD (User Datagram Protocol) data packet, and then adding a header containing the destination address to the UPD data packet to obtain the second data packet. Subsequently, after the link switch is completed, the signal processing unit sends the second data packet with the added UDP header to a pre-allocated internal dedicated logical node. Upon receiving the second data packet, the internal dedicated logical node removes the UDP header of the second data packet and parses it to obtain the first data packet and the destination address in the UDP header, and then sends the buffered first data packet to the corresponding destination address based on the destination address. Through the above steps, data is successfully switched from the first link to the second link, thereby ensuring the continuity of data transmission.
[0032] This application embodiment ensures the continuity of data transmission during dynamic link switching by caching data packets during the link switching process and transmitting data through an internal dedicated logical node and adding a UPD header after the switching is completed.
[0033] As one optional embodiment, sending the first data packet to the target address according to the target address contained in the UDP header includes: If the target address is the address of the terminal device, based on the target address contained in the UDP header, the first data packet is sent to the terminal device through a preset first interface. If the target address is the address of the server, then the first data packet is sent to the server through a preset second interface.
[0034] Specifically, taking a 5G link as the first link and a WIFI link as the second link as an example: For the uplink 5G link data stream, it is initiated by the AGV terminal device, enters the interface unit and network unit through interface 1, and then is sent from interface 2 of the network unit to the 5G processing unit. The 5G processing unit performs data conversion and then sends the data to the 5G communication module; the downlink data stream is the reverse. For the uplink WIFI link data stream, it is initiated by the AGV terminal device, enters the interface unit and network unit through interface 1, and then is sent from interface 3 of the network unit to the WIFI processing unit. The WIFI processing unit performs data conversion and then sends the data to the WIFI communication module; the downlink data stream is the reverse.
[0035] During the handover process, the 5G processing unit buffers the uplink and downlink data packets it receives. After the handover is complete, the 5G processing unit processes the buffered data packets, adds a UDP header, and sends it to the internal dedicated logical node. Upon receiving the data from the 5G processing unit, the internal dedicated logical node of the network unit removes the UDP header to analyze the source and destination addresses of the data packets. If the destination address is the IP address of the AGV terminal device, the buffered data packets are sent to the AGV terminal device via interface 1; if the destination address is the IP address of the AGV control system server, the data packets are forwarded to the AGV control system server by the WIFI processing unit via interface 3.
[0036] As one optional embodiment, switching the data transmission of the first link from the first link to the second link includes: A handover request is sent to the signal processing unit corresponding to the first link, so that the signal processing unit returns response information after receiving the handover request; Upon receiving the response information, the interface address for data transmission in the routing table is changed from the interface address corresponding to the first link to the interface address corresponding to the second link, so as to switch from the first link to the second link.
[0037] Specifically, taking an example where the first link is a 5G link and the second link is a Wi-Fi link. Please refer to [link / reference]. Figure 4The link handover process is as follows: The network unit sends a handover request message to the 5G processing unit, carrying the IP address and port of the internal dedicated logical node. The 5G processing unit receives and processes the handover request message, then returns a handover request response message to the network unit, carrying the IP address and port of the 5G processing unit. After receiving the handover request response message, the network unit updates its IP routing table: changing the next-hop address of the uplink IP route for the 5G link from the IP address of the original 5G link interface 2 to the IP address of the WIFI link interface 3. Then, the network unit sends a handover result message to the 5G processing unit, carrying the result information. At this point, the network unit completes the link handover between the 5G link and the WIFI link.
[0038] As one optional embodiment, the state identification of the communication link includes: Obtain alarm information, network quality information, latency, and network congestion status corresponding to the communication link; Based on the alarm information, the network quality information, the latency, and the network congestion status, the state of the communication link is identified.
[0039] Specifically, alarm information refers to signals issued by network devices or management systems indicating abnormalities or faults, including but not limited to alarm information related to link status. By acquiring alarm information and determining whether it affects the use of the communication link, the status of the corresponding communication link can be identified.
[0040] Network quality information is a key performance indicator for measuring link health. This information includes, but is not limited to, RSRP (Reference Signal Received Power), RSRQ (Reference Signal Received Quality), and SINR (Signal to Interference plus Noise Ratio). Corresponding thresholds are pre-defined for each type of network quality information. By acquiring various network quality information and comparing it with these thresholds, the state of the communication link is identified.
[0041] Latency is the time it takes for a data packet to travel from its source to its destination address. Higher latency indicates a weaker communication link. The availability of a communication link can be determined by monitoring whether the latency exceeds a preset threshold.
[0042] Network congestion occurs when the incoming traffic to a network link or device exceeds its processing capacity, leading to queue growth, packet loss, and increased latency. Specific metrics can be chosen to characterize network congestion, such as round-trip time, packet loss rate, and bandwidth utilization. By comparing network congestion data with preset thresholds, the current state of the communication link can be identified.
[0043] By analyzing and processing the acquired alarm information, network quality information, latency, and network congestion, it can identify whether the 5G link and the WIFI link are available. In order to switch the unavailable communication link to the available communication link when one communication link is unavailable and the other is available.
[0044] Existing link status identification technologies typically rely on quality signals or Ping (network diagnostic tools) as the basis for judgment, but this method has low accuracy. For example, even when the quality signal is normal, data transmission may be abnormal; and Ping packets belong to the ICMP (Internet Control Message Protocol) protocol data, making it inaccurate to use them to determine TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) application layer data. Furthermore, Ping packets cannot be used to determine congestion conditions. To address this, this application's embodiments obtain alarm information, network quality information, latency, and network congestion status corresponding to the communication link, and then identify the communication link status accordingly, effectively improving the accuracy and timeliness of link status identification.
[0045] As one optional embodiment, obtaining alarm information, network quality information, latency, and network congestion status corresponding to the communication link includes: By sending query information to the communication module corresponding to the communication link, the alarm information and network quality information corresponding to the communication link can be obtained; A connection request is initiated to the server through the communication link, so that the server returns synchronization confirmation information after receiving the connection request; Upon receiving the synchronization confirmation information, the latency and network congestion status of the communication link are determined based on the synchronization confirmation information.
[0046] Specifically, in order to obtain relevant information about the communication link in a timely manner, this application embodiment uses AT commands (i.e., executing commands / scripts at specified times) to directly operate the communication module.
[0047] The status identification process for both communication links is the same. Taking the 5G link as an example, the gateway device sends a query message to the 5G communication module via AT commands to obtain the alarm information and network quality information corresponding to the 5G link. After receiving the query message, the 5G communication module returns the alarm information and network quality information of the 5G link to the gateway device.
[0048] Furthermore, when the network is abnormal, especially when network congestion occurs, relying on the conventional Ping method to obtain latency to determine the link status is lagging and its timeliness cannot meet the requirements of high-reliability transmission. This application's embodiment employs a TCP handshake mechanism, analyzing and processing handshake steps 1 and 2 to further improve the timeliness of 5G link status identification. The TCP handshake steps are as follows: Step 1: The gateway device initiates a TCP SYN (connection request) to the AGV control system server. This message carries timestamp information. Step 2: After receiving the TCP SYN, the AGV control system server replies to the gateway device with TCP SYN+ACK (i.e., synchronization confirmation information). This message carries timestamp information and window length information.
[0049] Furthermore, based on the timestamp information and window length information carried in the synchronization confirmation information, the delay and congestion coefficient are calculated, and the congestion coefficient is used to characterize the network congestion situation.
[0050] As one optional embodiment, determining the latency and network congestion status of the communication link based on the synchronization confirmation information includes: The latency of the communication link is determined based on the synchronization confirmation information and the timestamp in the connection request; Obtain the window length information from several recently received synchronization confirmation messages, and determine the network congestion situation based on the changing trend of the window length information.
[0051] Specifically, when the gateway device initiates a connection request to the AGV control system server, a timer is started to record the timestamp T1 of the connection request. When the gateway device receives the synchronization confirmation information returned by the AGV control system server, it records the timestamp T2 of the synchronization confirmation information and stops the timer. The delay is then calculated based on the difference between T2 and T1.
[0052] When the gateway device receives the synchronization confirmation information returned by the AGV control system server, it records the window length information in the synchronization confirmation information, and calculates the average window length based on the window length information of the N most recently received synchronization confirmation information. Based on the average window length, it analyzes the changing trend of the window length of the N most recently received synchronization confirmation information, thereby generating a congestion coefficient, and then uses this indicator to determine the network congestion situation.
[0053] As one optional embodiment, the step of identifying the state of the communication link based on the alarm information, the network quality information, the latency, and the network congestion status includes: Determine whether the alarm information is an alarm that affects the use of the link; if so, determine that the communication link is in an unavailable state. If not, then in the order of the network quality information, the latency, and the network congestion status, determine whether the network quality information, the latency, or the network congestion status are within the corresponding preset threshold range. If the network quality information, the latency, or the network congestion is outside the corresponding preset threshold range, then the communication link is determined to be in an unavailable state. If the network quality information, the latency, and the network congestion are all within the corresponding preset threshold ranges, then the communication link is determined to be in an available state.
[0054] Specifically, the gateway device collects alarm information, network quality information, latency, and network congestion status of each communication link over a period of time to make a comprehensive judgment on the link status. In this embodiment, based on timeliness and impact, the link status is judged sequentially in the order of alarm information, network quality information, latency, and network congestion status.
[0055] The acquired alarm information includes alarms that affect the use of communication links and alarms that do not affect the use of communication links. First, it is determined whether the alarm information is an alarm that seriously affects the use of the link. If so, the corresponding communication link is determined to be unavailable. If the alarm information is not an alarm that seriously affects the use of the link, network quality information is further checked. It is determined whether each performance indicator corresponding to the network quality information exceeds the set threshold range. If so, the current communication link is determined to be unavailable. Otherwise, it is determined whether the latency is greater than a preset threshold. If the latency is greater than the preset threshold, the communication link is determined to be unavailable. If the latency is not greater than the preset threshold, it is determined whether the network congestion exceeds the set threshold range. Specifically, it is determined whether the congestion coefficient is greater than the preset threshold. If so, the communication link is determined to be unavailable. Otherwise, the communication link is determined to be available.
[0056] In some AGV application scenarios with high data traffic, using 5G alone to replace Wi-Fi can lead to excessively high 5G data costs, exceeding the budget. Therefore, this application adopts a dual-network scheme to solve the above problems. High-performance data is transmitted via the 5G link, prioritizing data transmission reliability; large-volume, low-value data is transmitted via the Wi-Fi link to reduce costs. Furthermore, the status of the 5G and Wi-Fi links is identified. When the 5G link is identified as unavailable and the Wi-Fi link is available, link switching is performed to ensure the reliability of data transmitted via the 5G link. To address the continuity issue during link switching, this application adds a UPD header, allocates internal dedicated logical nodes to process data, and caches received data packets during link switching before forwarding them to the target address after the switch is complete, ensuring data transmission continuity. Furthermore, this application also improves the accuracy and timeliness of link status identification by using alarm information, network quality information, latency, and network congestion conditions for link status identification.
[0057] Accordingly, this application also provides a dual-link dynamic switching device, which can implement all the processes of the dual-link dynamic switching method in the above embodiments.
[0058] Please see Figure 5 , Figure 5 This is a schematic diagram of a dual-link dynamic switching device provided in an embodiment of this application. The dual-link dynamic switching device includes: The status identification module 501 is used to identify the status of the communication link; the communication link includes a first link and a second link. The link switching module 502 is used to switch the data transmission of the first link from the first link to the second link when the first link is unavailable and the second link is available. The data caching module 503 is used to cache the first data packet received by the signal processing unit corresponding to the first link during the link switching process. The data transmission module 504 is used to, after the link switching is completed, add a User Datagram Protocol (UDP) header to the cached first data packet by the signal processing unit to obtain a second data packet, and send the second data packet to a pre-allocated internal dedicated logical node; after receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
[0059] Preferably, sending the first data packet to the target address according to the target address contained in the UDP header includes: If the target address is the address of the terminal device, based on the target address contained in the UDP header, the first data packet is sent to the terminal device through a preset first interface. If the target address is the address of the server, then the first data packet is sent to the server through a preset second interface.
[0060] Preferably, the state identification of the communication link includes: Obtain alarm information, network quality information, latency, and network congestion status corresponding to the communication link; Based on the alarm information, the network quality information, the latency, and the network congestion status, the state of the communication link is identified.
[0061] Preferably, the acquisition of alarm information, network quality information, latency, and network congestion status corresponding to the communication link includes: By sending query information to the communication module corresponding to the communication link, the alarm information and network quality information corresponding to the communication link can be obtained; A connection request is initiated to the server through the communication link, so that the server returns synchronization confirmation information after receiving the connection request; Upon receiving the synchronization confirmation information, the latency and network congestion status of the communication link are determined based on the synchronization confirmation information.
[0062] Preferably, determining the latency and network congestion status of the communication link based on the synchronization confirmation information includes: The latency of the communication link is determined based on the synchronization confirmation information and the timestamp in the connection request; Obtain the window length information from several recently received synchronization confirmation messages, and determine the network congestion situation based on the changing trend of the window length information.
[0063] Preferably, the step of identifying the state of the communication link based on the alarm information, the network quality information, the latency, and the network congestion status includes: Determine whether the alarm information is an alarm that affects the use of the link; if so, determine that the communication link is in an unavailable state. If not, then in the order of the network quality information, the latency, and the network congestion status, determine whether the network quality information, the latency, or the network congestion status are within the corresponding preset threshold range. If the network quality information, the latency, or the network congestion is outside the corresponding preset threshold range, then the communication link is determined to be in an unavailable state. If the network quality information, the latency, and the network congestion are all within the corresponding preset threshold ranges, then the communication link is determined to be in an available state.
[0064] Preferably, switching the data transmission of the first link from the first link to the second link includes: A handover request is sent to the signal processing unit corresponding to the first link, so that the signal processing unit returns response information after receiving the handover request; Upon receiving the response information, the interface address for data transmission in the routing table is changed from the interface address corresponding to the first link to the interface address corresponding to the second link, so as to switch from the first link to the second link.
[0065] In specific implementation, the working principle, control process and technical effects of the dual-link dynamic switching device provided in this application are the same as those of the dual-link dynamic switching method in the above embodiments, and will not be repeated here.
[0066] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes: a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program, it implements the steps in the above-described dual-link dynamic switching method embodiment. Alternatively, when the processor 601 executes the computer program, it implements the functions of each module / unit in the above-described device embodiments.
[0067] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 602 and executed by the processor 601 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.
[0068] The computer device may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will understand that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.
[0069] The processor 601 can be a Central Processing Unit (CPU), or 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 can be a microprocessor or any conventional processor. The processor 601 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines.
[0070] The memory 602 can be used to store the computer programs and / or modules. The processor 601 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 602 and calling the data stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0071] Wherein, if the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 601, 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.
[0072] This application also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the dual-link dynamic switching method described in any of the above embodiments.
[0073] This application also provides a computer program product, including a computer program / instruction, which, when executed by the computer program / instruction processor, implements the dynamic switching method for dual links described in any of the above embodiments.
[0074] The methods in this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in this application are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, core network equipment, or other programmable devices.
[0075] The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; or an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0076] The computer programs / instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer-readable program instructions from the network and forwards those instructions to computer-readable storage media within the respective computing / processing device.
[0077] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages and conventional procedural programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing the status information of the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0078] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0079] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0080] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0081] Each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0082] This application provides a dynamic switching method, apparatus, device, medium, and product for dual links. Its advantages include: by identifying the state of the communication links, when the first link is unavailable and the second link is available, the data transmission of the first link is switched to the second link; during the link switching process, the signal processing unit corresponding to the first link buffers the received first data packet; after the link switching is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, which is then sent to a pre-allocated internal dedicated logical node; upon receiving the second data packet, the logical node removes the UDP header to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header. This ensures the continuity of data transmission during the communication link switching process, effectively improving the reliability and efficiency of data transmission. Furthermore, by establishing an internal dedicated logical node to independently operate the switching process data, data loss is avoided, further improving reliability.
[0083] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.
Claims
1. A dynamic switching method for dual links, characterized in that, include: Status identification is performed on the communication link; the communication link includes a first link and a second link; When the first link is unavailable and the second link is available, the data transmission of the first link is switched from the first link to the second link. During the link switching process, the signal processing unit corresponding to the first link performs buffering processing on the received first data packet; After the link switch is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, and sends the second data packet to a pre-allocated internal dedicated logical node. After receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
2. The dynamic switching method for dual links as described in claim 1, characterized in that, Sending the first data packet to the target address according to the target address contained in the UDP header includes: If the target address is the address of the terminal device, based on the target address contained in the UDP header, the first data packet is sent to the terminal device through a preset first interface. If the target address is the address of the server, then the first data packet is sent to the server through a preset second interface.
3. The dynamic switching method for dual links as described in claim 1, characterized in that, The status identification of the communication link includes: Obtain alarm information, network quality information, latency, and network congestion status corresponding to the communication link; Based on the alarm information, the network quality information, the latency, and the network congestion status, the state of the communication link is identified.
4. The dynamic switching method for dual links as described in claim 3, characterized in that, The acquisition of alarm information, network quality information, latency, and network congestion status corresponding to the communication link includes: By sending query information to the communication module corresponding to the communication link, the alarm information and network quality information corresponding to the communication link can be obtained; A connection request is initiated to the server through the communication link, so that the server returns synchronization confirmation information after receiving the connection request; Upon receiving the synchronization confirmation information, the latency and network congestion status of the communication link are determined based on the synchronization confirmation information.
5. The dynamic switching method for dual links as described in claim 4, characterized in that, The step of determining the latency and network congestion status of the communication link based on the synchronization confirmation information includes: The latency of the communication link is determined based on the synchronization confirmation information and the timestamp in the connection request; Obtain the window length information from several recently received synchronization confirmation messages, and determine the network congestion situation based on the changing trend of the window length information.
6. The dynamic switching method for dual links as described in claim 3, characterized in that, The step of identifying the state of the communication link based on the alarm information, the network quality information, the latency, and the network congestion status includes: Determine whether the alarm information is an alarm that affects the use of the link; if so, determine that the communication link is in an unavailable state. If not, then in the order of the network quality information, the latency, and the network congestion status, determine whether the network quality information, the latency, or the network congestion status are within the corresponding preset threshold range. If the network quality information, the latency, or the network congestion is outside the corresponding preset threshold range, then the communication link is determined to be in an unavailable state. If the network quality information, the latency, and the network congestion are all within the corresponding preset threshold ranges, then the communication link is determined to be in an available state.
7. The dynamic switching method for dual links as described in claim 1, characterized in that, The step of switching data transmission from the first link to the second link includes: A handover request is sent to the signal processing unit corresponding to the first link, so that the signal processing unit returns response information after receiving the handover request; Upon receiving the response information, the interface address for data transmission in the routing table is changed from the interface address corresponding to the first link to the interface address corresponding to the second link, so as to switch from the first link to the second link.
8. A dynamic switching device for dual links, characterized in that, include: A status identification module is used to identify the status of the communication link; the communication link includes a first link and a second link. The link switching module is used to switch the data transmission of the first link from the first link to the second link when the first link is unavailable and the second link is available. The data caching module is used to cache the first data packet received by the signal processing unit corresponding to the first link during the link switching process. The data transmission module is used so that, after the link switch is completed, the signal processing unit adds a User Datagram Protocol (UDP) header to the buffered first data packet to obtain a second data packet, and sends the second data packet to a pre-allocated internal dedicated logical node; after receiving the second data packet, the logical node removes the UDP header of the second data packet to obtain the first data packet, and sends the first data packet to the target address according to the target address contained in the UDP header.
9. A computer device, characterized in that, The device includes a processor and a memory, the memory storing a computer program configured to be executed by the processor, wherein the processor, when executing the computer program, implements the dual-link dynamic switching method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the dynamic switching method for dual links as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the dynamic switching method for dual links as described in any one of claims 1 to 7.