Network access control method, terminal, gateway and readable storage medium

By mapping the device identification information of the terminal to multiple idle time slots in the Internet of Things wireless communication system, and generating network access credential values ​​to determine the target time slot, the conflict problem caused by multiple terminals selecting the same time slot at the same time is solved, and the network access efficiency is improved.

CN122054318APending Publication Date: 2026-05-15SHENZHEN NATIONZ ELECTRONIC COMMERCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN NATIONZ ELECTRONIC COMMERCE CO LTD
Filing Date
2026-01-08
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In IoT wireless communication systems, multiple terminals simultaneously selecting the same idle time slot to send data can cause conflicts at the access gateway, reducing network access efficiency.

Method used

By mapping the terminal's device identification information to multiple idle time slots, a network access credential value is generated, and the target time slot is determined based on the credential value. This ensures that different terminals correspond to different idle time slots and avoids multiple terminals from selecting the same time slot for communication at the same time.

Benefits of technology

This effectively reduces the number of conflicts at the access gateway and improves network access efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122054318A_ABST
    Figure CN122054318A_ABST
Patent Text Reader

Abstract

The invention discloses a network access control method, a terminal, a gateway and a storage medium. The method comprises the following steps: receiving an idle time slot message broadcasted by the gateway; mapping the equipment identification information of the terminal to the plurality of idle time slots to obtain a corresponding target time slot of the terminal in the plurality of idle time slots; sending a time slot use request to the gateway based on the target time slot, so that the gateway determines whether to allow the terminal to use the target time slot based on the time slot use request; and if a response message which is sent by the gateway and is used for indicating agreement to use the target time slot is received, communicating with the gateway based on the target time slot. According to the method, the device identification information of the terminal itself can be mapped to the plurality of idle time slots without a preset time slot, and due to the uniqueness of the device identification information, different terminals can be ensured to correspond to different idle time slots, so that the plurality of terminals cannot simultaneously select the same time slot to transmit and receive data, and the data transmission efficiency is improved. Therefore, the number of conflicts occurring in the access gateway can be effectively reduced, and the network access efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a network access control method, a terminal, a gateway, and a computer-readable storage medium. Background Technology

[0002] In IoT wireless communication systems, gateways are primarily responsible for information exchange between terminals and servers. Gateways need to communicate with a large number of terminals, and to avoid communication conflicts, time-division multiplexing is typically used, dividing the network into multiple time slots. Each terminal sends and receives data in its own time slot. How to allocate time slots to terminals without duplication is a crucial aspect of communication. Currently, related technologies involve the gateway periodically broadcasting idle time slots. Terminals not yet connected to the gateway select an idle time slot to communicate with it after receiving the broadcast. However, when multiple terminals concurrently connect to the gateway, multiple terminals may simultaneously select the same idle time slot to send data, leading to access conflicts and reducing network access efficiency. Summary of the Invention

[0003] This application provides a network access control method, a terminal, a gateway, and a computer-readable storage medium, which solves the problem in related technologies where multiple terminals simultaneously select the same idle time slot to send data, causing conflicts in the access gateway and reducing network access efficiency.

[0004] In a first aspect, this application provides a network access control method applied to a terminal, the method comprising: Receive an idle time slot message broadcast by the gateway, wherein the idle time slot message includes multiple idle time slots; The device identification information of the terminal is mapped to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots, wherein different terminals correspond to different idle time slots; A time slot usage request is sent to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request; If a response message indicating agreement to use the target time slot is received from the gateway, then communication is conducted with the gateway based on the target time slot.

[0005] In one embodiment, mapping the device identification information of the terminal to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots includes: Generate the network access credential value of the terminal based on the device identification information; The multiple idle time slots are indexed and numbered, and the total number of the multiple idle time slots is counted. Based on the total number of the multiple idle time slots and the index value corresponding to each idle time slot, the network access credential value is mapped to the multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots.

[0006] In one embodiment, the device identification information includes a unique identifier value; generating the network access credential value of the terminal based on the device identification information includes: Based on a preset credential generation algorithm, the network access credential value is generated according to the unique identifier value and a preset non-fixed value.

