CN113037937B - Voice conference communication method and device based on centerless ad hoc network - Google Patents

Voice conference communication method and device based on centerless ad hoc network Download PDF

Info

Publication number
CN113037937B
CN113037937B CN201911359994.5A CN201911359994A CN113037937B CN 113037937 B CN113037937 B CN 113037937B CN 201911359994 A CN201911359994 A CN 201911359994A CN 113037937 B CN113037937 B CN 113037937B
Authority
CN
China
Prior art keywords
time slot
node
service time
occupation state
voice
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
Application number
CN201911359994.5A
Other languages
Chinese (zh)
Other versions
CN113037937A (en
Inventor
赵松
郝增盈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebi Tianhai Electronic Information System Co Ltd
Original Assignee
Hebi Tianhai Electronic Information System Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hebi Tianhai Electronic Information System Co Ltd filed Critical Hebi Tianhai Electronic Information System Co Ltd
Priority to CN201911359994.5A priority Critical patent/CN113037937B/en
Publication of CN113037937A publication Critical patent/CN113037937A/en
Application granted granted Critical
Publication of CN113037937B publication Critical patent/CN113037937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/42Systems providing special services or facilities to subscribers
    • H04M3/56Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities
    • H04M3/561Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities by multiplexing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
    • H04J3/1694Allocation of channels in TDM/TDMA networks, e.g. distributed multiplexers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/42Systems providing special services or facilities to subscribers
    • H04M3/56Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities
    • H04M3/563User guidance or feature selection
    • H04M3/565User guidance or feature selection relating to time schedule aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W74/00Wireless channel access
    • H04W74/08Non-scheduled access, e.g. ALOHA
    • H04W74/0833Random access procedures, e.g. with 4-step access
    • H04W74/0841Random access procedures, e.g. with 4-step access with collision treatment
    • H04W74/085Random access procedures, e.g. with 4-step access with collision treatment collision avoidance
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a communication method and a device for a voice conference based on a centerless ad hoc network, wherein the method and the device are applied to any node accessed into the centerless ad hoc network and comprise the following steps: under the condition of receiving a trigger request of broadcast voice, selecting a service time slot; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for other nodes to broadcast voice; and broadcasting voice in the selected service time slot. By the method and the device, the process of broadcasting the voice by the plurality of nodes in the centerless ad hoc network can be carried out simultaneously.

Description

Voice conference communication method and device based on centerless ad hoc network
Technical Field
The present application relates to the field of TDMA waveform design, and in particular, to a communication method and apparatus based on a voice conference in a centerless ad hoc network.
Background
The centreless ad hoc network is a network combining mobile communication and computer network, the information exchange of the network adopts the packet switching mechanism in the computer network, and the nodes are portable terminals which can move, such as radio stations. In the centerless ad hoc network, a strict control center is not arranged, all nodes are equal in position, and the network is a peer-to-peer network.
Currently, the station call mode in the centreless ad hoc network is usually one-to-many or one-to-one, in practice, a conference-like manner allows users of multiple stations to talk simultaneously, and the number of listeners in the centreless ad hoc network is not limited to a more practical and urgent scene requirement.
Disclosure of Invention
The application provides a communication method and a device based on a voice conference in a centerless ad hoc network, and aims to provide a communication method and a device which are similar to a conference mode and allow multiple parties to talk at the same time.
In order to achieve the above object, the present application provides the following technical solutions:
the application provides a voice conference communication method based on a centerless ad hoc network, which is applied to any node accessed into the centerless ad hoc network and comprises the following steps:
under the condition of receiving a trigger request of broadcast voice, selecting a service time slot; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for broadcasting voice by other nodes;
and broadcasting voice in the selected service time slot.
Optionally, the MAC frame includes a target number of single frames;
the target number is a numerical value obtained by rounding up a quotient obtained by dividing the number of the nodes in the centerless ad hoc network by a first numerical value, wherein the first numerical value is the number of control time slots in one single frame;
the single frame with the number of the targets is the single frame with the number of the previous targets in the single frame sequence, and the single frame sequence is formed by arranging the single frames with the frame numbers in the sequence from small to large.
Optionally, after the node accesses the centerless ad hoc network, the method further includes:
acquiring an MAC address distributed for the node, wherein the MAC address is determined according to a unique corresponding number of any control time slot in the MAC frame;
and determining the control time slot occupied by the node according to the MAC address.
Optionally, the node records a service time slot occupation state table; the service time slot occupation state table comprises: the MAC address is used for expressing the occupation state of each service time slot in the MAC frame and the MAC address of the node occupying the service time slot;
after the node determines the occupied control time slot, the method further comprises the following steps:
broadcasting a service time slot occupation state message in a control time slot occupied by the node when the occupation state of any service time slot in a service time slot occupation state table recorded by the node changes;
and under the condition that the occupation state of the service time slot in the service time slot occupation state table recorded by the node is not changed and the service time slot is not completely idle, broadcasting the service time slot occupation state message in the control time slot occupied by the node according to a preset period.
Optionally, the method further includes:
after receiving the service time slot occupation state message broadcasted by the one-hop neighbor node, the node compares the received service time slot occupation state message with the occupation state of each service time slot in the service time slot occupation state table recorded by the node, and judges whether a conflict service time slot exists; the conflict service time slot is a service time slot occupied by two nodes with different MAC addresses simultaneously;
if the conflict service time slot exists, determining the node with the small MAC address as a successful node from two different MAC addresses corresponding to the conflict service time slot; the node with successful competition represents the node which can continuously occupy the conflict service time slot.
Optionally, after determining that the node with the small MAC address is a successful node for contention, the method further includes:
updating the occupation state of the conflict service time slot and the MAC address corresponding to the conflict service time slot in a service time slot occupation state table recorded by the node according to the successfully competing node and the MAC address of the successfully competing node, and marking that the conflict service time slot is occupied by the node with a small MAC address in the service time slot occupation state table to obtain an updated service time slot occupation state table;
and broadcasting the service time slot occupation state information in the control time slot occupied by the node according to the updated service time slot occupation state table.
Optionally, the method further includes:
under the condition of receiving the voice broadcast by other nodes, if the node and the node which initially broadcasts the received voice belong to the same preset group, the received voice is played.
Optionally, the method further includes:
and under the condition of receiving the voice broadcast by other nodes, if the node is a relay node of the other nodes, selecting a service time slot from the MAC frame by the node to broadcast the received voice.
The application also provides a communication device of the voice conference based on the centerless ad hoc network, which is applied to any node accessed into the centerless ad hoc network and comprises the following steps:
the selection module is used for selecting the service time slot under the condition of receiving the trigger request of the broadcast voice; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for other nodes to broadcast voice;
and the first broadcasting module is used for broadcasting voice in the selected service time slot.
Optionally, the MAC frame includes a target number of single frames;
the target number is a numerical value obtained by rounding up a quotient obtained by dividing the number of the nodes in the centerless ad hoc network by a first numerical value, wherein the first numerical value is the number of control time slots in one single frame; the single frame with the number of the targets is the single frame with the number of the previous targets in the single frame sequence, and the single frame sequence is formed by arranging the single frames with the frame numbers in the sequence from small to large.
Optionally, the method further includes:
an obtaining module, configured to obtain an MAC address allocated to the node after the node accesses the centerless ad hoc network, where the MAC address is determined according to a unique number corresponding to any one control timeslot in the MAC frame;
and the first determining module is used for determining the control time slot occupied by the node according to the MAC address.
Optionally, the method further includes:
a second broadcasting module, configured to broadcast a service time slot occupation state message in a control time slot occupied by the node when an occupation state of any service time slot in a service time slot occupation state table recorded by the node changes;
and the third broadcasting module is used for broadcasting the service time slot occupation state information in the control time slot occupied by the node according to the preset period under the condition that the occupation state of the service time slot in the service time slot occupation state table recorded by the node is not changed and the service time slot is not completely idle.
Optionally, the method further includes:
the comparison module is used for comparing the received service time slot occupation state message with the occupation state of each service time slot in a service time slot occupation state table recorded by the node after receiving the service time slot occupation state message broadcasted by the one-hop neighbor node, and judging whether a conflict service time slot exists; the conflict service time slot is a service time slot occupied by two nodes with different MAC addresses simultaneously;
a second determining module, configured to determine, if the conflict service timeslot exists, a node with a smaller MAC address as a successful contention node from two different MAC addresses corresponding to the conflict service timeslot; and the node which successfully competes represents the node which can continuously occupy the conflict service time slot.
Optionally, the method further includes:
an updating module, configured to update, after the second determining module determines that a node with a small MAC address is a node with a successful contention, an occupation state of the conflicting service time slot and an MAC address corresponding to the conflicting service time slot in a service time slot occupation state table recorded by the node according to the node with a successful contention and the MAC address of the node with a successful contention, and mark that the conflicting service time slot is occupied by the node with a small MAC address in the service time slot occupation state table, to obtain an updated service time slot occupation state table;
and a third broadcasting module, configured to broadcast a service timeslot occupation state message in the control timeslot occupied by the node according to the updated service timeslot occupation state table.
Optionally, the method further includes:
and the first playback module is used for playing the received voice under the condition of receiving the voice broadcast by other nodes and if the node and the node which initially broadcasts the received voice belong to the same preset group.
Optionally, the method further includes:
and the first playback module is used for selecting a service time slot from the MAC frame to broadcast the received voice if the node is a relay node of other nodes under the condition of receiving the voice broadcast by other nodes.
The communication method based on the voice conference in the centerless ad hoc network selects the service time slot under the condition of receiving the trigger request of the broadcast voice; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for broadcasting voice by other source nodes and broadcasting voice in the selected service time slot; the service time slot selected by the source node is part of the service time slots in the preset MAC frame, and other service time slots in the MAC frame are used for broadcasting voice by other nodes, so that the communication method can simultaneously carry out the process of broadcasting voice by a plurality of nodes in the centerless ad hoc network.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a voice conference communication method and apparatus based on a centerless ad hoc network according to the present application;
fig. 2 is a schematic diagram of a frame structure of a TDMA-based MAC frame provided in the present application;
fig. 3 is a schematic structural diagram of any timeslot in a MAC frame provided in the present application;
fig. 4 (a) is a schematic diagram of a frame structure of a TDMA-based MAC frame provided in the present application;
fig. 4 (b) is a schematic structural diagram of any timeslot in a MAC frame provided in the present application;
fig. 5 is a flowchart of a MAC address assignment process provided in the present application;
fig. 6 is a flowchart of an embodiment of a method for broadcasting voice according to the present application;
fig. 7 is a flowchart of an embodiment of a processing method after a node receives a service timeslot to be occupied, according to the present application;
fig. 8 is a flowchart of an embodiment of a speech receiving method provided in the present application;
fig. 9 is a flowchart of an embodiment of a method for processing a conflict between occupation states of service timeslots according to the present application;
fig. 10 is a schematic structural diagram of an embodiment of a communication apparatus for a voice conference without a central ad hoc network according to the present application.
Detailed Description
Fig. 1 is a schematic view of an application scenario of a communication method and device for a voice conference based on a centerless ad hoc network, which is provided by the present application, and includes: the intelligent terminal equipment is connected with a plurality of radio stations accessed into the centerless ad hoc network through WIFI, and is used for configuring preset initial parameters for the radio stations accessed into the centerless ad hoc network. The intelligent terminal device can be a PC or a tablet computer.
The communication device of the voice conference based on the centerless ad hoc network can be applied to any radio station in the application scene and can also be independently arranged.
For convenience of description, the stations are collectively described as nodes.
The application provides a purpose that communication device of voice conference will realize based on no central ad hoc network: in the process of carrying out the voice conference on the node accessed to the centerless ad hoc network, the process of broadcasting voice by a plurality of nodes in the centerless ad hoc network can be carried out simultaneously.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to implement the above communication method and apparatus for a voice conference based on a centerless ad hoc network, in the embodiment of the present application, a process of broadcasting voices by a preset number of nodes is allowed to be performed simultaneously, where the preset number may be determined according to actual requirements, and in actual application, in order to ensure that the nodes in the centerless ad hoc network can clearly hear voice messages broadcasted by a plurality of nodes, a value of the preset number is generally any one of 1 to 3; of course, the number of nodes that allow the ad hoc network to broadcast voice at the same time is not particularly limited in this embodiment.
Based on the preset number and the above purpose, the embodiment of the present application provides a frame structure of a Media Access Control (MAC) frame used by a voice conference device when broadcasting or forwarding a voice, and a process of broadcasting, receiving, and forwarding a voice by any node in a centerless ad hoc network.
Fig. 2 is a schematic diagram of a frame structure of a TDMA-based MAC frame according to the present application.
In the present application, a TDMA-based MAC frame is composed of a plurality of time slots, including control time slots and traffic time slots. The control time slot is used for time slot synchronization, neighbor discovery, route maintenance, occupation condition broadcast of the service time slot and the like; the traffic slots are used for broadcasting voice. In fig. 2, control slots and traffic slots are sequentially arranged from left to right, each control slot is configured with a number, and each traffic slot is also configured with a number.
The structure of any time slot in the MAC frame is shown in fig. 3, and includes six parts, which are sequentially arranged from left to right, where the leftmost part is a first part, and the first part and the sixth part perform a protection function; the second part is preamble, which is used for physical layer synchronization and ensures that the receiving node can receive data such as signaling or voice of the sending node; the third part is MAC Head, which is used to carry the frame number, time slot number, MAC ID of sending node, and is mainly used to time slot synchronization function; the fourth part is Payload and is used for self-defining data such as signaling or voice and the like; the fifth part is Forward Error Correction (FEC) for Forward Error Correction and detection.
Parameters related to the frame structure of a TDMA-based MAC frame include: the length of a single frame, the length of each time slot in the single frame, the number of control time slots and service time slots in the single frame and the like. In order to achieve the desired objects of the present application, the following conditions are satisfied for parameters related to a frame structure of a MAC frame, where the desired objects include: in the process of carrying out a voice conference on a node accessed to the centerless ad hoc network, the process of broadcasting voice by a plurality of nodes in the centerless ad hoc network can be carried out simultaneously; for any node in the preset number of nodes, other nodes in the centerless ad hoc network can receive the voice broadcast by the node; and the node can also receive the voice broadcast by other nodes in the process of broadcasting the voice.
The first condition is that: the sum of the length of a single frame and the voice transmission duration of a time slot is not more than 300ms.
Since the sum of the length of a single frame and the duration of a voice transmission of one slot represents: and in the process of receiving the voice broadcast by the same node, the interval between the two adjacent received voices is kept. In the present application, when the first condition is satisfied, that is, when the sum of the length of a single frame and the voice transmission duration of one slot is not greater than 300ms, the interval between two adjacent times of receiving voices broadcast by the same node may be made not greater than 300ms, and since the user acoustically perceives that voices heard in two adjacent times are not delayed when the interval between two adjacent times of receiving voices is not greater than 300ms. Thus, the present condition may provide the user with an auditory effect without delay.
In this embodiment, any node in the centerless ad hoc network is accessed, and in the process of broadcasting voice in one service time slot, voice is collected from the voice buffer queue first, and when the time reaches the time corresponding to the occupied service time slot, the collected voice is broadcasted in the service time slot.
The time length between the adjacent two times of broadcasting voice in the occupied service time slot can be set as the acquisition time length for acquiring N times of voice, wherein N is a positive integer; and, because the time length between two adjacent broadcasting voices in the occupied service time slot is the length of a single frame. Therefore, in the embodiment of the present application, the length of a single frame may be set as the acquisition duration for acquiring N times of voices, and in practice, the duration for acquiring once needs to be determined according to the parameters of the node device. The specific value of N is not limited in this embodiment, and it is only necessary to determine the length of the single frame based on the value of N after the value of N is determined, so that the sum of the length of the single frame and the voice transmission duration of one timeslot is not greater than 300ms.
The second condition is that: the number of bytes carried by payload of each time slot in a single frame is not less than the total number of bytes for collecting the voice collected N times.
Since it has been stated in the first condition that when an occupied service time slot is reached each time, the voice acquired N times is broadcasted in the service time slot, the total number of bytes that can be carried by payload in a time slot in a single frame is not less than the total number of bytes of the voice acquired N times. Specifically, the larger the total number of bytes that can be carried by payload in a time slot is, the larger the length of the time slot is; moreover, the length of a time slot may be determined based on the total number of bytes that can be carried by the payload in the time slot, where a calculation formula between the total number of bytes that can be carried by the payload in the time slot and the length of the time slot is the prior art, and is not described here again.
In this condition, it is only limited that the number of bytes that can be carried by payload in the time slot is not less than the total number of bytes obtained by collecting N times. The number of bytes that can be carried by payload in the time slot is not limited in this embodiment.
It should be noted that, in this embodiment, since the number of bytes that can be carried by payload in the time slot is not less than the number of bytes obtained by collecting N times, the node may occupy a service time slot with a number in a single frame each time voice is broadcast.
Determining the length of a single MAC frame based on the first condition, and determining the length of a time slot in the single MAC frame based on the second condition; based on the determined length of the MAC single frame and the length of one time slot in the MAC single frame, the total number of time slots included in one MAC single frame may be determined.
Determining the number of control time slots and the number of service time slots in the total number of time slots based on the total number of time slots included in one MAC frame, wherein the following conditions are required to be met:
firstly, the sum of the number of the control time slots and the number of the service time slots is the total number of the time slots in the MAC frame.
Second, in this embodiment, the process of broadcasting voices by the nodes of the first preset number (P) is allowed to be performed simultaneously, and a station is located at the node, if the node is not a node in the nodes of the centerless ad hoc network in which the broadcasting process is performed simultaneously, and the node is a relay node, and one service timeslot can carry the voices of the second preset number (R), the node needs to occupy at most P + P/R service timeslots, so that one MAC single frame needs to have at least P + P/R service timeslots. If the station is in the angle of the centerless ad hoc network, if the number of the relay nodes in the centerless ad hoc network is N, the centerless ad hoc network needs to occupy P + P × N/R service time slots. The setting of the number of relay nodes in the centerless ad hoc network needs to be determined according to actual conditions, and only the voice broadcasted by any node in the centerless ad hoc network is ensured to be received by any other node in the centerless ad hoc network.
After the first and second conditions are satisfied, the number of the control time slots and the number of the service time slots in one MAC single frame may have multiple value conditions, and this embodiment does not limit specific value conditions, as long as the frame structure can be conveniently changed in a telescopic manner, and the communication efficiency is ensured.
In this embodiment, a value of each parameter of the MAC single frame determined when the two conditions are satisfied is described as an example in which a process of allowing 6 nodes in the nodes accessing the network to broadcast voice is performed simultaneously.
Specifically, the time required for acquiring voice once is 25ms, and in the present embodiment, the voice is acquired and transmitted once, so that the length of the designed single frame is 50ms.
According to the voice acquisition speed of 2.4kbps, the data volume acquired once is 2.4kbps × 25ms =60bit =7.5 bytes, and the data can be acquired twice within the duration of a single frame, that is, when the time of an occupied time slot is reached, 15 bytes of voice data need to be sent, and generally, 3 bytes of data need to be sent. Therefore, the number of bytes that can be carried by payload in one timeslot is not less than 18, and in this embodiment, the first portion is 150us; the Preamble of the second part is 7 bytes, wherein the Preamble comprises 2 bytes of synchronization bytes; the MAC Head of the third part is 3 bytes; the number of bytes which can be carried by payload of the fourth part is 36; the FEC of the fifth part is 25 bytes; the sixth part is 50us; therefore, the number of bytes that can be carried by one slot is 71 bytes, as shown in fig. 4 (a). According to the physical layer information rate of 250kbps, the duration of one time slot is 2.5ms, and furthermore, one MAC single frame includes 20 time slots.
Since the process of allowing 6 of the nodes accessing the network to broadcast voice can be performed simultaneously; according to the principle of determining the number of the control time slots and the number of the service time slots in the MAC single frame, the number of the control time slots in the MAC single frame can be set to be 4, and at the moment, the number of the service time slots in the single frame can be determined to be 16. Specifically, as shown in fig. 4 (b), the frame structure of the MAC frame provided in this embodiment sequentially includes CS0 to CS3 and TS0 to TS15 from left to right, where CS0 to CS3 are 4 control timeslots and TS0 to TS15 are 16 traffic timeslots.
In the application, a control time slot needs to be allocated to any node accessing to the centerless ad hoc network, and when the number of control time slots in one MAC single frame is determined and the maximum number of nodes accessing to the centerless ad hoc network is allowed to be determined, the number of MAC single frames required by the maximum number of nodes can be determined. And the determined MAC single frames with the required number are formed into MAC multi-frames, each MAC single frame in the MAC multi-frames corresponds to one frame number, and the time corresponding to the MAC single frame with the smaller frame number is earlier.
For example, the maximum number of nodes allowed to access the centerless ad hoc network is 24, and one MAC single frame includes 4 control slots, where each node should correspond to one control slot, and therefore, when all the 24 nodes access the centerless ad hoc network, a total of 6 MAC single frames are required. Each of the 6 MAC single frames corresponds to a frame number.
After the MAC single frame is determined according to the two conditions provided by the application, a control time slot is allocated to any node accessed to the centerless ad hoc network based on the MAC single frame. Specifically, any one node corresponds to a Media Access Control (MAC) Address, and the node can determine the Control timeslot corresponding to the node according to a preset corresponding relationship between the MAC Address of the node and the Control timeslot number in the multiframe.
Specifically, fig. 5 illustrates a MAC address assignment process, which is executed by an assignment device whose main body is a MAC address, and the assignment device of the MAC address may be configured in an intelligent terminal device connected to each node.
In the application, after a service person detects that a node is accessed to a centerless ad hoc network, the service person counts the number NR of the nodes currently accessed to the centerless ad hoc network, and inputs the value of the NR into an intelligent terminal device.
Specifically, the method for allocating the MAC address in the intelligent terminal device may include the following steps:
s501, when an instruction of distributing the MAC address to the node to be distributed is received, the number of single frames occupied by the node accessed into the centerless ad hoc network is determined.
In this step, when there is a node accessed to the centerless ad hoc network, for convenience of description, the node currently accessed to the centerless ad hoc network is referred to as a node to be allocated. The received instruction includes a total number of nodes which are currently accessed to the centerless ad hoc network, and specifically, the number of single frames required to be occupied is determined according to the following formula (1).
MF=ROUNDUP(NR/M) (1)
NR represents the total number of nodes currently accessed into the centerless ad hoc network; m represents the number of control slots included in one single frame; ROUNDUP denotes rounding up; the MF represents the number of single frames occupied by nodes currently accessing the centreless ad hoc network.
S502, determining the MAC address meeting the preset condition as a candidate MAC address according to the preset corresponding relation between the number of the control time slot in the multiframe and the preset MAC address.
Wherein, the preset corresponding relation is that one MAC address corresponds to the number of one control time slot in one multiframe. Specifically, in this embodiment, the preset correspondence between the MAC address and the number of the control slot in the multiframe may include the following formula (2) and formula (3).
I=(MAC-1)/4 (2)
P=(MAC-1)%4 (3)
In the formula, I represents the frame number of a single frame, MAC represents MAC address, (MAC-1)/4 represents the quotient obtained by dividing the MAC address minus 1 by 4; p represents the number corresponding to the control slot in a single frame, (MAC-1)% 4 represents the remainder obtained by dividing the MAC address by 1 and then dividing by 4.
The preset conditions include: corresponding to the control time slots of the required number of single frames with the minimum frame number in the multiframe as the starting frame number. In the present embodiment, for convenience of description, the determined MAC address satisfying the preset condition is referred to as a candidate MAC address.
S503, determining the MAC addresses with the number same as that of the nodes to be distributed from the candidate MAC addresses.
S504, according to the principle of allocating one MAC address for one node, the determined MAC address is sent to the node to be allocated.
In this step, one MAC address is sent to one node based on the determined MAC address, and the embodiment is not limited to which MAC address is assigned to which node to be assigned.
In the prior art, it is determined that a single frame occupied by nodes in an access network may have many control slots which are not occupied according to the MAC address configured for each node in advance and the corresponding relationship between the MAC address and the control slot in the multiframe, thereby causing the waste of the control slots.
In the embodiment, the number of single frames occupied by nodes accessing a centerless ad hoc network is determined; determining candidate MAC addresses meeting preset conditions according to a preset corresponding relation between the MAC addresses and control time slots in the multiframes, wherein the preset conditions comprise: and corresponding to the control time slots in the single frames with the required number by taking the minimum frame number as the initial frame in the multiframes, so that the single frames corresponding to the candidate MAC frames meeting the preset condition are the single frames with the required number by taking the minimum frame number as the initial frame in the multiframes, and the single frames with the required number are the single frames occupied by the communication among the nodes to be distributed. In this embodiment, each time the MAC address is allocated to the node to be allocated, the single frame with the required number, which takes the minimum frame number as the starting frame number, in the multiframe is determined, so that the number of the single frames occupied by the node in the access network is the minimum. Therefore, according to the method for allocating the MAC address to the node to be allocated in the embodiment, the number of wasted control timeslots can be reduced to the minimum, and the utilization rate of the channel can be further improved.
After the MAC address is allocated to the node accessing the centerless ad hoc network, the node may determine the control time slot that the node needs to occupy according to the preset corresponding relationship between the MAC address and the number of the control time slot. In this embodiment, a service timeslot that a node needs to occupy when broadcasting voice is determined in a contention manner, specifically, fig. 6 illustrates a voice broadcasting method provided by the present application, which may include the following steps:
s601, when receiving a trigger request of broadcast voice, determines whether the trigger request is a multicast request.
When a user of the node triggers a request to talk, a request to send speech is triggered. In practice, for nodes accessing to the centerless ad hoc network, some of the nodes may form a group, so that when any one node in the group broadcasts voice, only other nodes belonging to the group can listen, and nodes outside the group cannot listen.
In practice, two keys may be provided on a node, one for intra-group communication and the other for centerless ad hoc intra-network communication. Therefore, in this step, the manner of determining whether the request is a multicast request may include: the requested key is triggered by the user.
If the request is a multicast request, S602 is executed, otherwise S603 is executed.
S602, judging whether the number of nodes simultaneously performing in the voice broadcasting process in the current group is smaller than a first preset number.
In this step, the maximum number of nodes allowed to broadcast voice simultaneously in one group is set in advance, and for convenience of description, the preset maximum number of nodes indicating allowed to broadcast voice simultaneously in one group is referred to as a first preset number.
Specifically, in this step, the determining whether the number of nodes simultaneously performing the voice broadcast in the current group is less than the first preset number may include:
judging whether the number of the nodes which are simultaneously carried out in the voice broadcasting process in the current group is less than a first preset number or not according to the number of the voice channels which are occupied in the voice channels supported by the current node, wherein the number of the nodes occupied by the nodes in the group is the number of the nodes which are currently carrying out the voice broadcasting simultaneously in the group. Specifically, in this embodiment, the first preset number is set to 3, that is, the maximum 3-way voice broadcasting supported processes in the group are performed simultaneously.
And if the number is less than the first preset number, executing the step S603, otherwise, ending.
S603, judging whether the number of nodes which are simultaneously carried out in the voice broadcasting process in the current centerless ad hoc network is smaller than a second preset number.
In this embodiment, the maximum number of nodes that are allowed to broadcast voice simultaneously in the centerless ad hoc network is set in advance, and for convenience of description, the preset maximum number of nodes that represents that the centerless ad hoc network is allowed to broadcast voice simultaneously is referred to as a second preset number.
Specifically, the determining manner in this step may include:
and judging whether the number of the nodes which are simultaneously carried out in the current in-network voice broadcasting process is less than a second preset number or not according to the number of the voice channels which are occupied in the voice channels supported by the current node, wherein the number of the nodes occupied by the nodes in the network is the number of the nodes which are simultaneously carried out in the network. Specifically, in this embodiment, the second preset number is set to 6, that is, the maximum 6-channel voice broadcasting supported processes in the network are performed simultaneously.
If the number is less than the second preset number, S604 is executed, otherwise, the process ends.
S604, occupying a voice channel, recording information of the occupied voice channel, and initializing a voice buffer queue.
In this embodiment, taking any node in the centerless ad hoc network as an example, the process of allowing the voice broadcasting of a preset number of nodes to be performed simultaneously, so that in the process, the node may broadcast one path of voice, receive the voice of the remaining path number, and not forward the received voice; the node may also forward the received partial number of paths of voice after receiving the preset number of paths of voice; the node may also be receiving a preset number of voice paths and forwarding the received preset number of voice paths. Therefore, any node in the ad hoc network without the center sends and forwards the voice with the total number of paths being the preset number of paths in the process. In this embodiment, each node has the capability of processing a preset number of voice channels, and for convenience of description, the capability of processing a preset number of voice channels is referred to as supporting a preset number of voice channels.
In this step, one voice channel is occupied, and information of the currently occupied voice channel is recorded, specifically, an ID of the currently occupied voice channel can be recorded. Meanwhile, in this embodiment, the voice buffer queue is used for buffering the voice spoken by the user; in this embodiment, there are six voice buffer queues, which satisfy the requirement of voice buffer during the process of performing voice call simultaneously; in this step, a voice buffer queue is initialized, specifically, initializing the voice buffer queue indicates that it is ensured that no voice data exists in the voice buffer queue, and the voice buffer queue is idle, so that when voice data arrives, a node can select the idle voice buffer queue to perform voice buffer.
S605, judging whether a new time slot needs to be occupied.
In this application, when designing the MAC frame, the number of bytes that can be carried by payload in one time slot is greater than the number of bytes obtained by acquiring N times of speech, and in this embodiment, the number of bytes that can be carried by payload in one time slot is twice the number of bytes obtained by acquiring N times of speech, so that in this embodiment, one time slot can carry two paths of speech.
In this embodiment, when a node currently occupies a service timeslot to forward a path of voice, the node may also use the timeslot to perform voice broadcasting, and at this time, the node does not need to contend for the timeslot again, that is, does not need to occupy a new timeslot. Otherwise, the current node does not occupy the service time slot for forwarding the voice, and at this time, the node needs to compete for one time slot for voice broadcasting.
If so, S606 is performed, otherwise, S608 is performed.
S606, determining the service time slot to be occupied, starting the timer for occupying the waiting time slot, and adding the currently occupied voice channel information to the service time slot to be occupied.
In this embodiment, a control time slot is allocated to any node accessing the centerless ad hoc network, and each node accessing the centerless ad hoc network is configured with a service time slot occupation state table, where the service time slot occupation state table is used for the node to record the occupation state of each service time slot and the MAC address of the node occupying the service time slot.
Specifically, the occupation state of any one service timeslot may be one of the following candidate occupation states. In the embodiment of the present application, the candidate occupancy states include: idle, occupied by a one-hop neighbor node, occupied by a two-hop neighbor node and occupied by the node; wherein, the occupation of a node indicates that the node adopts the service time slot to broadcast voice.
For any node accessed to the centerless ad hoc network, a one-hop neighbor node of the node is a sending node of information directly received by the node, for example, if the a node receives information broadcast by the B node on a control time slot, the B node is the one-hop neighbor node of the a node.
The two-hop neighbor node of the node is a sending node which needs to forward the received information once. For example, node a receives information broadcast by node B on a control slot, which is broadcast by node C to node B; at this time, the two-hop neighbor node of a is the node C.
In this embodiment, for any node accessed to the centerless ad hoc network, when a preset sending condition is satisfied, the preset content of the service time slot occupation state table is broadcasted in the corresponding control time slot, and for convenience of description, the information broadcasted by the node is referred to as the service time slot occupation state message of the node.
If any service time slot in the service time slot occupation state table recorded by the node is occupied by the two-hop neighbor node, the service time slot occupation state is idle when the service time slot occupation state message is sent.
The preset sending time comprises two times.
The first method comprises the following steps: when the content in the service time slot occupation state table of the node changes, the service time slot occupation state message is broadcasted on the control time slot corresponding to the node, and at the moment, the one-hop neighbor node of the node can receive the service time slot occupation state message broadcasted by the node.
And the second method comprises the following steps: and when the occupation state of the service time slot in the service time slot occupation state table recorded by the node is not changed and the service time slot in the service time slot occupation state table of the node is not all idle, periodically transmitting the service time slot.
In this step, the node randomly determines a service time slot as a service time slot to be occupied from each service time slot in an idle state recorded in the service time slot occupation state table. And the node updates the occupation condition of the service time slot to be occupied in the service time slot occupation state table into the information representing the occupation application.
In this step, the waiting time slot occupation timer indicates a preset time length for starting timing from the service time slot to be occupied determined in this step. If the information indicating that the service time slot to be occupied is not received in the timing range of the waiting time slot occupation timer, the node can occupy the service time slot to be occupied, otherwise, the node cannot occupy the service time slot to be occupied.
And, in this step, adding the newly occupied one voice channel (voice channel occupied in S604) to the to-be-occupied service slot. It should be noted that, at this time, voice cannot be broadcast in the pending service timeslot.
And S607, broadcasting the service time slot occupation status message in the control time slot.
In this step, according to the service time slot occupation table, a service time slot occupation state message is broadcasted at a corresponding control time slot, and after a one-hop neighbor node of the node receives the service time slot occupation state message of the node, it is determined whether the service time slot to be occupied can be occupied by the node, specifically, a process of determining whether the service time slot to be occupied can be occupied by the node is described in an embodiment corresponding to the figure, and is not described here again.
Executing S609 under the condition that the service time slot to be occupied can be occupied by the node, specifically, the timing of the waiting time slot occupation timer is overtime, and information indicating that the service time slot to be occupied can not be occupied by the node is not received; or, within the timing range of the waiting time slot occupation timer, receiving information indicating that the node can occupy the waiting time slot, and executing S609.
And S608, adding the currently occupied voice channel information.
In the case that the new time slot does not need to be occupied, the step is executed, specifically, the information of the occupied voice channel (the voice channel determined in S605) is added to the occupied service time slot, and S609 is executed.
And S609, collecting voice data.
In this step, the words spoken by the node user are collected, specifically, in this embodiment, data obtained in 25ms is collected as voice data obtained by one-time collection, and the collection process is continuous.
S610, sending the collected voice data on the service time slot.
In this step, sending and collecting N acquired voice data on the service time slot to be occupied under the condition that the service time slot to be occupied can be occupied by the node; in the present step, the acquired voice data is transmitted in the occupied service time slot under the condition that the occupied service time slot exists.
S611, under the condition that the current path of voice broadcasting is finished, deleting the information of the voice channel occupied by broadcasting the current path of voice, and releasing the voice channel occupied by broadcasting the current path of voice.
And S612, judging whether the sending time slot needs to be released or not.
In this step, the sending time slot is a service time slot for broadcasting the current path of voice, specifically, a service time slot to be occupied or an occupied service time slot.
In this embodiment, since one service timeslot can carry two paths of voice, in the process of broadcasting the current path of voice on the transmission timeslot by the node, it is possible that the node also forwards the voice on the transmission timeslot, at this time, the transmission timeslot cannot be released, otherwise, the transmission timeslot may be released.
If so, S613 is performed, otherwise, it ends.
S613, in the service time slot occupation state table recorded by the node, the node clears the occupation state of the transmission time slot.
And S614, broadcasting the service time slot occupation state message.
In this step, according to the content of the service time slot occupation state table determined by the node latest, the service time slot occupation state message is broadcasted at the control time slot of the node.
Any node in the embodiment of the application has a service time slot occupation state table for recording the occupation conditions of the any node, a one-hop neighbor node of the any node and a two-hop neighbor node to the service time slot. Therefore, for any node, when receiving the service timeslot occupation status message broadcast by the one-hop neighbor node of the node, the service timeslot occupation status message broadcast by the one-hop neighbor node includes: and the one-hop neighbor node of the one-hop neighbor node occupy the service time slot.
Specifically, the service time slot occupation state message broadcasted by the one-hop neighbor node includes the MAC address of the node occupying each service time slot in the service time slot occupation state table of the one-hop neighbor node, and if the occupation state of a certain service time slot in the service time slot occupation state table is "idle", the information corresponding to the service time slot in the service time slot occupation state message is "idle", which indicates that the service time slot is not occupied by the node; if the occupation state of the service time slot in the service time slot occupation state table is one-hop neighbor node occupation, the information corresponding to the service time slot in the service time slot occupation state message is the MAC address of the node occupying the service time slot; if the occupation state of a certain service time slot in the service time slot occupation state table is 'two-hop neighbor node occupation', the information corresponding to the service time slot is 'idle' in the service time slot occupation state message.
The arbitrary node judges whether the occupation condition of the service time slot has conflict or not based on the content of the own service time slot occupation state table and the content of the service time slot occupation state message broadcast by the one-hop neighbor node.
Specifically, as shown in fig. 7, for convenience of description, in the following receiving process, a method for processing a node after receiving a service timeslot occupation status message, where any node where the node is located is referred to as a local node, may include the following steps:
s701, when receiving a service time slot occupation state message broadcasted by a one-hop neighbor node, judging whether a service time slot occupation conflict exists according to the received service time slot occupation state message and the content of a service time slot state table of the node.
Specifically, whether the occupation situation corresponding to the service time slot is different is judged for each service time slot according to the occupation situation of each time slot in the received service time slot occupation state message broadcasted by the one-hop neighbor node and the occupation situation of each service time slot recorded in the service time slot occupation state table of the local node, namely whether the MAC addresses of the occupation nodes corresponding to the service time slot are different is judged, if so, two nodes with different MAC addresses occupy the same service time slot, and at the moment, the occupation situation of the service time slot is shown to have conflict; otherwise, it indicates that the occupation state of the service time slot has no conflict.
If the occupied state of any one service time slot does not conflict, S702 is executed, otherwise, conflict processing is performed, and a specific conflict processing method is introduced in the embodiment corresponding to fig. 9, which is not described herein again.
S702, judging whether the neighbor is occupied by one hop.
The case where the traffic slot occupation states do not conflict may include various cases.
In the first case: for a certain service time slot, in the service time slot occupation status message, the occupation status of the certain service time slot is "occupied by a certain node" (the service time slot occupation status message includes the MAC address of the certain node "), and the occupation status of the certain service time slot in the service time slot occupation status table of the local node is" idle ".
In the second case: for a certain service time slot, in the service time slot occupation status message, the occupation status of the certain service time slot is "idle", and in the service time slot occupation status table of the local node, the occupation status of the certain service time slot is also "idle".
In the third case: for a certain service time slot, in the service time slot occupation state message, the occupation state of the certain service time slot is "idle", and in the service time slot occupation state table of the local node, the occupation state of the certain service time slot is "occupied by a certain node".
Although in the above three cases, the occupation status of the certain service timeslot does not conflict, for the first case, the local node needs to update the occupation status of the certain service timeslot in the service timeslot occupation status table. Specifically, in this step, it is necessary to determine whether a "certain node" in the "certain node occupation" is a one-hop neighbor node or a two-hop neighbor node of the local node.
Specifically, in this step, it is determined whether the "certain node" is a one-hop neighbor node of the local node, specifically, it may be determined that the "certain node" is a one-hop neighbor node of the local node according to whether the local node receives the information broadcast by the "certain node" or not, and if the information is received, the "certain node" is determined.
Specifically, it may be determined whether the MAC address of the certain node in the service timeslot occupation status message is the same as the MAC address of the sending node in the MAC HEAD of the service timeslot occupation status message, if the same, the occupied node of the "certain service timeslot" is the sending node of the service timeslot occupation status message, and the local node can receive the service timeslot occupation status message sent by the sending node, which indicates that the sending node is a one-hop neighbor node of the local node, so that it is determined that the occupied state of the certain service timeslot is "one-hop neighbor occupation", otherwise, the occupied state of the certain service timeslot is "two-hop neighbor occupation".
If the "certain node" is judged to be a one-hop neighbor node of the local node, S703 is executed, otherwise, S704 is executed.
S703, updating the occupation state corresponding to the 'certain service time slot' in the service time slot occupation state table of the local node to be occupied by the one-hop neighbor node, and updating the MAC address corresponding to the 'certain service time slot' in the service time slot occupation state table to be the MAC address of the one-hop neighbor node.
Specifically, the occupied state corresponding to the "certain service time slot" in the service time slot occupied state table of the local node is updated to one-hop neighbor occupation, and the MAC address corresponding to the "certain service time slot" in the service time slot occupied state table of the local node is updated to the MAC address corresponding to the "certain service time slot" in the service time slot occupied state message.
After the present step is executed, S705 is executed again.
S704, updating the occupation state corresponding to the 'certain service time slot' in the service time slot occupation state table of the local node to be occupied by the two-hop neighbor node, and updating the MAC address corresponding to the 'certain service time slot' in the service time slot occupation state table to be the MAC address of the two-hop neighbor node.
Specifically, the MAC address corresponding to the "certain service slot" in the service slot occupation state table is updated to the MAC address corresponding to the "certain service slot" in the service slot occupation state message.
S705, starting a time slot state holding timer.
In order to avoid that the one-hop neighbor node or the two-hop neighbor node occupies the service time slot to be occupied, the one-hop neighbor node or the two-hop neighbor node always occupies the service time slot to be occupied; or, to avoid that the node does not receive the release message for the to-be-occupied service slot sent by the one-hop neighbor node due to poor signal quality caused by distance and/or interference after the one-hop neighbor node releases the to-be-occupied service slot.
In order to avoid the above two situations, in this step, a timeslot status holding timer is started, where the timeslot status holding timer is used to start timing from the node updating the service timeslot occupation status table by a preset second duration. If, in the time slot state keeping timer timing range, receiving the service time slot occupation state message for releasing the service time slot to be occupied, executing S706; alternatively, if the time slot status holding timer times out, S706 is executed.
S706, deleting the information of the voice receiving and transmitting channel, releasing the voice receiving and transmitting channel, and clearing the occupation state of the service time slot to be occupied by the one-hop neighbor node or the two-hop neighbor node aiming at the service time slot occupation state table of the node.
The step is from the angle of the relay node, because the relay node carries out the first playback and the subsequent forwarding of the voice when receiving the voice broadcast by the one-hop neighbor node, wherein the same voice channel is adopted for receiving the voice and forwarding the voice. For the convenience of description, the voice channel used by the node for receiving and forwarding is referred to as a transceiving voice channel.
In the step, deleting the information of the voice receiving and transmitting channel, releasing the voice receiving and transmitting channel, and clearing the occupied state of the service time slot to be occupied by a one-hop neighbor node or a two-hop neighbor node in a service time slot occupied state table of the node, wherein if the one-hop neighbor node occupies the service time slot to be occupied, in the step, clearing the occupied state of the service time slot to be occupied by the one-hop neighbor node; similarly, if the two-hop neighbor node occupies the service time slot to be occupied, in this step, the occupied state of the two-hop neighbor node on the service time slot to be occupied is cleared.
And S707, judging whether the forwarding time slot can be released.
Because the node is a relay node, the node forwards the received voice after receiving the voice sent by the one-hop neighbor node. For convenience of description, a service timeslot occupied by the node for forwarding the voice is referred to as a forwarding timeslot.
In the present application, under the condition that one service timeslot can carry multiple paths of voice, while the node broadcasts voice in the forwarding timeslot, there may be other nodes broadcasting voice in the forwarding timeslot. Therefore, in this step, it is determined whether the forwarding slot can be released.
If no other node broadcast voice exists in the forwarding time slot, it is determined that the forwarding time slot can be released, and at this time, S708 is executed; otherwise, the forwarding time slot cannot be released, and the process is finished.
S708, clearing the occupation state of the node pair to the forwarding time slot in the service time slot occupation state table.
And updating the occupation state of the forwarding service time slot into idle state in the service time slot occupation state table.
S709, broadcasting the service time slot occupation status message.
In this step, according to the updated service time slot occupation state table of the node, the service time slot occupation state message is broadcasted at the control time slot corresponding to the node.
Fig. 8 is a speech receiving method provided in the present application, which includes the following steps:
s801, under the condition that voice data sent by one-hop neighbor nodes are received, whether the voice channel is occupied by the voice of the path is judged.
In this embodiment, for any node, when a certain voice channel is occupied and the voice channel is loaded into a certain service timeslot, the certain voice channel and the certain service timeslot are stored as a set of data.
In this step, under the condition of receiving voice data sent by a one-hop neighbor node, judging whether a service time slot of the received voice data exists according to a stored corresponding relation between a voice channel and a service time slot, if so, indicating that the voice channel is occupied by the voice channel, and executing S815; otherwise, the voice channel is not occupied by the voice channel, and S802 is executed.
S802, judging whether an idle voice channel exists.
And determining whether the currently occupied voice channel comprises all voice channels supported by the node from the recorded voice channel information. If so, it is determined that there is no idle voice channel and S814 is performed, and if not, it is determined that there is an idle voice channel and S803 is performed.
And S803, occupying one voice channel and recording the information of the currently occupied one voice channel.
Specifically, the ID of a currently occupied voice channel and the service time slot for receiving the voice of the currently occupied voice channel may be recorded, and recorded as a group of data, so as to determine, based on the recorded information, whether the node has occupied a voice channel for the voice broadcast in a certain service time slot.
S804, whether the node and the sending node of the received voice belong to a group or not is judged.
If so, S805 is performed, otherwise, S806 is performed.
S805, the received voice data is forwarded to a playback interface.
In this step, the received voice data is forwarded to the playback interface for playback, and S806 is executed.
And S806, judging whether the node is the relay node of the sending node.
In this step, whether the node is the relay node of the sending node is determined by transmitting information of the OLSR routing protocol on the control timeslot, and specifically, a process of determining whether the node is the relay node of the sending node according to the information of the OLSR routing protocol is the prior art and is not described herein again.
In this embodiment, if the node is a relay node of the sending node, the node needs to forward the received voice; otherwise, the received voice does not need to be forwarded.
Specifically, if yes, S807 is executed, and if no, the process ends.
S807, initializing a voice buffer queue, and buffering voice data to the buffer queue.
This step prepares the local node for forwarding the received voice data.
And S808, judging whether a new time slot needs to be occupied.
Under the condition that one service time slot can send multi-path voice in the application, if the node currently occupies the service time slot and the occupied service time slot can also bear one path of voice, the node does not need to apply for occupying one service time slot again, namely, does not need to occupy a new time slot; otherwise, the node needs to occupy a new time slot.
If not, S809 is performed, otherwise, S810 is performed.
S809, add voice channel information to the occupied traffic slot, and execute S812.
And S810, randomly occupying an idle time slot, and adding a voice channel to the occupied idle time slot.
S811, sending the service time slot occupation status message, and starting a waiting service time slot occupation timer.
The execution process of this step is the same as S607 in the embodiment corresponding to fig. 6, and is not described here again.
And S812, collecting voice data.
The execution process of this step is the same as S609 in the embodiment corresponding to fig. 6, and is not described here again.
S813 broadcasts the buffered voice data in the buffer queue on the traffic slot.
Specifically, if the time slot is a newly applied service time slot, the buffered voice data is sent in the service time slot occupied by the new application under the condition that a timer occupied by the waiting service time slot is overtime, or when the time slot occupied by the waiting service time slot is received within the timing range of the timer and indicates that the idle time slot can be occupied; if there is an occupied traffic slot, the buffered voice data is transmitted directly on the occupied traffic slot.
And S814, voice channel conflict processing.
In this embodiment, the situation of voice channel collision occurs when the service time slot occupation conflicts, so in this embodiment, after the problem of service time slot collision is solved, the problem of voice channel collision is solved. At the party of conflict failure of conflict service time slot, if the number of nodes simultaneously carried out in the current in-network voice broadcasting process reaches six, at this moment, the nodes of the conflict failure release the voice channel correspondingly occupied in the conflict service time slot.
And S815, forwarding the received voice data to a playback interface.
And S816, judging whether the node is a relay node of the sending node.
The execution process of this step is the same as S806, and is not described here again.
Specifically, if yes, S817 is performed, otherwise, the process ends.
And S817, buffering the voice data to a queue, and sending the buffered data on the service time slot occupied by the node forwarding.
Fig. 9 is a method for processing a conflict of an occupied state of a service timeslot, which may include the following steps:
s901, determining a small MAC address in the MAC addresses corresponding to the conflict service time slot.
In this embodiment, when the occupation states of a certain service slot conflict, for convenience of description, the service slot in which the occupation states conflict is referred to as a conflict service slot. In this embodiment, the processing principle for the conflicting service time slot is that a node with a small MAC address occupies the conflicting service time slot. Therefore, in this step, the size of the MAC address of the node occupying the conflicting service time slot is determined, and a smaller MAC address is determined, and for convenience of description, the node with the smaller MAC address of the two nodes corresponding to the conflicting service time slot is referred to as a node that succeeds in contention, otherwise, the node is referred to as a node that fails in contention.
In this embodiment, for the node that succeeds in the contention, it is only necessary to continue to occupy the conflicting service timeslot to send the voice without processing. For the node with the failed competition, the occupied voice channel needs to be released, and the occupation state of the conflict service time slot in the service time slot occupation state table of the node with the failed competition is updated. At this time, the node with failed contention may perform the procedure according to the corresponding embodiment of fig. 6.
S902, updating the occupation state of the conflict service time slot in the service time slot occupation state table of the local node, and starting a time slot state holding timer.
In this step, the local node updates the occupation state of the conflict service time slot in the service time slot occupation state table to the determined occupation of the node corresponding to the small MAC address, specifically, if the node corresponding to the small MAC address is a one-hop neighbor node of the local node, the occupation state of the conflict service time slot in the service time slot occupation state table is updated to one-hop neighbor node occupation; and if the node corresponding to the small MAC address is a two-hop neighbor node of the local node, updating the occupation state of the conflict service time slot in the service time slot occupation state table to be occupied by the two-hop neighbor node.
In this step, information indicating that a node with a small MAC address occupies the updated occupied state of the conflicting service slot is marked.
And S903, broadcasting the service time slot occupation state information in the control time slot corresponding to the local node according to the content in the service time slot occupation state table updated by the local node.
In this step, after the local node broadcasts the service time slot occupation status message, and after the one-hop neighbor node of the local node receives the service status message, for convenience of description, the node that receives the service time slot occupation status message is called a receiving node.
If the receiving node is a node with successful competition, processing according to the processing mode of the node with successful competition, and if the receiving node is a node with failed competition, processing according to the processing method of the node with failed competition.
Fig. 10 is a communication apparatus embodiment of a voice conference of a centerless ad hoc network provided in the present application, where the apparatus embodiment may be applied to any node accessing the centerless ad hoc network, and includes: a selection module 101 and a first broadcast module 102;
the selection module 101 is configured to select a service timeslot when a trigger request of broadcast voice is received; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for other nodes to broadcast voice; a first broadcasting module 102, configured to broadcast voice in a selected service timeslot.
Preferably, the MAC frame includes a target number of single frames; the target number is a numerical value obtained by rounding up a quotient obtained by dividing the number of the nodes in the centerless ad hoc network by a first numerical value, wherein the first numerical value is the number of control time slots in one single frame; the single frame with the number of the targets is the single frame with the number of the previous targets in the single frame sequence, and the single frame sequence is formed by arranging the single frames with the frame numbers in the sequence from small to large.
Preferably, the method further comprises the following steps: an acquisition module 103 and a first determination module 104;
the acquiring module 103 is configured to acquire an MAC address allocated to the node after the node accesses the centerless ad hoc network, where the MAC address is determined according to a unique corresponding number of any one control timeslot in the MAC frame; a first determining module 104, configured to determine, according to the MAC address, a control timeslot occupied by the node.
Preferably, the method further comprises the following steps: a second broadcasting module 105 and a third broadcasting module 106;
the second broadcasting module 105 is configured to broadcast a service time slot occupation state message in a control time slot occupied by the node when an occupation state of any service time slot in the service time slot occupation state table recorded by the node changes; a third broadcasting module 106, configured to broadcast a service time slot occupation state message in a control time slot occupied by the node according to a preset period when an occupation state of a service time slot in a service time slot occupation state table recorded by the node does not change and the service time slot is not completely idle.
Preferably, the method further comprises the following steps: a comparison module 107 and a second determination module 108;
the comparing module 107 is configured to, after receiving the service time slot occupation state message broadcast by the one-hop neighbor node, compare the received service time slot occupation state message with the occupation state of each service time slot in the service time slot occupation state table recorded by the node, and determine whether a conflicting service time slot exists; the conflict service time slot is a service time slot occupied by two nodes with different MAC addresses simultaneously; a second determining module 108, configured to determine, if the conflict service time slot exists, a node with a smaller MAC address as a successful contention node from two different MAC addresses corresponding to the conflict service time slot; the node with successful competition represents the node which can continuously occupy the conflict service time slot.
Preferably, the method further comprises the following steps: an update module 109 and a third broadcast module 110;
after the second determining module determines that a node with a small MAC address is a node with a successful contention, the updating module 109 is configured to update the occupation state of the conflict service time slot and the MAC address corresponding to the conflict service time slot in the service time slot occupation state table recorded by the node according to the node with a successful contention and the MAC address of the node with a successful contention, and mark that the conflict service time slot is occupied by the node with a small MAC address in the service time slot occupation state table, so as to obtain an updated service time slot occupation state table; a third broadcasting module 110, configured to broadcast a service timeslot occupation state message in the control timeslot occupied by the node according to the updated service timeslot occupation state table.
Preferably, the method further comprises the following steps: the first playback module 111 is configured to, in a case that a voice broadcast by another node is received, play back the received voice if the node and the node that originally broadcasts the received voice belong to the same preset group.
Preferably, the method further comprises the following steps: and the first playing module 112 is configured to, in a case that a voice broadcast by another node is received, if the node is a relay node of the another node, select a service timeslot from the MAC frame to broadcast the received voice.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A communication method of voice conference based on centerless ad hoc network is characterized in that, applied to any node accessing centerless ad hoc network, comprising:
under the condition of receiving a trigger request of broadcast voice, selecting a service time slot; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for broadcasting voice by other nodes;
broadcasting voice in the selected service time slot;
wherein the MAC frame comprises a target number of single frames;
the target number is a numerical value obtained by rounding up a quotient obtained by dividing the number of the nodes in the centerless ad hoc network by a first numerical value, wherein the first numerical value is the number of control time slots in one single frame;
the single frames with the number of the targets are the single frames with the number of the previous targets in the single frame sequence, and the single frame sequence is formed by arranging the single frames with the frame numbers in the sequence from small to large;
the method for allocating the MAC address of the node comprises the following steps:
when an instruction for distributing an MAC address to a node to be distributed is received, determining the number of single frames occupied by the node accessed into the centerless ad hoc network;
determining the MAC address meeting the preset condition as a candidate MAC address according to the preset corresponding relation between the number of the control time slot in the multiframe and the preset MAC address, wherein the preset corresponding relation is that one MAC address corresponds to the number of one control time slot in one multiframe, and the preset condition comprises the following steps: corresponding to the control time slot of the single frame with the minimum frame number in the multiframe as the initial frame number;
determining MAC addresses with the same number as the number of nodes to be distributed from the candidate MAC addresses;
sending the determined MAC address to a node to be allocated according to the principle of allocating one MAC address to one node;
wherein the method further comprises:
after receiving the service time slot occupation state message broadcasted by the one-hop neighbor node, the node compares the received service time slot occupation state message with the occupation state of each service time slot in the service time slot occupation state table recorded by the node, and judges whether a conflict service time slot exists; the conflict service time slot is a service time slot occupied by two nodes with different MAC addresses simultaneously;
if the conflict service time slot exists, determining the node with the small MAC address as a successful node from two different MAC addresses corresponding to the conflict service time slot; the node with successful competition represents the node which can continuously occupy the conflict service time slot.
2. The method of claim 1, wherein the node records a traffic slot occupation status table; the service time slot occupation state table comprises: the MAC address is used for expressing the occupation state of each service time slot in the MAC frame and the MAC address of the node occupying the service time slot;
after the node determines the occupied control time slot, the method further comprises the following steps:
broadcasting a service time slot occupation state message in a control time slot occupied by the node when the occupation state of any service time slot in a service time slot occupation state table recorded by the node changes;
and under the condition that the occupation state of the service time slot in the service time slot occupation state table recorded by the node is not changed and the service time slot is not completely idle, broadcasting the service time slot occupation state message in the control time slot occupied by the node according to a preset period.
3. The method according to claim 2, further comprising, after determining that the node with the small MAC address is a successful node for contention:
updating the occupation state of the conflict service time slot in a service time slot occupation state table of the local node, starting a time slot state holding timer, updating the occupation state of the conflict service time slot in the service time slot occupation state table to the determined occupation of the node corresponding to the small MAC address by the local node, and broadcasting service time slot occupation state information in the control time slot corresponding to the local node according to the content in the service time slot occupation state table updated by the local node.
4. A communication device for voice conference based on centerless ad hoc network is characterized in that, applied to any node accessing centerless ad hoc network, it includes:
the selection module is used for selecting the service time slot under the condition of receiving the trigger request of the broadcast voice; the service time slot is a part of service time slots in a preset MAC frame, and other service time slots in the MAC frame are used for other nodes to broadcast voice;
the first broadcasting module is used for broadcasting voice in the selected service time slot;
wherein the content of the first and second substances,
the MAC frame comprises a target number of single frames;
the target number is a numerical value obtained by rounding up a quotient obtained by dividing the number of the nodes in the centerless ad hoc network by a first numerical value, wherein the first numerical value is the number of control time slots in one single frame; the single frames with the number of the targets are the single frames with the number of the previous targets in the single frame sequence, and the single frame sequence is formed by arranging the single frames with the frame numbers in the sequence from small to large;
the method for allocating the MAC address of the node comprises the following steps:
when an instruction for distributing an MAC address to a node to be distributed is received, determining the number of single frames occupied by the node accessed into the centerless ad hoc network;
determining the MAC address meeting the preset condition as a candidate MAC address according to the preset corresponding relation between the number of the control time slot in the multiframe and the preset MAC address, wherein the preset corresponding relation is that one MAC address corresponds to the number of one control time slot in one multiframe, and the preset condition comprises the following steps: corresponding to the control time slot of the single frame with the minimum frame number in the multiframe as the initial frame number;
determining MAC addresses with the same number as the number of nodes to be distributed from the candidate MAC addresses;
sending the determined MAC address to a node to be allocated according to the principle of allocating one MAC address to one node;
wherein the apparatus further comprises:
the comparison module is used for comparing the received service time slot occupation state message with the occupation state of each service time slot in a service time slot occupation state table recorded by the node after receiving the service time slot occupation state message broadcasted by the one-hop neighbor node, and judging whether a conflict service time slot exists; the conflict service time slot is a service time slot occupied by two nodes with different MAC addresses simultaneously;
a second determining module, configured to determine, if the conflict service timeslot exists, a node with a smaller MAC address as a successful contention node from two different MAC addresses corresponding to the conflict service timeslot; the node with successful competition represents the node which can continuously occupy the conflict service time slot.
5. The apparatus of claim 4, further comprising:
a second broadcasting module, configured to broadcast a service time slot occupation state message in a control time slot occupied by the node when an occupation state of any service time slot in a service time slot occupation state table recorded by the node changes;
and the third broadcasting module is used for broadcasting the service time slot occupation state information in the control time slot occupied by the node according to a preset period under the condition that the occupation state of the service time slot in the service time slot occupation state table recorded by the node is not changed and the service time slot is not completely idle.
6. The apparatus of claim 5, further comprising:
an updating module, configured to update an occupation state of the conflict service timeslot in a service timeslot occupation state table of a local node after the second determining module determines that the node with the small MAC address is a node with successful contention, start a timeslot state holding timer, and update the occupation state of the conflict service timeslot in the service timeslot occupation state table to the determined occupation state of the node corresponding to the small MAC address by the local node;
and the third broadcasting module is used for broadcasting the service time slot occupation state information in the control time slot corresponding to the local node according to the content in the service time slot occupation state table updated by the local node.
CN201911359994.5A 2019-12-25 2019-12-25 Voice conference communication method and device based on centerless ad hoc network Active CN113037937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911359994.5A CN113037937B (en) 2019-12-25 2019-12-25 Voice conference communication method and device based on centerless ad hoc network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911359994.5A CN113037937B (en) 2019-12-25 2019-12-25 Voice conference communication method and device based on centerless ad hoc network

Publications (2)

Publication Number Publication Date
CN113037937A CN113037937A (en) 2021-06-25
CN113037937B true CN113037937B (en) 2023-04-07

Family

ID=76458961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911359994.5A Active CN113037937B (en) 2019-12-25 2019-12-25 Voice conference communication method and device based on centerless ad hoc network

Country Status (1)

Country Link
CN (1) CN113037937B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115767736B (en) * 2022-11-11 2024-02-27 航天行云科技有限公司 Continuous time frame reservation method and system based on hybrid TDMA wireless ad hoc network

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171862A1 (en) * 2006-01-25 2007-07-26 Honeywell International Inc. Media access control protocol for mobile ad hoc networks using CDMA and multiuser detection
FR2910655B1 (en) * 2006-12-22 2009-02-27 Thales Sa METHOD FOR RESERVATION AND DYNAMIC ALLOCATION OF TIME CRANES IN A NETWORK WITH SERVICE GUARANTEE
US8284749B2 (en) * 2008-03-10 2012-10-09 Comtech Mobile Datacom Corporation Time slot synchronized, flexible bandwidth communication system
EP2141839A1 (en) * 2008-06-30 2010-01-06 Thomson Licensing, Inc. Method and device for borrowing time slot
US8891494B2 (en) * 2010-04-22 2014-11-18 The Regents Of The University Of California Method and apparatus for the use of multiple-input, multiple output (MIMO) systems for multi-packet reception (MPR) in a distributed time slot assignment protocol
US9723538B2 (en) * 2011-06-20 2017-08-01 Cisco Technology, Inc. Systematic neighbor detection in shared media computer networks
CN102612152B (en) * 2012-02-27 2014-06-11 西北工业大学 Ad Hoc network MAC (Media Access Control) protocol realizing method based on STDMA (Self Organizing Time Division Multiple Access)
KR101461643B1 (en) * 2013-06-14 2014-11-20 한국해양과학기술원 frame structure of multiple access ship Ad-hoc network suporting real time and non-real time service and communication method using the same
CN108093469B (en) * 2016-11-22 2020-11-06 上海交通大学 Distributed access method of wireless transmission system based on TDMA
CN109429347B (en) * 2017-09-01 2022-04-08 杭州海康威视数字技术股份有限公司 Time slot allocation method and device
CN108024367B (en) * 2017-12-01 2020-11-20 上海金卓科技有限公司 Method, device, equipment and storage medium for dynamically allocating time slot
CN108235437B (en) * 2017-12-04 2021-07-09 中国电子科技集团公司第三十研究所 Wireless mobile self-organizing network channel time slot scheduling and distributing method

Also Published As

Publication number Publication date
CN113037937A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN105075385B (en) Network-assisted UE detection in direct mode UE-to-UE communication
JP4582553B2 (en) Multimedia content distribution method and system using wireless communication network, particularly mobile phone network
Kanzaki et al. Dynamic TDMA slot assignment in ad hoc networks
US7502360B2 (en) Method and apparatus for dynamic neighbor discovery within wireless networks using time division multiple access (TDMA)
US8050250B2 (en) Random access method for user equipment in time division synchronization code division multiple access communication system
CN104469694B (en) A kind of communication means and device based on group system
KR100586845B1 (en) Method for enhancing transfer rate using DLP and multi-channel in DCF-based wireless LAN network, and wireless network system thereof
EP2335440B1 (en) Mac protocol for multi-channel wireless networks
CN107113700B (en) Random access method, user equipment and base station
CN110809324B (en) MAC transmission method based on distributed TDMA and wireless self-organizing network system
CN109640393B (en) Competitive time division multiple access method for data and voice simultaneous transmission of wireless ad hoc network
CN100534068C (en) Non-confliction on-demand multi-address access method
CN110225593B (en) Random number idle time slot competition method in distributed TDMA protocol
KR102400823B1 (en) AD-HOC Communication Network and Communication Method
CN101754399B (en) Multi-channel collaboration multi-address access method and system
CN108347746A (en) Connection control method, access network elements and user equipment
CN110324866A (en) A kind of communication means, equipment and system
CN113037937B (en) Voice conference communication method and device based on centerless ad hoc network
KR20180126050A (en) Method and apparatus for transmitting a sink beacon message in a NAN device
CN100452745C (en) Multi-address access method with the confliction decomposition
CN101119151A (en) On-demand multi-access method with conflict decomposition
KR101346305B1 (en) the TDMA control method of having relay function using contention period
WO2021128039A1 (en) Centerless ad hoc network-based voice conference communication method and device
CN106851853B (en) Multi-access control method and control device for multi-hop centerless network
CN108471640B (en) Dynamic and static mixed time slot allocation method and 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