Link switching method and device
By determining multiple links to be switched in the UAV communication system and selecting the target link for switching based on indicators such as signal strength, frame error rate, latency and bandwidth, the signal interruption problem of traditional UAV communication systems in complex environments is solved, and highly reliable and efficient data transmission is achieved to adapt to mission requirements in complex environments.
Patent Information
- Application Number
- CN202511091626.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-10-03
AI Technical Summary
Traditional drone communication systems are susceptible to terrain obstruction, electromagnetic interference and severe weather in complex environments, resulting in signal attenuation, delay and even interruption. They are unable to meet the high-bandwidth and low-latency requirements of high-definition video streaming and multi-sensor fusion. The existing dual-link solution lacks an intelligent switching mechanism, making it difficult to ensure continuous and stable communication for tasks such as large-scale remote sensing dynamic monitoring and disaster relief.
By determining multiple links to be switched, it is determined whether the current link meets the switching conditions. If the conditions are met, the target link is selected from the multiple links to be switched for switching. The link quality is calculated using indicators such as signal strength, frame error rate, latency and bandwidth. The best link is selected for switching based on the task type and priority decision tree.
It improves the stability and adaptability of drone communications, ensures highly reliable and efficient data transmission in complex environments, and meets the needs of high-definition video streaming and multi-sensor fusion.
Smart Images

