Relay node switching method, device, storage medium and electronic device

By sending target data packets in the communication network and receiving signal quality information of the relay nodes, and performing relay node handover operations, the problem of difficulty in switching between relay nodes in different networks is solved, and real-time and reliability of data transmission is achieved sex.

CN114051271BActive Publication Date: 2024-12-03ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111357784.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2024-12-03
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

The existing communication network does not support the switching of devices between relay nodes in different networks, resulting in data transmission lag.

Method used

The target data packet is sent through the target device, including the currently connected relay node identification information, receive the signal quality information returned by each relay node, and perform the relay node connection switching operation based on this information, select the relay node with excellent signal quality for the Switch.

Benefits of technology

It realizes seamless switching of devices within the communication network, ensures real-time and reliability of data transmission, and solves the problem of data transmission lag caused by the inability to switch between different network relay nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114051271B_ABST
    Figure CN114051271B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a switching method, device, storage medium and electronic device of a relay node, wherein the method comprises: a target device located in a target communication network sends a target data packet; the target device receives first received signal quality information returned by a first relay node, and second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network; the target device performs a relay node connection switching operation based on the first received signal quality information and one or more second received signal quality information. Through the present invention, the problem that the device cannot be switched between different network relay nodes in the related art, thereby causing the lag of data transmission, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of communications, and in particular, to a switching method, device, storage medium, and electronic device for a relay node. Background Art

[0002] Some existing communication networks (eg, long-range radio LoRa communication networks) do not support devices (eg, mobile terminals) switching between different network relay nodes, thereby hindering the application of the communication network.

[0003] For example, in the business scenario of computer keys, staff need to carry computer keys to move and work in areas covered by different network nodes. Therefore, the computer keys need to be able to switch between various relay nodes to ensure the communication quality of data transmission. However, the relevant technology cannot achieve flexible switching of computer keys between various intermediate and advanced nodes.

[0004] Currently, no effective solution has been proposed to the problem in related technologies that devices cannot switch between different network relay nodes, which leads to data transmission delays. Summary of the Invention

[0005] Embodiments of the present invention provide a relay node switching method, device, storage medium and electronic device to at least solve the problem in the related art that a device cannot be switched between different network relay nodes, thereby causing a lag in data transmission.

[0006] According to one embodiment of the present invention, a method for switching a relay node is provided, comprising: a target device located in a target communication network sends a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected; the target device receives first reception signal quality information returned by the first relay node, and second reception signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network; the target device performs a relay node connection switching operation based on the first reception signal quality information and one or more of the second reception signal quality information.

[0007] In an optional embodiment, the target device located in the target communication network sends a target data packet, including: the target device sends the target data packet according to a predetermined sending period within the current statistical period; the target device receives the first reception signal quality information returned by the first relay node, and the second reception signal quality information returned by one or more other relay nodes; the target device receives the first reception signal quality information respectively fed back by the first relay node for the target data sent by the target device each time, and the second reception signal quality information respectively fed back by one or more other relay nodes for the target data sent by the target device each time; the target device performs a relay node connection switching operation based on the first reception signal quality information and one or more second reception signal quality information, including: the target device performs a relay node connection switching operation based on multiple first reception signal quality information and multiple second reception signal quality information received.

[0008] In an optional embodiment, the target device performs a relay node connection switching operation based on the received multiple first received signal quality information and the received multiple second received signal quality information, including: the target device determines a first quantity of first-category first received signal quality information and a second quantity of second-category first received signal quality information included in the multiple first received signal quality information, wherein the value of the first-category first received signal quality information is greater than a cut-off threshold, and the value of the second-category first received signal quality information is less than or equal to the cut-off threshold; the target device determines a third quantity of third-category second received signal quality information from each other relay node included in the multiple second received signal quality information, and a fourth quantity of fourth-category second received signal quality information, wherein the value of the third-category second received signal quality information is greater than or equal to the cut-off threshold, and the value of the fourth-category second received signal quality information is less than the cut-off threshold; when the target device determines that the first quantity and the second quantity satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third quantity and fourth quantity satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node.

[0009] In an optional embodiment, when the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include a second relay node whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: when the target device determines that the difference between the first number and the second number is less than a first threshold, and the other relay nodes include a second relay node whose corresponding third number and fourth number difference is greater than a second threshold, the target device switches the currently connected relay node from the first relay node to the second relay node.