[0007] In one embodiment, the credential generation algorithm includes a hash function; the method for generating the network access credential value based on the preset credential generation algorithm, according to the unique identifier value and a preset non-fixed value, includes: The hash value is calculated between the unique identifier value and the non-fixed value according to the hash function; The network access credential value is determined based on the calculated hash value.

[0008] In one embodiment, mapping the network access credential value to the plurality of idle time slots based on the total number of the plurality of idle time slots and the index value corresponding to each idle time slot, to obtain the target time slot corresponding to the terminal in the plurality of idle time slots, includes: The target remainder value corresponding to the network access certificate value is obtained by performing a remainder operation on the total number of the multiple idle time slots based on the network access certificate value. Based on the target residual value, determine the target index value of the network access certificate value in the plurality of idle time slots; Based on the target index value and the index value corresponding to each idle time slot, the target time slot corresponding to the terminal in the plurality of idle time slots is determined.

[0009] Secondly, this application also provides a network access control method applied to a gateway, the method comprising: Broadcast an idle time slot message, wherein the idle time slot message includes multiple idle time slots; When a time slot usage request is received from a terminal, it is determined whether the target time slot in the time slot usage request is occupied. When the terminal receives the idle time slot message, it maps the terminal's device identification information to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots. If the target time slot is not occupied, a response message indicating consent to use the target time slot is sent to the terminal, so that the terminal can communicate with the gateway based on the target time slot.

[0010] In one embodiment, after determining whether the target time slot in the time slot usage request is occupied, the method further includes: If the target time slot is occupied, a response message indicating disagreement with using the target time slot is sent to the terminal, so that the terminal can re-determine the target time slot based on the idle time slot message broadcast by the gateway.

[0011] Thirdly, this application also provides a terminal, which includes a memory and a processor; The memory is used to store computer programs; The processor is used to implement the network access control method corresponding to any of the terminals described above when executing the computer program.

[0012] Fourthly, this application also provides a gateway, which includes a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the network access control method corresponding to any of the above-described gateways when executing the computer program.

[0013] Fifthly, this application also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements any one of the above-described network access control methods. This application discloses a network access control method, a terminal, a gateway, and a computer-readable storage medium. The network access control method includes: receiving an idle time slot message broadcast by a gateway, the idle time slot message including multiple idle time slots; mapping the terminal's device identification information to the multiple idle time slots to obtain a target time slot corresponding to the terminal among the multiple idle time slots, wherein different terminals correspond to different idle time slots; sending a time slot usage request to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request; if a response message indicating agreement to use the target time slot is received from the gateway, then communication is established with the gateway based on the target time slot. This network access control method, by mapping the terminal's device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots, can achieve the mapping of the terminal's own device identification information to multiple idle time slots without the need for preset time slots. Due to the uniqueness of the device identification information, it can ensure that different terminals correspond to different idle time slots, so that multiple terminals will not simultaneously select the same time slot for sending and receiving data, thereby effectively reducing the number of access gateway conflicts and improving network access efficiency. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the structure of an Internet of Things (IoT) wireless communication system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a gateway provided in an embodiment of this application; Figure 4 This is a schematic flowchart of a network access control method provided in an embodiment of this application; Figure 5 This is a schematic flowchart of a sub-step of another network access control method provided in the embodiments of this application; Figure 6 This is a schematic flowchart of another network access control method provided in the embodiments of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0018] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0019] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0020] In IoT wireless communication systems, gateways are primarily responsible for information exchange between terminals and servers. Gateways need to communicate with a large number of terminals; for example, a gateway may need to connect hundreds or thousands of terminals. To avoid communication conflicts, time-division multiplexing is typically used, dividing the system into multiple time slots. Each terminal sends and receives data in its own time slot. Allocating time slots to terminals without duplication is a crucial aspect of the communication process.

[0021] Currently, the relevant technologies typically employ the following schemes when allocating time slots: Option 1: Assign fixed time slots to terminals during the module production or installation / deployment phase. Terminals directly use these fixed time slots for communication when accessing the gateway. This requires manually ensuring the uniqueness of the time slot number for each terminal under a gateway. The disadvantages of this option are low production and deployment efficiency and a high risk of errors.