Figure CN120751453A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of link switching, and in particular to a link switching method and device. Background Art
[0002] Traditional drones rely on single-band communications and are susceptible to terrain obstruction, electromagnetic interference, and severe weather in complex environments, resulting in signal attenuation, delay, and even interruption. Fixed links are unable to dynamically adapt to changing scenarios such as urban canyons and forests. This is especially true when faced with the high-bandwidth, low-latency demands of high-definition video streaming and multi-sensor fusion.
[0003] The existing dual-link solution only has redundant backup and lacks an intelligent switching mechanism, making it difficult to ensure continuous and stable communication for tasks such as large-scale remote sensing dynamic monitoring and disaster relief. It is urgent to break through radio limitations through multi-link fusion and adaptive switching technology to achieve highly reliable and efficient data transmission in complex environments. Summary of the Invention
[0004] The object of the present invention is to provide a link switching method and device, which can improve communication stability.
[0005] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows: In a first aspect, an embodiment of the present application provides a link switching method, the method comprising: Determining multiple links to be switched; Determine whether the current link meets the switching conditions; When the current link meets the switching condition, determining a target link from multiple links to be switched; The current link is switched to the target link.
[0006] In an optional implementation, the step of determining whether the current link meets the switching condition includes: Determining the signal strength, frame error rate, delay, and bandwidth of the current link; Calculating a first link quality of the current link based on the signal strength, frame error rate, delay, and bandwidth; comparing the first link quality with a preset quality; When the first link quality of the current link is less than the preset quality, it is determined that the current link meets the switching condition.
[0007] In an optional implementation, the step of determining whether the current link meets the switching condition includes: Determining the second link quality of each of the links to be switched; Calculating a difference between the second link quality and the first link quality; comparing the difference with a preset threshold; When the difference is greater than or equal to the preset threshold, it is determined that the current link meets the switching condition.
[0008] In an optional implementation manner, when the current link meets the switching condition, the step of determining a target link from multiple links to be switched includes: When the current link meets the switching condition, determining the current task type; Determine a first priority decision tree corresponding to the task type, wherein the first priority decision tree indicates a priority ranking of each of the links to be switched; A link to be switched with a first priority is obtained from the first priority decision tree as a target link.
[0009] In an optional implementation manner, when the current link meets the switching condition, the step of determining a target link from multiple links to be switched includes: When the current link meets the switching condition, determining the maximum second link quality from the second link qualities; The link to be switched corresponding to the maximum second link quality is used as the target link.
[0010] In an optional embodiment, the method further comprises: Acquiring link data of each link to be switched; For each of the links to be switched, acquiring a plurality of sub-data of the link to be switched based on a sliding window; Determine the signal strength mean, frame error rate mean, delay mean, and bandwidth mean in each of the sub-data; For each sub-data, calculating the link quality of the sub-data based on the average signal strength, average frame error rate, average delay, and average bandwidth of the sub-data; The signal strength mean, frame error rate mean, delay mean, bandwidth mean and corresponding link quality in each sub-data are used as training data; The link quality determination model is trained based on the training data to obtain a trained link quality determination model.
[0011] In an optional implementation manner, when the current link meets the switching condition, the step of determining a target link from multiple links to be switched includes: When the current link meets the switching condition, determining the third link quality of each of the links to be switched based on the trained link determination model; Determining a maximum third link quality from the third link qualities; The link to be switched corresponding to the maximum third link quality is used as the target link.
[0012] In an optional implementation manner, when the current link meets the switching condition, the step of determining a target link from multiple links to be switched includes: When the current link meets the switching condition, determining the current task type; determining a second priority decision tree corresponding to the task type; Obtaining a link to be switched that does not meet preset requirements from the second priority decision tree; Deleting the to-be-switched links that do not meet the preset requirements from the second priority decision tree to obtain a third priority decision tree; Acquire each first link to be switched from the third priority decision tree; determining a fourth link quality of each of the first links to be switched; determining a maximum fourth link quality from the fourth link qualities; The first link to be switched corresponding to the largest fourth link quality is used as the target link.
[0013] In an optional implementation manner, when the current link meets the switching condition, the step of determining a target link from multiple links to be switched includes: When the current link meets the switching condition, determining the current task type; determining a fourth priority decision tree corresponding to the task type; Obtaining a to-be-switched link of a first priority from the fourth priority decision tree; Calculating a fifth link quality of the link to be switched of the first priority in the fourth priority decision tree; When the quality of the fifth link is greater than or equal to the preset quality, taking the link to be switched of the first priority in the fourth priority decision tree as the target link; When the fifth link quality is less than the preset quality, the link to be switched with the second priority in the fourth priority decision tree is selected as the target link.
[0014] In a second aspect, an embodiment of the present application provides a link switching device, the device comprising: A determination module is used to determine multiple links to be switched; and determine whether the current link meets the switching conditions; When the current link meets the switching condition, determining a target link from multiple links to be switched; The switching module is configured to switch the current link to the target link.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the link switching method when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the link switching method when executed by a processor.
[0017] This application has the following beneficial effects: The present application determines multiple links to be switched, determines whether the current link meets the switching conditions, and when the current link meets the switching conditions, determines the target link from the multiple links to be switched and switches the current link to the target link, thereby improving the stability of device communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention; Figure 2 One of the flowcharts of a link switching method provided in an embodiment of the present invention; Figure 3 A second flowchart of a link switching method provided by an embodiment of the present invention; Figure 4 A third flowchart of a link switching method provided by an embodiment of the present invention; Figure 5 A fourth flowchart of a link switching method provided by an embodiment of the present invention; Figure 6 A fifth flowchart of a link switching method provided by an embodiment of the present invention; Figure 7 A sixth flowchart of a link switching method provided by an embodiment of the present invention; Figure 8 Schematic diagram of a link switching method according to an embodiment of the present invention; Figure 9 A tenth flowchart of a link switching method provided by an embodiment of the present invention; Figure 10This is a structural block diagram of a link switching device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0023] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, or is the orientation or position relationship in which the product of the invention is usually placed when in use. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.
[0024] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.
[0025] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0026] After extensive research, the inventors discovered that the widespread application of drone technology in various fields, such as large-scale, high-frequency remote sensing and dynamic monitoring missions, has placed higher demands on the stability and efficiency of drone communication systems. Traditional drone communication systems mostly rely on a single radio link. In complex environments, signals are easily affected by factors such as terrain, buildings, and electromagnetic interference, leading to communication interruptions, signal attenuation, or delays, and failing to provide stable and efficient information support for drones. For example, in complex terrain areas such as mountainous areas, the communication signal between the drone and the ground station may be blocked by peaks, weakening or even interrupted. In urban environments, dense buildings and complex electromagnetic environments can also severely interfere with the transmission of drone communication signals. Although some existing technologies have attempted to adopt dual-link or multi-link communication, they suffer from problems such as unintelligent link switching and inability to fully adapt to complex environments, making them difficult to meet the requirements of drone missions in complex environments.
[0027] In view of the discovery of the above-mentioned problems, this embodiment provides a link switching method and device that can determine whether the current link meets the switching conditions by determining multiple links to be switched. When the current link meets the switching conditions, the target link is determined from the multiple links to be switched, and the current link is switched to the target link, which can improve the stability of device communication. The solution provided in this embodiment is explained in detail below.
[0028] This embodiment provides an electronic device capable of switching a link. In one possible implementation, the electronic device may be a user terminal, such as, but not limited to, a server, a smartphone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile internet device (MID), and a drone.
[0029] Please refer to Figure 1 , Figure 1 The electronic device 100 provided in the embodiment of the present application is shown in FIG. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0030] The electronic device 100 includes a link switching device 110 , a memory 120 , and a processor 130 .
[0031] The memory 120 and the processor 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The link switching device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the link switching device 110.
[0032] The memory 120 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction.
[0033] Please refer to Figure 2 , Figure 2 For application Figure 1 The flowchart of a link switching method of the electronic device 100 is shown, and the method including each step is described in detail below.
[0034] S201: Determine multiple links to be switched.
[0035] S202: Determine whether the current link meets the switching condition.
[0036] S203: When the current link meets the switching condition, a target link is determined from multiple links to be switched.
[0037] S204: Switch the current link to the target link.
[0038] Multiple links to be switched can be integrated into a multi-band wireless communication module, and the multiple links to be switched can include 1.4 GHz, 2.4 GHz, 5G, and 5.8 GHz.
[0039] The drone can switch links among multiple links to be switched. The switching trigger condition is to determine the current link connected to the drone and whether the current link connected to the drone meets the switching conditions.
[0040] There are many ways to construct switching conditions, for example, switching conditions can be constructed based on signal quality, switching conditions can be constructed based on task requirements, and switching conditions can be constructed based on environmental and regulatory restrictions.
[0041] When it is determined that the current link meets the switching conditions, the target link is determined from multiple links to be switched, such as 1.4GHz, 2.4GHz, 5G, and 5.8GHz, and the current link of the drone is switched to the target link, so that the drone can adaptively switch the link, thereby improving communication stability.
[0042] There are many ways to determine whether the current link meets the switching conditions. In one implementation, Figure 3 As shown, the following steps are included: S301: Determine the signal strength, frame error rate, delay, and bandwidth of the current link.
[0043] S302: Calculate a first link quality of the current link based on signal strength, frame error rate, delay, and bandwidth.
[0044] S303: Compare the first link quality with a preset quality.
[0045] S304: When the first link quality of the current link is less than the preset quality, determine that the current link meets the switching condition.
[0046] The signal strength RSSI indicates the wireless signal power detected by the receiving end. The frame error rate FER is the ratio of error frames to the total number of frames in transmission, reflecting the link reliability. The latency RTT is the one-way or round-trip time for data from the sender to the receiver. The bandwidth BW is the maximum theoretical data transmission rate of the link.
[0047] The signal sensing unit collects the signal strength, frame error rate, delay and bandwidth of the current link in real time.
[0048] The first link quality of the current link may be calculated based on the signal strength, frame error rate, delay, and bandwidth as follows: .
[0049] in, is the first link quality of the current link, is the signal strength of the current link, FER is the frame error rate of the current link, RTT is the delay of the current link, is the bandwidth of the current link, They are the weight coefficients of signal strength, frame error rate, delay and bandwidth, respectively. The value can be adjusted dynamically according to task requirements, such as a higher latency weight in real-time tasks.
[0050] For example, if the drone is performing a real-time task, such as video transmission, you can set the delay weight Set to 0.5 to set the bandwidth Set to 0.3.
[0051] If the UAV is performing a reliability task, such as telemetry data: you can set the FER weight Set to 0.6, RSSI weight Set to 0.4.
[0052] Before calculating the first link quality of the current link, the real-time collected signal strength, frame error rate, delay and bandwidth are filtered. For example, the real-time collected signal strength, frame error rate, delay and bandwidth can be filtered based on Kalman filtering or moving average to eliminate instantaneous noise interference. The first link quality is calculated by using the above formula for the filtered signal strength, frame error rate, delay and bandwidth.
[0053] In another example, in order to make the calculation of the first link quality more accurate, the signal strength, frame error rate, delay, and bandwidth after filtering can be normalized so that their value range is [0, 1]. The formula for normalizing the signal strength, frame error rate, delay, and bandwidth after filtering is: ; Where A is signal strength, frame error rate, delay or bandwidth, is the minimum value corresponding to signal strength, frame error rate, delay or bandwidth, It is the maximum value corresponding to signal strength, frame error rate, delay or bandwidth.
[0054] The first link quality of the current link is compared with the preset quality. When the current link quality is less than the preset quality, it indicates that the current link performance is poor and the current link needs to be switched. When the first link quality of the current link is greater than or equal to the preset quality, it is considered that the current link does not need to be switched.
[0055] In another example, determining whether the current link meets the switching condition can also be done by: if the received signal strength of the current link is less than a preset strength, the switching condition is considered met. If the signal-to-noise ratio of the current link is less than a preset signal-to-noise ratio, the switching condition is considered met. If the packet loss rate of the current link is greater than a preset packet loss rate, the switching condition is considered met. If the bandwidth of the current link is insufficient, the switching condition is considered met.
[0056] In another example, the method for determining whether the current link meets the switching conditions can also take into account the type of mission the drone is performing. For example, when the drone is performing takeoff / return, it needs to switch to 2.4GHz, and when cruising, it needs to switch to 4G. When the drone is performing aerial photography, it needs to switch to 5.8GHz, and when performing inspections, it needs to switch to 900MHz.
[0057] In another example, the method for determining whether the current link meets the switching conditions can also take into account the environment and regulations in which the drone is located, for example: automatically switching to 4G / 5G when entering a high-rise building area in the city.
[0058] In another implementation of determining whether the current link meets the switching condition, such as Figure 4 As shown, the following steps are included: S401: Determine the second link quality of each link to be switched.
[0059] S402: Calculate the difference between the second link quality and the first link quality.
[0060] S403: Compare the difference with a preset threshold.
[0061] S404: When the difference is greater than or equal to the preset threshold, determine that the current link meets the switching condition.
[0062] By determining the second link quality of the link to be switched, it is determined whether the switching condition is met based on the first link quality of the current link and the second link quality of each link to be switched.
[0063] If there is a link among the links to be switched that is much better than the current link, it is determined that the switching condition is met.
[0064] Specifically, the difference between each second link quality and the first link quality is calculated, and each difference is compared with a preset threshold. If only one difference is greater than or equal to the preset threshold, the link to be switched corresponding to the second link quality corresponding to that difference is selected as the target link. If multiple differences are greater than or equal to the preset threshold, the largest difference is determined from the differences, and the link to be switched corresponding to the second link quality corresponding to the largest difference is selected as the target link.
[0065] It should be noted that the preset threshold can be set to (first link quality*20%), (first link quality*25%), (first link quality*30%), and the embodiment of the present application does not impose any specific limitation on this.
[0066] When the current link meets the switching condition, there are multiple implementation methods for determining the target link from multiple links to be switched. In one implementation method, for example, Figure 5 As shown, the following steps are included: S501: When the current link meets the switching condition, determine the current task type.
[0067] S502: Determine a first priority decision tree corresponding to the task type.
[0068] The first priority decision tree indicates the priority ranking of each link to be switched.
[0069] S503: Obtain a first-priority link to be switched from the first-priority decision tree as a target link.
[0070] For example, different tasks are pre-set to correspond to different first-priority decision trees. For example, when the task type is cruise, the first-priority decision tree is set to: 5G > 5.8GHz > 2.4GHz > 1.4GHz. When the task type is start-stop, the first-priority strategy tree is set to: 2.4GHz > 1.4GHz > 5G > 5.8GHz.
[0071] Based on the task type executed by the drone, a first priority decision tree corresponding to the task type currently executed by the drone is searched from multiple different first priority decision trees corresponding to multiple preset task types.
[0072] Exemplarily, when the mission type is cruising: the first priority decision tree determined is: 5G>5.8GHz>2.4GHz>1.4GHz, then 5G is obtained as the target link, and the current link is switched to the target link.
[0073] In another implementation method of determining a target link from multiple links to be switched when the current link meets the switching condition, such as Figure 6 As shown, the following steps are included: S601: When the current link meets the switching condition, determine the maximum second link quality from the second link qualities.
[0074] S602: The link to be switched corresponding to the maximum second link quality is selected as the target link.
[0075] For example, when the current link meets the switching conditions, the second link qualities corresponding to the links to be switched are 9.5, 9, 9.2, 9.6, and 8 respectively, and the maximum second link quality is determined to be 9.6 from the second link qualities, then the link to be switched corresponding to the second link quality of 9.6 is determined as the target link.
[0076] It should be noted that the calculation method of the second link quality of each link to be switched is similar to the calculation method of the first link quality of the current link, and is not described in detail here.
[0077] In another implementation of determining the target link, the second link quality of each link to be switched is determined, and a second link quality greater than a preset quality is determined from the second link qualities. If there is only one second link quality greater than the preset quality, the link to be switched corresponding to that second link quality is used as the target link. If there are multiple second link qualities greater than the preset quality, the current task type is determined. A first priority decision tree corresponding to the task type is determined, and the first priority decision tree is adjusted based on each link to be switched with a second link quality greater than the preset quality. The first priority link to be switched is obtained from the adjusted first priority decision tree as the target link.
[0078] For example, if the links to be switched with a second link quality greater than the preset quality include 5.8 GHz and 2.4 GHz, and the first priority decision tree corresponding to the drone's mission type is determined to be 5G > 5.8 GHz > 2.4 GHz > 1.4 GHz, the first priority decision tree is adjusted to: 5.8 GHz > 2.4 GHz > 1.4 GHz. 5.8 GHz is selected as the first-priority link to be switched and used as the target link.
[0079] Another way to determine the target link is to Figure 7 As shown, the following steps are included: S701: Acquire link data of each link to be switched.
[0080] S702: For each link to be switched, obtain multiple sub-data of the link to be switched based on the sliding window.
[0081] S703: Determine the average signal strength, average frame error rate, average delay, and average bandwidth in each sub-data.
[0082] S704: For each sub-data, calculate the link quality of the sub-data based on the average signal strength, average frame error rate, average delay, and average bandwidth of the sub-data.
[0083] S705: The mean signal strength, mean frame error rate, mean delay, mean bandwidth and corresponding link quality in each sub-data are used as training data.
[0084] S706: Train the link quality determination model based on the training data to obtain a trained link quality determination model.
[0085] S707: When the current link meets the switching condition, determine the third link quality of each link to be switched based on the trained link determination model.
[0086] S708: Determine the maximum third link quality from the third link qualities.
[0087] S709: The link to be switched corresponding to the highest third link quality is selected as the target link. Link data of each link to be switched is collected. The link data of each switching link may include signal strength, frame error rate, delay, and bandwidth. Outliers can be removed from the collected signal strength, frame error rate, delay, and bandwidth based on the 3σ principle. A sliding window is used to segment the collected and outlier-removed link data to obtain multiple data.
[0088] It should be noted that each window can be set to include ten seconds of link data.
[0089] For each sub-data, the mean of the link data in the sub-data is calculated, that is, the mean signal strength, the mean frame error rate, the mean delay, and the mean bandwidth in the sub-data.
[0090] The link quality of each sub-data is calculated based on the calculation method for calculating the first link quality, and the signal strength mean, frame error rate mean, delay mean, bandwidth mean and corresponding link quality in each sub-data are used as training data.
[0091] The link quality determination model is trained. The input of the link quality determination model is the average signal strength, average frame error rate, average delay, and average bandwidth of a certain link. The output of the link quality determination model is the link quality of the link.
[0092] The following loss function can be used to determine the link quality model: .
[0093] in, To predict link quality, Label link quality.
[0094] Set the learning rate and discount factor of the link quality determination model, as well as the experience replay buffer capacity.
[0095] For example, set the learning rate to 0.001, the discount factor to 0.9, and the experience replay cache capacity to 10,000 entries.
[0096] The third link quality of each link to be switched is determined based on the trained link determination model, and the link to be switched corresponding to the maximum third link quality is obtained as the target link.
[0097] In another implementation method of determining a target link from multiple links to be switched when the current link meets the switching condition, such as Figure 8 As shown, the following steps are included: S801: When the current link meets the switching condition, determine the current task type.
[0098] S802: Determine a second priority decision tree corresponding to the task type.
[0099] S803: Obtain the to-be-switched links that do not meet the preset requirements from the second priority decision tree.
[0100] S804: Delete the to-be-switched links that do not meet the preset requirements from the second priority decision tree to obtain a third priority decision tree.
[0101] S805: Acquire each first link to be switched from the third priority decision tree.
[0102] S806: Determine the fourth link quality of each first link to be switched.
[0103] S807: Determine the maximum fourth link quality from the fourth link qualities.
[0104] S808: Use the first link to be switched corresponding to the largest fourth link quality as the target link.
[0105] By integrating the priority decision tree and link quality calculation, the communication effect of the target link can be improved.
[0106] For example, when the current task type is cruise, the second priority decision tree corresponding to cruise is determined to be: 5G>5.8GHz>2.4GHz>1.4GHz. If the focus of cruise is on signal strength, the links to be switched that do not meet the signal strength requirements are obtained from the second priority decision tree based on the signal strength. For example, if the signal strengths of 5G and 2.4GHz do not meet the requirements, 5G and 2.4GHz are deleted from the second priority decision tree to obtain the deleted third priority decision tree: 5.8GHz>1.4GHz. The third priority decision tree then contains two first links to be switched, namely 5.8GHz and 1.4GHz.
[0107] The fourth link quality of 5.8 GHz and 1.4 GHz is calculated respectively. The calculation method is similar to the calculation method of the first link quality, which is not repeated here. If the fourth link quality of 5.8 GHz is greater than the fourth link quality of 1.4 GHz, 5.8 GHz is used as the target link.
[0108] In order to further improve the communication effect of the target link of the switching, when the current link meets the switching conditions, the implementation method of the target link is determined from multiple links to be switched, such as Figure 9 As shown, the following steps are included: S901: When the current link meets the switching condition, determine the current task type.
[0109] S902: Determine a fourth priority decision tree corresponding to the task type.
[0110] S903: Obtain a link to be switched of the first priority from the fourth priority decision tree.
[0111] S904: Calculate the fifth link quality of the link to be switched with the first priority in the fourth priority decision tree.
[0112] S905: When the fifth link quality is greater than or equal to the preset quality, the link to be switched with the first priority in the fourth priority decision tree is used as the target link.
[0113] S906: When the quality of the fifth link is less than the preset quality, the link to be switched with the second priority in the fourth priority decision tree is selected as the target link.
[0114] Still assuming that the current task type is cruise, the fourth priority decision tree corresponding to cruise is: 5G>5.8GHz>2.4GHz>1.4GHz. For example: The link to be switched 5G of the first priority is obtained from the fourth priority decision tree, and the fifth link quality of the link to be switched is calculated. If the fifth link quality is greater than or equal to the preset quality, the link to be switched is used as the target link.
[0115] If the fifth link quality is less than the preset quality, the second priority link to be switched, 5.8 GHz, is obtained from the fourth priority decision tree as the target link.
[0116] In another example, when the fifth link quality of the first-priority link to be switched in the fourth priority decision tree is less than the preset quality, the link quality of the second-priority link to be switched is calculated from the second-priority link to be switched in the fourth priority decision tree; when the link quality of the second-priority link to be switched is less than the preset quality, the link quality of the third-priority link to be switched is calculated from the third-priority link to be switched in the fourth priority decision tree; when the link quality of the third-priority link to be switched is less than the preset quality, the link quality of the fourth-priority link to be switched is calculated from the fourth-priority link to be switched in the fourth priority decision tree; when the link quality of the fourth-priority link to be switched is less than the preset quality, the link to be switched with the largest link quality is determined from the first-priority link to be switched, the second-priority link to be switched, the third-priority link to be switched, and the fourth-priority link to be switched in the fourth priority decision tree as the target link.
[0117] Please refer to Figure 10 The present application also provides an embodiment of a method for Figure 1 The link switching device 110 of the electronic device 100 includes: The determination module 111 is configured to determine a plurality of links to be switched; determine whether a current link satisfies a switching condition; and determine a target link from the plurality of links to be switched when the current link satisfies the switching condition. The switching module 112 is configured to switch the current link to the target link.
[0118] The present application further provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement the link switching method.
[0119] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 130, the link switching method is implemented.
[0120] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0121] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0123] The above descriptions are merely examples of various embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be readily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A link switching method, characterized in that: The method comprises: Determining multiple links to be switched; Determine whether the current link meets the switching conditions; When the current link meets the switching condition, determining a target link from multiple links to be switched; The current link is switched to the target link.
2. The method according to claim 1, characterized in that The step of determining whether the current link meets the switching condition includes: Determining the signal strength, frame error rate, delay, and bandwidth of the current link; Calculating a first link quality of the current link based on the signal strength, frame error rate, delay, and bandwidth; comparing the first link quality with a preset quality; When the first link quality of the current link is less than the preset quality, it is determined that the current link meets the switching condition.
3. The method according to claim 2, characterized in that The step of determining whether the current link meets the switching condition includes: Determining the second link quality of each of the links to be switched; Calculating a difference between the second link quality and the first link quality; comparing the difference with a preset threshold; When the difference is greater than or equal to the preset threshold, it is determined that the current link meets the switching condition.
4. The method according to claim 1, wherein The step of determining a target link from a plurality of links to be switched when the current link meets the switching condition includes: When the current link meets the switching condition, determining the current task type; Determine a first priority decision tree corresponding to the task type, wherein the first priority decision tree indicates a priority ranking of each of the links to be switched; A link to be switched with a first priority is obtained from the first priority decision tree as a target link.
5. The method according to claim 3, characterized in that The step of determining a target link from a plurality of links to be switched when the current link meets the switching condition includes: When the current link meets the switching condition, determining the maximum second link quality from the second link qualities; The link to be switched corresponding to the maximum second link quality is used as the target link.
6. The method according to claim 1, characterized in that The method further comprises: Acquiring link data of each link to be switched; For each of the links to be switched, acquiring a plurality of sub-data of the link to be switched based on a sliding window; Determine the signal strength mean, frame error rate mean, delay mean, and bandwidth mean in each of the sub-data; For each sub-data, calculating the link quality of the sub-data based on the average signal strength, average frame error rate, average delay, and average bandwidth of the sub-data; The signal strength mean, frame error rate mean, delay mean, bandwidth mean and corresponding link quality in each sub-data are used as training data; The link quality determination model is trained based on the training data to obtain a trained link quality determination model.
7. The method according to claim 6, characterized in that The step of determining a target link from a plurality of links to be switched when the current link meets the switching condition includes: When the current link meets the switching condition, determining the third link quality of each of the links to be switched based on the trained link determination model; Determining a maximum third link quality from the third link qualities; The link to be switched corresponding to the maximum third link quality is used as the target link.
8. The method according to claim 1, characterized in that The step of determining a target link from a plurality of links to be switched when the current link meets the switching condition includes: When the current link meets the switching condition, determining the current task type; determining a second priority decision tree corresponding to the task type; Obtaining a link to be switched that does not meet preset requirements from the second priority decision tree; Deleting the to-be-switched links that do not meet the preset requirements from the second priority decision tree to obtain a third priority decision tree; Acquire each first link to be switched from the third priority decision tree; determining a fourth link quality of each of the first links to be switched; determining a maximum fourth link quality from the fourth link qualities; The first link to be switched corresponding to the largest fourth link quality is used as the target link.
9. The method according to claim 1, characterized in that The step of determining a target link from a plurality of links to be switched when the current link meets the switching condition includes: When the current link meets the switching condition, determining the current task type; determining a fourth priority decision tree corresponding to the task type; Obtaining a to-be-switched link of a first priority from the fourth priority decision tree; Calculating a fifth link quality of the link to be switched of the first priority in the fourth priority decision tree; When the quality of the fifth link is greater than or equal to the preset quality, taking the link to be switched of the first priority in the fourth priority decision tree as the target link; When the fifth link quality is less than the preset quality, the link to be switched with the second priority in the fourth priority decision tree is selected as the target link.
10. A link switching device, characterized in that: The device comprises: A determination module, configured to determine a plurality of links to be switched; determine whether a current link satisfies a switching condition; and determine a target link from the plurality of links to be switched when the current link satisfies the switching condition; The switching module is configured to switch the current link to the target link.
Citation Information
Cited By
Link switching method, device, medium and product
CN121334782A