Device pairing method, electronic device, and computer-readable storage medium
By interacting with the location and identification information of IoT terminals and relay node devices, and combining distance and communication status, the best relay node device is selected, which solves the problem of passive IoT terminals not reporting data in a timely manner and achieves efficient and reliable data transmission.
Patent Information
- Application Number
- CN202310253232.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-03-02
AI Technical Summary
When passive IoT terminals fail to report data in a timely manner when the data collection volume is large, it can lead to memory overflow and loss of critical data. How can we achieve the best match with relay node devices to improve communication efficiency and data transmission reliability?
The IoT terminal sends location and identification information to the relay node device, receives distance information, performs initial screening of candidate relay node devices, performs secondary screening based on communication status and channel quality measurements, determines the target relay node device, and makes a pairing request, updating the candidate and target device lists in real time.
To ensure more reliable pairing between relay node devices and IoT terminals, improve data transmission efficiency and reliability, and dynamically adjust device matching to ensure optimal pairing.
Smart Images

Figure CN116233960B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Things, in particular to a device pairing method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] Passive Internet of Things terminals have a wide range of applications in sensor data reporting scenarios such as smart grids and smart farms due to their simple structure, maintenance-free life cycle, and environmental friendliness. Due to cost and functional limitations, the storage capacity and computing power of passive Internet of Things terminals are extremely limited. When the data collection of passive Internet of Things terminals is large, if the data is not reported in time, it is easy to cause memory overflow and loss of critical data.
[0003] Therefore, a special relay node device can be deployed to receive the data reported by the passive Internet of Things terminal. Then, how to achieve the best matching between the passive Internet of Things terminal and the relay node device becomes a problem to be solved. SUMMARY
[0004] The present application aims to solve the above problems in the prior art and provides a device pairing method, an electronic device and a computer readable storage medium to achieve the best pairing of Internet of Things terminals and relay node devices.
[0005] To achieve the above object, the technical solutions adopted by the embodiments of the present application are as follows:
[0006] In a first aspect, the embodiments of the present application provide a device pairing method applied to an Internet of Things terminal, which comprises:
[0007] sending the location information and the identification information of the Internet of Things terminal to each relay node device and receiving the distance information between each relay node device and the Internet of Things terminal sent by each relay node device;
[0008] determining a plurality of candidate relay node devices according to the distance information;
[0009] determining a target relay node device from the plurality of candidate relay node devices;
[0010] sending a pairing request to the target relay node device and receiving a pairing response result fed back by the target relay node device, wherein the pairing response result comprises pairing success or pairing failure.
[0011] Optionally, the determining of the target relay node device from the plurality of candidate relay node devices comprises:
[0012] determining the target relay node device from the plurality of candidate relay node devices according to the communication state of each candidate relay node device and the Internet of Things terminal.
[0013] Optionally, the determining the target relay node device from the plurality of candidate relay node devices according to the communication status of each candidate relay node device with the Internet of Things terminal comprises:
[0014] sending a request message to each candidate relay node device;
[0015] receiving a response message sent by each candidate relay node device;
[0016] determining the target relay node device from each candidate relay node device according to the receiving time of each response message.
[0017] Optionally, the determining the target relay node device from the plurality of candidate relay node devices according to the communication status of each candidate relay node device with the Internet of Things terminal comprises:
[0018] sending a channel quality measurement request to each candidate relay node device;
[0019] receiving a channel quality measurement signal sent by each candidate relay node device;
[0020] determining the target relay node device from each candidate relay node device according to each channel quality measurement signal.
[0021] Optionally, the determining the target relay node device from the plurality of candidate relay node devices comprises:
[0022] comparing each candidate relay node device with each relay node device in a preconfigured relay node device list, the preconfigured relay node device list including all relay node devices allowed to be paired by the Internet of Things terminal;
[0023] if there is at least one candidate relay node device in each candidate relay node device that is consistent with a relay node device in the preconfigured relay node device list, determining the target relay node device from the at least one candidate relay node device according to the ranking of the at least one candidate relay node device.
[0024] Optionally, the method further comprises:
[0025] if a new relay node device is detected to be activated, taking the new relay node device as one relay node device corresponding to the Internet of Things terminal, and updating the ranking of each candidate relay node device according to the distance information between the new relay node device and the Internet of Things terminal;
[0026] If it is detected that the relay node device corresponding to the IoT terminal is turned off, the relay node device that is turned off is no longer taken as the relay node device corresponding to the IoT terminal.
[0027] In a second aspect, the embodiments of the present application further provide a device pairing method applied to a relay node device, the method comprising:
[0028] receiving position information and identification information sent by each IoT terminal;
[0029] determining distance information between the relay node device and each IoT terminal according to position information of the relay node device and position information of each IoT terminal, and sending the distance information between the relay node device and each IoT terminal to each corresponding IoT terminal according to identification information of each IoT terminal;
[0030] receiving pairing requests sent by each IoT terminal, detecting a node state of the relay node device, and sending a pairing response result to each IoT terminal according to a node state detection result.
[0031] Optionally, the detection of the node state of the relay node device comprises node idle channel detection, node idle computing resource detection, and node paired IoT terminal quantity detection.
[0032] The sending of the pairing response result to each IoT terminal according to the node state detection result comprises:
[0033] if the node state detection result is a detection pass, sending a pairing success to each IoT terminal;
[0034] if the node state detection result is a detection fail, sending a pairing fail to each IoT terminal.
[0035] In a third aspect, the embodiments of the present application provide a device pairing apparatus applied to an IoT terminal, the apparatus comprising a sending module, a determining module, and a receiving module.
[0036] The sending module is configured to send position information and identification information of the IoT terminal to each relay node device, and receive distance information between each relay node device and the IoT terminal sent by each relay node device.
[0037] The determining module is configured to determine a plurality of candidate relay node devices according to the distance information.
[0038] The determining module is configured to determine a target relay node device from the plurality of candidate relay node devices.
[0039] The receiving module is configured to send a pairing request to the target relay node device, and receive a pairing response result fed back by the target relay node device, wherein the pairing response result comprises: pairing success or pairing failure.
[0040] Optionally, the determining module is specifically configured to determine the target relay node device from the plurality of candidate relay node devices according to a communication state of each candidate relay node device and the Internet of Things terminal.
[0041] Optionally, the determining module is specifically configured to send a request message to each candidate relay node device.
[0042] Optionally, the receiving module is configured to receive a response message sent by each candidate relay node device.
[0043] The determining module is configured to determine the target relay node device from each candidate relay node device according to a receiving time of each response message.
[0044] Optionally, the determining module is specifically configured to send a channel quality measurement request to each candidate relay node device.
[0045] Optionally, the receiving module is configured to receive a channel quality measurement signal sent by each candidate relay node device.
[0046] The determining module is configured to determine the target relay node device from each candidate relay node device according to each channel quality measurement signal.
[0047] Optionally, the determining module is specifically configured to compare each candidate relay node device with each relay node device in a preconfigured relay node device list, wherein the preconfigured relay node device list comprises all relay node devices allowed to be paired by the Internet of Things terminal.
[0048] If there is at least one candidate relay node device in each candidate relay node device that is consistent with a relay node device in the preconfigured relay node device list, the determining module is configured to determine the target relay node device from the at least one candidate relay node device according to an order of the at least one candidate relay node device.
[0049] Optionally, the apparatus further comprises an updating module.
[0050] The updating module is configured to, if a new relay node device is detected to be activated, take the new relay node device as one relay node device corresponding to the Internet of Things terminal, and update an order of each candidate relay node device according to distance information between the new relay node device and the Internet of Things terminal.
[0051] If it is detected that the relay node device corresponding to the Internet of Things terminal is closed, the relay node device that is closed is no longer taken as the relay node device corresponding to the Internet of Things terminal.
[0052] In a fourth aspect, an embodiment of the present application provides a device pairing apparatus applied to a relay node device, the apparatus comprising a receiving module, a determining module and a sending module.
[0053] The receiving module is configured to receive position information and identification information sent by each Internet of Things terminal.
[0054] The determining module is configured to determine distance information between the relay node device and each Internet of Things terminal according to position information of the relay node device and position information of each Internet of Things terminal, and send the distance information between the relay node device and each Internet of Things terminal to each corresponding Internet of Things terminal according to identification information of each Internet of Things terminal.
[0055] The sending module is configured to receive a pairing request sent by each Internet of Things terminal, detect a node state of the relay node device, and send a pairing response result to each Internet of Things terminal according to a node state detection result.
[0056] Optionally, the detection of the node state of the relay node device comprises node idle channel detection, node idle computing resource detection and node paired Internet of Things terminal quantity detection.
[0057] The sending module is specifically configured to send a pairing success to each Internet of Things terminal if the node state detection result is a detection pass.
[0058] If the node state detection result is a detection fail, the sending module sends a pairing fail to each Internet of Things terminal.
[0059] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a storage medium and a bus, the storage medium storing machine readable instructions executable by the processor, the processor and the storage medium communicating through the bus when the electronic device is running, and the processor executing the machine readable instructions to execute steps of the device pairing method provided in the first aspect or the second aspect.
[0060] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to execute steps of the device pairing method provided in the first aspect or the second aspect.
[0061] The present application has the following beneficial effects:
[0062] The application provides a device pairing method, an electronic device and a computer readable storage medium. In the method, the Internet of Things terminal can perform primary screening on the relay node device based on distance information between the relay node device and the Internet of Things terminal sent by each relay node device, determine a plurality of candidate relay node devices from each relay node device, and further perform secondary screening on each candidate relay node device based on a pairing strategy, determine a target relay node device from each candidate relay node device, and pair with the target relay node device by initiating a pairing request. The method can determine the best pairing relay node device corresponding to the Internet of Things terminal from a plurality of relay node devices through multiple screenings. The initial screening based on the distance information can make the pairing of the target relay node device and the Internet of Things terminal more reliable by combining the secondary screening, because the distance information is related to the communication delay and data transmission efficiency between devices, and can improve the data transmission efficiency while ensuring the data transmission reliability.
[0063] Secondly, the method updates through two links. First, the relay node devices corresponding to the Internet of Things terminal are updated in real time according to the detection of the activation of new relay node devices or the closing of existing relay node devices, so that the determined candidate relay node devices are updated in real time. Second, the selected target relay node device is updated in real time according to the pairing result of the current target relay node device. The combination of the two links can effectively ensure that the selected target relay node device is the best pairing device at any time.
[0064] In addition, after receiving the pairing request sent by the Internet of Things terminal, the relay node device can perform node state detection to detect the node state of the relay node device, and send a pairing success message to the Internet of Things terminal after the detection is passed. The method can also perform node state detection on the target relay node device to ensure that the most effective relay node device is selected, thereby ensuring the best matching between the Internet of Things terminal and the relay node device. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0066] Figure 1 Flowchart of the device pairing method provided by the embodiments of the application Figure One ;
[0067] Figure 2 Flowchart of the device pairing method provided by the embodiment of the present application Figure Two ;
[0068] Figure 3 Flowchart of the device pairing method provided by the embodiment of the present application Figure Three ;
[0069] Figure 4 Flowchart of the device pairing method provided by the embodiment of the present application Figure Four ;
[0070] Figure 5 Flowchart of the device pairing method provided by the embodiment of the present application Figure Five ;
[0071] Figure 6 Flowchart of the device pairing method provided by the embodiment of the present application Figure Six ;
[0072] Figure 7 Flowchart of the device pairing method provided by the embodiment of the present application Figure Seven ;
[0073] Figure 8 Signaling interaction diagram of the Internet of Things terminal and the relay node device provided by the embodiment of the present application Figure One ;
[0074] Figure 9 Signaling interaction diagram of the Internet of Things terminal and the relay node device provided by the embodiment of the present application Figure Two ;
[0075] Figure 10 Signaling interaction diagram of the Internet of Things terminal and the relay node device provided by the embodiment of the present application Figure Three ;
[0076] Figure 11 Schematic diagram of a device pairing apparatus provided by the embodiment of the present application
[0077] Figure 12 Schematic diagram of another device pairing apparatus provided by the embodiment of the present application
[0078] Figure 13 Structural schematic diagram of an electronic device provided by the embodiment of the present application DETAILED DESCRIPTION
[0079] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.
[0080] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0081] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0082] With the increase of Internet of Things nodes, the arrangement and maintenance cost of the internal battery of the Internet of Things device will be very large in the future. In addition, there are still many scenarios and needs in reality that cannot be solved by the current NB-IoT (Narrow Band Internet of Things) technical solution, for example:
[0083] 1. Extreme environmental condition application scenarios, such as high pressure, extremely high / low temperature, humid and corrosive environment, etc.;
[0084] 2. Device extremely low complexity / minimum size (for example, millimeter level thickness) requirement, long life maintenance-free requirement;
[0085] 3. Scenarios where traditional battery power supply method is not available.
[0086] With the continuous progress of energy collection technology, the Ambient IoT (Ambient Internet of Things) emerges as the times require, that is, the batteryless Internet of Things. The Ambient IoT is an Internet of Things device powered by external energy collection or by limited energy storage capacity (such as a capacitor), which obtains energy through wireless radio frequency signals, solar energy, light energy, motion energy, and temperature difference, and uses a dedicated energy collection device to collect energy to power the Internet of Things device. At the same time, it has many advantages such as extremely simple structure, maintenance-free in life cycle, and environmental friendliness. The Ambient IoT terminal has a wide range of applications in sensor data reporting scenarios such as smart grids and smart farms.
[0087] Due to cost and functional limitations, the storage capacity and computing power of the Ambient IoT terminal are extremely limited. When the terminal collects a large amount of data, if the data cannot be reported in time, it is easy to cause memory overflow and loss of critical data. Therefore, deploying a dedicated relay node device / data aggregation node device to receive the data reported by the Ambient IoT terminal has become a highly feasible data reporting solution. The data collected by the Ambient IoT terminal is first reported to the relay node device, and after storage, classification, aggregation, and operation processing, it is uniformly reported to the base station. This data reporting method can effectively reduce the reporting frequency, save bandwidth resources, and greatly improve the reliability and success rate of data transmission.
[0088] Based on this, how to achieve the best pairing between the Ambient IoT terminal and the relay node device to improve the communication efficiency between the Ambient IoT terminal and the relay node device, and thus improve the data transmission efficiency becomes particularly important.
[0089] The present scheme provides different pairing strategies to achieve the optimal pairing between the Ambient IoT terminal and the relay node device, improve the pairing efficiency, and ensure the reliability and success rate of data transmission.
[0090] Figure 1 Flowchart of the device pairing method provided by the embodiments of the present application Figure One The present method can be applied to an Internet of Things terminal, as shown in Figure 1 The present method can include:
[0091] S101, send the location information and identification information of the Internet of Things terminal to each relay node device, and receive the distance information between each relay node device and the Internet of Things terminal sent by each relay node device.
[0092] In this embodiment, the pairing strategy between one Internet of Things terminal and a relay node device is described. By executing the pairing strategy, a target relay node can be determined from the multiple relay nodes connected to the Internet of Things terminal for pairing. Any Internet of Things terminal can use the pairing strategy provided by the present scheme to pair with a target relay node.
[0093] Optionally, the Internet of Things terminal can establish an initial connection with multiple relay node devices, so as to send the location information and identification information of the Internet of Things terminal to each relay node device. Each relay node device can calculate the distance information between itself and the Internet of Things terminal, so that the Internet of Things terminal can receive the distance information between each relay node device and the Internet of Things terminal sent by each relay node device.
[0094] The relay node device can include, but is not limited to, the following types: 5G terminal (NR UE); LTE terminal (LTE UE); NB-IoT terminal; dedicated relay base station; wireless CPE node; edge computing platform; edge gateway; same type of Internet of Things terminal; third-party power device with protocol conversion function; third-party power amplifier and forwarding device compatible with transmission protocol.
[0095] The location information of the Internet of Things terminal can refer to coordinate information, which includes but is not limited to the following information: GPS (Global Positioning System) system positioning coordinate information; Beidou system positioning coordinate information; GLONASS (GLObal Navigation Satellite System) system positioning coordinate information; absolute coordinate positioning information; relative coordinate positioning information; real-time coordinate positioning information.
[0096] The identification information of the Internet of Things terminal includes but is not limited to the following information: ID (Identity document) information; product serial number; Name information; IP (Internet Protocol) address information; MAC (Media Access Control) address information; device manufacturer information. Among them, the ID information in the identification information of the Internet of Things terminal includes but is not limited to the following information: device identification information; device serial number information; temporary mobile user identity information; global unique temporary mobile user identity information; wireless network temporary identification information.
[0097] S102, determining a plurality of candidate relay node devices according to the distance information.
[0098] In an implementable manner, a plurality of candidate relay node devices can be determined from the relay node devices according to the distance information between each relay node device and the Internet of Things terminal.
[0099] Since the distance information between the relay node device and the Internet of Things terminal is related to the information delay and data transmission efficiency between the two devices to some extent, the closer the distance information, the smaller the information delay, and the higher the data transmission efficiency.
[0100] Optionally, the distance information between the IOT terminal and the relay node device in the embodiment can refer to the Euclidean distance between the IOT terminal and the relay node device.
[0101] The relay node devices can be initially screened according to the distance information, and a plurality of candidate relay node devices can be determined.
[0102] In another implementable manner, each relay node device can also be taken as a candidate relay node device.
[0103] Optionally, the relay node devices connected with the IOT terminal can exist in the form of a list, for example, a relay node device index table is created, and the relay node device index table contains the identification information of each relay node device and the distance information between each relay node device and the IOT terminal. Each relay node device can be sorted in ascending order of distance information.
[0104] Then, according to the sorting result, the relay node devices with the top ranking can be determined from the relay node devices as candidate relay node devices, for example, the top 5 relay node devices. Of course, the specific number can be flexibly adjusted.
[0105] S103, determining a target relay node device from the plurality of candidate relay node devices.
[0106] Optionally, the target relay node device can be determined from the plurality of candidate relay node devices based on the pairing strategy provided in the scheme, and the specific pairing strategy can be seen from the specific embodiments below.
[0107] S104, sending a pairing request to the target relay node device and receiving a pairing response result fed back by the target relay node device, the pairing response result including: pairing success or pairing failure.
[0108] The IOT terminal can send a pairing request to the determined target relay node device to request pairing with it, and receive a pairing response result fed back by the target relay node device. When the pairing response result is pairing success, the IOT terminal and the target relay node are paired, and when the pairing response result is pairing failure, the IOT terminal and the target relay node are paired. The new target relay node can be determined for pairing until the pairing is successful.
[0109] In summary, the device pairing method provided in the embodiment can be used to determine the optimal pairing relay node device corresponding to the IoT terminal from the plurality of relay node devices through multiple screenings. The initial screening based on the distance information can make the pairing of the determined target relay node device and the IoT terminal more reliable, and can improve the data transmission efficiency while ensuring the data transmission reliability.
[0110] Optionally, in step S103, determining the target relay node device from the plurality of candidate relay node devices can include: determining the target relay node device from the plurality of candidate relay node devices according to the communication state of each candidate relay node device and the IoT terminal.
[0111] The communication state can represent the communication stability and the communication delay between the relay node device and the IoT terminal. According to the communication state, the relay node device with the best communication state can be determined from the plurality of candidate relay node devices as the target relay node device.
[0112] Figure 2 Flowchart of the device pairing method provided in the embodiment Figure Two Optionally, in the above steps, determining the target relay node device from the plurality of candidate relay node devices according to the communication state of each candidate relay node device and the IoT terminal can include:
[0113] S201, sending a request message to each candidate relay node device.
[0114] Optionally, the IoT terminal can send an Internet Control Message Protocol (ICMP) request message to each candidate relay node device, and the candidate relay node device can send a response message to the IoT terminal to respond to the request message after receiving the request message.
[0115] S202, receiving the response message sent by each candidate relay node device.
[0116] The Internet of Things terminal can receive the response messages sent by each candidate relay node device for the request message, and record the receiving time of the response message of each candidate relay node device.
[0117] S203, determining a target relay node device from each candidate relay node device according to the receiving time of each response message.
[0118] In an embodiment, the Internet of Things terminal can calculate the average round-trip time of the message between the Internet of Things terminal and each candidate relay node device according to the sending time of the sent request message and the receiving time of the received response message, and determine the candidate relay node device with the minimum average round-trip time as the target relay node device.
[0119] In other embodiments, the Internet of Things terminal can also determine a preset receiving time based on the sending time of the sent request message, compare the receiving time of the response message of each candidate relay node device with the preset receiving time, and determine the candidate relay node device with the minimum difference between the receiving time of the response message and the preset receiving time as the target relay node device.
[0120] Since the average round-trip time of the message can represent the communication delay state between the relay node device and the Internet of Things terminal, if there is no other factor interference, in the case of the minimum average round-trip time, the communication delay between the devices is also the minimum, and the communication efficiency is relatively high. Determining the candidate relay node device with the minimum average round-trip time as the target relay node device can ensure that the selected target relay node device has high data transmission efficiency with the Internet of Things terminal.
[0121] Figure 3 Flowchart of the device pairing method provided by the embodiments of the present application Figure Three Optionally, in the above step, the target relay node device can be determined from the plurality of candidate relay node devices according to the communication state of each candidate relay node device and the Internet of Things terminal, which can include:
[0122] S301, sending a channel quality measurement request to each candidate relay node device.
[0123] Optionally, the Internet of Things terminal can also send a channel quality measurement request to each candidate relay node device, and the candidate relay node device will respond to the channel quality measurement request and send a channel quality measurement signal to the Internet of Things terminal after receiving the channel quality measurement request.
[0124] S302, receiving the channel quality measurement signal sent by each candidate relay node device.
[0125] The Internet of Things terminal can receive the channel quality measurement information sent by each candidate relay node device. The channel quality measurement signal includes but is not limited to the following information: SINR (Signal to Interference plus Noise Ratio); RSRP (Reference Signal Receiving Power); RSRQ (Reference Signal Receiving Quality); RSCP (Received Signal Code Power); RSSI (Received Signal Strength Indicator).
[0126] S303, determining a target relay node device from each candidate relay node device according to each channel quality measurement signal.
[0127] Optionally, the candidate relay node device with the strongest channel quality measurement signal can be determined as the target relay node device according to the channel quality measurement signals sent by each candidate relay node device.
[0128] The stronger the channel quality measurement signal is, the more stable the data transmission between devices is. By determining the candidate relay node device with the strongest channel quality measurement signal as the target relay node device, the reliability and success rate of data transmission between the Internet of Things terminal and the target relay node device can be ensured.
[0129] Figure 4 The device pairing method provided by the embodiment of the application Figure Four Optionally, in step S103, the target relay node device can be determined from the plurality of candidate relay node devices, which can include:
[0130] S401, comparing each candidate relay node device with each relay node device in a preconfigured relay node device list, and the preconfigured relay node device list includes all relay node devices allowed to be paired by the Internet of Things terminal.
[0131] In addition to the above two ways of determining the target relay node device based on the communication state, the selection of the target relay node device can also be based on the preconfigured information comparison.
[0132] Generally, due to the difference between operators, the types and processing capabilities of relay node devices are different, and the types of relay node devices that can be paired by different Internet of Things terminals also differ, and not all relay node devices can be paired with any Internet of Things terminal.
[0133] The preconfigured relay node device list can include all relay node devices allowed to be paired by the Internet of Things terminal. The relay node devices included in the preconfigured relay node device list corresponding to different Internet of Things terminals can be different.
[0134] The identity of each candidate relay node device can be compared with the identity of each relay node device in the preconfigured relay node device list corresponding to the Internet of Things terminal.
[0135] S402, if at least one candidate relay node device in each candidate relay node device is consistent with the relay node device in the preconfigured relay node device list, a target relay node device is determined from the at least one candidate relay node device according to the ranking of the at least one candidate relay node device.
[0136] If one or more candidate relay node devices in each candidate relay node device are compared successfully with the relay node device in the preconfigured relay node device list, that is, there is one or more candidate relay node devices in the preconfigured relay node device list, a target relay node device can be determined from the one or more candidate relay node devices according to the ranking of the one or more candidate relay node devices.
[0137] The ranking of the one or more candidate relay node devices can be determined according to the distance information of each candidate relay node device from the Internet of Things terminal. The candidate relay node device with the smallest distance information can be determined as the target relay node device from the one or more candidate relay node devices. The one or more candidate relay node devices here are the candidate relay node devices compared above and existing in the preconfigured relay node device list.
[0138] Alternatively, in the case of ranking the candidate relay node devices in the list form according to the distance information from small to large, the candidate relay node device with the highest ranking in the one or more candidate relay node devices can be taken as the target relay node device.
[0139] Similarly, the Internet of Things terminal can send a pairing request to the target relay node, and complete pairing according to the pairing response result received from the target relay node.
[0140] If there is no candidate relay node device in each candidate relay node device compared successfully with the relay node device in the preconfigured relay node device list, the Internet of Things terminal determines new candidate relay node devices according to the distance information of each relay node device currently connected to the Internet of Things terminal after the timer expires, and determines a new target relay node device from the new candidate relay node devices.
[0141] In some embodiments, after receiving the pairing request sent by the Internet of Things terminal, the target relay node device can perform node state detection of the relay node device. When the node state detection passes, the target relay node device sends a response result of pairing success to the Internet of Things terminal, so that the Internet of Things terminal and the target relay node device complete pairing. When the node state detection does not pass, the target relay node device sends a response result of pairing failure to the Internet of Things terminal. For the target relay node device that fails to pair, the target relay node device can be deleted from the candidate relay node devices, and a new target relay node device is determined according to the above pairing strategies to perform pairing until a target relay node device that successfully pairs with the Internet of Things terminal is found, and then the pairing is stopped.
[0142] Figure 5 Flowchart of the device pairing method provided by the embodiments of the present application Figure Five Optionally, the method can further include:
[0143] S501, if a new relay node device is detected to be activated, the new relay node device is taken as a relay node device corresponding to the Internet of Things terminal, and the order of the current candidate relay node devices is updated according to distance information of the new relay node device and the Internet of Things terminal.
[0144] The method further provides an updating method of the relay node device. Optionally, when the Internet of Things terminal detects that a new relay node device is activated, the Internet of Things terminal establishes a connection with the new relay node device, sends position information and identification information of the Internet of Things terminal to the new relay node device, and receives distance information of the new relay node device and the Internet of Things terminal fed back by the new relay node device.
[0145] Then, the order of the current candidate relay node devices can be updated according to the distance information of the new relay node device and the Internet of Things terminal. When the distance information of the new relay node device and the Internet of Things terminal is greater than the distance information of all the candidate relay node devices and the Internet of Things terminal, the order of the candidate relay node devices remains unchanged. When the distance information of the new relay node device and the Internet of Things terminal is between the distance information of all the candidate relay node devices and the Internet of Things terminal, the order of the candidate relay node devices is changed. When the number of the selected candidate relay node devices remains unchanged, the last candidate relay node device in the previously determined candidate relay node devices is replaced by the new relay node device.
[0146] For example, the current determined candidate relay node devices are candidate relay node device 1, candidate relay node device 2, candidate relay node device 3, and candidate relay node device 4, and the distance information is sorted from small to large as candidate relay node device 1, candidate relay node device 2, candidate relay node device 3, and candidate relay node device 4.
[0147] Suppose the distance information between the new relay node device and the Internet of Things terminal is between the distance information corresponding to the candidate relay node device 2 and the distance information corresponding to the candidate relay node device 3, and the number of candidate relay node devices to be determined is 4, then the candidate relay node devices are updated, and the updated candidate relay node devices are candidate relay node device 1, candidate relay node device 2, new relay node device, and candidate relay node device 3. That is, the original candidate relay node device 4 is no longer a candidate relay node device.
[0148] S502, if it is detected that the relay node device corresponding to the Internet of Things terminal is closed, the closed relay node device is no longer used as the relay node device corresponding to the Internet of Things terminal.
[0149] In some cases, when the Internet of Things terminal detects that the relay node device connected thereto is closed, the relay node device is no longer one of the relay node devices of the Internet of Things terminal, and in the case where the relay node devices of the Internet of Things terminal exist in the form of a list, the closed relay node device is no longer used as the relay node device corresponding to the Internet of Things terminal can mean that the closed relay node device is deleted from the list.
[0150] Optionally, since the relay node devices corresponding to the Internet of Things terminal have changed, the order of the relay node devices may change, and thus the determined candidate relay node devices may also change.
[0151] Through the update strategy provided by the method, the relay node devices corresponding to the Internet of Things terminal can be updated in real time, so that the selection of the candidate relay node devices and the selection of the target relay node device are dynamically updated, and the selected target relay node device and the Internet of Things terminal have the best matching efficiency.
[0152] In addition, in some embodiments, when the Internet of Things terminal fails to pair with the currently selected target relay node device, the Internet of Things terminal can delete the target relay node device from the candidate relay node devices and select a new target relay node device from the remaining candidate relay node devices for pairing.
[0153] The method updates the relay node devices corresponding to the Internet of Things terminal in real time according to the activation of the new relay node device detected or the shutdown of the existing relay node device, so that the determined candidate relay node device is updated in real time; and the selected target relay node device is updated in real time according to the pairing result with the current target relay node device. In combination with the two links of updating, it can be effectively ensured that the selected target relay node device is the best pairing device at any time.
[0154] In summary, the device pairing method provided by the embodiment can perform primary screening on the relay node devices based on the distance information between the relay node devices and the Internet of Things terminal received by the Internet of Things terminal, determine a plurality of candidate relay node devices from the relay node devices, and further perform secondary screening on the candidate relay node devices based on a pairing strategy, determine a target relay node device from the candidate relay node devices, and pair with the target relay node device by initiating a pairing request. The method can determine the best pairing relay node device corresponding to the Internet of Things terminal from a plurality of relay node devices through multiple screenings. The initial screening based on the distance information can make the pairing of the determined target relay node device and the Internet of Things terminal more reliable in combination with the secondary screening, while ensuring the reliability of data transmission and improving the data transmission efficiency.
[0155] In addition, the method updates the relay node devices corresponding to the Internet of Things terminal in real time according to the activation of the new relay node device detected or the shutdown of the existing relay node device, so that the determined candidate relay node device is updated in real time; and the selected target relay node device is updated in real time according to the pairing result with the current target relay node device. In combination with the two links of updating, it can be effectively ensured that the selected target relay node device is the best pairing device at any time.
[0156] Next, the steps of the device pairing method applied to the relay node device provided by the method will be described. The relay node device and the Internet of Things terminal exchange information, and part of the interaction process has been described in detail in the execution method of the Internet of Things terminal side. The execution method of the relay node device side can be understood with reference to the execution method of the Internet of Things terminal side.
[0157] Figure 6 Flowchart of the device pairing method provided by the embodiment of the application Figure Six Optionally, the method can include:
[0158] S601, receiving position information and identification information sent by each Internet of Things terminal.
[0159] In practical applications, one Internet of Things terminal will send its position information and identification information to multiple relay node devices with which it establishes a connection, and one relay node device will also receive position information and identification information from multiple Internet of Things terminals.
[0160] S602, determining distance information between the relay node device and each Internet of Things terminal according to the position information of the relay node device and the position information of each Internet of Things terminal, and sending the distance information between the relay node device and each Internet of Things terminal to each corresponding Internet of Things terminal according to the identification information of each Internet of Things terminal.
[0161] The relay node device will calculate the distance information between the relay node device and each Internet of Things terminal according to its own position information and the position information of each Internet of Things terminal received, and send each distance information to the corresponding Internet of Things terminal, which can be sent according to the identification information of the Internet of Things terminal.
[0162] The position information of the relay node device also refers to the coordinate information of the relay node device, which includes but is not limited to the following information: GPS (Global Positioning System) system positioning coordinate information; Beidou system positioning coordinate information; GLONASS (GLObal Navigation Satellite System) system positioning coordinate information; absolute coordinate positioning information; relative coordinate positioning information; real-time coordinate positioning information.
[0163] The identification information of the relay node device includes but is not limited to the following information: ID (Identity document) information; product serial number; Name information; IP (Internet Protocol) address information; MAC (Media Access Control) address information; device manufacturer information. The ID information in the identification information of the relay node device includes but is not limited to the following information: device identification information; device serial number information; temporary mobile user identity information; globally unique temporary mobile user identity information; wireless network temporary identification information.
[0164] S603, receiving pairing requests sent by each Internet of Things terminal, detecting the node state of the relay node device, and sending pairing response results to each Internet of Things terminal according to the node state detection result.
[0165] When the relay node device receives the pairing request sent by each Internet of Things terminal as a target relay node device, the node state of the relay node device can be detected first, and a pairing response result is sent to each Internet of Things terminal according to the detection result of the node state.
[0166] Figure 7 Flowchart of the device pairing method provided by the embodiment of the application Figure Seven Optionally, the detection of the node state of the relay node device can include node idle channel detection, node idle computing resource detection, and node paired Internet of Things terminal quantity detection.
[0167] In some embodiments, when the relay node device receives the pairing request sent by each Internet of Things terminal, a relay node device state detection algorithm can be executed to detect the node state of the relay node device, wherein the node state detection algorithm includes but is not limited to detecting the following contents: whether the node has idle channels available; whether the node has idle computing resources; and whether the number of Internet of Things terminals already paired with the node exceeds an upper limit value.
[0168] When the detection result is that the node has idle channels available, the node has idle computing resources, and the number of Internet of Things terminals already paired with the node does not exceed the upper limit value, it is determined that the detection is passed. When one of the above three detection contents does not meet the condition, it is determined that the detection is not passed.
[0169] In step S603, according to the node state detection result, a pairing response result is sent to each Internet of Things terminal, which can include:
[0170] S701, if the node state detection result is passed, a pairing success is sent to each Internet of Things terminal.
[0171] When the node state detection result of the relay node device is passed, a pairing success message is sent to each Internet of Things terminal, and the matching is completed. Here, each Internet of Things terminal refers to each Internet of Things terminal that sends a pairing request to the relay node device.
[0172] S702, if the node state detection result is not passed, a pairing failure is sent to each Internet of Things terminal.
[0173] When the node state detection result of the relay node device is not passed, a pairing failure message is sent to each Internet of Things terminal, and if the pairing fails, the Internet of Things terminal can delete the relay node device that fails to pair from the candidate relay node device.
[0174] Since the selection of the target relay node device by the Internet of Things terminal is unidirectional, and the selected target relay node itself may have some problems so as not to be the best matching object of the Internet of Things terminal, based on this, the node state detection of the target relay node device is further performed on the selected target relay node device, so as to ensure that the most effective relay node device is selected, thereby ensuring the best matching between the Internet of Things terminal and the relay node device.
[0175] In summary, the device pairing method provided by the embodiment can perform node state detection on the relay node device after receiving the pairing request sent by the Internet of Things terminal, so as to detect the node state of the relay node device, and send a pairing success message to the Internet of Things terminal after the detection is passed. The node state detection of the target relay node device is further performed on the selected target relay node device, so as to ensure that the most effective relay node device is selected, thereby ensuring the best matching between the Internet of Things terminal and the relay node device.
[0176] Figure 8 The signaling interaction between the Internet of Things terminal and the relay node device provided by the embodiment of the application is shown in the figure. Figure One As shown in the figure, Figure 8 The method can include:
[0177] S801, the Internet of Things terminal sends the position information and the identification information of the Internet of Things terminal to the relay node device;
[0178] S802, the relay node device determines the distance information between the relay node device and each Internet of Things terminal according to the position information of the relay node device and the position information of the Internet of Things terminal;
[0179] S803, the relay node device sends the distance information between the relay node device and the Internet of Things terminal to the Internet of Things terminal according to the identification information of the Internet of Things terminal;
[0180] S804, the Internet of Things terminal determines the candidate relay node device according to the distance information sent by each relay node device;
[0181] S805, the Internet of Things terminal sends a request message to the candidate relay node device;
[0182] S806, the candidate relay node device sends a response message to the Internet of Things terminal;
[0183] S807, the Internet of Things terminal determines the target relay node device from each candidate relay node device according to the receiving time of the response message of each candidate relay node device;
[0184] S808, the Internet of Things terminal sends a pairing request to the target relay node device;
[0185] S809, the target relay node device performs node state detection, and generates a detection result;
[0186] S810, the target relay node device sends a pairing response result to the Internet of Things terminal according to the detection result;
[0187] S811, the Internet of Things terminal completes pairing or updates the candidate relay node device according to the pairing response result.
[0188] Figure 9 The signaling interaction between the Internet of Things terminal and the relay node device provided by the embodiment of the present application Figure Two As shown in the method can include: Figure 9
[0189] S901, the Internet of Things terminal sends the location information and the identification information of the Internet of Things terminal to the relay node device;
[0190] S902, the relay node device determines the distance information between the relay node device and each Internet of Things terminal according to the location information of the relay node device and the location information of the Internet of Things terminal;
[0191] S903, the relay node device sends the distance information between the relay node device and the Internet of Things terminal to the Internet of Things terminal according to the identification information of the Internet of Things terminal;
[0192] S904, the Internet of Things terminal determines the candidate relay node device according to the distance information sent by each relay node device;
[0193] S905, the Internet of Things terminal sends a channel quality measurement request to the candidate relay node device;
[0194] S906, the candidate relay node device sends a channel quality measurement signal to the Internet of Things terminal;
[0195] S907, the Internet of Things terminal determines the target relay node device from each candidate relay node device according to the channel quality measurement signal of each candidate relay node device;
[0196] S908, the Internet of Things terminal sends a pairing request to the target relay node device;
[0197] S909, the target relay node device performs node state detection, and generates a detection result;
[0198] S910, the target relay node device sends a pairing response result to the Internet of Things terminal according to the detection result;
[0199] S911, the Internet of Things terminal completes pairing or updates the candidate relay node device according to the pairing response result.
[0200] Figure 10 Signaling interaction between IOT terminal and relay node device provided by embodiments of the present application Figure Three As shown in the method can comprise: Figure 10
[0201] S1001, the IOT terminal sends the IOT terminal to the relay node device position information and identification information;
[0202] S1002, the relay node device determines the distance information between the relay node device and each IOT terminal according to the position information of the relay node device and the position information of the IOT terminal;
[0203] S1003, the relay node device sends the distance information between the relay node device and the IOT terminal to the IOT terminal according to the identification information of the IOT terminal;
[0204] S1004, the IOT terminal determines the candidate relay node device according to each distance information sent by each relay node device;
[0205] S1005, the IOT terminal compares each candidate relay node device with each relay node device in the preconfigured relay node device list; if there is at least one candidate relay node device in each candidate relay node device which is consistent with the relay node device in the preconfigured relay node device list, the target relay node device is determined from at least one candidate relay node device according to the ranking of at least one candidate relay node device.
[0206] S1006, the IOT terminal sends a pairing request to the target relay node device;
[0207] S1007, the target relay node device performs node state detection and generates a detection result;
[0208] S1008, the target relay node device sends a pairing response result to the IOT terminal according to the detection result;
[0209] S1009, the IOT terminal completes pairing or updates the candidate relay node device according to the pairing response result.
[0210] It is worth noting that in the above three interaction embodiments, the relay node device represents the candidate relay node device or the target relay node device in different cases. The specific implementation of each step of the above method is not described again.
[0211] The following describes the device, equipment and storage medium for performing the device pairing method provided by the present application, and the specific implementation process and technical effects are described above, and the following is not described again.
[0212] Figure 11 A schematic diagram of a device pairing apparatus is provided for the embodiments of the present application, and the functions implemented by the device pairing apparatus correspond to the method steps performed by the Internet of Things terminal. The apparatus can be understood as the Internet of Things terminal or the processor of the terminal, as shown in the figure. The apparatus can include a sending module 1110, a determining module 1111, and a receiving module 1112. Figure 11
[0213] The sending module 1110 is configured to send the position information and the identification information of the Internet of Things terminal to each relay node device, and receive the distance information between each relay node device and the Internet of Things terminal sent by each relay node device.
[0214] The determining module 1111 is configured to determine a plurality of candidate relay node devices according to the distance information.
[0215] The determining module 1111 is configured to determine a target relay node device from the plurality of candidate relay node devices.
[0216] The receiving module 1112 is configured to send a pairing request to the target relay node device, and receive a pairing response result fed back by the target relay node device, wherein the pairing response result includes a pairing success or a pairing failure.
[0217] Optionally, the determining module 1111 is specifically configured to determine the target relay node device from the plurality of candidate relay node devices according to the communication state of each candidate relay node device and the Internet of Things terminal.
[0218] Optionally, the determining module 1111 is specifically configured to send a request message to each candidate relay node device.
[0219] Receive a response message sent by each candidate relay node device.
[0220] Determine the target relay node device from the plurality of candidate relay node devices according to the receiving time of each response message.
[0221] Optionally, the determining module 1111 is specifically configured to send a channel quality measurement request to each candidate relay node device.
[0222] Receive a channel quality measurement signal sent by each candidate relay node device.
[0223] Determine the target relay node device from the plurality of candidate relay node devices according to the channel quality measurement signal.
[0224] Optionally, the determining module 1111 is specifically configured to compare each candidate relay node device with each relay node device in a preconfigured relay node device list, wherein the preconfigured relay node device list includes all relay node devices allowed to be paired by the Internet of Things terminal.
[0225] If there is at least one candidate relay node device consistent with the relay node devices in the preconfigured relay node device list among the candidate relay node devices, a target relay node device is determined from the at least one candidate relay node device according to the ranking of the at least one candidate relay node device.
[0226] Optionally, the apparatus further comprises an updating module.
[0227] The updating module is configured to, if a new relay node device is detected to be activated, take the new relay node device as a relay node device corresponding to the Internet of Things terminal, and update the ranking of the current candidate relay node devices according to distance information of the new relay node device and the Internet of Things terminal.
[0228] If the relay node device corresponding to the Internet of Things terminal is detected to be closed, the closed relay node device is no longer taken as the relay node device corresponding to the Internet of Things terminal.
[0229] Figure 12 Another schematic diagram of an apparatus for device pairing is provided for the embodiments of the present application, and the functions implemented by the apparatus correspond to the method steps performed by the relay node device. The apparatus can be understood as the relay node device or the processor of the device, as shown in the apparatus can comprise a receiving module 1220, a determining module 1221, and a sending module 1222. Figure 12
[0230] The receiving module 1220 is configured to receive the position information and the identification information sent by each Internet of Things terminal.
[0231] The determining module 1221 is configured to determine distance information of the relay node device and each Internet of Things terminal according to the position information of the relay node device and the position information of each Internet of Things terminal, and send the distance information of the relay node device and each Internet of Things terminal to each corresponding Internet of Things terminal according to the identification information of each Internet of Things terminal.
[0232] The sending module 1222 is configured to receive a pairing request sent by each Internet of Things terminal, detect a node state of the relay node device, and send a pairing response result to each Internet of Things terminal according to a node state detection result.
[0233] Optionally, the detection of the node state of the relay node device comprises node idle channel detection, node idle computing resource detection, and number detection of Internet of Things terminals that have been paired with the relay node device.
[0234] The sending module 1222 is specifically configured to send a pairing success to each Internet of Things terminal if the node state detection result is a detection pass.
[0235] If the node state detection result is a detection failure, the pairing failure is sent to each Internet of Things terminal.
[0236] The apparatus is configured to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0237] The modules can be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), or the like. For another example, when a certain module is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, for example, a central processing unit (CPU) or other processor capable of invoking program code. For another example, the modules can be integrated together to implement in the form of a system on a chip (SOC).
[0238] The modules can be connected or communicate with each other via wired connection or wireless connection. The wired connection can include metal cable, optical cable, hybrid cable, or the like, or any combination thereof. The wireless connection can include connection in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or the like, or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the system and apparatus described above can refer to the corresponding process in the method embodiment, which will not be described here again.
[0239] Figure 13 A structural schematic diagram of an electronic device is provided for the embodiments of the present application. The electronic device can be an Internet of Things terminal or a relay node device.
[0240] The electronic device can include a processor 801 and a storage medium 802.
[0241] The storage medium 802 is configured to store a program, and the processor 801 invokes the program stored in the storage medium 802 to execute the method embodiments described above. The specific implementation and technical effects are similar, which will not be described here again.
[0242] The storage medium 802 stores program codes, which, when executed by the processor 801, cause the processor 801 to perform various steps in the device pairing method according to various exemplary embodiments of the present application described in the above “Exemplary Method” section of the specification.
[0243] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, and can implement or execute the methods, steps and logical block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution.
[0244] The storage medium 802 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The storage medium 802 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, for storing program instructions and / or data.
[0245] Optionally, the present application also provides a program product, such as a computer readable storage medium, comprising a program for executing the above-mentioned method embodiments when executed by a processor.
[0246] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. The division of the units is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0247] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0248] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be a physically independent unit, or two or more units can be integrated into a unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0249] The integrated unit implemented in the form of software functional units can be stored in a computer readable storage medium. The software functional unit stored in the storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in the various embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and various program code storage media.
Claims
1. A device pairing method, characterized in that, Applied to Internet of Things (IoT) terminals, the method includes: Send the location information and identification information of the IoT terminal to each relay node device, and receive the distance information between each relay node device and the IoT terminal sent by each relay node device; Based on the distance information, multiple candidate relay node devices are identified; The target relay node device is determined from the plurality of candidate relay node devices; Send a pairing request to the target relay node device and receive a pairing response result from the target relay node device, the pairing response result including: pairing successful or pairing failed; The step of determining the target relay node device from the plurality of candidate relay node devices includes: Based on the communication status between each candidate relay node device and the IoT terminal, a target relay node device is determined from the plurality of candidate relay node devices. The communication status characterizes the communication stability and communication latency between each candidate relay node device and the IoT terminal.
2. The method according to claim 1, characterized in that, The step of determining the target relay node device from the plurality of candidate relay node devices based on the communication status between each candidate relay node device and the IoT terminal includes: Send request messages to each candidate relay node device; Receive response messages sent by each of the candidate relay node devices; Based on the reception time of each response message, the target relay node device is determined from each candidate relay node device.
3. The method according to claim 1, characterized in that, The step of determining the target relay node device from the plurality of candidate relay node devices based on the communication status between each candidate relay node device and the IoT terminal includes: Send channel quality measurement requests to each candidate relay node device; Receive channel quality measurement signals sent by each of the candidate relay node devices; Based on the channel quality measurement signals, the target relay node device is determined from the candidate relay node devices.
4. The method according to claim 1, characterized in that, The step of determining the target relay node device from the plurality of candidate relay node devices includes: Each candidate relay node device is compared with each relay node device in the pre-configured relay node device list, which includes all relay node devices that the IoT terminal is allowed to pair with. If at least one of the candidate relay node devices matches a relay node device in the pre-configured relay node device list, then the target relay node device is determined from the at least one candidate relay node device according to the order of the at least one candidate relay node device.
5. The method according to claim 1, characterized in that, The method further includes: If a new relay node device is detected to be activated, the new relay node device will be used as a relay node device corresponding to the IoT terminal, and the order of the current candidate relay node devices will be updated according to the distance information between the new relay node device and the IoT terminal. If it is detected that the relay node device corresponding to the IoT terminal is turned off, then the turned-off relay node device will no longer be used as the relay node device corresponding to the IoT terminal.
6. A device pairing method, characterized in that, Applied to relay node devices, the method includes: Receive location and identification information sent by various IoT terminals; Based on the location information of the relay node device and the location information of each IoT terminal, the distance information between the relay node device and each IoT terminal is determined respectively, and the distance information between the relay node device and each IoT terminal is sent to the corresponding IoT terminal according to the identification information of each IoT terminal. The system receives pairing requests from various IoT terminals, detects the node status of the relay node device, and sends pairing response results to each IoT terminal based on the node status detection results.
7. The method according to claim 6, characterized in that, The detection of the node status of the relay node device includes: node idle channel detection, node idle computing power resource detection, and detection of the number of IoT terminals paired with the node. The step of sending pairing response results to each IoT terminal based on the node status detection results includes: If the node status detection result is successful, then a pairing success message is sent to each IoT terminal. If the node status detection result is "detection failed", then a pairing failure message will be sent to each IoT terminal.
8. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the device pairing method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, performs the steps of the device pairing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Relay selection optimization method based on Internet of Vehicles and urban Internet of Things
CN110381465A
Wireless sensing relay message processing method and power equipment monitoring system
CN110830944A