[0022] Option 2: Terminals do not need to pre-set time slot numbers. Instead, the gateway periodically broadcasts available time slots. Terminals not connected to the gateway select an available time slot to communicate with the gateway after receiving the broadcast. However, when multiple terminals connect to the gateway concurrently, multiple terminals may simultaneously select the same available time slot to send data, resulting in conflicts when accessing the gateway and reducing network access efficiency.

[0023] To address the problem of network access efficiency reduction caused by multiple terminals simultaneously selecting the same idle time slot to send data, which leads to conflicts at the access gateway, this application provides a network access control method, a terminal, a gateway, and a computer-readable storage medium. By mapping the terminal's device identification information to multiple idle time slots, the target time slot corresponding to the terminal in the multiple idle time slots is obtained. This allows the terminal's own device identification information to be mapped to multiple idle time slots without the need for preset time slots. Due to the uniqueness of the device identification information, it can be ensured that different terminals correspond to different idle time slots, so that multiple terminals will not simultaneously select the same time slot for sending and receiving data. This can effectively reduce the number of conflicts at the access gateway and improve network access efficiency.

[0024] For example, the terminal may include, but is not limited to, electronic devices such as smartphones, tablets, laptops, and desktop computers.

[0025] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0026] Please see Figure 1 , Figure 1This is a schematic diagram of the structure of an Internet of Things (IoT) wireless communication system 10 provided in an embodiment of this application. The IoT wireless communication system 10 may include multiple terminals 100, a gateway 200, and a server 300, wherein the gateway 200 is mainly responsible for information exchange between the terminals 100 and the server 300.

[0027] For example, terminal 100 wirelessly communicates with gateway 200, sending messages to server 300 through gateway 200. Server 300 also communicates with gateway 200, sending messages to terminal 100 through gateway 200. Before communication between terminal 100 and gateway 200, gateway 200 needs to allocate an idle time slot for terminal 100 to avoid conflicts caused by multiple terminals 100 simultaneously selecting the same idle time slot to send data.

[0028] It should be noted that, in the embodiments of this application, each terminal 100 can execute the network access control method provided in the embodiments of this application.

[0029] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a terminal 100 provided in an embodiment of this application. The terminal 100 may include a processor 1001 and a memory 1002, wherein the processor 1001 and the memory 1002 can be connected by a bus, which can be any applicable bus such as an Inter-integrated Circuit (I2C) bus.

[0030] The memory 1002 may include a storage medium and internal memory. The storage medium may be a non-volatile storage medium or a volatile storage medium. The storage medium may store an operating system and computer programs, while the internal memory provides an environment for the execution of the computer programs stored in the storage medium. The computer programs include program instructions, which, when executed, cause the processor 1001 to perform the network access control method described in any embodiment.

[0031] The processor 1001 provides computing and control capabilities to support the operation of the entire terminal 100.

[0032] The processor 1001 can be a Central Processing Unit (CPU), but it can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or it can be any conventional processor.

[0033] In one embodiment, the processor 1001 is configured to run a computer program stored in the memory 1002 to perform the following steps: The system receives an idle time slot message broadcast by the gateway, which includes multiple idle time slots; maps the terminal's device identification information to the multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots, wherein different terminals correspond to different idle time slots; sends a time slot usage request to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request; if a response message from the gateway indicating agreement to use the target time slot is received, the system communicates with the gateway based on the target time slot.

[0034] In one embodiment, when the processor 1001 maps the terminal's device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots, it is configured to: The network access credential value of the terminal is generated based on the device identification information; multiple idle time slots are indexed and numbered and the total number of multiple idle time slots is counted; based on the total number of multiple idle time slots and the index value corresponding to each idle time slot, the network access credential value is mapped to multiple idle time slots to obtain the target time slot corresponding to the terminal in multiple idle time slots.

[0035] In one embodiment, the device identification information includes a unique identification value; when the processor 1001 generates the terminal's network access credential value based on the device identification information, it is used to: Based on a preset credential generation algorithm, an access credential value is generated according to a unique identifier value and a preset non-fixed value.

[0036] In one embodiment, the credential generation algorithm includes a hash function; when the processor 1001 generates an access credential value based on a preset credential generation algorithm and a preset non-fixed value, it is used to implement: The unique identifier value and the non-fixed value are hashed using a hash function; the network access certificate value is determined based on the calculated hash value.