[0010] In an optional embodiment, when the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: when the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include multiple second relay nodes whose corresponding third number and fourth number satisfy the second relationship, the target device selects a second relay node from multiple second relay nodes according to a target selection rule; the target device switches the currently connected relay node from the first relay node to the selected second relay node.

[0011] In an optional embodiment, the target device selects a second relay node from multiple second relay nodes according to a target selection rule, including: the target device selects a second relay node from multiple second relay nodes according to at least one of the following rules: selecting a second relay node with the smallest difference between the third quantity and the fourth quantity; selecting a second relay node with the largest average value of multiple second received signal quality information sent; selecting a second relay node closest to the target device; selecting a second relay node with the smallest load; selecting a second relay node with the largest remaining resources.

[0012] In an optional embodiment, the target communication network includes a long-range radio LoRa communication network.

[0013] According to another embodiment of the present invention, a relay node switching device is provided, which is applied to a target device located in a target communication network, and includes: a sending module for sending a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected; a receiving module for receiving first received signal quality information returned by the first relay node, and second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network; and a determining module for performing a relay node connection switching operation based on the first received signal quality information and one or more of the second received signal quality information.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0015] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0016] Through the present invention, relay node switching can be performed based on the received signal quality information returned by the currently connected relay node and the received signal quality information returned by other relay nodes, thereby realizing seamless switching of devices within the communication network, thereby ensuring the real-time and reliability of data transmission, and effectively solving the problem in related technologies that the device cannot be switched between different network relay nodes, thereby causing data transmission lag. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is the structure diagram of the LoRa communication network system;

[0018] Figure 2 is a hardware structure block diagram of a mobile terminal according to a method for switching a relay node according to an embodiment of the present invention;

[0019] Figure 3 is a flow chart of a relay node switching method according to an embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram of the overall operation flow according to the first embodiment of the present invention;

[0021] Figure 5 is a schematic diagram of the relationship between signal quality Q and time t according to the first embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of the overall operation flow according to the second embodiment of the present invention;

[0023] Figure 7 is a schematic diagram of the relationship between signal quality Q and time t according to the second embodiment of the present invention;

[0024] Figure 8 4 is a structural block diagram of a switching device for a relay node according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.

[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0027] The solution in the embodiment of the present invention can be applied to the LoRa (Long Range Radio) communication network. Of course, it can also be applied to other networks that currently cannot achieve seamless switching of devices between different relay nodes. The following first introduces the LoRa communication network:

[0028] The LoRa communication network system consists of a LoRa network server, a LoRa gateway, a LoRa relay, and LoRa mobile devices. The network structure diagram is as follows: Figure 1 As shown. Among them:

[0029] The LoRa network server is responsible for processing LoRa communication data and managing the LoRa communication network. It communicates with the LoRa gateway through a wired connection (such as optical fiber, Ethernet, etc.).

[0030] The LoRa gateway is responsible for receiving and forwarding LoRa communication data, and is used to convert LoRa communication data into wired communication data. The LoRa gateway uses LoRa communication for downstream communication and wired communication for upstream communication.

[0031] The LoRa relay is responsible for receiving and forwarding LoRa communication data to expand the coverage of the LoRa communication network. Both upstream and downstream communications use LoRa communication.

[0032] LoRa mobile devices are responsible for generating business data.

[0033] However, in the related LoRa communication network, mobile devices are not supported to switch between different network nodes, which hinders the application of the LoRa communication network. In the embodiment of the present invention, a wireless communication switching solution for mobile devices suitable for the LoRa communication network is proposed, which can ensure the smoothness and real-time performance of the switching. The present invention is described below with reference to the embodiments:

[0034] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 2 FIG. 1 is a hardware structure diagram of a mobile terminal according to a method for switching a relay node according to an embodiment of the present invention. Figure 2 As shown, the mobile terminal may include one or more ( Figure 2 Only one is shown) a processor 202 (the processor 202 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 204 for storing data, wherein the mobile terminal may also include a transmission device 206 and an input and output device 208 for communication functions. It will be understood by those skilled in the art that Figure 2 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 2 More or fewer components than shown, or with Figure 2 Different configurations shown.

[0035] The memory 204 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the switching method of the relay node in the embodiment of the present invention. The processor 202 executes the computer program stored in the memory 204 to execute various functional applications and data processing, that is, to implement the above-mentioned method. The memory 204 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include a memory remotely located relative to the processor 202, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission device 206 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 206 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 206 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] Figure 3 FIG. 1 is a flow chart of a switching method for a relay node according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0038] Step S302: a target device located in a target communication network sends a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected;

