Terminal detection rapid access method and system
By adjusting the number of terminals and access policies in the Internet of Things gateway, the conflict problem during multi-terminal access is solved, and a fast and conflict-free access process is achieved, which improves access efficiency and user experience.
Patent Information
- Application Number
- CN202411290108.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
AI Technical Summary
In IoT applications, multiple terminals are prone to access conflicts when accessing gateways at the same time, resulting in too long access process. The existing random fallback algorithm is inefficient when accessing large-scale terminals and cannot be used in a short period of time. Complete conflict-free access to all terminals.
The gateway adds the maximum number of idle frames to the broadcast. The access terminal is selected to select idle frames based on the random number to send access requests. The gateway counts the number of idle frames and access terminals, adjusts the number of terminals to avoid conflicts, and ensures that all terminals are within one cycle No conflict access.
It realizes conflict-free access to all terminals during the data transmission cycle, significantly speeding up the access process and improving the system's access performance and user experience.
Smart Images

Figure CN119233432A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of terminal detection, and in particular to a method and system for rapid access of terminal detection. Background Art
[0002] In IoT applications, tens of thousands or even hundreds of thousands of terminals often access the same gateway for data communication. At this time, synchronous communication is generally used, that is, each terminal will send data regularly according to the arrangement of the gateway when accessing. The sending cycle is related to the number of terminals connected, and the longest period can be as long as 40 to 50 minutes (cycle) to send data. After the terminal completes access to the gateway, it sends data in the time slice allocated by the gateway. Only one terminal sends data in a time slice, so there will be no conflict. It is easy for the terminal to send data according to the gateway scheduling after access. The difficulty lies in the difficulty of the terminal when it first accesses the gateway. At this time, the terminal has not yet established contact with the gateway, and the gateway does not know that there is a terminal to access.
[0003] In the terminal access process, the general practice is that the gateway will periodically broadcast accessible time slices - idle time slices (idle resources) for a period of time after the broadcast. The terminal to be accessed will first listen to the broadcast, and when the idle time slice (idle resource) given in the broadcast arrives, it will try to send an access request to the gateway. If the gateway receives the terminal request and passes the authentication, it will return a time slice to the terminal. At this time, the terminal has completed the access. Thereafter, the terminal can periodically send data to the gateway in the returned allocated time slice.
[0004] The above terminal access process is feasible for one terminal to access, but when multiple terminals are preparing to access at the same time, access conflicts will occur, because each terminal has heard the broadcast and sent access requests in the same idle time slice, so conflicts will occur. The gateway cannot correctly receive the request information, and it is impossible to send access return information, which ultimately leads to all terminals being unable to receive gateway return information and unable to complete the access process. The most common method to solve this access problem is the random backoff algorithm. The core of this algorithm is to increase the random window and then randomize after a conflict occurs. The probability of multiple terminals randomly entering the same time slice and causing conflicts can be reduced by expanding the random window value Nmax multiple times.
[0005] However, when the number of terminals to be accessed is not large and there are idle time slices (when there are more resources), the time spent by the terminal after multiple random backoffs is not long, which can meet the application requirements. However, when the number of terminals to be accessed increases sharply, for example, reaching the order of tens of thousands, the wireless transmission bandwidth is limited, and it takes several minutes or even dozens of minutes for the terminals to be accessed in sequence without backoff and conflict. In practice, the random backoff access algorithm is used. In the first two rounds of access process, conflicts will basically occur when the terminal sends a request (the number of terminals is greater than the number of idle frames Nmax), and the probability of terminal access is almost 0. After several rounds of attempts and the expansion of the window Nmax value, the terminal can gradually complete the access to the gateway. After multiple rounds of attempts, the longest time for all terminals to complete access will reach several hours, which is unacceptable in practical applications. Therefore, it is not ideal to use the random backoff algorithm for terminal access. Summary of the invention
[0006] The purpose of this application is to provide a terminal detection fast access method and system in order to overcome the existing technical defects, which can solve the problem of achieving conflict-free access of all terminals within a data transmission cycle when the gateway encounters sudden terminal simultaneous access.
[0007] The purpose of this application is achieved through the following technical solutions:
[0008] In a first aspect, the present application proposes a terminal detection fast access method, the method is applied to a terminal detection fast access system, the system includes a gateway and a plurality of terminals to be accessed connected to the gateway, the method includes:
[0009] Step S1, the gateway adds the maximum number of idle frames in the broadcast and sends it to the terminal to be accessed;
[0010] Step S2: After the access terminal monitors the broadcast, it generates a random number according to the maximum number of idle frames, and sends an access frame to the gateway in the idle frame corresponding to the random number;
[0011] Step S3, the gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed according to the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends;
[0012] Step S4, the gateway adjusts the number of terminals to be accessed, calculates the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, starts the access round using the number of idle frames, and repeats steps S1 to S4 using the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
[0013] In a possible implementation, the calculation formula for the number of terminals to be accessed N is: N=Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。
[0014] In a possible implementation, the adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally to the data area.
[0015] In a possible implementation, the random number is randomly generated within 1-Nmax.
[0016] In a possible implementation, the method further includes:
[0017] The terminal to be accessed compares the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, it will wait for the idle frame corresponding to the previous random number to arrive for access. If there is a change, it will regenerate a random number and wait for the idle frame corresponding to the new random number to arrive for access.
[0018] In a second aspect, the present application also proposes a terminal detection and rapid access system, the system comprising a gateway and a plurality of terminals to be accessed connected to the gateway;
[0019] The gateway is used to add the maximum number of idle frames in the broadcast and send it to the terminal to be connected;
[0020] The terminal to be accessed is used to generate a random number according to the maximum number of idle frames after monitoring the broadcast, and send an access frame to the gateway in the idle frame corresponding to the random number;
[0021] The gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed according to the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends;
[0022] The gateway is used to adjust the number of terminals to be accessed, calculate the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, start the access round using the number of idle frames, and use the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
[0023] In a possible implementation, the calculation formula for the number of terminals to be accessed N is: N=Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。
[0024] In a possible implementation, the adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally to the data area.
[0025] In a possible implementation, the random number is randomly generated within 1-Nmax.
[0026] In a possible implementation, the terminal to be accessed is used to compare the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, access is performed when the idle frame corresponding to the previous random number arrives; if there is a change, the random number is regenerated and access is performed when the idle frame corresponding to the new random number arrives.
[0027] The above-mentioned main scheme of the present application and its further options can be freely combined to form multiple schemes, all of which are schemes that can be adopted and claimed for protection in the present application; and in the present application, (non-conflicting options) options and other options can also be freely combined. After understanding the scheme of the present application, those skilled in the art can understand that there are multiple combinations based on the prior art and common knowledge, all of which are technical schemes to be protected by the present application, and they are not exhaustively listed here.
[0028] The present application discloses a terminal detection fast access method and system. First, the gateway adds a maximum number of idle frames in a broadcast. After the access terminal monitors the broadcast, the access terminal generates a random number according to the maximum number of idle frames, and sends an access frame to the gateway in the idle frame corresponding to the random number. The gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frame of the detection window, calculates the number of terminals to be accessed, adjusts the number of terminals to be accessed, calculates the number of idle frames in the idle area in the data cycle, starts an access round, and repeats the above steps with the adjusted number of terminals to be accessed as the maximum number of idle frames until all the terminals to be accessed do not conflict, and the total number of terminals to be accessed is obtained, ensuring that all the terminals to be accessed access the gateway. By adjusting and predicting the number of terminals to be accessed, sufficient idle resources are pre-arranged, and all terminals can be guaranteed to access the gateway within a cycle, thereby ensuring that the terminals have minimal conflicts in the idle time slice, thereby accelerating the access process. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flow chart of a terminal detection and quick access method proposed in an embodiment of the present application is shown.
[0031] Figure 2 A schematic diagram of the terminal access sampling principle proposed in an embodiment of the present application is shown.
[0032] Figure 3 A complete sending cycle schematic diagram proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0033] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0034] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.
[0035] In the prior art, a certain proportion of idle frames is reserved in a data transmission cycle for terminal access. If this proportion is too high, the cycle will become longer and time will be wasted. If the proportion is too low, congestion will occur when a large number of terminals access at the same time, resulting in complete inability to access. In fact, access congestion may occur regardless of the reserved proportion. The terminal party can solve the access problem by using a random backoff algorithm, but there will still be a situation where the terminal needs to back off multiple times, resulting in a long terminal access time.
[0036] The reason for this problem is that neither the gateway nor the terminal knows the total number of terminals that need to access. Of course, the total number of terminals to be accessed is constantly changing over time and is unpredictable. The simultaneous access of terminals to the gateway will lead to intensified access conflicts and longer access cycles. The fundamental reason is that neither the terminal nor the gateway knows the total number of terminals to be accessed, and cannot make scheduling arrangements for the terminals to be accessed in advance.
[0037] Therefore, in order to solve the above-mentioned technical problems, the embodiment of the present application proposes a terminal detection and quick access method and system to detect and estimate the number of terminals currently to be accessed, and actively expand the number of idle areas in the data transmission cycle according to the estimated number of terminals. The terminals to be accessed perform random access according to the new total number of idle frames. It can be achieved within one access cycle that all terminals can access the gateway, thereby solving the problem of a large number of terminals accessing the gateway at the same time, resulting in a long access time due to conflicts. It is described in detail below.
[0038] The terminal detection fast access method can also detect and estimate the number of terminals currently waiting to access, and actively expand the number of idle areas P in the data transmission cycle T based on the estimated number of terminals. The terminals waiting to access perform random access based on the total number of new idle frames, which theoretically eliminates conflicts when terminals send access frames.
[0039] Please refer to Figure 1 , Figure 1 A flowchart of a terminal detection and quick access method proposed in an embodiment of the present application is shown. The method is applied to a terminal detection and quick access system. The system includes a gateway and a plurality of terminals to be accessed connected to the gateway. The method includes:
[0040] Step S1: The gateway adds the maximum number of idle frames in the broadcast and sends it to the terminal to be accessed.
[0041] First, adjust the maximum number of idle frames in the original broadcast (Nmax) to the maximum number of terminal connections that the gateway can theoretically access (Nwg). If the maximum number of terminal connections Nwg that a gateway can support is 100,000, then Nmax is set to 100,000.
[0042] Step S2: After the access terminal monitors the broadcast, it generates a random number according to the maximum number of idle frames, and sends an access frame to the gateway in the idle frame corresponding to the random number.
[0043] The random number is randomly generated in 1-Nmax. After listening to the broadcast, each terminal that wants to access the network (terminal to be accessed) will randomly select a time slice (numbered between 1 and Nmax) to send an access request. This is done to avoid all terminals trying to access at the same time, thereby reducing collisions and retransmissions. That is, after hearing the broadcast, the terminal to be accessed generates a random number s in 1-Nmax and sends an access frame when the time point corresponding to the random number s arrives.
[0044] The method further includes:
[0045] The terminal to be accessed compares the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, it will wait for the idle frame corresponding to the previous random number to arrive for access. If there is a change, it will regenerate a random number and wait for the idle frame corresponding to the new random number to arrive for access.
[0046] Each terminal waiting to access will monitor the change of Nmax to ensure that the access process is synchronized with the information broadcast by the gateway. If Nmax remains unchanged, the terminal will continue to follow the previously generated random access. Once Nmax is detected to be updated, it means that the gateway has adjusted the strategy to optimize access efficiency and reduce conflicts. At this time, the terminal will immediately terminate the original access process and regenerate a random access opportunity based on the new Nmax, thereby starting a new round of access attempts.
[0047] It not only enhances the flexibility and response speed of the overall strategy, but also ensures that terminal access can be efficiently guided even when network conditions change rapidly, reducing unnecessary retries and waiting, and optimizing the overall access performance and user experience of the system.
[0048] Step S3: The gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed based on the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends.
[0049] The calculation formula for the number of terminals to be accessed N is: N = Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。
[0050] The gateway will continue to listen to these access requests within a specific detection window time (for example, r = 1000 idle frames, about 60 seconds). After this period ends, the number of access terminals (n) in the idle frames that actually successfully access is counted. The total number of terminals to be accessed N is inferred from the ratio of the number of access terminals n in the idle frames to the preset idle time slices. According to the data in the example, if 500 terminals successfully access in these 1000 idle time slices, the total number of terminals to be accessed is estimated to be N = 100000*500 / 1000 = 50000, which means that an estimated 50,000 terminals are trying to access the network.
[0051] Therefore, the gateway not only broadcasts idle frame information to guide terminal access, but also dynamically adjusts its broadcast strategy according to the access activity in the idle frame (i.e., the number of access terminals). It can provide real-time feedback on the network status and ensure that the access parameter (Nmax) matches the actual number of terminals to be accessed, thereby optimizing the overall access efficiency and system load balancing.
[0052] Figure 2A schematic diagram of the terminal access sampling principle proposed in an embodiment of the present application is shown. After the terminal generates a random number, the access points are evenly distributed in the entire access Rmax space. All terminals are randomly accessed in 1-Rmax. The terminal access points are evenly distributed in the entire spatial sampling space t. The ratio of the number of terminals n to r is equal to the ratio of the total number of terminals N to Rmax: n / r=N / Rmax, where Rmax is the total number of idle frames. In step S1, the total number of idle frames Rmax is set to the maximum number of idle frames Nmax, r is the number of all idle frames in the time detection window t, n is the number of access terminals in time t, N is the number of all access terminals, one terminal corresponds to one access point, and all access frames are counted as idle frames.
[0053] Step S4, the gateway adjusts the number of terminals to be accessed, calculates the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, starts the access round using the number of idle frames, and repeats steps S1 to S4 using the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
[0054] The adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally in the data area. For example, the total number of idle frames in the broadcast is set to λ=1.2 times the original theoretical maximum access number, that is, 20% of idle time slices are added, in order to give the terminals to be accessed more time selection opportunities to disperse access requests and reduce collisions caused by simultaneous access. If the initial maximum access number is 100,000, the adjusted Nmax becomes 120,000 (100,000*1.2).
[0055] The method may adopt a photovoltaic synchronous communication model. In a possible implementation, based on the photovoltaic synchronous communication model, Figure 3 A complete transmission cycle schematic diagram proposed in an embodiment of the present application is shown, wherein each terminal has one transmission opportunity in the transmission cycle T, the number of terminals accessed by a single gateway can reach 100,000, and a transmission cycle can be up to 40 minutes at most, so the interval between two transmissions of a terminal can be up to 40 minutes at most, and event frames E and idle frames I are added in a certain ratio in the entire transmission cycle T, which is 8:2:2 in the figure, that is, 8 data frames, 2 event frames and 2 idle frames are arranged alternately. After the data frame ends, an idle frame area P of indefinite length is added. This area is all idle frames, which is used to meet the needs of new terminal access. The length Pn of the idle area P can be 0. sum(I) is the number of idle frames in the data area, excluding the idle frames in the idle area. The length of the data area D is Ld, and the length of Ld is determined by the number of access terminals.
[0056] The specific steps for terminal sending and access are as follows:
[0057] First, when the terminal accesses the gateway for the first time, the gateway assigns a sending time point to the terminal. This time point is called a data frame, which is a periodic sending time slice exclusively for the terminal. In each period T, the terminal will send in this data frame, and is prohibited from sending at other time points. In this way, each terminal has one sending opportunity in each period T.
[0058] Second, in each cycle T, in addition to data frames, event frames E and idle frames I are added in proportion. When an emergency occurs, the terminal can compete to send in the event frame. Emergency events are low-probability events, so event frames are fast response frames. The idle frame is the time slice for the new terminal to send the access frame. The first step for the new terminal to connect to the gateway is to send the access frame in the idle frame. After the access frame is successfully sent, it will be assigned an exclusive data frame number. The terminal after access only sends data or events in the specified data frame number or event frame, and will no longer use the idle frame.
[0059] Third, the connected terminal decides whether to send data in this round according to the length Ld of the data area in the broadcast. When the allocated frame number>Ld, the terminal cannot send data. Only when the frame number<=Ld can the terminal send data in the allocated frame number.
[0060] Fourth, when multiple new terminals want to access, the new terminals obtain idle frames through competition. If multiple terminals compete for the same idle frame and fail to send it, a random backoff algorithm is used to compete again until access is successful.
[0061] Fifth, the competition access algorithm for idle frames is as follows:
[0062] The terminal obtains the period T, idle frame ratio K and the length of the completely idle area P by receiving the gateway broadcast, calculates the total number of idle frames in period T Nidle = sum(I) + Pn, randomly obtains a value r in the range of 1-Nidle, and sends an access frame at the idle frame position corresponding to the r value. If the access frame is sent successfully, a data frame number assigned by the gateway can be obtained, and the access is completed. If the access frame fails to be sent, the range of Nidle is expanded to Nidle = 2xNidle in two periods T, and a random value r is generated again and access is made at position r. If the number of accesses is greater than 5 times, the access process is stopped and the frequency hopping gateway switching process is entered. After receiving this adjusted broadcast information, the terminal to be accessed will re-execute the process of randomly selecting a time slice according to the new Nmax value, thereby sending an access request within a more relaxed time window.
[0063] After a round of access attempts based on the expanded Nmax value ends, the gateway will reset Nmax back to the default value (the theoretical maximum number of accesses) and then start a new round of broadcasts and access attempts. This dynamic adjustment mechanism can flexibly adapt to changes in network access requirements and manage the access process more efficiently.
[0064] Modify the new data cycle T parameter in the broadcast and the maximum random value parameter R in the broadcast = N*1.2. After the terminal receives the new parameter R, it recalculates the random access time point and enters the access process. A new round of access process is started with the new Pn, which is called an access round. The length of the data area Ld in the data cycle of the access round remains unchanged until the end of the access round. When the next round starts, Ld is changed when T is recalculated. If the data frame position assigned to the newly accessed terminal is behind Ld, data will not be sent in this round until the frame position is less than Ld. In this way, the frame position of the newly accessed terminal in the access round must be greater than Ld, so data cannot be sent until the end of the access round. Under normal circumstances, the Ld of the round after the access round will be expanded accordingly according to the number of access terminals, so the newly accessed terminal will start sending data in the next round of the access round.
[0065] In addition, after the access round, as Ld may be adjusted and expanded according to the number of terminals actually accessed, the terminals that were unable to send data due to location reasons can start data transmission in the new cycle, which not only maintains the order of network access, but also makes full use of bandwidth resources.
[0066] A possible implementation of a terminal detection quick access system is provided below, which is used to execute the various execution steps and corresponding technical effects of the terminal detection quick access method shown in the above embodiments and possible implementations.
[0067] In a second aspect, the present application proposes a terminal detection and rapid access system, the system comprising a gateway and a plurality of terminals to be accessed connected to the gateway;
[0068] The gateway is used to add the maximum number of idle frames in the broadcast and send it to the terminal to be connected;
[0069] The terminal to be accessed is used to generate a random number according to the maximum number of idle frames after monitoring the broadcast, and send an access frame to the gateway in the idle frame corresponding to the random number;
[0070] The gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed according to the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends;
[0071] The gateway is used to adjust the number of terminals to be accessed, calculate the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, start the access round using the number of idle frames, and use the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
[0072] In a possible implementation, the calculation formula for the number of terminals to be accessed N is: N=Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。
[0073] In a possible implementation, the adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally to the data area.
[0074] In a possible implementation, the random number is randomly generated within 1-Nmax.
[0075] In a possible implementation, the terminal to be accessed is used to compare the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, access is performed when the idle frame corresponding to the previous random number arrives; if there is a change, the random number is regenerated and access is performed when the idle frame corresponding to the new random number arrives.
[0076] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A terminal detection and rapid access method, characterized in that: The method is applied to a terminal detection and rapid access system, the system comprising a gateway and a plurality of terminals to be accessed connected to the gateway, and the method comprises: Step S1: The gateway adds the maximum number of idle frames in the broadcast and sends it to the terminal to be accessed; Step S2: After the access terminal monitors the broadcast, it generates a random number according to the maximum number of idle frames, and sends an access frame to the gateway in the idle frame corresponding to the random number; Step S3, the gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed according to the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends; Step S4, the gateway adjusts the number of terminals to be accessed, calculates the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, starts the access round using the number of idle frames, and repeats steps S1 to S4 using the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
2. The terminal detection fast access method according to claim 1, characterized in that: The calculation formula for the number of terminals to be accessed N is: N = Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。 3. The terminal detection fast access method according to claim 2, characterized in that: The adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally to the data area.
4. The terminal detection fast access method according to claim 2, characterized in that: Random numbers are randomly generated in 1-Nmax.
5. The terminal detection and rapid access method according to claim 1, characterized in that: The method further comprises: The terminal to be accessed compares the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, it will wait for the idle frame corresponding to the previous random number to arrive for access. If there is a change, it will regenerate a random number and wait for the idle frame corresponding to the new random number to arrive for access.
6. A terminal detection and rapid access system, characterized in that: The system includes a gateway and a plurality of terminals to be accessed connected to the gateway; The gateway is used to add the maximum number of idle frames in the broadcast and send it to the terminal to be connected; The terminal to be accessed is used to generate a random number according to the maximum number of idle frames after monitoring the broadcast, and send an access frame to the gateway in the idle frame corresponding to the random number; The gateway counts the number of idle frames in the detection window and the number of access terminals in the idle frames, and calculates the number of terminals to be accessed according to the number of idle frames in the detection window and the number of access terminals in the idle frames after the detection window ends; The gateway is used to adjust the number of terminals to be accessed, calculate the number of idle frames in the idle area in the data cycle according to the adjusted number of terminals to be accessed, start the access round using the number of idle frames, and use the adjusted number of terminals to be accessed as the maximum number of idle frames until the total number of terminals to be accessed is obtained when there is no conflict among all terminals to be accessed, thereby ensuring that all terminals to be accessed can access the gateway.
7. The terminal detection and rapid access system as claimed in claim 6, characterized in that: The calculation formula for the number of terminals to be accessed N is: N = Nmax*n / r, where Nmax is the maximum number of idle frames, n is the number of access terminals in the idle frames of the detection window, r is the number of idle frames in the detection window, and r< <Nmax。 8. The terminal detection and rapid access system as claimed in claim 7, characterized in that: The adjusted number of terminals to be accessed is N′=λN, where λ is the adjustment multiple, and the number of idle frames Pn=N′-sum(I), where sum(I) is the total number of idle frames added proportionally to the data area.
9. The terminal detection and rapid access system as claimed in claim 7, characterized in that: Random numbers are randomly generated in 1-Nmax.
10. The terminal detection and rapid access system according to claim 6, characterized in that: The terminal to be accessed is used to compare the maximum number of idle frames received in this round with the maximum number of idle frames in the previous round. If there is no change, it will wait for the idle frame corresponding to the previous random number to arrive for access. If there is a change, it will regenerate a random number and wait for the idle frame corresponding to the new random number to arrive for access.