[0037] In one embodiment, when the processor 1001 maps the network access credential value to multiple idle time slots based on the total number of idle time slots and the index value corresponding to each idle time slot, to obtain the target time slot corresponding to the terminal in the multiple idle time slots, it is used to implement: The target remainder value corresponding to the network access certificate value is obtained by taking the remainder of the total number of idle time slots based on the network access certificate value; the target index value of the network access certificate value in the multiple idle time slots is determined based on the target remainder value; and the target time slot corresponding to the terminal in the multiple idle time slots is determined based on the target index value and the index value corresponding to each idle time slot.

[0038] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a gateway 200 provided in an embodiment of this application. The gateway 200 may include a processor 2001 and a memory 2002, wherein the processor 2001 and the memory 2002 can be connected by a bus, which can be any applicable bus such as an Inter-integrated Circuit (I2C) bus.

[0039] The memory 2002 may include a storage medium and internal memory. The storage medium may be a non-volatile storage medium or a volatile storage medium. The storage medium may store an operating system and computer programs, and the internal memory provides an environment for the execution of the computer programs stored in the storage medium. The computer programs include program instructions, which, when executed, cause the processor 2001 to perform the network access control method described in any embodiment.

[0040] The processor 2001 provides computing and control capabilities to support the operation of the entire gateway 200.

[0041] The processor 2001 can be a Central Processing Unit (CPU), but it can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or it can be any conventional processor.

[0042] In one embodiment, the processor 2001 is configured to run a computer program stored in the memory 2002 to perform the following steps: Broadcast an idle time slot message, which includes multiple idle time slots; upon receiving a time slot usage request from a terminal, determine whether the target time slot in the request is occupied. Specifically, when the terminal receives the idle time slot message, it maps its device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots; if the target time slot is not occupied, send a response message to the terminal indicating agreement to use the target time slot, so that the terminal can communicate with the gateway based on the target time slot.

[0043] In one embodiment, after determining whether the target time slot in the time slot usage request is occupied, the processor 2001 is further configured to: If the target time slot is occupied, a response message indicating disagreement with using the target time slot is sent to the terminal, so that the terminal can re-determine the target time slot based on the free time slot message broadcast by the gateway.

[0044] Please see Figure 4 , Figure 4 This is a schematic flowchart illustrating a network access control method provided in an embodiment of this application. Figure 4 As shown, the network access control method may include steps S101 to S104.

[0045] Step S101: Receive the idle time slot message broadcast by the gateway. The idle time slot message includes multiple idle time slots.

[0046] In IoT wireless communication systems, gateways can count current idle time slots and periodically broadcast idle time slot messages to multiple terminals. These idle time slot messages include multiple idle time slots. It should be noted that an idle time slot refers to a time slot that is not used or occupied by a terminal.

[0047] For example, when a terminal receives an idle time slot message broadcast by the gateway, it can parse the idle time slot message to obtain multiple idle time slots in the idle time slot message, such as 16K sub-time slots that are not occupied by voice channels, signaling channels or synchronization signals.

[0048] Step S102: Map the terminal's device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal in multiple idle time slots, wherein different terminals correspond to different idle time slots.

[0049] In this embodiment, after receiving an idle time slot message broadcast by the gateway, the terminal can map its device identification information to one of multiple idle time slots based on preset rules to obtain the target time slot corresponding to the terminal, and then communicate with the gateway based on the target time slot. The following will explain in detail how to map the terminal's device identification information to multiple idle time slots.

[0050] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating a sub-step of another network access control method provided in this application embodiment. For example... Figure 5 As shown, step S102 may include steps S1021 to S1023.

[0051] Step S1021: Generate the terminal's network access certificate value based on the device identification information.

[0052] For example, device identification information of the terminal can be obtained, and network access credential value of the terminal can be generated based on the device identification information. The device identification information includes unique identification values, such as the terminal's MAC address (Media Access Control Address, physical address or hardware address) and ID (Identity number).

[0053] In this embodiment, the network access credential value is used to map to one of multiple idle time slots. Different network access credential values ​​correspond to different idle time slots. It can be understood that due to the uniqueness of the device identification information of the terminal device, the network access credential value generated based on the device identification information of different terminals is also unique. Subsequently, different network access credential values ​​can be mapped to different idle time slots, so that different terminals correspond to different idle time slots. This can ensure that different terminals will not use the same idle time slot for communication, thereby effectively reducing the number of access gateway conflicts and improving network access efficiency.

[0054] In some embodiments, generating a network access credential value for a terminal based on device identification information may include: generating a network access credential value based on a preset credential generation algorithm, using a unique identifier value and a preset non-fixed value.

[0055] For example, the credential generation algorithm may include, but is not limited to, hash functions, encryption functions, pseudo-random sequences, lookup tables, etc. Hash functions may include, but are not limited to, MD5, SHA-1, SHA256, SHA3, SM3, etc. Encryption functions may include symmetric encryption functions (e.g., AES, DES), asymmetric encryption functions (e.g., RSA), etc. Pseudo-random sequences may include m-sequences, M-sequences, Gold sequences, etc.

[0056] For example, the preset non-fixed value may include, but is not limited to, timestamps, random numbers, and other numerical values.

[0057] In some implementations, the unique identifier value can be first merged with a preset non-fixed value, and then the merged value can be processed using a credential generation algorithm to obtain the network access credential value. The merging method can include, but is not limited to, appending, or dispersing and mixing operations. For example, the unique identifier value can be merged with a timestamp first, and then an encryption function can be used to encrypt and calculate the merged value to obtain the network access credential value.

[0058] By merging the unique identifier value with a preset non-fixed value, it can be ensured that the value of the network access certificate generated each time is as different as possible within a limited time.

[0059] In some embodiments, the credential generation algorithm includes a hash function; generating an access credential value based on a preset credential generation algorithm and a preset non-fixed value includes: calculating a hash value for the unique identifier value and the non-fixed value according to the hash function; and determining the access credential value based on the calculated hash value.

[0060] For example, the unique identifier value and the non-fixed value can be hashed using the SHA256 algorithm, and the hash value obtained can be used as the network access credential value. The specific process of hash value calculation can be found in the detailed description of relevant technologies, and will not be elaborated here.

[0061] In the above embodiment, by calculating the hash value of the unique identifier value and the non-fixed value according to the hash function, since the input and output of the hash function show great differences and the hash value has the property of uniform distribution, it can be ensured that the index value of the idle time slot obtained by taking the remainder of the hash value also shows the effect of uniform distribution. Thus, the idle time slots selected by different terminals can be evenly distributed on different idle time slots, avoiding multiple terminals from selecting the same idle time slot for communication.

[0062] Step S1022: Index and number the multiple idle time slots and count the total number of multiple idle time slots.

[0063] For example, after parsing the idle time slot message and obtaining multiple idle time slots from the message, the terminal can index and number the multiple idle time slots and count the total number of idle time slots. For instance, when there are 5 idle time slots, they can be numbered with index values ​​from 0 to 4.

[0064] Step S1023: Based on the total number of multiple idle time slots and the index value corresponding to each idle time slot, map the network access credential value to multiple idle time slots to obtain the target time slot corresponding to the terminal in multiple idle time slots.

[0065] In some embodiments, mapping the network access credential value to multiple idle time slots based on the total number of idle time slots and the index value corresponding to each idle time slot to obtain the target time slot corresponding to the terminal in the multiple idle time slots may include: performing a modulo operation on the total number of idle time slots based on the network access credential value to obtain the target remainder value corresponding to the network access credential value; determining the target index value of the network access credential value in the multiple idle time slots based on the target remainder value; and determining the target time slot corresponding to the terminal in the multiple idle time slots based on the target index value and the index value corresponding to each idle time slot.

[0066] It's important to note that the modulo operation on the entry credential value (e.g., hash value) is a crucial step in converting the entry credential value into an array index. The basic formula for the modulo operation is index = hash_value % array_size, where array_size is the size of the hash table array, which is also the total number of idle time slots. If the total number of idle time slots is 5, it means the hash table size is 5, so the modulo operation can convert the hash value into an index value between 0 and 4.

[0067] For example, when the total number of idle time slots is 5, the target remainder value corresponding to the network access certificate value can be obtained by taking the remainder of the total number of idle time slots based on the network access certificate value. For example, the target remainder value is an integer between 0 and 4. Then, based on the target remainder value, the target index value of the network access certificate value in the multiple idle time slots is determined. For example, when the target remainder value is 0, the target index value of the network access certificate value in the multiple idle time slots can be determined to be 0. Another example is when the target remainder value is 1, the target index value of the network access certificate value in the multiple idle time slots can be determined to be 1. Then, the index value corresponding to the idle time slot that matches the target index value is used to determine the target time slot corresponding to the terminal in the multiple idle time slots. For example, when the target index value is 1, the idle time slot with an index value of 1 is determined as the target time slot corresponding to the terminal in the multiple idle time slots. Another example is when the target index value is 4, the idle time slot with an index value of 4 is determined as the target time slot corresponding to the terminal in the multiple idle time slots.

[0068] In the above embodiment, by performing a modulo operation on the total number of idle time slots based on the network access certificate value, the target index value of the network access certificate value in the multiple idle time slots is determined based on the obtained target remainder value. Then, based on the target index value and the index value corresponding to each idle time slot, the target time slot corresponding to the terminal in the multiple idle time slots is determined. Since the input and output of the hash function exhibit great differences, and the hash value has the property of uniform distribution, it can be ensured that the index value of the idle time slot obtained by taking the remainder of the hash value also exhibits a uniform distribution effect. This allows the idle time slots selected by different terminals to be evenly distributed across different idle time slots, avoiding multiple terminals from selecting the same idle time slot for communication.

[0069] Step S103: Send a time slot usage request to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request.

[0070] For example, after mapping the terminal's device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots, the terminal can send a time slot usage request to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request. The time slot usage request may include the target time slot.

[0071] In this embodiment of the application, when the gateway receives a time slot usage request sent by the terminal, it needs to determine whether the target time slot in the time slot usage request is used or occupied by other terminals. If the target time slot is not occupied, the gateway sends a response message to the terminal to indicate that it agrees to use the target time slot, so that the terminal can communicate with the gateway based on the target time slot. If the target time slot is occupied, the gateway sends a response message to the terminal to indicate that it does not agree to use the target time slot, so that the terminal can re-determine a new target time slot.

[0072] In the above embodiments, by sending a time slot usage request to the gateway based on the target time slot, and the gateway determining whether to allow the terminal to use the target time slot based on the time slot usage request, it is possible to further determine whether the target time slot is occupied by other terminals. This can avoid the problem of multiple terminals simultaneously selecting the same idle time slot to send data, which can cause conflicts in the access gateway and result in low network access efficiency.

[0073] Step S104: If a response message indicating agreement to use the target time slot is received from the gateway, then communication is conducted with the gateway based on the target time slot.

[0074] For example, after receiving a response message from the gateway indicating agreement to use the target time slot, the terminal can communicate with the gateway based on the target time slot.

[0075] In the above embodiments, by communicating with the gateway based on the target time slot when receiving a response message from the gateway indicating agreement to use the target time slot, conflicts can be avoided by multiple terminals simultaneously selecting the same idle time slot to send data, thus effectively reducing the number of conflicts at the access gateway and improving network access efficiency.

[0076] In some implementations, after sending a time slot usage request to the gateway based on the target time slot, the method further includes: if no response message is received from the gateway within a preset time period, then returning to receive the idle time slot message broadcast by the gateway, mapping the device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots, and sending a time slot usage request to the gateway based on the target time slot.

[0077] The preset duration can be set according to the actual situation, and the specific value is not limited here. For example, if no response message is received from the gateway within the preset duration, the process returns to steps S101 to S103 above. For details, please refer to the detailed description of the above embodiment, which will not be repeated here.

[0078] In other implementations, after sending a time slot usage request to the gateway based on the target time slot, the method further includes: if a response message sent by the gateway indicating disagreement with the use of the target time slot is received, then returning to receive the idle time slot message broadcast by the gateway, mapping the device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots, and sending a time slot usage request to the gateway based on the target time slot.

[0079] For example, if a response message from the gateway indicating disagreement with the use of the target time slot is received, the process returns to execute steps S101 to S103 as described above. For details, please refer to the detailed description of the above embodiments, which will not be repeated here.