[0039] Step S304: The target device receives the first received signal quality information returned by the first relay node, and the second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network;

[0040] Step S306: The target device performs a relay node connection switching operation based on the first received signal quality information and one or more pieces of the second received signal quality information.

[0041] Through the above steps, relay node switching can be performed based on the received signal quality information returned by the currently connected relay node and the received signal quality information returned by other relay nodes, thereby realizing seamless switching of devices within the communication network, thereby ensuring the real-time and reliability of data transmission, and effectively solving the problem in related technologies that the device cannot be switched between different network relay nodes, thereby causing data transmission lag.

[0042] The execution subject of the above steps is a target device, which may be a mobile terminal, a personal computer terminal or other devices with similar processing capabilities.

[0043] In addition, in S302, when the target device sends the target data packet, it may be sent by broadcast or multicast. Of course, other sending methods are also possible, as long as the target data packet can be sent to multiple relay nodes. In S304, the time order in which the target device receives the first received signal quality information and the second received signal quality information may not be fixed. The first received signal quality information may be received first, or the second received signal quality information may be received first. Of course, the first received signal quality information and the second received signal quality information may also be received simultaneously. In addition, in S306, when the target device performs a relay node connection switching operation based on the first received signal quality information and one or more pieces of the second received signal quality information, it may first determine whether a handoff operation needs to be performed based on the first received signal quality information, and then determine the relay node to be switched to based on the one or more pieces of the second received signal quality information. Of course, the two operations may also be performed simultaneously, or the relay node to be switched to may be determined first, and then the handoff operation is determined to be performed. The specific operation order may be adjusted based on actual conditions.

[0044] In an optional embodiment, the target device in the target communication network sending the target data packet includes: the target device sending the target data packet according to a predetermined sending cycle within a current statistical period;

[0045] The target device receiving the first received signal quality information returned by the first relay node and the second received signal quality information returned by one or more other relay nodes includes: the target device receiving the first received signal quality information respectively fed back by the first relay node for the target data sent by the target device each time, and the second received signal quality information respectively fed back by one or more other relay nodes for the target data sent by the target device each time;

[0046] The target device performs a relay node connection switching operation based on the first received signal quality information and one or more second received signal quality information, including: the target device performs a relay node connection switching operation based on the received multiple first received signal quality information and multiple second received signal quality information.

[0047] In the above embodiment, the target device can continuously determine whether a relay node connection switch is required. In actual operation, a comprehensive judgment can be made every period of time, for example, every 5 seconds, every 10 seconds, every 20 seconds, every minute, etc. Each period of time can be called a statistical period, and when it is determined that the relay node to be switched is required, the switching operation is performed, wherein the length of each interval statistical period can be fixed or not, and the specific length can be defined based on the actual situation. In the above embodiment, the target device can send target data multiple times, and then comprehensively determine whether a relay node switch is required based on the received multiple first reception signal quality information and the multiple second reception signal quality information respectively returned by the other relay nodes, and when it is determined that a switch is required, which other relay node to switch to. The target device may send target data at a fixed period, such as once every 1 second, once every 2 seconds, once every 50 milliseconds, once every 70 milliseconds, etc., or at an irregular period, such as at intervals of 20 ms, 50 ms, 80 ms, etc. Of course, target data may also be sent in other ways. A comprehensive judgment based on multiple received signal quality information can ensure the accuracy of the switching.

[0048] In an optional embodiment, the target device performs a relay node connection switching operation based on the received multiple first received signal quality information and the received multiple second received signal quality information, including: the target device determines a first quantity of first-category first received signal quality information and a second quantity of second-category first received signal quality information included in the multiple first received signal quality information, wherein the value of the first-category first received signal quality information is greater than a cut-off threshold, and the value of the second-category first received signal quality information is less than or equal to the cut-off threshold; the target device determines a third quantity of third-category second received signal quality information from each other relay node included in the multiple second received signal quality information, and a fourth quantity of fourth-category second received signal quality information, wherein the value of the third-category second received signal quality information is greater than or equal to the cut-off threshold, and the value of the fourth-category second received signal quality information is less than the cut-off threshold; when the target device determines that the first quantity and the second quantity satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third quantity and fourth quantity satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node. In this embodiment, the above-mentioned quantities can be calculated by setting a counter. In addition, the above-mentioned entry threshold, entry threshold, first relationship and second relationship can be flexibly set, and can be flexibly set according to scenario requirements or user configuration or capabilities supported by the system, etc.

[0049] In an optional embodiment, when the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include a second relay node whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: when the target device determines that the difference between the first number and the second number is less than a first threshold, and the other relay nodes include a second relay node whose corresponding third number and fourth number difference is greater than a second threshold, the target device switches the currently connected relay node from the first relay node to the second relay node. In this embodiment, whether to perform a cut-out operation can be determined by judging whether there are more values ​​less than the cut-out threshold among the multiple received signal qualities corresponding to the currently connected first relay node (that is, the number of received signal qualities less than or equal to the cut-out threshold is greater than the number of received signal qualities greater than the cut-out threshold), and whether to perform a cut-in operation can be determined by judging whether there are more values ​​greater than or equal to the cut-in threshold among the multiple received signal qualities corresponding to other relay nodes (that is, the number of received signal qualities greater than or equal to the cut-in threshold is greater than the number of received signal qualities less than the cut-in threshold). If so, it is considered that the relay node may be a relay node that needs to be cut in, wherein the above-mentioned first threshold is a negative value, for example, it can be -2, -3, -5, etc., and the threshold can be flexibly set according to actual conditions; the above-mentioned second threshold is a positive value, for example, it can be 2, 3, 5, etc., and the threshold can also be flexibly set according to actual conditions.

[0050] In an optional embodiment, when the target device determines that the first number and the second number satisfy the first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy the second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: when the target device determines that the first number and the second number satisfy the first relationship, and the other relay nodes include multiple second relay nodes whose corresponding third number and fourth number satisfy the second relationship, the target device selects a second relay node from multiple second relay nodes according to the target selection rule; the target device switches the currently connected relay node from the first relay node to the selected second relay node. In this embodiment, there may be multiple second relay nodes that meet the above conditions. In this case, it is necessary to determine the best relay node from the multiple second relay nodes as the relay node with cut-in. The following describes in detail how to select the best second relay node:

[0051] The target device may select a second relay node from the plurality of second relay nodes according to at least one of the following rules:

[0052] Selecting a second relay node having the smallest difference between the third number and the fourth number;

[0053] Selecting a second relay node having the largest average value of multiple pieces of second received signal quality information sent;

[0054] Selecting a second relay node closest to the target device;

[0055] Select the second relay node with the smallest load;

[0056] Select the second relay node with the largest remaining resources.

[0057] In an optional embodiment, the target communication network includes a long-range radio LoRa communication network.

[0058] The following describes the overall operation process of the present invention using the LoRa communication network as an example:

[0059] Example 1:

[0060] Figure 4 The overall process of the relay switching method of the mobile device according to the embodiment of the present invention is as follows Figure 1 ,like Figure 4 As shown, the following steps are included:

[0061] S402, the mobile device (corresponding to the above-mentioned target device) includes path information when transmitting data (corresponding to the above-mentioned target data packet).

[0062] S404, after receiving the data, the LoRa relay node parses the relay node number in the path information (or other information that can identify the relay node, not limited to the number), and extracts the received signal quality Q corresponding to the data i ,i represents the i-th relay node. Among them, the j-th relay node is included in the path information (that is, the j-th relay node is the relay node currently connected to the mobile device).

[0063] Among them, the LoRa relay node i (i≠j) not included in the path information will receive the signal quality Q i Compared with the threshold THR1: When Q i When >THR1, it indicates that the mobile device has gradually approached the relay node i, so node i responds to the data and includes its received signal quality Q in the response data. i ; Otherwise, discard the data.

[0064] The LoRa relay node j included in the path information carries its received signal quality Q in the response data. j .

