CN112601183B - Time slot number and relay number setting method and device, electronic equipment and storage medium - Google Patents
Time slot number and relay number setting method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112601183B CN112601183B CN202011306517.5A CN202011306517A CN112601183B CN 112601183 B CN112601183 B CN 112601183B CN 202011306517 A CN202011306517 A CN 202011306517A CN 112601183 B CN112601183 B CN 112601183B
- Authority
- CN
- China
- Prior art keywords
- terminal
- relay
- time slot
- target
- position information
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/029—Location-based management or tracking services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
- H04L5/003—Arrangements for allocating sub-channels of the transmission path
- H04L5/0058—Allocation criteria
- H04L5/0069—Allocation based on distance or geographical location
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
- H04L5/003—Arrangements for allocating sub-channels of the transmission path
- H04L5/0078—Timing of allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
- H04W4/08—User group management
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a method, a device, electronic equipment and a storage medium for setting time slot number and relay times, which are used for setting the relay times by acquiring the position information of each terminal in a group; controlling each terminal to adjust the time slot number and the relay times according to the position information; therefore, the time slot number and the relay times can be adjusted according to the actual distribution position of the terminal, and the reliability of real-time communication between the terminals in the group through the narrow-band network is improved.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for setting a number of time slots and a number of times of relaying, an electronic device, and a storage medium.
Background
Currently, some terminals (e.g., walkie-talkies) can connect to a public network (i.e., a broadband network) to communicate with a server, and can also communicate with other terminals through a narrowband transmission manner.
When the terminals are used in a group, sometimes, due to the blocking of obstacles, too large distance and other reasons, some terminals in the group cannot directly perform information interaction through the narrowband network, and some terminals in the group need to start a relay function to realize the relay of the narrowband information. In order to ensure the real-time performance of communication between terminals, a terminal generally divides each transmission period into a plurality of time slots, wherein one time slot is used for transmitting own information, and the other time slots are used for forwarding the information of other terminals; meanwhile, when the narrowband information is transferred, the narrowband information is sent in a broadcast mode, which may cause the same information to be continuously transferred between two terminals with the relay function, so that an upper limit of the number of times of transferring is generally set (i.e. the number of times of transferring), and when one piece of information is transferred once, the information of the number of times of transferring contained in the information is added with one, and when the information of the number of times of transferring contained in the information is detected to reach the upper limit of the number of times of transferring, the transferring is not performed any more; generally, the set number of slots cannot be less than the number of relays plus one.
The relay times and the time slot number of the existing terminal are generally written in a program and are fixed and unchangeable; however, when a terminal group is used, the position of each terminal may change sometimes, so that the distance between terminals may change, and along with the change of the distance, the number of times that information needs to be transferred may change in order to ensure reliable communication between terminals in the group; sometimes, although the position of each terminal in the group is fixed, some new terminals may be added into the group during the use process, so that the distribution range of the terminals is larger, and the number of times that the information needs to be transferred is increased in order to ensure reliable communication among the terminals in the group; and the fixed relay times and the fixed time slot number may not meet the use requirement.
Disclosure of Invention
In view of the foregoing disadvantages of the prior art, an object of the embodiments of the present application is to provide a method and an apparatus for setting a number of timeslots and relay times, an electronic device, and a storage medium, which are beneficial to improving reliability of real-time communication between terminals in a group via a narrowband network.
In a first aspect, an embodiment of the present application provides a method for setting a number of time slots and a number of times of relaying, which is applied to a server, and includes the steps of:
A1. acquiring position information of each terminal in a group;
A2. and controlling each terminal to adjust the time slot number and the relay times according to the position information.
In some embodiments, step A1 comprises:
acquiring the position information of the newly added terminal and recording the position information into a position information table stored in a server;
and reading the position information of the existing terminal from the position information table.
In other embodiments, step A1 comprises:
and acquiring the position information periodically transmitted by each terminal.
Further, after the step of obtaining the location information periodically transmitted by each terminal, the method further includes:
detecting whether position information periodically sent by all terminals is acquired;
if not, determining the current position information of the offline terminal according to the historical position information of the offline terminal.
In the method for setting the number of time slots and the number of times of relaying, step A2 includes:
calculating the distance between the two terminals which are farthest away according to the position information of each terminal;
and controlling each terminal to adjust the time slot number and the relay times according to the distance between the two terminals which are farthest away.
In some embodiments, the step of controlling each terminal to adjust the number of timeslots and the number of relays according to the distance between the two terminals farthest apart includes:
inquiring in a first inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target time slot number and the target relay frequency;
generating a control instruction according to the target time slot number and the target relay frequency;
and sending the control instruction to each terminal so that the terminal sets the time slot number and the relay times as the target time slot number and the target relay times.
In still other embodiments, the step of controlling each terminal to adjust the number of slots and the number of times of relaying according to the distance between the two terminals farthest apart includes:
inquiring in a second inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target relay times;
calculating the corresponding target time slot number according to the target relay times;
generating a control instruction according to the target time slot number and the target relay frequency;
and sending the control instruction to each terminal so that the terminal sets the time slot number and the relay times as the target time slot number and the target relay times.
In a second aspect, an embodiment of the present application provides a device for setting a number of time slots and a number of times of relaying, which is applied to a server, and includes:
the first acquisition module is used for acquiring the position information of each terminal in the group;
and the adjusting module is used for controlling each terminal to adjust the time slot number and the relay times according to the position information.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the steps of the time slot number and relay number setting method by calling the computer program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, where the computer program runs the steps of the time slot number and relay number setting method when executed by a processor.
Has the advantages that:
according to the method, the device, the electronic equipment and the storage medium for setting the time slot number and the relay times, the position information of each terminal in a group is acquired; controlling each terminal to adjust the time slot number and the relay times according to the position information; therefore, the time slot number and the relay times can be adjusted according to the actual distribution position of the terminal, and the reliability of real-time communication between the terminals in the group through the narrow-band network is improved.
Drawings
Fig. 1 is a flowchart of a method for setting the number of time slots and the number of times of relaying according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a device for setting the number of time slots and the number of times of relaying according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The following disclosure provides embodiments or examples for implementing different configurations of the invention. To simplify the disclosure of the present invention, specific example components and arrangements are described below. Of course, they are merely examples and are not intended to limit the present invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples, such repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. In addition, the present invention provides examples of various specific processes and materials, but those of ordinary skill in the art will recognize applications of other processes and/or uses of other materials.
Referring to fig. 1, a method for setting a number of time slots and a relay number provided in an embodiment of the present application is applied to a server, and includes the steps of:
A1. acquiring position information of each terminal (which can be but not limited to an interphone, a mobile phone, a tablet computer, a smart watch, a camera, sensing equipment and the like, wherein the terminal has the functions of communicating with a server through a broadband network, communicating with other terminals through a narrow-band network and relaying);
A2. and controlling each terminal to adjust the time slot number and the relay times according to the position information.
In fact, for some terminals whose positions are fixed (e.g. cameras and sensing devices that are fixedly arranged) or can only move within a certain range (e.g. an intercom assigned to security personnel at each doorway of a cell, each security personnel needs to keep the doorway and can only move near the doorway), the position information of each terminal can be obtained in advance and recorded in a position information table stored in a server; because the position of each terminal is fixed, if a new terminal joins the group, the time slot number and the relay frequency are adjusted once each time when a new terminal is added, and if no new terminal joins the group, the time slot number and the relay frequency do not need to be adjusted. Thus, in some embodiments, step A1 comprises:
A101. acquiring the position information of a newly added terminal (namely, a terminal newly added to a group) and recording the position information into a position information table stored in a server;
A102. and reading the position information of the existing terminals (namely all the terminals in the group before the new terminal joins the group) from the position information table.
The position information of the new terminal can be sent to the server by the new terminal itself or input into the server by a manager according to the position of the new terminal. For the terminal which can move in the limited range, the position information is generally input into the server by a manager, but the terminal can also periodically send actual position information to the server within a preset time period, and the server calculates the position information of one position point according to the actual position information to be used as the position information of the corresponding terminal; for example, the calculation procedure of using the center of gravity point position information of the distribution area of the position points corresponding to the actual position information as the position information of the corresponding terminal is as follows: after the second actual position information is acquired, the center points of the first actual position and the second actual position (namely the connecting line midpoint of the first actual position and the second actual position) are calculated, after the third actual position information is acquired, the center point between the center point and the third actual position is calculated to be used as a new center point, and so on, and the finally obtained center point is used as the gravity center point of the distribution area.
In fact, the position of some terminals is randomly changed, and the movable range of the terminal is not limited, and in order to grasp the real-time position of each terminal in the group, the terminal generally needs to periodically transmit its own position information, so that the server can adjust the number of slots and the number of relays of each terminal in time. Thus, in some embodiments, step A1 comprises:
A103. and acquiring the position information periodically transmitted by each terminal.
Step A2 may be executed once after the location information of the terminal is obtained each time; step A2 may also be performed periodically according to a preset adjustment period, where the adjustment period is greater than the period for the terminal to send the location information, so as to avoid frequent adjustment. For the case where the step A2 is periodically executed according to a preset adjustment period, the last acquired position information in the adjustment period may be used as valid position information for executing the step A2; the center of gravity of the distribution area of the position points corresponding to each piece of position information acquired in the adjustment period may also be calculated (the calculation process refers to the foregoing), and the position information of the center of gravity may be used as effective position information for executing step A2.
Further, after the step of acquiring the location information periodically transmitted by each terminal, the method further includes:
A104. detecting whether position information periodically sent by all terminals is acquired;
A105. if not, determining the current position information of the offline terminal according to the historical position information of the offline terminal.
Here, the offline terminal is a terminal whose server cannot receive the location information periodically transmitted by the server, and the server cannot receive the location information of the offline terminal, so that the current real location of the offline terminal cannot be known.
For example, the moving speed and the moving direction of the offline terminal may be calculated from the position information of the offline terminal acquired last and last, and then the position information at the current time may be calculated from the moving speed and the moving direction.
For another example, the motion path curve may be fitted to a plurality of times of position information transmitted by the offline terminal before losing contact with the server, and the position information at the current time may be calculated from the motion path curve.
In this embodiment, step A2 includes:
A201. calculating the distance between two terminals which are farthest away according to the position information of each terminal;
A202. and controlling each terminal to adjust the time slot number and the relay times according to the distance between the two terminals which are farthest away.
In step a201, the distance between each two terminals is calculated, and the maximum value is extracted from the calculation result, so as to obtain the distance between the two terminals that are farthest apart.
In some embodiments, the step of controlling each terminal to adjust the number of slots and the number of relays according to the distance between two terminals farthest apart includes:
inquiring in a first inquiry table according to the distance between two terminals which are farthest away to obtain the corresponding target time slot number and the target relay frequency;
generating a control instruction according to the target time slot number and the target relay number;
and sending a control instruction to each terminal so that the terminal sets the time slot number and the relay frequency as a target time slot number and a target relay frequency.
After receiving the control instruction, the terminal adjusts the time slot number and the relay frequency of the self sending period according to the target time slot number and the target relay frequency in the control instruction.
In this embodiment, a mapping relationship between the distance value and the number of slots and the number of relay times is preset, and a first lookup table is generated, so that the corresponding number of slots and the corresponding number of relay times can be directly queried from the first lookup table according to the distance between two terminals which are farthest away, and are used as the corresponding target number of slots and the corresponding target number of relay times. Generally, the mapping relationship between the distance value and the number of time slots and the number of relay times in the first lookup table is the mapping relationship between the distance range value and the number of time slots and the number of relay times, and when the distance between two terminals farthest away falls into which distance range, the corresponding number of time slots and the corresponding number of relay times are taken as the target number of time slots and the target number of relay times.
The terminal used in the group may have terminals of different types, and the maximum number of time slots that the terminals of different types can realize may be different, for this reason, after the target number of time slots and the target relay number are obtained by inquiry, the minimum value of the maximum number of time slots that each terminal can realize is also obtained first, then the target number of time slots obtained by inquiry is compared with the minimum value, if the target number of time slots obtained by inquiry is not greater than the minimum value, the target number of time slots and the target relay number obtained by inquiry are taken as the final target number of time slots and the target relay number, if the target number of time slots obtained by inquiry is greater than the minimum value, the minimum value is taken as the final target number of time slots, and the relay number corresponding to the final target number of time slots in the first inquiry table is taken as the final target relay number.
In other embodiments, a202, the step of controlling each terminal to adjust the number of slots and the number of relays according to the distance between two terminals farthest apart includes:
inquiring in a second inquiry table according to the distance between two terminals which are farthest away to obtain the corresponding target relay times;
calculating the corresponding target time slot number according to the target relay times;
generating a control instruction according to the target time slot number and the target relay number;
and sending a control instruction to each terminal so that the terminal sets the time slot number and the relay frequency as a target time slot number and a target relay frequency.
In this embodiment, a mapping relationship between the distance value and the relay times is preset, and a second lookup table is generated, so that the corresponding relay times can be directly queried from the second lookup table according to the distance between two terminals which are farthest away, and the corresponding relay times are used as corresponding target relay times. Generally, the mapping relationship between the distance value and the relay count in the second lookup table is a mapping relationship between a distance range value and the relay count, and when the distance between two terminals farthest away falls within which distance range, the corresponding relay count is taken as the target relay count.
The target time slot number may be calculated according to the formula N = N + i, where N is the target time slot number, N is the target relay times, i is a preset positive integer value, and i may be 1 or another value greater than 1.
Because there may be terminals of different types in the terminals used in the group, the maximum number of time slots that can be realized by the terminals of different types may be different, for this reason, after the target number of time slots is obtained by calculation, the minimum value of the maximum number of time slots that can be realized by each terminal may also be obtained first, then the target number of time slots obtained by calculation is compared with the minimum value, if the target number of time slots obtained by calculation is not greater than the minimum value, the target number of time slots obtained by calculation and the target relay number obtained by inquiry are taken as the final target number of time slots and the target relay number, if the target number of time slots obtained by calculation is greater than the minimum value, the minimum value is taken as the final target number of time slots, and the corresponding relay number is calculated as the final target relay number according to the formula N = N-i.
According to the method for setting the time slot number and the relay times, the position information of each terminal in the group is obtained; controlling each terminal to adjust the time slot number and the relay times according to the position information; therefore, the time slot number and the relay times can be adjusted according to the actual distribution position of the terminal, and the reliability of real-time communication between the terminals in the group through the narrow-band network is improved.
Referring to fig. 2, an embodiment of the present application further provides a device for setting a time slot number and a relay number, which is applied to a server and includes a first obtaining module 1 and an adjusting module 2;
the system comprises a first acquisition module 1, a second acquisition module and a control module, wherein the first acquisition module 1 is used for acquiring the position information of each terminal in a group;
and the adjusting module 2 is used for controlling each terminal to adjust the time slot number and the relay times according to the position information.
In fact, for some terminals whose positions are fixed (e.g. cameras and sensing devices that are fixedly arranged) or can only move within a certain range (e.g. an intercom assigned to security personnel at each doorway of a cell, each security personnel needs to keep the doorway and can only move near the doorway), the position information of each terminal can be obtained in advance and recorded in a position information table stored in a server; because the position of each terminal is fixed, if a new terminal joins the group, the time slot number and the relay times are adjusted once each time when a new terminal is added, and if no new terminal joins the group, the time slot number and the relay times do not need to be adjusted. In some embodiments, therefore, the first acquiring module 1, when acquiring the location information of each terminal in the group,
acquiring the position information of a newly added terminal (namely, a terminal newly added to a group) and recording the position information into a position information table stored in a server;
and reading the position information of the existing terminals (namely all the terminals in the group before the new terminal joins the group) from the position information table.
The position information of the new terminal can be sent to the server by the new terminal itself or input into the server by a manager according to the position of the new terminal. For the terminal which can move in the limited range, the position information is generally input into the server by the manager, but the terminal can also periodically send the actual position information to the server in a preset time period, and the server calculates the position information of one position point according to the actual position information to be used as the position information of the corresponding terminal; for example, the calculation procedure of using the center of gravity point position information of the distribution area of the position points corresponding to the actual position information as the position information of the corresponding terminal is as follows: after the second actual position information is acquired, the center points of the first actual position and the second actual position (namely the connecting line midpoint of the first actual position and the second actual position) are calculated, after the third actual position information is acquired, the center point between the center point and the third actual position is calculated to be used as a new center point, and so on, and the finally obtained center point is used as the gravity center point of the distribution area.
In fact, the position of some terminals is randomly changed, and the movable range of the terminal is not limited, and in order to grasp the real-time position of each terminal in the group, the terminal generally needs to periodically transmit its own position information, so that the server can adjust the number of slots and the number of relays of each terminal in time. In some embodiments, therefore, the first obtaining module 1, when obtaining the location information of each terminal in the group,
and acquiring the position information periodically transmitted by each terminal.
The adjusting module 2 can control each terminal to adjust the time slot number and the relay times each time after the position information of the terminal is acquired each time; the number of the time slots and the number of the relay times of each terminal can be regularly controlled according to a preset adjusting period, wherein the adjusting period is larger than the period of the terminal for sending the position information so as to avoid frequent adjustment. For the condition that the time slot number and the relay times of each terminal are regularly controlled according to a preset adjusting period, the position information finally obtained in the adjusting period can be used as effective position information for controlling the time slot number and the relay times of each terminal; or, a center of gravity point of a distribution area of location points corresponding to each piece of location information acquired in the adjustment period may be calculated (the calculation process refers to the foregoing text), and the location information of the center of gravity point is used as effective location information for controlling the number of time slots and the number of times of relay adjustment for each terminal.
Further, after the first obtaining module 1 obtains the location information periodically sent by each terminal, it further:
detecting whether position information periodically sent by all terminals is acquired;
if not, determining the current position information of the offline terminal according to the historical position information of the offline terminal.
The offline terminal is a terminal whose server cannot receive the position information periodically transmitted by the server, and the server cannot receive the position information of the offline terminal, so that the current real position of the offline terminal cannot be known.
For example, the moving speed and the moving direction of the offline terminal may be calculated from the position information of the offline terminal acquired last and last, and then the position information at the current time may be calculated from the moving speed and the moving direction.
For another example, the motion path curve may be fitted to the position information of the terminal that is not on-line and transmitted before losing contact with the server, and the position information at the current time may be calculated from the motion path curve.
In this embodiment, when the adjusting module 2 controls each terminal to adjust the number of slots and the number of times of relaying according to the location information,
calculating the distance between two terminals which are farthest away according to the position information of each terminal;
and controlling each terminal to adjust the time slot number and the relay times according to the distance between the two terminals which are farthest away.
When the adjusting module 2 calculates the distance between the two farthest-spaced terminals according to the position information of each terminal, the distance between each two terminals is calculated, and the maximum value is extracted from the calculation result, so that the distance between the two farthest-spaced terminals is obtained.
In some embodiments, when the adjusting module 2 controls each terminal to adjust the number of slots and the number of times of relaying according to the distance between two terminals which are farthest apart,
inquiring in a first inquiry table according to the distance between two terminals which are farthest away to obtain the corresponding target time slot number and the target relay frequency;
generating a control instruction according to the target time slot number and the target relay number;
and sending a control instruction to each terminal so that the terminal sets the time slot number and the relay frequency as a target time slot number and a target relay frequency.
In this embodiment, a mapping relationship between the distance value and the number of slots and the number of relay times is preset, and a first lookup table is generated, so that the corresponding number of slots and the corresponding number of relay times can be directly queried from the first lookup table according to the distance between two terminals which are farthest away, and are used as the corresponding target number of slots and the corresponding target number of relay times. Generally, the mapping relationship between the distance value and the number of time slots and the number of relay times in the first lookup table is the mapping relationship between the distance range value and the number of time slots and the number of relay times, and when the distance between two terminals farthest away falls into which distance range, the corresponding number of time slots and the corresponding number of relay times are taken as the target number of time slots and the target number of relay times.
The terminal used in the group may have terminals of different types, and the maximum number of time slots that the terminals of different types can realize may be different, for this reason, after the target number of time slots and the target relay number are obtained by inquiry, the minimum value of the maximum number of time slots that each terminal can realize is also obtained first, then the target number of time slots obtained by inquiry is compared with the minimum value, if the target number of time slots obtained by inquiry is not greater than the minimum value, the target number of time slots and the target relay number obtained by inquiry are taken as the final target number of time slots and the target relay number, if the target number of time slots obtained by inquiry is greater than the minimum value, the minimum value is taken as the final target number of time slots, and the relay number corresponding to the final target number of time slots in the first inquiry table is taken as the final target relay number.
In other embodiments, when the adjusting module 2 controls each terminal to adjust the number of slots and the number of times of relaying according to the distance between the two terminals which are farthest apart,
inquiring in a second inquiry table according to the distance between two terminals which are farthest away to obtain the corresponding target relay times;
calculating the corresponding target time slot number according to the target relay times;
generating a control instruction according to the target time slot number and the target relay number;
and sending a control instruction to each terminal so that the terminal sets the time slot number and the relay frequency as a target time slot number and a target relay frequency.
In this embodiment, a mapping relationship between the distance value and the relay times is preset, and a second lookup table is generated, so that the corresponding relay times can be directly queried from the second lookup table according to the distance between two terminals which are farthest away, and the corresponding relay times are used as corresponding target relay times. Generally, the mapping relationship between the distance value and the relay count in the second lookup table is a mapping relationship between a distance range value and the relay count, and when the distance between two terminals farthest away falls within which distance range, the corresponding relay count is taken as the target relay count.
The target number of time slots may be calculated according to the formula N = N + i, where N is the target number of time slots, N is the target relay times, i is a preset positive integer value, and i may be 1 or another value greater than 1.
Because there may be terminals of different types in the terminals used in the group, the maximum number of time slots that can be realized by the terminals of different types may be different, for this reason, after the target number of time slots is obtained by calculation, the minimum value in the maximum number of time slots that can be realized by each terminal may also be obtained first, then the target number of time slots obtained by calculation is compared with the minimum value, if the target number of time slots obtained by calculation is not greater than the minimum value, the target number of time slots obtained by calculation and the target relay number obtained by inquiry are used as the final target number of time slots and the target relay number, if the target number of time slots obtained by calculation is greater than the minimum value, the minimum value is used as the final target number of time slots, and the corresponding relay number is calculated according to the formula N = N-i as the final target relay number.
As can be seen from the above, the time slot number and relay number setting device acquires the location information of each terminal in the group; controlling each terminal to adjust the time slot number and the relay times according to the position information; therefore, the time slot number and the relay times can be adjusted according to the actual distribution position of the terminal, and the reliability of real-time communication between the terminals in the group through the narrow-band network is favorably improved
Referring to fig. 3, an electronic device 100 according to an embodiment of the present application further includes a processor 101 and a memory 102, where the memory 102 stores a computer program, and the processor 101 is configured to execute the steps of the method for setting the number of timeslots and the number of relays by calling the computer program stored in the memory 102.
The processor 101 is electrically connected to the memory 102. The processor 101 is a control center of the electronic device 100, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 102 and calling data stored in the memory 102, thereby performing overall monitoring of the electronic device.
The memory 102 may be used to store computer programs and data. The memory 102 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 101 executes various functional applications and data processing by calling a computer program stored in the memory 102.
In this embodiment, the processor 101 in the electronic device 100 loads instructions corresponding to one or more processes of the computer program into the memory 102, and the processor 101 runs the computer program stored in the memory 102 according to the following steps, so as to implement various functions: acquiring position information of each terminal in a group; and controlling each terminal to adjust the time slot number and the relay times according to the position information.
According to the method, the electronic equipment acquires the position information of each terminal in the group; controlling each terminal to adjust the time slot number and the relay times according to the position information; therefore, the time slot number and the relay times can be adjusted according to the actual distribution position of the terminal, and the reliability of real-time communication between the terminals in the group through the narrow-band network is improved.
An embodiment of the present application further provides a storage medium, on which a computer program is stored, where the computer program runs the steps of the above-mentioned time slot number and relay number setting method when executed by a processor, so as to implement the following functions: acquiring position information of each terminal in a group; and controlling each terminal to adjust the time slot number and the relay times according to the position information.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, which are substantially the same as the present invention.
Claims (7)
1. A time slot number and relay number setting method is applied to a server and is characterized by comprising the following steps:
A1. acquiring position information of each terminal in a group;
A2. controlling each terminal to adjust the time slot number and the relay times according to the position information;
the step A2 comprises the following steps:
calculating the distance between the two terminals which are farthest away according to the position information of each terminal;
controlling each terminal to adjust the time slot number and the relay times according to the distance between the two terminals which are farthest away,
the step of controlling each terminal to adjust the number of time slots and the number of times of relaying according to the distance between the two terminals which are farthest apart comprises:
inquiring in a first inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target time slot number and the target relay times;
generating a control instruction according to the target time slot number and the target relay frequency;
transmitting the control instruction to each terminal to cause the terminal to set the number of slots and the number of relay times as the target number of slots and the target number of relay times,
or the step of controlling each terminal to adjust the number of time slots and the number of times of relaying according to the distance between the two terminals which are farthest away comprises the following steps:
inquiring in a second inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target relay times;
calculating the corresponding target time slot number according to the target relay times;
generating a control instruction according to the target time slot number and the target relay frequency;
and sending the control instruction to each terminal so that the terminal sets the time slot number and the relay times as the target time slot number and the target relay times.
2. The method for setting the number of time slots and the number of times of relaying according to claim 1, wherein step A1 comprises:
acquiring position information of the newly added terminal, and recording the position information into a position information table stored in a server;
and reading the position information of the existing terminal from the position information table.
3. The method for setting the number of time slots and the number of times of relaying according to claim 1, wherein step A1 comprises:
and acquiring the position information periodically transmitted by each terminal.
4. The method for setting the number of slots and the number of times of relaying according to claim 3, wherein after the step of acquiring the location information periodically transmitted by each terminal, the method further comprises:
detecting whether position information periodically sent by all terminals is acquired;
if not, determining the current position information of the offline terminal according to the historical position information of the offline terminal.
5. A time slot number and relay number setting device is applied to a server and is characterized by comprising the following components:
the first acquisition module is used for acquiring the position information of each terminal in the group;
the adjusting module is configured to control each terminal to adjust the number of time slots and the number of times of relaying according to the location information, and specifically includes:
calculating the distance between two terminals which are farthest away according to the position information of each terminal;
controlling each terminal to adjust the time slot number and the relay times according to the distance between the two terminals which are farthest away,
the step of controlling each terminal to adjust the number of time slots and the number of times of relaying according to the distance between the two terminals which are farthest apart comprises:
inquiring in a first inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target time slot number and the target relay frequency;
generating a control instruction according to the target time slot number and the target relay frequency;
transmitting the control instruction to each terminal to cause the terminal to set the number of slots and the number of relay times as the target number of slots and the target number of relay times,
or the step of controlling each terminal to adjust the number of time slots and the number of times of relaying according to the distance between the two terminals which are farthest away comprises the following steps:
inquiring in a second inquiry table according to the distance between the two terminals which are farthest away to obtain the corresponding target relay times;
calculating the corresponding target time slot number according to the target relay times;
generating a control instruction according to the target time slot number and the target relay number;
and sending the control instruction to each terminal so that the terminal sets the time slot number and the relay times as the target time slot number and the target relay times.
6. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the steps of the time slot number and relay number setting method according to any one of claims 1 to 4 by calling the computer program stored in the memory.
7. A storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, executes the steps of the time slot number and relay number setting method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011306517.5A CN112601183B (en) | 2020-11-19 | 2020-11-19 | Time slot number and relay number setting method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011306517.5A CN112601183B (en) | 2020-11-19 | 2020-11-19 | Time slot number and relay number setting method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112601183A CN112601183A (en) | 2021-04-02 |
CN112601183B true CN112601183B (en) | 2023-04-18 |
Family
ID=75183462
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011306517.5A Active CN112601183B (en) | 2020-11-19 | 2020-11-19 | Time slot number and relay number setting method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112601183B (en) |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101959279B (en) * | 2009-07-13 | 2013-01-30 | 华为技术有限公司 | Route establishing method and device, and data transmission method |
JP2013090135A (en) * | 2011-10-18 | 2013-05-13 | Ueda Japan Radio Co Ltd | Position discrimination system and communication method |
CN103167024A (en) * | 2013-02-05 | 2013-06-19 | 广东工业大学 | Collaborative information transfer method facing car networking |
JP2016017817A (en) * | 2014-07-07 | 2016-02-01 | 新世代株式会社 | Wireless communication system |
CN105407178A (en) * | 2015-12-24 | 2016-03-16 | 福州华鹰重工机械有限公司 | Vehicle ad hoc network routing method and device |
CN105848295B (en) * | 2016-05-13 | 2019-07-12 | 中国科学院计算技术研究所 | A kind of isomery car networking slot allocation method |
CN106993320B (en) * | 2017-03-22 | 2020-02-07 | 江苏科技大学 | Wireless sensor network cooperative transmission routing method based on multiple relays and multiple hops |
CN109067653B (en) * | 2018-09-27 | 2021-05-14 | 深圳友讯达科技股份有限公司 | Method and system for establishing dual-mode communication network |
CN110881165B (en) * | 2019-09-24 | 2020-10-13 | 北京航空航天大学 | Clustering multichannel QoS access method, device and equipment for Internet of vehicles |
-
2020
- 2020-11-19 CN CN202011306517.5A patent/CN112601183B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112601183A (en) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3751377B1 (en) | Intelligent robot control method, device, system, and storage medium | |
EP3211758A1 (en) | Wireless charging system and method | |
CN109743772B (en) | Network access method and LoRaWAN terminal | |
EP2699046A1 (en) | Location intercept method and apparatus | |
CN111031565A (en) | Method and device for identifying off-line state of ZigBee device | |
US20200275278A1 (en) | Unauthorized Communication Detection Apparatus and Recording Medium | |
CN112383449B (en) | Information sending method and device, electronic equipment and storage medium | |
US10152392B2 (en) | Communication apparatus and wireless communication system | |
JP2015082303A (en) | Radio device, radio module, interface module and communication method | |
CN112601183B (en) | Time slot number and relay number setting method and device, electronic equipment and storage medium | |
CN112615733B (en) | Terminal fault judgment method and device, electronic equipment and storage medium | |
US11194315B2 (en) | Wireless communication apparatus that manages process in factory, and process management method | |
CN108931934B (en) | Window opening control platform based on rainfall analysis | |
CN112601265A (en) | Relay control method and device based on position, electronic equipment and storage medium | |
CN112584329A (en) | Terminal relay control method and device, electronic equipment and storage medium | |
EP2785085B1 (en) | A system and method for providing incoming call to a remote device sharing a MSISDN with other remote devices | |
CN112468538B (en) | Operation method and system of Internet of things equipment | |
CN105791339A (en) | Method and device for processing resource operation request | |
US20220146558A1 (en) | Detection of energy-consumption fraud in an electrical distribution service | |
JP2018121148A (en) | Terminal, communication control system and program | |
CN113133097B (en) | Wireless communication method and system | |
CN112469087A (en) | Method for adjusting communication rate of air conditioning equipment, terminal and storage medium | |
CN111010670B (en) | Remote control method and device based on multi-device cooperation and processing terminal | |
CN111341082A (en) | Junction box, junction box networking method and junction box control system | |
CN110501985A (en) | Signal transmission control method and device for regional control system and regional control system |
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 |