CN113395772B - Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium - Google Patents
Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN113395772B CN113395772B CN202010177370.8A CN202010177370A CN113395772B CN 113395772 B CN113395772 B CN 113395772B CN 202010177370 A CN202010177370 A CN 202010177370A CN 113395772 B CN113395772 B CN 113395772B
- Authority
- CN
- China
- Prior art keywords
- time slot
- terminal
- target
- gateway
- heartbeat signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000002452 interceptive effect Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 2
- 230000007717 exclusion Effects 0.000 abstract description 15
- 230000008569 process Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W72/00—Local resource management
- H04W72/04—Wireless resource allocation
- H04W72/044—Wireless resource allocation based on the type of the allocated resource
- H04W72/0446—Resources in time domain, e.g. slots or frames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W72/00—Local resource management
- H04W72/50—Allocation or scheduling criteria for wireless resources
- H04W72/54—Allocation or scheduling criteria for wireless resources based on quality criteria
- H04W72/541—Allocation or scheduling criteria for wireless resources based on quality criteria using the level of interference
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application provides a time slot allocation method, a time slot allocation device, electronic equipment and a computer readable storage medium. The method comprises the following steps: receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal; comparing the first time slot with a second time slot contained in each second heartbeat signal; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway; allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot. The method and the device can avoid the situation that the terminal in the cross area is subjected to or carries out channel interference, and carry out mutual exclusion relation binding on the terminal equipment which is far away, thereby avoiding the channel interference.
Description
Technical Field
The present application relates to the field of timeslot allocation technologies, and in particular, to a timeslot allocation method, a timeslot allocation device, an electronic device, and a computer-readable storage medium.
Background
A hospital bed card is a terminal that can display information and can be connected to a server through a gateway, and usually, a plurality of beds in a ward are provided, and each bed is provided with a bed card terminal. The bedside card can be used for displaying patient information, cautions and the like. The gateway serves as a transfer point between the head cards and the server, and one gateway can cover one or more areas of a plurality of head cards.
The bedside card and the gateway adopt a time-sharing working mode, and the working process among the bedside card, the gateway and the server is mainly divided into two steps, namely a registration process and a conventional heartbeat process.
First, the registration process is the process of acquiring the timeslot and acquiring the new communication key. The gateway broadcasts in a certain time slot within a heartbeat range of the terminal, the bedside card monitors the gateway broadcast after triggering registration (for example, by pressing a key), and sends a registration application to the gateway, and the gateway allocates a specific time slot and a key in a conventional heartbeat process to the terminal after determining that registration can be performed. In the conventional heartbeat process, the bedside card terminal performs heartbeat in the fixed time slot of the bedside card terminal and performs data interaction with the gateway, and if the probability that the gateway cannot respond after the heartbeat of the bedside card is higher, a re-registration process is triggered.
In the process of field arrangement of the bed card and the gateway, in order to ensure that all the bed cards are within the coverage area of the gateway, there will be some areas where the radio frequencies of the gateways intersect, as shown in fig. 1, areas ABC have ABC gateways respectively, and adjacent gateways have intersection areas. The bed card, registration and heartbeat processes in the intersection area are all affected by the other gateway. In addition, the cases of generating channel interference are 2, 3 and 4, and although the cases are not in the crossing range of the gateway, the cases of generating channel interference may occur because the three terminals of 2, 3 and 4 are close to each other.
For the first case, terminal 1 in the cross area may receive the broadcast of gateway a/B, and if terminal 1 registers with a successfully, then, terminal 1 will affect the reception of gateway B in the same timeslot every heartbeat.
For the second case, the respective gateways may receive the data sent by the terminals 2, 3, and 4, but if the terminals 2, 3, and 4 are assigned to the same timeslot, the reception of the terminals 2, 3, and 4 may receive interference, for example, the terminal 2 waits for a gateway to respond after heartbeat, and at this time, the terminal 3 sends heartbeat, and at this time, the terminal 3 affects the reception of the terminal 2 (although the same timeslot, there is a random delay before each heartbeat, so as to avoid complete synchronization of the terminal devices).
Disclosure of Invention
The application provides a time slot allocation method, a time slot allocation device, an electronic device and a computer readable storage medium, which are used for solving the problem that channel interference may be generated in the prior art.
In order to solve the above problem, the present application discloses a timeslot allocation method, applied to a server, the method including:
receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
comparing the first time slot with a second time slot contained in each second heartbeat signal; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot.
Optionally, the allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result includes:
and when the first time slot is different from the second time slot, the first time slot is taken as a target time slot to be allocated to the first terminal, and the state of the target time slot is marked as an unavailable state.
Optionally, when there are a plurality of second terminals, a second heartbeat signal of each second terminal includes a corresponding second time slot, and allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result includes:
when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, acquiring target time slots, which are different from the second time slots corresponding to the second terminals, in the target gateway;
and allocating the target time slot to the first terminal, and marking the state of the target time slot as an unavailable state.
Optionally, after the receiving the first heartbeat signal sent by the first terminal, the method further includes:
and under the condition that the first terminal is not accessed to the target gateway for the first time, acquiring and releasing the time slot of the first terminal which is accessed to the target gateway for the last time.
Optionally, after the receiving the first heartbeat signal sent by the first terminal, the method further includes:
distributing the encryption and decryption keys corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
In order to solve the above problem, the present application discloses a timeslot allocation apparatus, applied to a server, the apparatus including:
the heartbeat signal receiving module is used for receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
a time slot comparison module, configured to perform time slot comparison on the first time slot and second time slots included in each of the second heartbeat signals; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
the target time slot allocation module is used for allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot.
Optionally, the target timeslot allocation module includes:
and the first time slot allocation unit is used for allocating the first time slot as a target time slot to the first terminal when the first time slot is different from the second time slot, and marking the state of the target time slot as an unavailable state.
Optionally, when there are a plurality of second terminals, a second heartbeat signal of each second terminal includes a corresponding second time slot, and the target time slot allocating module includes:
a target time slot obtaining unit, configured to obtain, when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, target time slots in the target gateway, where the second time slots corresponding to the second terminals are different from each other;
and the target time slot allocation unit is used for allocating the target time slot to the first terminal and marking the state of the target time slot as an unavailable state.
Optionally, the method further comprises:
and the time slot obtaining and releasing module is used for obtaining and releasing the time slot of the first terminal which accesses the target gateway last time under the condition that the first terminal does not access the target gateway for the first time.
Optionally, the method further comprises:
the encryption and decryption key distribution module is used for distributing the encryption and decryption key corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
In order to solve the above problem, the present application discloses an electronic device including:
A processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the time slot allocation method of any of the above when executing the program.
In order to solve the above problem, the present application discloses a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform any one of the time slot allocation methods described above.
Compared with the prior art, the method has the following advantages:
the embodiment of the application provides a time slot allocation scheme, wherein a first heartbeat signal sent by a first terminal is received, the first heartbeat signal is sent by the first terminal when the first terminal is accessed to a first time slot of a target gateway, the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal, the first time slot and second time slots contained in the second heartbeat signals are subjected to time slot comparison, the second time slot is sent by the second terminal when the second terminal is accessed to the target gateway or a gateway adjacent to the target gateway, the target time slot of the target gateway is allocated to the first terminal according to a time slot comparison result, and the target time slot is a time slot different from the second time slot. The embodiment of the application can avoid the terminal in the cross area from being subjected to or carrying out channel interference, and carry out the binding of the mutual exclusion relation on the terminal equipment with a relatively short distance, thereby avoiding the channel interference.
Drawings
Fig. 1 is a diagram illustrating channel interference of a terminal in the prior art;
fig. 2 is a flowchart illustrating steps of a timeslot allocation method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating steps of another timeslot allocation method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a timeslot allocation scheme according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a timeslot allocating apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another timeslot allocation apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 2, a flowchart illustrating steps of a time slot allocation method provided in an embodiment of the present application is shown, where the time slot allocation method may be applied to a server, and specifically may include the following steps:
step 101: receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal.
The method and the device for allocating the time slot of the terminal access gateway can be applied to a scene of allocating the time slot of the terminal access gateway.
The server may be used to allocate time slots of the gateway to the terminals. There may be multiple gateways under a server, each gateway may have multiple time slots, and the server side may manage the status of each gateway under it.
The first terminal is a terminal for accessing a gateway under the server, in this embodiment, the first terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like, and in this embodiment, the first terminal is preferably a hospital bed card.
The second terminal is a terminal which is adjacent to the first terminal and has the same access gateway as the gateway to which the first terminal is to access or has a cross coverage area with the gateway to which the first terminal is to access. In this embodiment, the second terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like, and in this embodiment, the second terminal is preferably a hospital bed card.
The first heartbeat signal is a signal sent by the first terminal when the first terminal needs to access the first time slot of the target gateway.
The second heartbeat signal refers to a signal sent by the second terminal when the second terminal accesses the target gateway or other gateways adjacent to the target gateway, which is monitored by the first terminal.
The first terminal will listen to the air signal in a heartbeat cycle when registering, and report to the uplink, which is divided into two cases: 1. when the first terminal registers with the target gateway for the first time, the first terminal can monitor and record the broadcast sent by the target gateway, so that the first heartbeat signal can be sent to the server. 2. When the first terminal is not registered with the target gateway for the first time, the first terminal may monitor and record a broadcast sent by the target gateway, and during this process, may also monitor heartbeat signals (i.e., second heartbeat signals) sent by other terminals.
If the terminal registered for the first time hears more than 1 gateway broadcast, the terminal is associated with the heard gateway and allocates a time slot, and if the time slot 1 is allocated, the associated gateway time slot 1 is in an unavailable state.
The terminal which is not registered firstly releases the time slot of the gateway which is related to the terminal and changes the terminal into an available state. Firstly, determining whether a mutual exclusion device exists, if the gateway registered this time is the same as the gateway registered last time, and the heartbeat information sent by other terminals is monitored in the time slot in which the heartbeat is carried out last time, the mutual exclusion device exists, and if the mutual exclusion device exists, the allocated time slot needs to satisfy the mutual exclusion relationship (which is the second situation of the interference situation); if the gateway registered at the time and the gateway registered at the last time are not the same and represent that the terminal moves, contacting the mutually exclusive relationship between the terminal and other terminals; if multiple gateway broadcasts are also monitored, the corresponding time slot associated with the gateway becomes unavailable.
After receiving the first heartbeat signal transmitted by the first terminal, step 102 is executed.
Step 102: comparing the first time slot with a second time slot contained in each second heartbeat signal; and the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway.
After receiving the first heartbeat signal sent by the first terminal, a time slot comparison may be performed between a first time slot included in the first heartbeat signal and a second time slot included in each second heartbeat signal, where the second time slot is a time slot sent by the second terminal when the second terminal is in an accessed target gateway or a gateway adjacent to the target gateway.
In this embodiment, the first time slot and the second time slot may be compared to determine whether the first time slot and the second time slot are the same.
After the time slot comparison is performed between the first time slot and each second time slot, step 103 is performed.
Step 103: allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot.
The target time slot refers to a time slot in an available state acquired from the target gateway. The state of the time slot under each gateway under the server can be pre-saved in the server, as shown in table 1 below:
Table 1:
time slot 1 | |
Time slot 3 | |
|
Time slot 6 | Time slot 7 | Time slot 8 | Time slot 9 | Time slot 10 | |
Gateway A | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
Gateway B | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
Gateway C | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
Gateway D | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
Gateway E | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
Gateway F | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used | Can be used |
As can be seen from table 1, in the initial state, timeslots 1 to 10 under gateways a to F are all in the available state.
When the first terminal applies for the time slot of the gateway A, the gateway A reports to the server: a first terminal applies for a time slot of a gateway A, the first terminal is in a coverage range of a gateway B, the first terminal is associated with the gateway B, and a server: allocate the available slot 1 of gateway a to terminal 1, marking terminal 1 that slot 1 is not available on gateway B, as shown in table 2 below:
table 2:
and when other terminals apply for the time slot of the gateway B, the gateway B reports: the other terminals apply for the time slot on the gateway B, and the server allocates the available time slot of the gateway B to the other terminals (e.g. any one of the time slots 2-10).
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not intended to limit the embodiments of the present application.
After comparing the first time slot with each second time slot and obtaining the time slot comparison result, the target time slot which is in an available state under the target gateway and is different from the second time slot can be allocated to the first terminal.
According to the time slot allocation method provided by the embodiment of the application, a first heartbeat signal sent by a first terminal is received, the first heartbeat signal is sent by the first terminal when the first terminal is accessed to a first time slot of a target gateway, the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal, the first time slot and second time slots contained in the second heartbeat signals are subjected to time slot comparison, the second time slots are sent by the second terminal when the second terminal is accessed to the target gateway or a gateway adjacent to the target gateway, the target time slot of the target gateway is allocated to the first terminal according to a time slot comparison result, and the target time slot is a time slot different from the second time slot. The embodiment of the application can avoid the terminal in the cross area from being subjected to or carrying out channel interference, and carry out the binding of the mutual exclusion relation on the terminal equipment with a relatively short distance, thereby avoiding the channel interference.
Referring to fig. 3, a flowchart illustrating steps of another timeslot allocation method provided in this embodiment of the present application is shown, where the timeslot allocation method may be applied to a server, and specifically may include the following steps:
step 201: receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal.
The method and the device for allocating the time slot of the terminal access gateway can be applied to a scene of allocating the time slot of the terminal access gateway.
The server may be used to allocate time slots of the gateway to the terminals. There may be multiple gateways under a server, each gateway may have multiple time slots, and the server side may manage the status of each gateway under it.
The first terminal is a terminal for accessing a gateway under the server, in this embodiment, the first terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like, and in this embodiment, the first terminal is preferably a hospital bed card.
The second terminal is a terminal which is adjacent to the first terminal and has the same access gateway as the gateway to which the first terminal is to access or has a cross coverage area with the gateway to which the first terminal is to access. In this embodiment, the second terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like, and in this embodiment, the second terminal is preferably a hospital bed card.
The first heartbeat signal refers to a signal sent by the first terminal when the first terminal needs to access the first time slot of the target gateway.
The second heartbeat signal refers to a signal sent by the second terminal when the second terminal, which is monitored by the first terminal, accesses the target gateway or another gateway adjacent to the target gateway.
The first terminal will listen to the air signal in a heartbeat cycle when registering, and report to the uplink, which is divided into two cases: 1. when the first terminal registers with the target gateway for the first time, the first terminal can monitor and record the broadcast sent by the target gateway, so that the first heartbeat signal can be sent to the server. 2. When the first terminal is not registered with the target gateway for the first time, the first terminal may monitor and record a broadcast sent by the target gateway, and during this process, may also monitor heartbeat signals (i.e., second heartbeat signals) sent by other terminals.
If the terminal registered for the first time hears more than 1 gateway broadcast, the terminal is associated with the heard gateway and allocates a time slot, and if the time slot 1 is allocated, the associated gateway time slot 1 is in an unavailable state.
The terminal which is not registered for the first time releases the time slot of the gateway related to the terminal and becomes an available state. Firstly, determining whether a mutual exclusion device exists, if the gateway registered this time is the same as the gateway registered last time, and the heartbeat information sent by other terminals is monitored in the time slot in which the heartbeat is carried out last time, the mutual exclusion device exists, and if the mutual exclusion device exists, the allocated time slot needs to satisfy the mutual exclusion relationship (which is the second situation of the interference situation); if the gateway registered at the time and the gateway registered at the last time are not the same and represent that the terminal moves, contacting the mutually exclusive relationship between the terminal and other terminals; if multiple gateway broadcasts are also monitored, the corresponding time slot associated with the gateway becomes unavailable.
After receiving the first heartbeat signal transmitted by the first terminal, step 202 is executed.
Step 202: and under the condition that the first terminal is not accessed to the target gateway for the first time, acquiring and releasing the time slot of the first terminal which is accessed to the target gateway for the last time.
When the first terminal is a terminal which is not accessed to the target gateway for the first time, the time slot of the gateway related to the terminal is released and changed into an available state. For example, when the first terminal accesses the target gateway last time, the accessed time slot is time slot 2, and then when the first terminal accesses the target gateway again, the time slot 2 needs to be released.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation of the embodiments of the present application.
Step 203: comparing the first time slot with a second time slot contained in each second heartbeat signal; and the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway.
After receiving the first heartbeat signal sent by the first terminal, a time slot comparison may be performed between a first time slot included in the first heartbeat signal and a second time slot included in each second heartbeat signal, where the second time slot is a time slot sent by the second terminal when the second terminal is in an accessed target gateway or a gateway adjacent to the target gateway.
In this embodiment, the first time slot and the second time slot may be compared to determine whether the first time slot and the second time slot are the same.
After the time slot comparison between the first time slot and each second time slot, step 204 is performed.
Step 204: and when the first time slot is different from the second time slot, the first time slot is taken as a target time slot to be allocated to the first terminal, and the state of the target time slot is marked as an unavailable state.
When the first time slot and the second time slot are not the same, the first time slot may be allocated to the first terminal as a target time slot, and the state of the first time slot is marked as an unavailable state on the server side, that is, the first time slot under the target gateway is already occupied by the terminal.
Step 205: and when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, acquiring target time slots different from the second time slots corresponding to the second terminals in the target gateway.
And when the first time slot is the same as at least one of the second time slots, acquiring a time slot different from the second time slot from the target gateway as a target time slot, and allocating the target time slot to the first terminal, for example, if the terminals 2, 3, and 4 are all allocated to the time slot 2, when the terminals are in heartbeat, the respective gateways may receive corresponding heartbeats, but may not receive the response of the gateways, the terminal 1 moves, and runs to the location 1' and the gateway C reports: the terminal 1 applies for a gateway C time slot; a server: allocating the available timeslot 1 of the gateway C to the terminal 1, and releasing the timeslot 1 of the gateway a and the gateway B associated with the terminal 1, as shown in the following table 3:
Table 3:
the terminal 2 moves and runs to the position 2', and the gateway C reports: terminal 2 applies for gateway C slot, server: allocating the available time slot 2 of the gateway C to the terminal 2, releasing the time slot of the gateway B occupied by the terminal 2, and releasing the mutual exclusion relationship between the terminals 2, 3, and 4, as shown in the following table 4:
table 4:
it should be understood that the above examples are merely illustrative for better understanding of the embodiments of the present application and are not to be construed as the only limitations on the embodiments of the present application.
After the target time slots with different second time slots corresponding to the second terminals in the target gateway are obtained when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, step 206 is executed.
Step 206: and allocating the target time slot to the first terminal, and marking the state of the target time slot as an unavailable state.
After target time slots with different second time slots corresponding to the second terminals in the target gateway are obtained, the target time slots can be allocated to the first terminals, and the state of the target time slots is marked to be an unavailable state, namely the target time slots under the target gateway are occupied by the terminals. As shown in fig. 4, when the terminals 1 to N access the target gateway, the terminals 1 to N may be sequentially accessed, and after one terminal occupies one practice under the gateway, the state of the timeslot may be marked as unavailable, and the next terminal access may be performed.
Step 207: distributing the encryption and decryption keys corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
In this embodiment, when the terminal registers with the gateway, the server may further allocate an encryption/decryption key of the gateway to the first terminal, where the encryption/decryption key may be used for performing encryption/decryption processing on the interactive information between the first terminal and the target gateway, so as to ensure the security of the interactive information.
According to the time slot allocation method provided by the embodiment of the application, a first heartbeat signal sent by a first terminal is received, the first heartbeat signal is sent by the first terminal when the first terminal is accessed to a first time slot of a target gateway, the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal, the first time slot and second time slots contained in the second heartbeat signals are subjected to time slot comparison, the second time slots are sent by the second terminal when the second terminal is accessed to the target gateway or a gateway adjacent to the target gateway, the target time slot of the target gateway is allocated to the first terminal according to a time slot comparison result, and the target time slot is a time slot different from the second time slot. The embodiment of the application can avoid the terminal in the cross area from being subjected to or carrying out channel interference, and carry out the binding of the mutual exclusion relation on the terminal equipment with a relatively short distance, thereby avoiding the channel interference.
Referring to fig. 5, a schematic structural diagram of a timeslot allocating apparatus provided in an embodiment of the present application is shown, where the timeslot allocating apparatus may be applied to a server, and specifically includes the following modules:
a heartbeat signal receiving module 310, configured to receive a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
a time slot comparing module 320, configured to perform time slot comparison on the first time slot and a second time slot included in each of the second heartbeat signals; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
a target time slot allocating module 330, configured to allocate a target time slot of the target gateway to the first terminal according to a time slot comparison result; the target time slot is a time slot different from the second time slot.
The time slot allocation device provided in the embodiment of the present application, by receiving a first heartbeat signal sent by a first terminal, where the first heartbeat signal is sent by the first terminal when the first terminal accesses a first time slot of a target gateway, and the first heartbeat signal includes a second heartbeat signal of a second terminal that is monitored by the terminal, performs time slot comparison between the first time slot and a second time slot included in each second heartbeat signal, where the second time slot is sent by the second terminal when the second terminal accesses the target gateway or a gateway adjacent to the target gateway, and allocates the target time slot of the target gateway to the first terminal according to a time slot comparison result, where the target time slot is a time slot different from the second time slot. The embodiment of the application can avoid the terminal in the cross area from being subjected to or carrying out channel interference, and carry out the binding of the mutual exclusion relation on the terminal equipment with a relatively short distance, thereby avoiding the channel interference.
Referring to fig. 6, a schematic structural diagram of another timeslot allocating apparatus provided in this embodiment is shown, where the timeslot allocating apparatus may be applied to a server, and specifically includes the following modules:
a heartbeat signal receiving module 410, configured to receive a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
a time slot obtaining and releasing module 420, configured to obtain and release a time slot, in which the first terminal last accesses the target gateway, when the first terminal does not access the target gateway for the first time;
a time slot comparison module 430, configured to perform time slot comparison on the first time slot and a second time slot included in each of the second heartbeat signals; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
a target time slot allocating module 440, configured to allocate a target time slot of the target gateway to the first terminal according to a time slot comparison result; the target time slot is different from the second time slot;
An encryption and decryption key distribution module 450, configured to distribute an encryption and decryption key corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
Optionally, the target timeslot allocating module 440 includes:
a first time slot allocating unit 441, configured to allocate the first time slot as a target time slot to the first terminal when the first time slot is different from the second time slot, and mark a state of the target time slot as an unavailable state.
Optionally, when there are multiple second terminals, a second heartbeat signal of each second terminal includes a corresponding second time slot, and the target time slot allocating module 440 includes:
a target time slot obtaining unit 442, configured to obtain, when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, target time slots in the target gateway, where the second time slots corresponding to the second terminals are different;
a target timeslot allocating unit 443, configured to allocate the target timeslot to the first terminal and mark a status of the target timeslot as an unavailable status.
The time slot allocation device provided in the embodiment of the present application, by receiving a first heartbeat signal sent by a first terminal, where the first heartbeat signal is sent by the first terminal when the first terminal accesses a first time slot of a target gateway, and the first heartbeat signal includes a second heartbeat signal of a second terminal that is monitored by the terminal, performs time slot comparison between the first time slot and a second time slot included in each second heartbeat signal, where the second time slot is sent by the second terminal when the second terminal accesses the target gateway or a gateway adjacent to the target gateway, and allocates the target time slot of the target gateway to the first terminal according to a time slot comparison result, where the target time slot is a time slot different from the second time slot. The embodiment of the application can avoid the terminal in the cross region from being subjected to or carrying out channel interference, and carry out the binding of the mutual exclusion relation on the terminal equipment with a relatively short distance, thereby avoiding the channel interference.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the application. Further, those skilled in the art will recognize that the embodiments described in this specification are preferred embodiments and that acts or modules referred to are not necessarily required for this application.
Additionally, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a slot allocation method stored on the memory and operable on the processor.
Embodiments of the present application further provide a computer-readable storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform any one of the time slot allocation methods described above.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The detailed description of the timeslot allocation method, the timeslot allocation apparatus, the electronic device, and the computer-readable storage medium provided by the present application are provided above, and specific examples are applied herein to describe the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (12)
1. A time slot allocation method is applied to a server, and the method comprises the following steps:
receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
comparing the first time slot with a second time slot contained in each second heartbeat signal; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
Allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot.
2. The method of claim 1, wherein the allocating the target timeslot of the target gateway to the first terminal according to the timeslot comparison result comprises:
and when the first time slot is different from the second time slot, the first time slot is taken as a target time slot to be allocated to the first terminal, and the state of the target time slot is marked as an unavailable state.
3. The method of claim 1, wherein when there are a plurality of second terminals, the second heartbeat signal of each second terminal includes a corresponding second timeslot, and the allocating the target timeslot of the target gateway to the first terminal according to the timeslot comparison result comprises:
when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, acquiring target time slots, which are different from the second time slots corresponding to the second terminals, in the target gateway;
and allocating the target time slot to the first terminal, and marking the state of the target time slot as an unavailable state.
4. The method of claim 1, further comprising, after the receiving the first heartbeat signal transmitted by the first terminal:
and under the condition that the first terminal is not accessed to the target gateway for the first time, acquiring and releasing the time slot of the first terminal which is accessed to the target gateway for the last time.
5. The method of claim 1, further comprising, after the receiving the first heartbeat signal transmitted by the first terminal:
distributing the encryption and decryption keys corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
6. A time slot allocation apparatus, applied to a server, the apparatus comprising:
the heartbeat signal receiving module is used for receiving a first heartbeat signal sent by a first terminal; the first heartbeat signal is sent by the first terminal when accessing a first time slot of a target gateway, and the first heartbeat signal comprises a second heartbeat signal of a second terminal monitored by the terminal;
a time slot comparison module, configured to perform time slot comparison on the first time slot and second time slots included in each of the second heartbeat signals; the second time slot is sent when the second terminal accesses the target gateway or a gateway adjacent to the target gateway;
The target time slot allocation module is used for allocating the target time slot of the target gateway to the first terminal according to the time slot comparison result; the target time slot is a time slot different from the second time slot.
7. The apparatus of claim 6, wherein the target timeslot assignment module comprises:
and the first time slot allocation unit is used for allocating the first time slot as a target time slot to the first terminal when the first time slot is different from the second time slot, and marking the state of the target time slot as an unavailable state.
8. The apparatus of claim 6, wherein when there are multiple second terminals, the second heartbeat signal of each second terminal includes a corresponding second timeslot, and the target timeslot assignment module comprises:
a target time slot obtaining unit, configured to obtain, when the first time slot is the same as at least one of the second time slots corresponding to the second terminals, target time slots in the target gateway, where the second time slots corresponding to the second terminals are different from each other;
and the target time slot allocation unit is used for allocating the target time slot to the first terminal and marking the state of the target time slot as an unavailable state.
9. The apparatus of claim 6, further comprising:
and the time slot obtaining and releasing module is used for obtaining and releasing the time slot of the first terminal which accesses the target gateway last time under the condition that the first terminal does not access the target gateway for the first time.
10. The apparatus of claim 6, further comprising:
the encryption and decryption key distribution module is used for distributing the encryption and decryption key corresponding to the target gateway to the first terminal; and the encryption and decryption key is used for encrypting and decrypting the interactive information between the first terminal and the target gateway.
11. An electronic device, comprising:
a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the time slot allocation method of any one of claims 1 to 5 when executing the program.
12. A computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the time slot allocation method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010177370.8A CN113395772B (en) | 2020-03-13 | 2020-03-13 | Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010177370.8A CN113395772B (en) | 2020-03-13 | 2020-03-13 | Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113395772A CN113395772A (en) | 2021-09-14 |
CN113395772B true CN113395772B (en) | 2022-07-29 |
Family
ID=77616205
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010177370.8A Active CN113395772B (en) | 2020-03-13 | 2020-03-13 | Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113395772B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105516214A (en) * | 2014-09-22 | 2016-04-20 | 电信科学技术研究院 | Information reporting method, resource allocating method, information reporting device and resource allocating device in Internet-of-vehicles system |
CN110337070A (en) * | 2019-07-24 | 2019-10-15 | 无锡灵龙芯物联网科技有限公司 | A kind of LORA data communications method based on TDMA |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100595592B1 (en) * | 2003-10-10 | 2006-06-30 | 엘지전자 주식회사 | Data Communication Timeslot Dynamic Allocation Data Structure of GS System |
KR20140055660A (en) * | 2012-11-01 | 2014-05-09 | 한국전자통신연구원 | Method for access using carrier sensing in communication system |
US10278095B1 (en) * | 2017-10-26 | 2019-04-30 | Amazon Technologies, Inc. | Wireless control of tightly spaced machines |
-
2020
- 2020-03-13 CN CN202010177370.8A patent/CN113395772B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105516214A (en) * | 2014-09-22 | 2016-04-20 | 电信科学技术研究院 | Information reporting method, resource allocating method, information reporting device and resource allocating device in Internet-of-vehicles system |
CN110337070A (en) * | 2019-07-24 | 2019-10-15 | 无锡灵龙芯物联网科技有限公司 | A kind of LORA data communications method based on TDMA |
Also Published As
Publication number | Publication date |
---|---|
CN113395772A (en) | 2021-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107211354A (en) | Multiplexing DRS in Transmission Bursts for Opportunistic Spectrum Access | |
CN102857901A (en) | Device discovery method, device discovery processing method and device discovering processing device | |
CN102769843B (en) | Identification symbol sharing method of wireless communication device and its base station and device thereof | |
US20160057603A1 (en) | Node Discovery According to Allocated Discovery Patterns | |
EP3427529B1 (en) | Wireless communication devices and base station for wireless communication in a wireless communication system | |
CN110972326B (en) | Downlink control channel transmission method, terminal and network side equipment | |
CN111741515A (en) | Gateway and terminal ad hoc network data transmission method based on LoRa technology | |
CN111654348B (en) | Internet of things data transmission method and device, computer equipment and storage medium | |
CN103313433A (en) | Method, apparatus, and computer program product for temporary release of resources in radio networks | |
CN113395772B (en) | Time slot allocation method, time slot allocation device, electronic equipment and computer readable storage medium | |
JP2021514560A (en) | Signal transmission method, terminal equipment and network equipment | |
CN111431818B (en) | Cross-domain request flow distribution method and device, storage medium and computer equipment | |
CN101146304B (en) | Log recording method and device based on service processing flow | |
CN103906249A (en) | Frequency-spectrum-resource distribution method and system, and access network device | |
CN111132316B (en) | Resource allocation method, terminal equipment and network side equipment | |
US8537764B2 (en) | Base station and mobile station | |
CN116526680B (en) | Control method and device for high-low voltage power distribution cabinet cluster | |
US9775189B2 (en) | System and method for reducing control data traffic in a white space network | |
US12256348B2 (en) | Synchronization signal transmission method and communications apparatus | |
CN110062473B (en) | Random access method, terminal equipment and network equipment | |
CN110430533A (en) | Mobile terminal locating method, device, system, computer equipment and storage medium | |
CN105656640A (en) | Method, user terminal, server and system for transferring electronic business card in face-to-face manner | |
JP6497711B2 (en) | Resource broadcast method and resource broadcast apparatus | |
CN113923752B (en) | Networking ranging method, storage medium and equipment | |
CN113891385A (en) | Method, device and device for detecting link status of network equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |