Device pairing method, electronic device, and computer-readable storage medium
By employing a two-way pairing strategy between IoT terminals and relay node devices, and filtering candidate devices based on capability and distance information, the issues of data transmission efficiency and stability of passive IoT terminals are resolved, achieving efficient device pairing and data transmission.
Patent Information
- Application Number
- CN202310197060.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-02-23
AI Technical Summary
When passive IoT terminals collect large amounts of data, they cannot report in a timely manner, leading to memory overflow and loss of critical data. How can we achieve efficient and accurate pairing with relay node devices to improve data transmission efficiency and stability?
By employing a two-way pairing strategy between IoT terminals and relay node devices, candidate devices are selected based on capability and distance information to ensure multi-connection pairing within the limits of device performance, thereby improving data transmission efficiency and stability.
By taking into account device capabilities and distance information, candidate devices can be accurately identified, improving the pairing success rate and data transmission stability, making full use of device performance, and enhancing data transmission efficiency.
Smart Images

Figure CN116170474B_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 extremely 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 provide a device pairing method, an electronic device and a computer readable storage medium to improve the efficient and accurate pairing of Internet of Things terminals and relay node devices, thereby improving the data transmission efficiency and stability between Internet of Things terminals and relay node devices.
[0005] To achieve the above purpose, 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, the method comprising:
[0007] sending the location information and 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 the number of relay node devices required for pairing according to the business requirement information;
[0009] determining the number of relay node devices currently allowed for pairing according to the capability information of the Internet of Things terminal, the capability information being used to represent the load state of the Internet of Things terminal;
[0010] determining at least one candidate relay node device from the relay node devices according to the number of relay node devices required for pairing, the number of relay node devices currently allowed for pairing, and the distance information between each relay node device and the Internet of Things terminal;
[0011] sending a pairing request to each candidate relay node device, and receiving a pairing result fed back by each candidate relay node, the pairing result comprising: pairing success or pairing failure.
[0012] Optionally, the determining the number of relay node devices currently allowed to pair according to the capability information of the Internet of Things terminal comprises:
[0013] determining the number of relay node devices currently allowed to pair according to the number of relay node devices allowed to pair simultaneously by the Internet of Things terminal and the number of relay node devices currently paired by the Internet of Things terminal.
[0014] Optionally, the determining each candidate relay node device from each relay node device according to the number of relay node devices required to pair, the number of relay node devices currently allowed to pair, and distance information of each relay node device from the Internet of Things terminal comprises:
[0015] determining the number of candidate relay node devices required according to the number of relay node devices required to pair and the number of relay node devices currently allowed to pair;
[0016] determining an order of each relay node device according to distance information of each relay node device from the Internet of Things terminal;
[0017] determining each candidate relay node device from each relay node device according to the number of candidate relay node devices required, identification information of relay node devices currently paired, and the order of each relay node device.
[0018] Optionally, the determining the number of candidate relay node devices required according to the number of relay node devices required to pair and the number of relay node devices currently allowed to pair comprises:
[0019] if the difference between the number of relay node devices required to pair and the number of relay node devices currently paired is greater than the number of relay node devices currently allowed to pair, determining the number of relay node devices currently allowed to pair as the number of candidate relay node devices required;
[0020] if the difference between the number of relay node devices required to pair and the number of relay node devices currently paired is less than or equal to the number of relay node devices currently allowed to pair, determining the difference between the number of relay node devices required to pair and the number of relay node devices currently paired as the number of candidate relay node devices required.
[0021] Optionally, the method further comprises:
[0022] Discarding the candidate relay node device which fails to pair, and determining a new candidate relay node device until the number of candidate relay nodes which successfully pair meets the required number of candidate relay node devices, then stopping pairing.
[0023] 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:
[0024] Receiving the position information and the identification information sent by each Internet of Things terminal, and determining distance information between each Internet of Things terminal and the relay node device according to the position information of the relay node device and the position information of each Internet of Things terminal;
[0025] Determining the number of Internet of Things terminals required to be paired according to the service requirement information;
[0026] Determining the number of Internet of Things terminals currently allowed to be paired according to the capability information of the relay node device, wherein the capability information is used to represent the load state of the relay node device;
[0027] Determining at least one candidate Internet of Things terminal from the Internet of Things terminals according to the number of Internet of Things terminals required to be paired, the number of Internet of Things terminals currently allowed to be paired, and the distance information between each Internet of Things terminal and the relay node device;
[0028] Sending a pairing request to each candidate Internet of Things terminal according to the node state detection result of the relay node device, and receiving a pairing confirmation message sent by each candidate Internet of Things terminal.
[0029] Optionally, the determining the number of Internet of Things terminals currently allowed to be paired according to the capability information of the relay node device comprises:
[0030] Determining the number of Internet of Things terminals currently allowed to be paired according to the number of Internet of Things terminals simultaneously allowed to be paired by the relay node device and the number of Internet of Things terminals currently paired by the relay node device in the capability information of the relay node device.
[0031] Optionally, the sending a pairing request to each candidate Internet of Things terminal according to the node state detection result of the relay node device comprises:
[0032] If the node state detection of the relay node device passes, sending a pairing request to each candidate Internet of Things terminal, and receiving a pairing confirmation message sent by each candidate Internet of Things terminal;
[0033] If the node state detection of the relay node device fails, the node state detection is re-performed after a time-out, until the node state detection passes, and a pairing request is sent to each candidate IoT terminal, the node state detection comprising: node idle channel detection, node idle computing resource detection, and node paired IoT terminal quantity detection.
[0034] In a third aspect, an embodiment of the present application provides a device pairing apparatus applied to an IoT terminal, the apparatus comprising: a sending module, a determining module, and a receiving module.
[0035] 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 of each relay node device and the IoT terminal sent by each relay node device.
[0036] The determining module is configured to determine a quantity of required relay node devices for pairing according to service demand information.
[0037] The determining module is configured to determine a quantity of currently allowed relay node devices for pairing according to capability information of the IoT terminal, the capability information being used to represent a load state of the IoT terminal.
[0038] The determining module is configured to determine at least one candidate relay node device from the relay node devices according to the quantity of required relay node devices for pairing, the quantity of currently allowed relay node devices for pairing, and the distance information of each relay node device and the IoT terminal.
[0039] The receiving module is configured to send a pairing request to each candidate relay node device, and receive a pairing result fed back by each candidate relay node device, the pairing result comprising: pairing success or pairing failure.
[0040] Optionally, the determining module is specifically configured to determine the quantity of currently allowed relay node devices for pairing of the IoT terminal according to a quantity of currently allowed relay node devices for pairing of the IoT terminal and a quantity of currently paired relay node devices of the IoT terminal in the capability information of the IoT terminal.
[0041] Optionally, the determining module is specifically configured to determine the quantity of required candidate relay node devices according to the quantity of required relay node devices for pairing and the quantity of currently allowed relay node devices for pairing.
[0042] The distance information of each relay node device and the IoT terminal is used to determine a ranking of each relay node device.
[0043] determine the candidate relay node devices from the relay node devices according to the required number of candidate relay node devices, the identification information of the currently paired relay node devices and the ranking of the relay node devices.
[0044] Optionally, the determining module is specifically configured to: if the difference between the required number of paired relay node devices and the current number of paired relay node devices is greater than the current number of allowed paired relay node devices, determine the current number of allowed paired relay node devices as the required number of candidate relay node devices.
[0045] If the difference between the required number of paired relay node devices and the current number of paired relay node devices is less than or equal to the current number of allowed paired relay node devices, determine the difference between the required number of paired relay node devices and the current number of paired relay node devices as the required number of candidate relay node devices.
[0046] Optionally, the apparatus further includes an updating module.
[0047] The updating module is configured to discard the candidate relay node devices that fail to pair, and determine new candidate relay node devices until the number of candidate relay node devices that successfully pair meets the required number of candidate relay node devices, and then stop pairing.
[0048] In a fourth aspect, the embodiments of the present application further provide a device pairing apparatus applied to a relay node device, the apparatus including a receiving module, a determining module and a sending module.
[0049] The receiving module is configured to receive the position information and the identification information sent by each Internet of Things terminal, and determine distance information between each Internet of Things terminal and the relay node device according to the position information of the relay node device and the position information of each Internet of Things terminal.
[0050] The determining module is configured to determine the required number of paired Internet of Things terminals according to service demand information.
[0051] The determining module is configured to determine the current number of allowed paired Internet of Things terminals according to the capability information of the relay node device, the capability information being used to represent the load state of the relay node device.
[0052] The determining module is configured to determine at least one candidate Internet of Things terminal from the Internet of Things terminals according to the required number of paired Internet of Things terminals, the current number of allowed paired Internet of Things terminals and the distance information between each Internet of Things terminal and the relay node device.
[0053] The sending module is configured to send a pairing request to each candidate IoT terminal according to the node state detection result of the relay node device, and receive a pairing confirmation message sent by each candidate IoT terminal.
[0054] Optionally, the determining module is specifically configured to determine the number of IoT terminals that the relay node device currently allows to pair according to the number of IoT terminals that the relay node device simultaneously allows to pair and the number of IoT terminals that the relay node device has currently paired in the capability information of the relay node device.
[0055] Optionally, the sending module is specifically configured to send a pairing request to each candidate IoT terminal and receive a pairing confirmation message sent by each candidate IoT terminal if the node state detection of the relay node device passes.
[0056] If the node state detection of the relay node device fails, the node state detection is performed again after timing out until the node state detection passes, and then a pairing request is sent to each candidate IoT terminal, and the node state detection includes node idle channel detection, node idle computing resource detection, and number detection of IoT terminals that the relay node device has currently paired.
[0057] In a fifth aspect, an embodiment of the present application provides an electronic device, including a processor, a storage medium, and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine readable instructions to perform the steps of the device pairing method provided in the first aspect or the second aspect.
[0058] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the device pairing method provided in the first aspect or the second aspect.
[0059] The present application has the following beneficial effects:
[0060] The application provides a device pairing method, an electronic device and a computer readable storage medium. The number of relay node devices currently allowed to be paired by an Internet of Things terminal can be determined based on the capability information of the Internet of Things terminal, and the number of candidate relay node devices can be accurately determined in combination with the number of relay node devices required to be paired by the Internet of Things terminal. That is, the upper limit of the relay node devices that can be paired by the Internet of Things terminal within the range allowed by the capability of the Internet of Things terminal can be determined, so as to fully utilize the device performance of the Internet of Things terminal and the relay node device and improve the data transmission efficiency between the Internet of Things terminal and the relay node device. The number of candidate relay node devices that meet the number can be determined from a plurality of relay node devices based on the distance information of each relay node device and the Internet of Things terminal. Since the distance information is related to the channel delay and the channel quality signal, the relay node devices are screened through the distance information, so that the pairing success rate of the selected candidate relay node device and the Internet of Things terminal is higher, and the data transmission stability is also higher.
[0061] In addition, the device pairing method provided by the embodiment can determine the number of Internet of Things terminals currently allowed to be paired by a relay node device based on the capability information of the relay node device, and accurately determine the number of candidate Internet of Things terminals in combination with the number of Internet of Things terminals required to be paired by the relay node device. That is, the upper limit of the Internet of Things terminals that can be paired by the relay node device within the range allowed by the capability of the relay node device can be determined, so as to fully utilize the device performance of the Internet of Things terminal and the relay node device and improve the data transmission efficiency between the Internet of Things terminal and the relay node device. The number of candidate Internet of Things terminals that meet the number can be determined from a plurality of Internet of Things terminals based on the distance information of each Internet of Things terminal and the relay node device. Since the distance information is related to the channel delay and the channel quality signal, the Internet of Things terminals are screened through the distance information, so that the pairing success rate of the selected candidate Internet of Things terminal and the relay node device is higher, and the data transmission stability is also higher. BRIEF DESCRIPTION OF DRAWINGS
[0062] 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 of the 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.
[0063] Figure 1 Flowchart of the device pairing method provided by the embodiment of the application Figure One ;
[0064] Figure 2Flowchart of device pairing method provided by an embodiment of the present application Figure Two ;
[0065] Figure 3 Flowchart of device pairing method provided by an embodiment of the present application Figure Three ;
[0066] Figure 4 Flowchart of device pairing method provided by an embodiment of the present application Figure Four ;
[0067] Figure 5 Flowchart of device pairing method provided by an embodiment of the present application Figure Five ;
[0068] Figure 6 Flowchart of device pairing method provided by an embodiment of the present application Figure Six ;
[0069] Figure 7 Schematic diagram of signaling interaction between an Internet of Things terminal and a relay node device provided by an embodiment of the present application
[0070] Figure 8 Schematic diagram of signaling interaction between an Internet of Things terminal and a relay node device provided by an embodiment of the present application
[0071] Figure 9 Schematic diagram of a device pairing apparatus provided by an embodiment of the present application
[0072] Figure 10 Schematic diagram of another device pairing apparatus provided by an embodiment of the present application
[0073] Figure 11 Structural schematic diagram of an electronic device provided by an embodiment of the present application DETAILED DESCRIPTION
[0074] To make the objectives, 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 below in a clear, complete manner with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying 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 flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart 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 flowchart or one or more operations can be removed from the flowchart under the guidance of the content of the present application.
[0075] In addition, the described embodiments are only some embodiments of the present application, rather than 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 are within the scope of protection of the present application.
[0076] 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.
[0077] Based on the defects of passive Internet of Things terminals in storage capacity and computing power, the present scheme respectively provides a two-way pairing strategy from the Internet of Things terminal side and the relay node device side to realize the pairing of the Internet of Things terminal and the relay node device, so that the data collected by the Internet of Things terminal can be uploaded to the relay node device first, and then forwarded to the base station for final data processing after being processed by the relay node device.
[0078] The pairing method of the present scheme increases the flexibility and success rate of pairing. And it realizes the multi-connection pairing method of the Internet of Things terminal and the relay node device, fully excavates the network transmission performance of the Internet of Things terminal and the relay node device, and improves the data transmission efficiency.
[0079] Figure 1 Flowchart of the device pairing method provided by the embodiments of the present application Figure One The following embodiments are described in detail around the steps performed by the method when applied to the Internet of Things terminal side. As shown in Figure 1 The method can include:
[0080] S101, send the position information and identification information of the Internet of Things terminal to each relay node device, and receive the distance information of each relay node device and the Internet of Things terminal sent by each relay node device.
[0081] One Internet of Things terminal can establish an initial connection with one or more relay node devices, and send the position information and identification information of the Internet of Things terminal to each relay node device with which an initial connection is established.
[0082] And one relay node device can receive position information and identification information sent from different Internet of Things terminals, so that one relay node device can send the distance information of the relay node device and each Internet of Things terminal to each corresponding Internet of Things terminal.
[0083] The relationship between the Internet of Things terminal and the relay node device is many-to-many, that is, any Internet of Things terminal can send location information and identification information to multiple relay node devices, and can also receive distance information sent by multiple relay node devices, and any relay node device can receive location information and identification information sent by multiple Internet of Things terminals, and can send corresponding distance information to multiple Internet of Things terminals.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] Optionally, the distance information between the Internet of Things terminal and the relay node device in the embodiment can refer to the Euclidean distance between the Internet of Things terminal and the relay node device.
[0088] S102, according to the service demand information, determine the number of required relay node devices.
[0089] The number of relay node devices required to be paired by different Internet of Things terminals when performing different services is different, and the Internet of Things terminal, service requirement, and required relay node device to be paired have a mapping relationship. The number of relay node devices required to be paired by the Internet of Things terminal can be determined according to the service requirement information to be currently performed.
[0090] That is, a set number of relay node devices need to be paired to complete the service.
[0091] S103, determine the number of relay node devices currently allowed to be paired according to the capability information of the Internet of Things terminal. The capability information is used to represent the load state of the Internet of Things terminal.
[0092] Generally, the capability information of the Internet of Things terminal is used to represent the load state of the Internet of Things terminal. In the embodiment, the capability information of the Internet of Things terminal includes but is not limited to the following information: Internet of Things terminal current available power information; upper limit information of the number of relay node devices allowed to be connected by the Internet of Things terminal at the same time; upper limit information of the number of relay node devices allowed to be paired by the Internet of Things terminal at the same time; identification information of the relay node device currently connected by the Internet of Things terminal; identification information of the relay node device currently paired by the Internet of Things terminal; identification information of the relay node device historically paired by the Internet of Things terminal.
[0093] The concept that needs to be distinguished is that the relay node device connected by the Internet of Things terminal can refer to the relay node device with which the Internet of Things terminal has established an initial connection and can perform transmission of basic information such as position information and coordinate information. The relay node device paired by the Internet of Things terminal can refer to the relay node device that has established an initial connection and has successfully paired. The Internet of Things terminal and the relay node device can perform transmission of collected data after successful pairing.
[0094] The number of relay node devices currently allowed to be paired by the Internet of Things terminal can be determined according to the capability information of the Internet of Things terminal.
[0095] S104, determine at least one candidate relay node device from each relay node device according to the number of relay node devices required to be paired, the number of relay node devices currently allowed to be paired, and the distance information of each relay node device from the Internet of Things terminal.
[0096] Based on the number of relay node devices required to be paired by the Internet of Things terminal, the number of relay node devices currently allowed to be paired, and the distance information of each relay node device from the Internet of Things terminal determined above, at least one candidate relay node device can be determined from each relay node device.
[0097] The embodiment focuses more on implementing multi-connection between the Internet of Things terminal and the relay node device, and a plurality of candidate relay node devices can be determined from the plurality of relay node devices to connect more relay node devices within the capability of the Internet of Things terminal, thereby improving the data transmission efficiency between the Internet of Things terminal and the relay node device.
[0098] In step S105, a pairing request is sent to each candidate relay node device, and a pairing result fed back by each candidate relay node device is received. The pairing result includes pairing success or pairing failure.
[0099] Optionally, the Internet of Things terminal can send a pairing request to each candidate relay node device, and receive a pairing result fed back by each candidate relay node device. When the pairing result is pairing success, the Internet of Things terminal and the candidate relay node device are paired successfully. When the pairing result is pairing failure, the Internet of Things terminal and the candidate relay node device are paired unsuccessfully. The candidate relay node device with pairing failure can be discarded, and the above method is executed cyclically to determine new candidate relay node devices for pairing until pairing is completed.
[0100] In summary, the device pairing method provided by the embodiment can determine the number of relay node devices currently allowed to be paired by the Internet of Things terminal based on the capability information of the Internet of Things terminal, and accurately determine the number of candidate relay node devices in combination with the number of relay node devices required to be paired by the Internet of Things terminal. That is, the upper limit of the relay node devices that can be paired by the Internet of Things terminal within the capability allowed by the Internet of Things terminal is determined in consideration of the capability information of the Internet of Things terminal, so as to fully utilize the device performance of the Internet of Things terminal and the relay node device, and improve the data transmission efficiency between the Internet of Things terminal and the relay node device. The number of candidate relay node devices that meet the number are determined from the plurality of relay node devices based on the distance information of each relay node device and the Internet of Things terminal. Since the distance information is related to the channel delay and the channel quality signal to a certain extent, the relay node devices are screened through the distance information, so that the pairing success rate of the selected candidate relay node devices and the Internet of Things terminal is higher, and the data transmission stability is also higher.
[0101] Optionally, in step S103, determining the number of relay node devices currently allowed to be paired according to the capability information of the Internet of Things terminal can include: determining the number of relay node devices currently allowed to be paired by the Internet of Things terminal according to the number of relay node devices simultaneously allowed to be paired by the Internet of Things terminal and the number of relay node devices currently paired by the Internet of Things terminal in the capability information of the Internet of Things terminal.
[0102] The content contained in the capability information of the IOT terminal is described above. The capability information can contain various information. In this embodiment, the number of relay node devices that the IOT terminal currently allows to pair can be determined according to the number of relay node devices that the IOT terminal simultaneously allows to pair and the number of relay node devices that the IOT terminal has currently paired in the capability information of the IOT terminal. The number of relay node devices that the IOT terminal has currently paired can be obtained according to the identification information of the relay node devices that the IOT terminal has currently paired.
[0103] Figure 2 Flowchart of the device pairing method provided by the embodiment of the application Figure Two Optionally, in step S104, each candidate relay node device can be determined from each relay node device according to the number of relay node devices required to pair, the number of relay node devices currently allowed to pair, and the distance information of each relay node device from the IOT terminal. This can include:
[0104] S201. Determine the number of candidate relay node devices required according to the number of relay node devices required to pair and the number of relay node devices currently allowed to pair.
[0105] The number of candidate relay node devices required can be determined according to the comparison result of the number of relay node devices required to pair and the number of relay node devices currently allowed to pair.
[0106] S202. Determine the order of each relay node device according to the distance information of each relay node device from the IOT terminal.
[0107] The list of relay node devices corresponding to the IOT terminal can be created according to the distance information of each relay node device from the IOT terminal. The list can contain the identification information of each relay node device connected by the IOT terminal, and can also mark the distance information between the relay node device and the IOT terminal. Optionally, each relay node device in the list of relay node devices can be sorted according to the distance information of each relay node device from the IOT terminal in descending order.
[0108] Of course, creating a list is only to facilitate the display of the order of each relay node device. In actual application, the list can also not be created intentionally.
[0109] S203. Determine each candidate relay node device from each relay node device according to the number of candidate relay node devices required, the identification information of each relay node device currently paired, and the order of each relay node device.
[0110] Based on the determined required number of candidate relay node devices and the identification information of the current and paired relay node devices of the Internet of Things terminal, and the ranking of the relay node devices, each candidate relay node device can be determined from the relay node devices.
[0111] Figure 3 Flowchart of the device pairing method provided by the embodiment of the application Figure Three In step S201, the required number of candidate relay node devices is determined according to the number of required relay node devices to be paired and the number of currently allowed relay node devices to be paired, which can include:
[0112] In step S301, if the difference between the number of required relay node devices to be paired and the number of currently paired relay node devices is greater than the number of currently allowed relay node devices to be paired, the number of currently allowed relay node devices to be paired is determined as the required number of candidate relay node devices.
[0113] Firstly, the number N of relay node devices to be paired currently can be calculated according to the difference between the number of required relay node devices to be paired and the number of currently paired relay node devices.
[0114] When the number N of relay node devices to be paired is greater than the number M of currently allowed relay node devices to be paired, although the number of required relay node devices to be paired is large, due to the capability limitation of the Internet of Things terminal, the Internet of Things terminal only allows pairing of M relay node devices in the case of allowed capability, and then the required number of candidate relay node devices is determined as M, that is, the number of currently allowed relay node devices to be paired of the Internet of Things terminal is determined as the required number of candidate relay node devices.
[0115] In step S302, if the difference between the number of required relay node devices to be paired and the number of currently paired relay node devices is less than or equal to the number of currently allowed relay node devices to be paired, the difference between the number of required relay node devices to be paired and the number of currently paired relay node devices is determined as the required number of candidate relay node devices.
[0116] When the number N of relay node devices still to be paired is less than or equal to the number M of relay node devices currently allowed to be paired, although the capacity of the Internet of Things terminal is sufficient, the number M of relay nodes allowed to be paired is greater than the number N of relay node devices required to be paired to perform the service requirement, but in this scenario, only N relay node devices are required to perform the service. At this time, the number N of relay node devices still to be paired can be determined as the number of required candidate relay node devices. That is, the difference between the number of relay node devices required to be paired and the number of currently paired relay node devices is determined as the number of required candidate relay node devices.
[0117] Optionally, in step S203, determining each candidate relay node device from each relay node device according to the number of required candidate relay node devices, the identification information of the currently paired relay node device, and the ranking of each relay node device can include:
[0118] According to the identification information of the currently paired relay node device, the currently paired relay node device can be removed from each relay node device to obtain the ranking of each remaining relay node device; and each candidate relay node device can be determined from each remaining relay node device according to the number of required candidate relay node devices and the ranking of each remaining relay node device.
[0119] Suppose the number of required candidate relay node devices is 5, then according to the ranking of each relay node device, the top 5 relay node devices can be taken as each candidate relay node device, of course, this is the case when the top 5 relay node devices do not contain the currently paired relay node device.
[0120] When the top 5 relay node devices contain the currently paired relay node device, the currently paired relay node device of the Internet of Things terminal is removed from the 5 relay node devices, and the candidate relay node device is selected from the 6th relay node device in order, and the number of candidate relay node devices is consistent with the number of paired relay node devices removed from the relay node devices.
[0121] Optionally, the method of the present application can further include discarding the candidate relay node device that fails to be paired, and determining a new candidate relay node device until the number of candidate relay nodes successfully paired meets the number of required candidate relay node devices, and then stopping pairing.
[0122] In some embodiments, when the IoT terminal fails to pair with a candidate relay node, the IoT terminal can delete the candidate relay node device that fails to pair, and determine new candidate relay node devices for pairing according to the ranking of the remaining relay node devices. When the number of relay node devices that successfully pair with the IoT terminal meets the required number, pairing is completed and pairing is stopped.
[0123] Figure 4 Flowchart of the device pairing method provided by the embodiments of the present application Figure Four Optionally, the method can further include:
[0124] S401, 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 IoT terminal, and the ranking of the current candidate relay node devices is updated according to the distance information between the new relay node device and the IoT terminal.
[0125] The method further provides an updating method of the relay node device. Optionally, when the IoT terminal detects that a new relay node device is activated, the IoT terminal establishes a connection with the new relay node device, and the ranking of the current candidate relay node devices can be updated according to the distance information between the new relay node device and the IoT terminal.
[0126] S402, if the relay node device corresponding to the IoT terminal is detected to be turned off, the turned-off relay node device is no longer taken as the relay node device corresponding to the IoT terminal.
[0127] In some cases, when the IoT terminal detects that a relay node device connected thereto is turned off, the relay node device is no longer taken as one of the relay node devices of the IoT terminal. The ranking of the relay node devices can change due to the turning off of the existing relay node device, so that the determined candidate relay node devices can also change.
[0128] Through the updating strategy provided by the method, the relay node devices corresponding to the IoT terminal can be updated in real time, so that the selection of the candidate relay node devices is dynamically updated, and the selected candidate relay node devices have the best matching efficiency with the IoT terminal.
[0129] In another implementable manner, the relay node device can also send the capability information of the relay node device to the IoT terminal, and the IoT terminal can determine the candidate relay node devices from the relay node devices according to the capability information of the IoT terminal in combination with the capability information of the relay node device.
[0130] The capability information of the relay node device includes but is not limited to: the upper limit of the number of IoT terminals allowed to be connected by the relay node device at the same time; the upper limit of the number of IoT terminals allowed to be paired by the relay node device at the same time; the identification information of the IoT terminals currently connected by the relay node device; the identification information of the IoT terminals currently paired by the relay node device; the identification information of the IoT terminals historically paired by the relay node device; the current available channel information of the relay node device; the current available computing power information of the relay node device, etc.
[0131] For example: assuming that the candidate relay node device determined by the IoT terminal according to its own capability information includes relay node device 1, and according to the capability information of relay node device 1, it is known that the number of IoT terminals currently allowed to be paired by relay node device 1 has reached the upper limit, then relay node device 1 can be deleted from the candidate relay node device of the IoT terminal.
[0132] Combining the capability information of the IoT terminal and the capability information of the relay node device for comprehensive judgment can make the selected candidate relay node device more accurate.
[0133] In some embodiments, after receiving the pairing request sent by the IoT terminal, the candidate relay node device can detect its node state, and when the detection is passed, it sends a pairing success message to the IoT terminal, and when the detection is not passed, it sends a pairing failure message to the IoT terminal.
[0134] The node state detection includes but is not limited to the following contents: 1. The node has available idle channels; 2. The node has idle computing power resources; 3. The number of terminals matched by the node does not exceed the upper limit value.
[0135] If the above conditions are all met at the same time, the state check is passed; otherwise, the state check is not passed.
[0136] In summary, the device pairing method provided in the embodiment can determine the number of relay node devices that the Internet of Things terminal is currently allowed to pair based on the capability information of the Internet of Things terminal, and can accurately determine the number of candidate relay node devices in combination with the number of relay node devices that the Internet of Things terminal device needs to pair. That is, in the case of considering the capability information of the Internet of Things terminal, the upper limit of the relay node devices that the Internet of Things terminal can pair is determined within the capability allowed range of the Internet of Things terminal, so as to fully utilize the device performance of the Internet of Things terminal and the relay node device and improve the data transmission efficiency between the Internet of Things terminal and the relay node device. The candidate relay node devices that meet the number are determined from the plurality of relay node devices based on the distance information of each relay node device and the Internet of Things terminal. Since the distance information is related to the channel delay and the channel quality signal to a certain extent, the relay node devices are screened through the distance information, so that the pairing success rate of the selected candidate relay node devices and the Internet of Things terminal is higher, and the data transmission stability is also higher.
[0137] The following embodiment takes the relay node device side as the execution subject to supplement the execution process of the device pairing method.
[0138] Figure 5 Process of the device pairing method provided in the embodiment Figure Five The method can include the following steps when applied to the relay node device.
[0139] S501, receiving the position information and the identification information sent by each Internet of Things terminal, and determining the distance information between each Internet of Things terminal and the relay node device according to the position information of the relay node device and the position information of each Internet of Things terminal.
[0140] The process of the pairing method executed on the relay node device side is basically the same as the process of the above-mentioned Internet of Things terminal side. Therefore, the execution steps of the method on the relay node device side are supplemented and will not be described in detail.
[0141] The relay node device can receive the position information sent by each Internet of Things terminal and calculate the distance information between each Internet of Things terminal and the relay node device according to the position information of the relay node device, and send each distance information to the corresponding Internet of Things terminal according to the identification information of each Internet of Things terminal.
[0142] S502, determining the number of Internet of Things terminals needed to be paired according to the business demand information.
[0143] The number of Internet of Things terminals needed to be paired by different relay node devices for different business demands is different. The number of Internet of Things terminals needed to be paired by the relay node device under the current business demand can be determined according to the mapping relationship between the business demand and the number of relay node devices and the number of Internet of Things terminals needed to be paired.
[0144] S503. Determine the number of IoT terminals that can be paired at present based on the capability information of the relay node device. The capability information is used to characterize the load status of the relay node device.
[0145] The above embodiments have described the contents of the capability information of the relay node device, and the number of IoT terminals that the relay node device is currently allowed to pair with can be determined based on the capability information of the relay node device.
[0146] S504. Based on the number of IoT terminals to be paired, the number of IoT terminals currently allowed to be paired, and the distance information between each IoT terminal and the relay node device, determine at least one candidate IoT terminal from the IoT terminals.
[0147] Based on the number of IoT terminals that the relay node device needs to be paired with, the number of IoT terminals that are currently allowed to be paired, and the distance information between each IoT terminal and the relay node device, at least one candidate IoT terminal can be identified from each IoT terminal.
[0148] S505. Based on the node status detection results of the relay node device, send pairing requests to each candidate IoT terminal and receive pairing confirmation messages from each candidate IoT terminal.
[0149] Before sending pairing requests to each candidate IoT terminal, the relay node device can also check its own node status. When the check result is successful, it sends a pairing request to each candidate IoT terminal. For each IoT terminal that receives the pairing request, it does not need to perform further checks. As long as it receives the pairing request, it sends a pairing confirmation message to the relay node device. The pairing confirmation message is used to indicate that the pairing is successful.
[0150] If the detection result fails, the node status can be re-detected after the timer expires, until the detection passes, at which point a pairing request is sent to each candidate IoT terminal.
[0151] In conclusion, the device pairing method provided in this embodiment can determine the number of IoT terminals currently allowed to be paired by the relay node device based on the capability information of the relay node device, and can accurately determine the number of candidate IoT terminals in combination with the number of IoT terminals required to be paired by the relay node device. That is, the upper limit of the IoT terminals that can be paired by the relay node device is determined within the range allowed by the capability of the relay node device, so as to fully utilize the device performance of the IoT terminals and the relay node device and improve the data transmission efficiency between the IoT terminals and the relay node device. The candidate IoT terminals satisfying the number are determined from the plurality of IoT terminals based on the distance information of each IoT terminal and the relay node device. Since the distance information is related to the channel delay and the channel quality signal to a certain extent, the IoT terminals are screened through the distance information, so that the pairing success rate of the selected candidate IoT terminals and the relay node device is higher, and the data transmission stability is also higher.
[0152] Optionally, in step S503, determining the number of IoT terminals currently allowed to be paired according to the capability information of the relay node device can include: determining the number of IoT terminals currently allowed to be paired by the relay node device according to the number of IoT terminals simultaneously allowed to be paired by the relay node device and the number of IoT terminals currently paired by the relay node device in the capability information of the relay node device.
[0153] Optionally, in step S504, a specific implementation of determining at least one candidate IoT terminal from the IoT terminals according to the number of IoT terminals required to be paired, the number of IoT terminals currently allowed to be paired, and the distance information of each IoT terminal and the relay node device can refer to steps S201-S203 and S301-S302.
[0154] Figure 6 Flowchart of the device pairing method provided in the embodiment Figure Six Optionally, in step S505, the node state detection result of the relay node device can include:
[0155] S601, if the node state detection of the relay node device is passed, a pairing request is sent to each candidate IoT terminal, and a pairing confirmation message sent by each candidate IoT terminal is received.
[0156] Optionally, the node state detection of the relay node device includes but is not limited to the following contents: the node has available idle channels; the node has idle computing power resources; the number of terminals connected by the node does not exceed the upper limit value. When the above three conditions are met, it is considered that the detection is passed, and then the relay node device can send a pairing request to each candidate IoT terminal and receive a pairing confirmation message sent by each candidate IoT terminal.
[0157] S602, if the node state detection of the relay node device fails, re-perform the node state detection after the timer expires, and send the pairing request to each candidate IoT terminal after the node state detection passes.
[0158] When one of the above three conditions is not met, it is considered that the detection fails. Then, the relay node device can re-perform the node state detection after the timer expires, and send the pairing request to each candidate IoT terminal after the detection passes.
[0159] In some embodiments, similarly, the relay node device can update the IoT terminals connected to the relay node device when a new IoT terminal is detected to be activated or an already connected IoT terminal is detected to be closed, so as to achieve the purpose of updating the candidate IoT terminals.
[0160] In an implementable manner, when the relay node device determines the candidate IoT terminals only according to the self-capability information, the candidate IoT terminal can perform re-judgment according to the self-capability information of the IoT terminal when receiving the pairing request sent by the relay node device. When the self-capability information also meets the requirements, the relay node device sends a pairing confirmation message to the relay node device, otherwise, a pairing failure message is sent.
[0161] In another implementable manner, when the relay node device determines the candidate IoT terminals according to both the self-capability information and the capability information of each IoT terminal, the candidate IoT terminal can no longer perform re-judgment when receiving the pairing request sent by the relay node device, but directly sends a pairing confirmation message to the relay node device.
[0162] Figure 7 A signaling interaction diagram between an IoT terminal and a relay node device provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the interaction process can include: Figure 7
[0163] S701, the IoT terminal sends the location information and the identification information of the IoT terminal to the relay node device;
[0164] S702, the relay node device calculates the distance information between the relay node device and the IoT terminal according to the location information of the IoT terminal and the location information of the relay node device;
[0165] S703, the relay node device sends the distance information between the relay node device and the IoT terminal to the IoT terminal;
[0166] S704, the IOT terminal determines the number of relay node devices required to be paired according to the service requirement information, and determines the number of relay node devices currently allowed to be paired according to the capability information of the IOT terminal;
[0167] S705, the IOT terminal determines at least one candidate relay node device from each relay node device according to the number of relay node devices required to be paired, the number of relay node devices currently allowed to be paired, and the distance information between the relay node device and the IOT terminal;
[0168] S706, the IOT terminal sends a pairing request to the candidate relay node device;
[0169] S707, the candidate relay node device detects its own node state and generates a detection result;
[0170] S708, the candidate relay node device sends a pairing result to the IOT terminal according to the detection result;
[0171] S709, the IOT terminal completes pairing or re-determines a new candidate relay node device according to the pairing result.
[0172] Figure 8 Another signaling interaction schematic diagram between an IOT terminal and a relay node device provided by the embodiment of the application is provided; as shown in the figure, Figure 8 the interaction process can include:
[0173] S801, the relay node device calculates the distance information between the IOT terminal and the relay node device according to the position information of the relay node device and the position information of the IOT terminal sent by the IOT terminal;
[0174] S802, the relay node device determines the number of IOT terminals required to be paired according to the service requirement information, and determines the number of IOT terminals currently allowed to be paired according to the capability information of the relay node device;
[0175] S803, the relay node device determines at least one candidate IOT terminal from each IOT terminal according to the number of IOT terminals required to be paired, the number of IOT terminals currently allowed to be paired, and the distance information between the relay node device and the IOT terminal;
[0176] S804, the relay node device detects its own node state and generates a detection result;
[0177] S805, if the detection is passed, a pairing request is sent to the candidate IOT terminal;
[0178] S806, the candidate IOT terminal sends a pairing confirmation message to the relay node device.
[0179] It is worth noting that in the above two interaction embodiments, the Internet of Things terminal is also used to represent a candidate Internet of Things terminal in some cases. The specific implementation of each step of the above method will not be repeated.
[0180] The following describes the device, equipment, and storage medium for performing the device pairing method provided in the present application, and the specific implementation process and technical effects are described above. The following will not be repeated.
[0181] Figure 9 A schematic diagram of a device pairing device provided by an embodiment of the present application is shown. The functions implemented by the device pairing device correspond to the steps of the method performed by the Internet of Things terminal described above. The device can be understood as the Internet of Things terminal described above, or the processor of the terminal, as shown in the figure. The device can include a sending module 910, a determination module 920, and a receiving module 930. Figure 9
[0182] The sending module 910 is configured to send the position 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.
[0183] The determination module 920 is configured to determine the number of relay node devices required for pairing according to the service demand information.
[0184] The determination module 920 is configured to determine the number of relay node devices currently allowed for pairing according to the capability information of the Internet of Things terminal. The capability information is used to represent the load state of the Internet of Things terminal.
[0185] The determination module 920 is configured to determine at least one candidate relay node device from each relay node device according to the number of relay node devices required for pairing, the number of relay node devices currently allowed for pairing, and the distance information between each relay node device and the Internet of Things terminal.
[0186] The receiving module 930 is configured to send a pairing request to each candidate relay node device, and receive a pairing result fed back by each candidate relay node device. The pairing result includes: pairing success or pairing failure.
[0187] Optionally, the determination module 920 is specifically configured to determine the number of relay node devices currently allowed for pairing of the Internet of Things terminal according to the number of relay node devices allowed for pairing of the Internet of Things terminal at the same time and the number of relay node devices currently paired with the Internet of Things terminal in the capability information of the Internet of Things terminal.
[0188] Optionally, the determination module 920 is specifically configured to determine the number of candidate relay node devices required according to the number of relay node devices required for pairing and the number of relay node devices currently allowed for pairing.
[0189] determine the order of each relay node device according to distance information of each relay node device and the Internet of Things terminal;
[0190] determine each candidate relay node device from each relay node device according to the number of required candidate relay node devices, the identification information of the currently paired relay node devices and the order of each relay node device.
[0191] Optionally, the determining module 920 is specifically configured to determine the number of currently allowed paired relay node devices as the number of required candidate relay node devices if the difference between the number of required paired relay node devices and the number of currently paired relay node devices is greater than the number of currently allowed paired relay node devices.
[0192] If the difference between the number of required paired relay node devices and the number of currently paired relay node devices is less than or equal to the number of currently allowed paired relay node devices, the difference between the number of required paired relay node devices and the number of currently paired relay node devices is determined as the number of required candidate relay node devices.
[0193] Optionally, the apparatus further includes an updating module.
[0194] The updating module is configured to discard the candidate relay node device that fails to pair and determine a new candidate relay node device until the number of candidate relay node devices that successfully pair meets the number of required candidate relay node devices, and then stop pairing.
[0195] Figure 10 Another device pairing apparatus provided by the embodiments of the present application is shown in the schematic diagram, and the functions implemented by the device pairing apparatus correspond to the steps of the method executed 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 schematic diagram, and the apparatus can include a receiving module 1010, a determining module 1020 and a sending module 1030. Figure 10
[0196] The receiving module 1010 is configured to receive the position information and the identification information sent by each Internet of Things terminal, and determine the distance information between each Internet of Things terminal and the relay node device according to the position information of the relay node device and the position information of each Internet of Things terminal.
[0197] The determining module 1020 is configured to determine the number of required paired Internet of Things terminals according to the service requirement information.
[0198] The determining module 1020 is configured to determine the number of currently allowed paired Internet of Things terminals according to the capability information of the relay node device, and the capability information is used to represent the load state of the relay node device.
[0199] determining at least one candidate IoT terminal from the IoT terminals according to the number of required paired IoT terminals, the number of currently allowed paired IoT terminals, and distance information of each IoT terminal from the relay node device;
[0200] sending a pairing request to each candidate IoT terminal according to the node state detection result of the relay node device, and receiving a pairing confirmation message sent by each candidate IoT terminal.
[0201] Optionally, the determining module 1020 is specifically configured to determine the number of currently allowed paired IoT terminals of the relay node device according to the number of simultaneously allowed paired IoT terminals of the relay node device and the number of currently paired IoT terminals of the relay node device in the capability information of the relay node device.
[0202] Optionally, the sending module 1030 is specifically configured to send a pairing request to each candidate IoT terminal and receive a pairing confirmation message sent by each candidate IoT terminal if the node state detection of the relay node device passes.
[0203] If the node state detection of the relay node device fails, the node state detection is performed again after timing out until the node state detection passes, and then a pairing request is sent to each candidate IoT terminal. The node state detection includes node idle channel detection, node idle computing resource detection, and number detection of currently paired IoT terminals of the relay node device.
[0204] The apparatus is used to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which are not described here in detail.
[0205] The above 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), etc. For another example, when the above module is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call code. For another example, the modules can be integrated together in the form of a system on a chip (SOC).
[0206] The above 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, etc., or any combination thereof. The wireless connection can include connection in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, etc., 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 device described above can refer to the corresponding process in the method embodiment, which will not be repeated herein.
[0207] Figure 11 A structural schematic diagram of an electronic device provided in an embodiment of the present application, which can be an Internet of Things terminal or a relay node device.
[0208] The device can include a processor 801 and a storage medium 802.
[0209] 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 above-mentioned method embodiments. The specific implementation and technical effects are similar, and will not be repeated here.
[0210] The storage medium 802 stores program codes, and when the program codes are executed by the processor 801, the processor 801 performs 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.
[0211] 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 device, a discrete hardware component, which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.
[0212] The storage medium 802, as a non-volatile computer readable storage medium, 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, for example, can include 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 capable of being accessed 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, used to store program instructions and / or data.
[0213] Optionally, the present application also provides a program product, for example, a computer readable storage medium, comprising a program, which when executed by a processor, is used to execute the above-mentioned method embodiments.
[0214] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0215] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to realize the purpose of the embodiment scheme.
[0216] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0217] The integrated unit realized in the form of software functional unit can be stored in a computer readable storage medium. The software functional unit stored in a storage medium includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
Claims
1. A device pairing method, characterized by, The method is applied to an Internet of Things terminal and comprises the following steps: sending location information and identification information of the Internet of Things terminal to each relay node device and receiving distance information between each relay node device and the Internet of Things terminal sent by each relay node device; determining the number of relay node devices required for pairing according to service demand information; determining the number of relay node devices currently allowed for pairing according to capability information of the Internet of Things terminal, which is used to represent a load state of the Internet of Things terminal; determining at least one candidate relay node device from the relay node devices according to the number of relay node devices required for pairing, the number of relay node devices currently allowed for pairing, and the distance information between each relay node device and the Internet of Things terminal; sending a pairing request to each candidate relay node device and receiving a pairing result fed back by each candidate relay node device, wherein the pairing result comprises pairing success or pairing failure; the step of determining each candidate relay node device from the relay node devices according to the number of relay node devices required for pairing, the number of relay node devices currently allowed for pairing, and the distance information between each relay node device and the Internet of Things terminal comprises the following steps: determining the number of candidate relay node devices required according to the number of relay node devices required for pairing and the number of relay node devices currently allowed for pairing; determining the ranking of each relay node device according to the distance information between each relay node device and the Internet of Things terminal; determining each candidate relay node device from the relay node devices according to the number of candidate relay node devices required, the identification information of relay node devices currently paired, and the ranking of each relay node device; the step of determining the number of candidate relay node devices required according to the number of relay node devices required for pairing and the number of relay node devices currently allowed for pairing comprises the following steps: if the difference between the number of relay node devices required for pairing and the number of relay node devices currently paired is greater than the number of relay node devices currently allowed for pairing, then the number of relay node devices currently allowed for pairing is determined as the number of candidate relay node devices required; if the difference between the number of relay node devices required for pairing and the number of relay node devices currently paired is less than or equal to the number of relay node devices currently allowed for pairing, then the difference between the number of relay node devices required for pairing and the number of relay node devices currently paired is determined as the number of candidate relay node devices required.
2. The method of claim 1, wherein, the step of determining the number of relay node devices currently allowed for pairing according to capability information of the Internet of Things terminal comprises the following step: determining the number of relay node devices currently allowed for pairing of the Internet of Things terminal according to the number of relay node devices currently allowed for pairing of the Internet of Things terminal and the number of relay node devices currently paired of the Internet of Things terminal in the capability information of the Internet of Things terminal.
3. The method of claim 1, wherein, the method further comprises the following steps: Discarding the candidate relay node devices which fail to pair, and determining new candidate relay node devices until the number of candidate relay nodes which successfully pair reaches the required number of candidate relay node devices, then stopping pairing.
4. A device pairing method characterized by, The method is applied to a relay node device, and the method comprises: receiving position information and identification information sent by each Internet of Things terminal, and determining distance information between each Internet of Things terminal and the relay node device according to position information of the relay node device and position information of each Internet of Things terminal; determining the number of Internet of Things terminals required to pair according to service demand information; determining the number of Internet of Things terminals currently allowed to pair according to capability information of the relay node device, wherein the capability information is used to represent a load state of the relay node device; determining at least one candidate Internet of Things terminal from the Internet of Things terminals according to the number of Internet of Things terminals required to pair, the number of Internet of Things terminals currently allowed to pair, and the distance information between each Internet of Things terminal and the relay node device; sending a pairing request to each candidate Internet of Things terminal according to a node state detection result of the relay node device, and receiving a pairing confirmation message sent by each candidate Internet of Things terminal; determining at least one candidate Internet of Things terminal from the Internet of Things terminals according to the number of Internet of Things terminals required to pair, the number of Internet of Things terminals currently allowed to pair, and the distance information between each Internet of Things terminal and the relay node device, comprises: determining the number of candidate Internet of Things terminals required according to the number of Internet of Things terminals required to pair and the number of Internet of Things terminals currently allowed to pair; determining the order of each Internet of Things terminal according to the distance information between each Internet of Things terminal and the relay node device; determining each candidate Internet of Things terminal from each Internet of Things terminal according to the number of candidate Internet of Things terminals required, identification information of Internet of Things terminals currently paired, and the order of each Internet of Things terminal; determining the number of candidate Internet of Things terminals required according to the number of Internet of Things terminals required to pair and the number of Internet of Things terminals currently allowed to pair, comprises: if the difference between the number of Internet of Things terminals required to pair and the number of Internet of Things terminals currently paired is greater than the number of Internet of Things terminals currently allowed to pair, then determining the number of Internet of Things terminals currently allowed to pair as the number of candidate Internet of Things terminals required; if the difference between the number of Internet of Things terminals required to pair and the number of Internet of Things terminals currently paired is less than or equal to the number of Internet of Things terminals currently allowed to pair, then determining the difference between the number of Internet of Things terminals required to pair and the number of Internet of Things terminals currently paired as the number of candidate Internet of Things terminals required.
5. The method of claim 4, wherein, determining the number of Internet of Things terminals currently allowed to pair according to capability information of the relay node device, comprises: determining the number of Internet of Things terminals currently allowed to pair according to the number of Internet of Things terminals simultaneously allowed to pair by the relay node device and the number of Internet of Things terminals currently paired by the relay node device in the capability information of the relay node device.
6. The method of claim 4, wherein, The step of sending a pairing request to each candidate IoT terminal according to the node state detection result of the relay node device comprises: If the node state detection of the relay node device is passed, a pairing request is sent to each candidate IoT terminal, and a pairing confirmation message sent by each candidate IoT terminal is received; If the node state detection of the relay node device is not passed, node state detection is performed again after timing out until the node state detection is passed, and a pairing request is sent to each candidate IoT terminal, wherein the node state detection comprises node idle channel detection, node idle computing resource detection, and number detection of IoT terminals that have been paired.
7. An electronic device, comprising: Comprise: A processor, a storage medium, and a bus, the storage medium stores program instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the device pairing method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the device pairing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Communication method, terminal and base station
CN105208621A
Communication control method and device, electronic equipment and storage medium
CN114286416A