Iot node adaptive access method based on time random number identification sequence
By using a time-random number identifier sequence and an adaptive access method with multiple calibration handshakes, the automation and stability issues of wireless IoT node access are solved, enabling automatic, fast, and accurate access for wireless IoT nodes, reducing operation and maintenance costs and improving network stability.
Patent Information
- Application Number
- CN202211532838.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-12-02
AI Technical Summary
In wireless IoT networking, node access requires manual configuration or firmware rewriting, leading to frequent misoperations, discontinuous node numbers, and serious resource waste. Furthermore, existing error correction mechanisms are limited and cannot adapt to complex communication environments.
An adaptive access method based on time-random number identifier sequences is adopted. Through multiple calibration handshakes between nodes and gateways, identifier sequences are automatically generated and verified to achieve automatic, fast and accurate access of nodes. The identifier sequence is generated using sine and cosine coding method and combined with time-random numbers to generate stable numbers.
It enables automated access of wireless IoT nodes, reduces manual operation and maintenance costs, avoids waste of numbering resources, improves network stability, adapts to packet loss and out-of-order situations, and enhances communication reliability.
Smart Images

Figure CN115988603B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of IoT node access authentication technology, specifically relating to an adaptive access method for IoT nodes based on a time-random number identifier sequence. Background Technology
[0002] As IoT projects continue to deepen and more IoT devices are deployed, wireless IoT, with its flexible installation advantages, is increasingly becoming the preferred networking mode. However, in many current wireless broadcast messaging IoT networks, node access typically requires on-site maintenance personnel to manually configure or rewrite and re-flash firmware for adaptation, increasing the workload as the number of registered nodes increases. Furthermore, errors in manual adaptation can easily lead to discontinuous node numbers and wasted numbering resources, reducing the efficiency of later maintenance. These errors are particularly prone to occur when the number of nodes is large. Simultaneously, the transmission characteristics of wireless IoT require communication to have error correction mechanisms in special circumstances such as packet loss to improve network stability. However, in reality, the design of error correction mechanisms in wireless IoT has certain limitations. As time goes on, the types of special circumstances will increase, making it impossible for existing error correction mechanisms to achieve complete error correction. Summary of the Invention
[0003] Based on the above requirements, this invention provides an adaptive access method for wireless IoT nodes based on time-random number identifier sequences to solve the node access problem in current wireless IoT networking.
[0004] This invention provides the following technical solution:
[0005] An adaptive access method for wireless IoT nodes based on time-random number identifier sequences includes the following steps: S1, the node initializes resources; S2, the node generates an identifier sequence X and packages it with an initial number and sends it; S3, the gateway verifies the node message, extracts the identifier sequence X, and retrieves an idle number; S4, the gateway generates an identifier sequence Y after a random delay and packages it with the identifier sequence X and the number, then sends it; S5, the node verifies the identifier sequence X in the message and extracts the identifier sequence Y and the number; S6, the node packages the new number and the identifier sequence Y and sends it; S7, the gateway verifies the number and the identifier sequence Y in the node message and sends a response packet; S8, the gateway waits for the node to retransmit to determine that registration is complete.
[0006] Furthermore, in step S1, when a node initializes its resources, each bit of its number must be cleared to zero.
[0007] Furthermore, in step S2, the node identifier sequence X is generated as follows:
[0008] The node selects two random hexadecimal numbers between 00H and 0FH as identifier sequences to generate input factors. Sine and cosine coding methods are used, and each input factor is randomly selected from two coding methods. Let x be the input factor and y be the identifier sequence output. The formulas for the two coding methods are:
[0009]
[0010]
[0011] Here, y takes four significant digits to generate a valid sequence, and the valid sequences generated by the two input factors are concatenated in the order of generation to obtain an 8-bit identifier sequence, which occupies 1 byte.
[0012] Furthermore, in step S4, the random delay range of the gateway is from 1 millisecond to 500 milliseconds.
[0013] Further, in step S4, the identifier sequence Y generated by the gateway is 8 bits long and occupies 1 byte. Among them, 6 bits are hexadecimal numbers representing the hour, minute, and second of the generation time. One hexadecimal random number between 00H and 0FH is inserted between the hour and minute and between the minute and second.
[0014] Furthermore, the detailed execution process of step S5 is as follows:
[0015] S50, node setting 5-second wait timer;
[0016] S51, if there is a response from the gateway within 5 seconds, otherwise jump to S52 increment the communication failure count by 1, and jump to S53 to determine if the failure count has exceeded 3. If it has not exceeded 3, reset and wait S50. If it has exceeded 3, jump to S57 registration failure.
[0017] S54, if there is a response from the gateway within 5 seconds, check if the message contains the original identifier sequence X; otherwise, continue waiting as in S51.
[0018] S55, node extraction of assigned number;
[0019] S56, check if the assigned number is zero; if so, proceed to S57 Registration Failed.
[0020] S58, if the assigned number is non-zero, the node stores the number and extracts the gateway's identifier sequence Y.
[0021] Furthermore, the interaction flow for steps S6, S7, and S8 is as follows:
[0022] S6, the node packages and sends the new number and the identifier sequence Y;
[0023] S71, the node waits for the gateway to respond for 5 seconds to determine whether to resend;
[0024] If there is no response, redirect to S72 to resend;
[0025] S72, the gateway verifies whether the number and identifier sequence Y in the node are consistent with its own and responds;
[0026] S73, the gateway waits for the node to retransmit for 30 seconds to determine whether to respond again;
[0027] S8. If the node receives a response from the gateway, the registration is complete; if the gateway does not receive a retransmission from the node within 30 seconds, the registration is complete.
[0028] The beneficial effects of this invention are as follows: This invention provides an adaptive access method for wireless IoT nodes based on a time-random number identifier sequence. Addressing the problems of increased maintenance workload and susceptibility to errors caused by the large number of access nodes in current wireless IoT, especially wireless broadcast messaging IoT, an adaptive access process is established. This enables automatic, fast, and accurate node access, resolving a series of current issues. It primarily utilizes a time-random number identifier sequence and a multi-calibration handshake to solve the problem of manual configuration or firmware rewriting and flashing for a large number of nodes in current wireless IoT networks, especially wireless broadcast messaging networks. This invention is designed for commonly used IoT networking scenarios, requiring no additional hardware or software costs such as floating-point arithmetic units. Deployment is simple, and multiple calibration handshakes address packet loss and out-of-order delivery, resulting in good stability. It significantly reduces the operational costs of manual maintenance and avoids wasted or conflicting node numbering resources due to misoperation. Attached Figure Description
[0029] Figure 1 This is a flowchart of the adaptive access process in an embodiment of the present invention;
[0030] Figure 2 This is a detailed flowchart of step S5 in the process of this invention;
[0031] Figure 3 This is a flowchart showing the specific interactions of steps S6, S7, and S8 in the process of this invention. Detailed Implementation
[0032] like Figure 1 As shown, an adaptive access method for IoT nodes based on time-stamped random number identifier sequences includes the following steps:
[0033] S1, node initializes resources;
[0034] S2, the node generates an identifier sequence X and packages it with the initial number for transmission;
[0035] S3, after the gateway verifies the node message, it extracts the identifier sequence X and retrieves the idle number;
[0036] S4, the gateway generates an identifier sequence Y after a random delay and packages it together with the identifier sequence X and the number for transmission;
[0037] S5, identify sequence X from the node verification message and extract the identifier sequence Y and number;
[0038] S6, the node packages and sends the new number and identifier sequence Y;
[0039] S7, the gateway verifies the number and identifier sequence Y in the node message and sends a response packet;
[0040] S8, the gateway waits for the node to retransmit in order to determine that the registration is complete.
[0041] When a node initializes its resources, each bit of its number is cleared to zero.
[0042] The node identifier sequence X is generated as follows:
[0043] The node selects two random hexadecimal numbers between 00H and 0FH as input factors to generate the identifier sequence. Sine and cosine coding methods are used, with each input factor randomly selected from one of the two coding methods. Let x be the input factor for generating the identifier sequence, and y be the output of the identifier sequence. The formulas for the two coding methods are:
[0044]
[0045]
[0046] Wherein, y takes four significant digits to generate a valid sequence, and the two identity sequences generated by the input factor are concatenated in the generation order to obtain an 8-bit identity sequence, which occupies 1 byte.
[0047] The identifier sequence X generated by the node is packaged together with the initial zero number and sent to the gateway.
[0048] After receiving the request message from the node, the gateway verifies the message structure. If it passes the verification, it extracts the identifier sequence X and retrieves the available free number. If no free number can be assigned, it assigns an initial zero number.
[0049] After selecting an assignable number, the gateway performs a random delay of 1 to 500 milliseconds. Then, it uses localtime to obtain the current time, generates a six-digit sequence in the form of hours, minutes, and seconds, and then randomly generates two random numbers in the range of hexadecimal 00H to 0FH to fill the time sequence between hours and minutes and between minutes and seconds, resulting in an 8-bit time random number sequence Y that occupies 1 byte. This sequence is then packaged and sent together with the assigned number and the identifier sequence X.
[0050] The node receives and verifies whether the identifier sequence X in the message from the gateway is the generated identifier sequence X, and extracts the allocation number and identifier sequence Y from it. The specific process is as follows:
[0051] S50, node setting 5-second wait timer;
[0052] S51, if there is a response from the gateway within 5 seconds, otherwise jump to S52 increment the communication failure count by 1, and jump to S53 to determine if the failure count has exceeded 3. If it has not exceeded 3, reset and wait S50. If it has exceeded 3, jump to S57 registration failure.
[0053] S54, if there is a response from the gateway within 5 seconds, check if the message contains the original identifier sequence X; otherwise, continue waiting as in S51.
[0054] S55, node extraction of assigned number;
[0055] S56, check if the assigned number is zero; if so, proceed to S57 Registration Failed.
[0056] S58, if the assigned number is non-zero, the node stores the number and extracts the gateway's identifier sequence Y.
[0057] After storing the new number, the node packages the new number together with the identifier sequence Y and sends it.
[0058] After receiving a message from a node, the gateway extracts the number and identifier sequence Y for verification. If the verification is successful, a response packet is sent.
[0059] After sending a response packet, the gateway waits 30 seconds for the node to retransmit to determine if reception is complete. If no node retransmits the message after 30 seconds, registration is considered complete. If a retransmission message is received, the gateway re-responds to the node and resets the waiting time. The specific process is as follows:
[0060] S6, the node packages and sends the new number and the identifier sequence Y;
[0061] S71, the node waits for the gateway to respond for 5 seconds to determine whether to resend;
[0062] If there is no response, redirect to S72 to resend;
[0063] S72, the gateway verifies whether the number and identifier sequence Y in the node are consistent with its own and responds;
[0064] S73, the gateway waits for the node to retransmit for 30 seconds to determine whether to respond again;
[0065] S8. If the node receives a response from the gateway, the registration is complete; if the gateway does not receive a retransmission from the node within 30 seconds, the registration is complete.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for adaptive access of wireless IoT nodes based on time random number identification sequence, characterized in that, The method comprises the following steps: S1, initializing resources by the node; S2, generating an identification sequence X by the node and sending the identification sequence X and an initial number together; S3, extracting the identification sequence X and searching for an idle number after verifying the node message by the gateway; S4, generating an identification sequence Y by the gateway after a random delay and sending the identification sequence Y and the identification sequence X and the number together; S5, verifying the identification sequence X in the message and extracting the identification sequence Y and the number by the node; S6, sending the new number and the identification sequence Y by the node; S7, verifying the number and the identification sequence Y in the node message and sending a response package back by the gateway; S8, waiting for the node to resend to determine whether the registration is completed by the gateway. 2.The method of claim 1, wherein, In step S1, the number must be set to zero in each bit when initializing resources by the node. 3.The method of claim 1, wherein, In step S2, the identification sequence X of the node is generated in the following way: The node selects two random numbers between 00H and 0FH as input factors for generating the identification sequence, the input factors are encoded by using the positive sine coding method, x is the input factor, y is the output of the identification sequence, and the formula of the coding method is: Encoding method 1: y = sin (x), wherein y takes four significant digits to generate an effective sequence, and the effective sequences generated by the two input factors are spliced in the generation order to obtain an 8-bit identification sequence X, which occupies 1 byte.
4. The method of claim 1, wherein, In step S2, the identification sequence X of the node is generated in the following way: The node selects two random numbers between 00H and 0FH as input factors for generating the identification sequence, the input factors are encoded by using the positive sine coding method, x is the input factor, y is the output of the identification sequence, and the formula of the coding method is: Encoding method 2: y = sin (x), wherein y takes four significant digits to generate an effective sequence, and the effective sequences generated by the two input factors are spliced in the generation order to obtain an 8-bit identification sequence X, which occupies 1 byte.
5. The method of claim 1, wherein, In step S4, the random delay range of the gateway is 1 ms to 500 ms.
6. The method of claim 1, wherein, In step S4, the identification sequence Y generated by the gateway has a total of 8 bits, which occupies 1 byte, wherein 6 bits are a hexadecimal number sequence of the time point of the hour, minute and second, and 1 bit of hexadecimal random number is inserted between the hour and the minute and the minute and the second.
7. The method of claim 1, wherein, The detailed execution process of step S5 is as follows: S50, the node sets n-second waiting timing; S51, whether there is a gateway response within n seconds, if not, jump to S52 to count +1 for communication failure, and jump to S53 to judge whether the failure exceeds i times, if not, reset the waiting S50, if yes, jump to S57 to register failure; S54, if there is a gateway response within n seconds, judge whether there is the original identification sequence X in the message, if not, continue S51 waiting; S55, the node extracts the allocated number; S56, judge whether the allocation is zero number, if yes, jump to S57 to register failure; S58, if the allocated number is not zero, the node stores the number and extracts the identification sequence Y of the gateway. 8.The method of claim 1, wherein, The interactive process of steps S6, S7 and S8 is as follows: S6, the node sends the new number and the identification sequence Y together; S71, the node waits for the gateway response for m seconds to determine whether to resend; If there is no response, jump to S6 to resend; S72, the gateway verifies whether the number and the identification sequence Y in the node are consistent with the identification sequence Y generated by itself and responds; S73, the gateway waits for the node to resend for T seconds to determine whether to respond again; S8, if the node receives the gateway response, the registration is completed; if the gateway does not receive the node resend within T seconds, the registration is completed.
Citation Information
Patent Citations
Target channel access method based on improved multi-target PSO
CN108055665A
Automatic equipment numbering method based on SSID broadcasting
CN112188410A