[0065] S406, the mobile device receives the response data of the relay node.

[0066] S408, when receiving the response data from the LoRa relay node j included in the path information, parse the received signal quality Q j , and compare it with the cut-off threshold THR2. When Q j <THR2, it indicates that the mobile device is gradually moving away from the current relay node j and needs to prepare for switching; otherwise, it is considered that no switching is required.

[0067] When receiving the response data from the LoRa relay node i not included in the path information, parse the received signal quality Q i ; if the switching preparation has been made, trigger the switching process; otherwise, it is considered that no switching is required. When receiving the response data from multiple LoRa relay nodes not included in the path information, select the relay node corresponding to the maximum value of the received signal quality Q i .

[0068] The above two conditions have no chronological relationship and only need to be satisfied simultaneously during judgment to trigger the switching process.

[0069] In addition, each time the mobile device sends data, repeat steps S402 - S408 to ensure seamless switching of the mobile device between different relay nodes.

[0070] For example, Figure 5 as shown, during the movement of the device, at time t1, it is found that Q i <THR2, and the mobile device prepares for switching; at time t2, it is found that Q i >THR1, trigger switching, and switch from relay node i to relay node j. Of course, in practical applications, it may also be that Q i >THR1 is found first, and then Q i <THR2 is found.

[0071] Embodiment 2:

[0072] In this embodiment of the present invention, a relay switching method for a mobile device is further provided, and the method includes the following steps:

[0073] The mobile device includes path information when transmitting data.

[0074] After receiving the data, the LoRa relay node parses the relay node number in the path information and extracts the received signal quality Q corresponding to the data i, i represents the i-th relay node. Among them, the j-th relay node is included in the path information.

[0075] The LoRa relay node i (i≠j) not included in the path information will receive the signal quality Q i Compared with the threshold THR1: When Q i When >THR1, it indicates that the mobile device has gradually approached the relay node i, so node i responds to the data and includes its received signal quality Q in the response data. i ; Otherwise, discard the data.

[0076] The LoRa relay node j included in the path information carries its received signal quality Q in the response data j .

[0077] The mobile device receives the response data from the relay node.

[0078] The mobile device performs relay switching based on the quality of each received signal, such as Figure 6 As shown, the specific steps include:

[0079] S602, initialize the counters of all relay nodes to 0 (corresponding to Figure 6 S1 in

[0080] S604, determine the signal quality of each relay node, and when it is determined that the response data from the LoRa relay node j included in the path information is received, analyze the received signal quality Q j , and compare it with the cut-off threshold THR2, and update the corresponding counter value according to the following formula, where τ1 is the upper limit of the counter (corresponding to the aforementioned second threshold), τ2 is the lower limit of the counter (corresponding to the aforementioned first threshold) (this step corresponds to Figure 6 S2-S6 in ).

[0081]

[0082] S606: When receiving response data from the LoRa relay node i that is not included in the path information, analyze the received signal quality Q i , compare it with the threshold THR1, and update the corresponding counter value according to the following formula (corresponding to Figure 6 S7-S12 in the .

[0083]

[0084] S608, if the counter c of the current relay node j =τ2 and there exists a counter c of another node i i= τ1, then switch to the corresponding relay node i and clear all counters c k ; Otherwise, stay at the current relay node j (corresponding to Figure 6 S13 - S15 in).

[0085] Each time the mobile device sends data, repeat steps S602 - S608 to ensure seamless switching of the mobile device between different relay nodes.

[0086] Example: As follows Figure 7 shown, the upper limit of the counter τ1 = 3, and the lower limit of the counter τ2 = -3. During the movement of the device, t1 - t9 are the moments of receiving packets. At the moment t2, it is found that Q j < THR2, and the counter c of the current node j -1; At the moment t4, it is found that Q i > THR1, and the counter c of the corresponding node i +1; At the moment t9, it satisfies c j = -3 and c i = 3, triggering a switch from relay node j to relay node i.

[0087] In the existing LoRa communication network, seamless switching of mobile devices between different network nodes is not supported. After using the solution proposed in this invention, seamless switching of mobile devices within the LoRa communication network can be achieved, thereby ensuring the real - time and reliability of data transmission.

[0088] Through the method in the embodiments of this invention, the application scope of LoRa communication technology is expanded, laying a technical foundation for the research and development and application of related LoRa communication products.

[0089] Through the description of the above - mentioned embodiments, those skilled in the art can clearly understand that the method according to the above - mentioned embodiments can be implemented by means of software plus a necessary general - purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of this invention, in essence, or the part that contributes to the existing technology can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this invention.

[0090] This embodiment also provides a switching device for a relay node, which is used to implement the above-mentioned embodiments and preferred embodiments. Details that have already been described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0091] Figure 8 is a structural block diagram of a switching device for a relay node according to an embodiment of the present invention, which can be applied to a target device located in a target communication network, such as Figure 8 As shown, the device includes:

[0092] A sending module 82 is configured to send a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected;

[0093] a receiving module 84, configured to receive first received signal quality information returned by the first relay node, and second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network;

[0094] The determination module 86 is configured to perform a relay node connection switching operation based on the first received signal quality information and one or more pieces of the second received signal quality information.

[0095] In an optional embodiment, the sending module 82 is specifically used to send the target data packet according to a predetermined sending period within the current statistical period; the receiving module 84 is specifically used to receive the first reception signal quality information fed back by the first relay node for each time the target data is sent by the target device, and the second reception signal quality information fed back by one or more other relay nodes for each time the target data is sent by the target device; the determination module 86 is specifically used to perform a relay node connection switching operation based on the received multiple first reception signal quality information and multiple second reception signal quality information.

[0096] In an optional embodiment, the determination module 86 is configured to perform a relay node connection switching operation based on the received multiple first received signal quality information and the received multiple second received signal quality information in the following manner: determining a first quantity of first-category first received signal quality information and a second quantity of second-category first received signal quality information included in the multiple first received signal quality information, wherein a value of the first-category first received signal quality information is greater than a cut-off threshold, and a value of the second-category first received signal quality information is less than or equal to the cut-off threshold; determining a third quantity of third-category second received signal quality information and a fourth quantity of fourth-category second received signal quality information respectively from each other relay node included in the multiple second received signal quality information, wherein a value of the third-category second received signal quality information is greater than or equal to the cut-off threshold, and a value of the fourth-category second received signal quality information is less than the cut-off threshold; and when it is determined that the first quantity and the second quantity satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third quantity and fourth quantity satisfy a second relationship, switching the currently connected relay node from the first relay node to the second relay node.

[0097] In an optional embodiment, the determination module 86 is used to implement, in the following manner, switching the currently connected relay node from the first relay node to the second relay node when it is determined that the first number and the second number satisfy a first relationship, and the other relay nodes include a second relay node whose corresponding third number and fourth number satisfy a second relationship: when it is determined that the difference between the first number and the second number is less than a first threshold, and the other relay nodes include a second relay node whose corresponding third number and fourth number difference is greater than a second threshold, switching the currently connected relay node from the first relay node to the second relay node.

[0098] In an optional embodiment, the determination module 86 is used to implement, in the following manner, switching the currently connected relay node from the first relay node to the second relay node when it is determined that the first number and the second number satisfy the first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy the second relationship: when it is determined that the first number and the second number satisfy the first relationship, and the other relay nodes include multiple second relay nodes whose corresponding third number and fourth number satisfy the second relationship, selecting a second relay node from multiple second relay nodes according to a target selection rule; switching the currently connected relay node from the first relay node to the selected second relay node.

[0099] In an optional embodiment, the determination module 86 is used to select a second relay node from multiple second relay nodes according to the target selection rules in the following manner: select a second relay node from multiple second relay nodes according to at least one of the following rules: select the second relay node with the smallest difference between the third quantity and the fourth quantity; select the second relay node with the largest average value of multiple second received signal quality information sent; select the second relay node closest to the target device; select the second relay node with the smallest load; select the second relay node with the largest remaining resources.

[0100] In an optional embodiment, the target communication network includes a long-range radio LoRa communication network.

[0101] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0102] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0103] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0104] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0105] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0106] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0107] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0108] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A relay node switching method, characterized in that: include: A target device located in a target communication network sends a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected; The target device receives first received signal quality information returned by the first relay node, and second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network; The target device performs a relay node connection switching operation based on the first received signal quality information and one or more of the second received signal quality information; The target device performing the relay node connection switching operation based on the received plurality of first received signal quality information and the received plurality of second received signal quality information includes: The target device determines a first quantity of first-category first received signal quality information included in the plurality of first received signal quality information, and a second quantity of second-category first received signal quality information, wherein a value of the first-category first received signal quality information is greater than a cut-out threshold, and a value of the second-category first received signal quality information is less than or equal to the cut-out threshold; The target device determines a third quantity of the third type of second received signal quality information respectively from each other relay node and a fourth quantity of the fourth type of second received signal quality information included in the plurality of the second received signal quality information, wherein a value of the third type of second received signal quality information is greater than or equal to a cut-in threshold, and a value of the fourth type of second received signal quality information is less than the cut-in threshold; When the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node.