[0080] The above embodiments, by re-determining the target time slot after not receiving a response message from the gateway within a preset time period or receiving a response message from the gateway indicating disagreement with the use of the target time slot, can avoid conflicts in the access gateway caused by directly using idle time slots occupied by other terminals, thereby effectively reducing the number of access gateway conflicts and improving network access efficiency.

[0081] Please see Figure 6 , Figure 6 This is a schematic flowchart of another network access control method provided in an embodiment of this application. As shown in the figure, the network access control method may include steps S201 to S203.

[0082] Step S201: Broadcast an idle time slot message, which includes multiple idle time slots.

[0083] For example, a gateway can periodically broadcast idle time slot messages. These idle time slot messages include multiple idle time slots. It should be noted that the gateway can count the number of time slots currently not occupied by terminals.

[0084] Step S202: When receiving a time slot usage request sent by the terminal, determine whether the target time slot in the time slot usage request is occupied. When the terminal receives an idle time slot message, it maps the terminal's device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal in multiple idle time slots.

[0085] In this embodiment, when a terminal receives an idle time slot message broadcast by the gateway, it can map its device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots. Based on the target time slot, the terminal sends a time slot usage request to the gateway, which then determines whether to allow the terminal to use the target time slot based on the request. The specific process of mapping the device identification information to multiple idle time slots can be found in the detailed description of step S102 above, and will not be repeated here.

[0086] For example, when a gateway receives a time slot usage request from a terminal, it needs to check whether the target time slot in the request is occupied. For instance, it can detect whether other terminals are using the target time slot to communicate with the gateway. If so, it determines that the target time slot is occupied; if not, it determines that the target time slot is not occupied.

[0087] Step S203: If the target time slot is not occupied, a response message indicating consent to use the target time slot is sent to the terminal so that the terminal can communicate with the gateway based on the target time slot.

[0088] For example, when it is determined that the target time slot is not occupied by other terminals, the gateway can send a response message to the terminal indicating that it agrees to use the target time slot, so that the terminal can communicate with the gateway based on the target time slot.

[0089] In some embodiments, after determining whether the target time slot in the time slot usage request is occupied, the method further includes: if the target time slot is occupied, sending a response message to the terminal indicating disagreement with the use of the target time slot, so that the terminal can re-determine the target time slot based on the idle time slot message broadcast by the gateway.

[0090] By sending a response message to the terminal indicating disagreement with the use of the target time slot when it is determined that the target time slot is occupied, it is possible to prohibit the terminal from using the target time slot and to enable the terminal to re-determine the target time slot. This avoids direct use of idle time slots occupied by other terminals, which could lead to conflicts in the access gateway. As a result, the number of access gateway conflicts can be effectively reduced, and network access efficiency can be improved.

[0091] In the above embodiments, by broadcasting idle time slot messages, the terminal can map its device identification information to multiple idle time slots upon receiving the message, thus obtaining the target time slot corresponding to the terminal among these idle time slots. This allows the terminal's device identification information to be mapped to multiple idle time slots without the need for pre-setting time slots. Due to the uniqueness of the device identification information, it ensures that different terminals correspond to different idle time slots, preventing multiple terminals from simultaneously selecting the same time slot for sending and receiving data. This effectively reduces the number of access gateway conflicts and improves network access efficiency.

[0092] The embodiments of this application also provide a computer-readable storage medium storing a computer program, which includes program instructions. A processor executes the program instructions to implement any of the network access control methods provided in the embodiments of this application.

[0093] For example, when the program is loaded by the processor, it can perform the following steps: The system receives an idle time slot message broadcast by the gateway, which includes multiple idle time slots; maps the terminal's device identification information to the multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots, wherein different terminals correspond to different idle time slots; sends a time slot usage request to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request; if a response message from the gateway indicating agreement to use the target time slot is received, the system communicates with the gateway based on the target time slot.

[0094] The computer-readable storage medium can be an internal storage unit of the terminal in the aforementioned embodiments, such as the terminal's hard disk or memory. Alternatively, the computer-readable storage medium can be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SDCard), flash card, etc., equipped on the terminal.

[0095] For example, once the program is loaded by the processor, it can perform the following steps: Broadcast an idle time slot message, which includes multiple idle time slots; upon receiving a time slot usage request from a terminal, determine whether the target time slot in the request is occupied. Specifically, when the terminal receives the idle time slot message, it maps its device identification information to multiple idle time slots to obtain the target time slot corresponding to the terminal among the multiple idle time slots; if the target time slot is not occupied, send a response message to the terminal indicating agreement to use the target time slot, so that the terminal can communicate with the gateway based on the target time slot.

[0096] The computer-readable storage medium can be an internal storage unit of the gateway in the aforementioned embodiments, such as the gateway's hard drive or memory. Alternatively, it can be an external storage device of the gateway, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital Card (SDCard), or Flash Card.

[0097] Furthermore, a computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, programs required for at least one function, etc.; and the data storage area may store data created according to each program, etc.

[0098] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A network access control method, characterized in that, Applied to a terminal, the method includes: Receive an idle time slot message broadcast by the gateway, wherein the idle time slot message includes multiple idle time slots; The device identification information of the terminal is mapped to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots, wherein different terminals correspond to different idle time slots; A time slot usage request is sent to the gateway based on the target time slot, so that the gateway can determine whether to allow the terminal to use the target time slot based on the time slot usage request; If a response message indicating agreement to use the target time slot is received from the gateway, then communication is conducted with the gateway based on the target time slot.

2. The network access control method according to claim 1, characterized in that, The step of mapping the device identification information of the terminal to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots includes: Generate the network access credential value of the terminal based on the device identification information; The multiple idle time slots are indexed and numbered, and the total number of the multiple idle time slots is counted. Based on the total number of the multiple idle time slots and the index value corresponding to each idle time slot, the network access credential value is mapped to the multiple idle time slots to obtain the target time slot corresponding to the terminal in the multiple idle time slots.

3. The network access control method according to claim 2, characterized in that, The device identification information includes a unique identifier value; generating the network access credential value for the terminal based on the device identification information includes: Based on a preset credential generation algorithm, the network access credential value is generated according to the unique identifier value and a preset non-fixed value.

4. The network access control method according to claim 3, characterized in that, The credential generation algorithm includes a hash function; the credential generation algorithm based on a preset value generates the network access credential value according to the unique identifier value and a preset non-fixed value, including: The hash value is calculated between the unique identifier value and the non-fixed value according to the hash function; The network access credential value is determined based on the calculated hash value.

5. The network access control method according to claim 2, characterized in that, The step of mapping the network access credential value to the multiple idle time slots based on the total number of the multiple idle time slots and the index value corresponding to each idle time slot, to obtain the target time slot corresponding to the terminal in the multiple idle time slots, includes: The target remainder value corresponding to the network access certificate value is obtained by performing a remainder operation on the total number of the multiple idle time slots based on the network access certificate value. Based on the target residual value, determine the target index value of the network access certificate value in the plurality of idle time slots; Based on the target index value and the index value corresponding to each idle time slot, the target time slot corresponding to the terminal in the plurality of idle time slots is determined.

6. A network access control method, characterized in that, Applied to a gateway, the method includes: Broadcast an idle time slot message, wherein the idle time slot message includes multiple idle time slots; When a time slot usage request is received from a terminal, it is determined whether the target time slot in the time slot usage request is occupied. When the terminal receives the idle time slot message, it maps the terminal's device identification information to the plurality of idle time slots to obtain the target time slot corresponding to the terminal in the plurality of idle time slots. If the target time slot is not occupied, a response message indicating consent to use the target time slot is sent to the terminal, so that the terminal can communicate with the gateway based on the target time slot.

7. The network access control method according to claim 6, characterized in that, After determining whether the target time slot in the time slot usage request is occupied, the method further includes: If the target time slot is occupied, a response message indicating disagreement with using the target time slot is sent to the terminal, so that the terminal can re-determine the target time slot based on the idle time slot message broadcast by the gateway.

8. A terminal, characterized in that, The terminal includes a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the network access control method as described in any one of claims 1 to 5 when executing the computer program.

9. A gateway, characterized in that, The gateway includes a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the network access control method as described in any one of claims 6 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements, as follows: The network access control method according to any one of claims 1 to 5; or The network access control method according to any one of claims 6 to 7.