2. The method according to claim 1, characterized in that The target device in the target communication network sends the target data packet, including: the target device sends the target data packet according to a predetermined sending cycle within a current statistical period; The target device receives the first received signal quality information returned by the first relay node, and the second received signal quality information returned by one or more other relay nodes, including: the target device receives the first received signal quality information respectively fed back by the first relay node for the target data sent by the target device each time, and the second received signal quality information respectively fed back by one or more other relay nodes for the target data sent by the target device each time; The target device performs a relay node connection switching operation based on the first received signal quality information and one or more of the second received signal quality information, including: the target device performs a relay node connection switching operation based on multiple received first received signal quality information and multiple received signal quality information.

3. The method according to claim 1, characterized in that: When the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: When the target device determines that the difference between the first number and the second number is less than a first threshold, and the other relay nodes include a second relay node whose corresponding difference between the third number and the fourth number is greater than a second threshold, the target device switches the currently connected relay node from the first relay node to the second relay node.

4. The method according to claim 1, characterized in that: When the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third number and fourth number satisfy a second relationship, the target device switches the currently connected relay node from the first relay node to the second relay node, including: When the target device determines that the first number and the second number satisfy a first relationship, and the other relay nodes include a plurality of second relay nodes whose corresponding third number and fourth number satisfy a second relationship, the target device selects a second relay node from the plurality of second relay nodes according to a target selection rule; The target device switches the currently connected relay node from the first relay node to the selected second relay node.

5. The method according to claim 4, characterized in that The target device selecting a second relay node from a plurality of the second relay nodes according to the target selection rule includes: the target device selecting a second relay node from a plurality of the second relay nodes according to at least one of the following rules: Selecting a second relay node having the smallest difference between the third number and the fourth number; Selecting a second relay node having the largest average value of multiple pieces of second received signal quality information sent; Selecting a second relay node that is closest to the target device; Select the second relay node with the smallest load; Select the second relay node with the largest remaining resources.

6. The method according to any one of claims 1 to 5, characterized in that: The target communication network includes a long-range radio LoRa communication network.

7. A switching device for a relay node, characterized in that: Applied to target devices located in the target communication network, including: A sending module, configured to send a target data packet, wherein the target data packet includes first identification information of a first relay node located in the target communication network to which the target device is currently connected; A receiving module, configured to receive first received signal quality information returned by the first relay node, and second received signal quality information returned by one or more other relay nodes, wherein the other relay nodes are relay nodes other than the first relay node included in the target communication network; A determination module, configured to perform a relay node connection switching operation based on the first received signal quality information and one or more of the second received signal quality information; The determination module is further configured to implement a relay node connection switching operation based on the received plurality of first received signal quality information and the received plurality of second received signal quality information in the following manner: determining a first quantity of first type first received signal quality information and a second quantity of second type first received signal quality information included in the plurality of first received signal quality information, wherein the value of the first type first received signal quality information is greater than a cut-out threshold, and the value of the second type first received signal quality information is less than or equal to the cut-out threshold; determining a third quantity of third type second received signal quality information respectively from each other relay node and a fourth quantity of fourth type second received signal quality information included in the plurality of second received signal quality information, wherein the value of the third type second received signal quality information is greater than or equal to the cut-in threshold, and the value of the fourth type second received signal quality information is less than the cut-in threshold; and when it is determined that the first quantity and the second quantity satisfy a first relationship, and the other relay nodes include second relay nodes whose corresponding third quantity and fourth quantity satisfy a second relationship, switching the currently connected relay node from the first relay node to the second relay node.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.