CN113099397B - Multi-packet voice transmission method based on PTT control, terminal and storage medium - Google Patents

Multi-packet voice transmission method based on PTT control, terminal and storage medium Download PDF

Info

Publication number
CN113099397B
CN113099397B CN202110498922.XA CN202110498922A CN113099397B CN 113099397 B CN113099397 B CN 113099397B CN 202110498922 A CN202110498922 A CN 202110498922A CN 113099397 B CN113099397 B CN 113099397B
Authority
CN
China
Prior art keywords
equipment
voice
floor
receiving
preemption
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
CN202110498922.XA
Other languages
Chinese (zh)
Other versions
CN113099397A (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.)
Ruan Internet Of Things Technology Group Co ltd
Original Assignee
Ruan Internet Of Things Technology Group 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 Ruan Internet Of Things Technology Group Co ltd filed Critical Ruan Internet Of Things Technology Group Co ltd
Priority to CN202110498922.XA priority Critical patent/CN113099397B/en
Publication of CN113099397A publication Critical patent/CN113099397A/en
Application granted granted Critical
Publication of CN113099397B publication Critical patent/CN113099397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/10Push-to-Talk [PTT] or Push-On-Call services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention belongs to the technical field of voice transmission, and particularly relates to a multi-packet voice transmission method based on PTT control, a terminal and a storage medium, wherein the method comprises the following steps: starting a sending thread and a receiving thread for each group according to the grouping information of N groups added by the current equipment; the acquired voice data is multicast to N packets through N sending threads respectively, and the voice data is received from the N packets through N receiving threads respectively. According to the technical scheme, for the condition that the same device is added with a plurality of groups, the device can simultaneously participate in voice sending and voice receiving of the plurality of groups through the sending thread and the receiving thread distributed to each group, and the purpose of isolating voice transmission among groups and sharing voice in the groups is achieved.

Description

Multi-packet voice transmission method based on PTT control, terminal and storage medium
Technical Field
The invention belongs to the technical field of voice transmission, and particularly relates to a multi-packet voice transmission method based on PTT control, a terminal and a storage medium.
Background
The traditional emergency equipment has the following three problems when voice transmission is carried out:
first, the conventional voice transmission method cannot realize the function of adding one device to multiple voice transmission groups, and cannot realize the function of isolating voice sharing in the voice transmission groups between groups, that is, the one device cannot participate in voice transmission and voice reception of multiple groups at the same time.
Second, the conventional emergency device does not have a mechanism for controlling mutual exclusion of voice preemption, and when two people want to talk simultaneously, the device will play a warning tone (busy tone) to both parties until one party gives up talking. When one party gives up speaking, the other party can normally speak, so that the whole equipment group can hear the speaking content. This solution is inefficient, resulting in very low channel utilization.
Third, the conventional voice transmission method introduces a large amount of miscellaneous packets when the talker switches, the miscellaneous packets may cause the waste of bandwidth, and the miscellaneous packets may cause noise when playing, which seriously affects the communication quality.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a multi-packet voice transmission method based on PTT control, a terminal and a storage medium, and for the condition that the same device joins in a plurality of packets, the device can simultaneously participate in the voice transmission and the voice reception of the plurality of packets through a transmitting thread and a receiving thread which are distributed to each packet, thereby realizing the purpose of isolating the voice transmission among groups and sharing the voice in the groups.
In a first aspect, the present invention provides a multi-packet voice transmission method based on PTT control, comprising the following steps:
starting a sending thread and a receiving thread for each group according to the group information of N groups added by the current equipment;
the acquired voice data is multicast to N packets through N sending threads respectively, and the voice data is received from the N packets through N receiving threads respectively.
Preferably, the method further comprises the steps of: and starting an acquisition thread and a broadcast thread for the equipment according to the working state of the equipment.
Preferably, the multicasting the collected voice data to the N packets by the N sending threads respectively includes:
collecting voice through a collection thread, and storing voice data into a buffer;
and the N sending threads multicast the voice data in the buffer to the N packets where the current equipment is located respectively. Preferably, the receiving the voice data from the N packets by the N receiving threads respectively specifically includes:
the N receiving threads respectively receive voice data from the N groups where the current equipment is located and store the voice data into the buffer;
and the broadcasting thread reads the voice data from the buffer and carries out voice broadcasting.
Preferably, the method further comprises the step of preempting the floor.
Preferably, the step of preempting the floor specifically includes:
acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located;
and if the channel state of the subnet is unoccupied, updating the speaking state of the current equipment to have the speaking right.
Preferably, the step of preempting the floor specifically includes:
acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located;
if the channel state of the subnet is occupied, judging whether M-time preemption instructions are received within preset time, if so, preempting to take effect, sending floor locking information to other equipment of the current equipment group, and receiving preemption success information fed back by the speaking equipment;
and updating the speaking status of the current device to be the speaking right.
Preferably, the method further includes a step of synchronizing the state when preempting the speech, specifically including:
receiving floor locking information sent when the preemption device preempts the floor, and updating the floor state of the current device to be without the floor;
generating and sending the locked information of the equipment to other equipment of the group where the current equipment is located so that the other equipment can update the speaking status to have no speaking right;
receiving notification information fed back by other equipment after the speech state is updated;
and generating and sending successful preemption information to all the equipment in the group where the current equipment is located so that the successful preemption information is received by the preemption equipment, and then the preemption equipment starts to send data.
In a second aspect, the present invention provides a terminal comprising a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are connected to each other, wherein the memory is used for storing a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a third aspect, the present invention provides a computer-readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect.
According to the technical scheme of the embodiment, for the condition that the same device joins in a plurality of groups, the device can simultaneously participate in voice transmission and voice reception of the plurality of groups through the transmitting thread and the receiving thread distributed to each group, and the purpose of isolating voice transmission among groups and sharing voice in the groups is achieved.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals.
FIG. 1 is a flow chart of a multi-packet voice transmission method based on PTT control according to an embodiment;
FIG. 2 is a diagram illustrating a device for multi-packet transmission of voice data according to an embodiment;
FIG. 3 is a diagram illustrating a device receiving voice data in multiple packets according to an embodiment;
FIG. 4 is a diagram illustrating initial states of a plurality of devices in a subnet in an embodiment;
fig. 5 is a schematic diagram of a change state of a device preempting a floor in an embodiment;
fig. 6 is a schematic diagram of state synchronization when a device preempts a floor in the embodiment;
fig. 7 is a schematic structural diagram of the terminal in the embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Example one
The embodiment provides a multi-packet voice transmission method based on PTT (Push-to-Talk) control, as shown in fig. 1, including the following steps:
s1, according to the grouping information of N groups added by the current equipment, starting a sending thread and a receiving thread for each group;
s2 multicasts the acquired voice data to N packets by N sending threads, and receives the voice data from N packets by N receiving threads.
In this embodiment, there are several devices (each device is equipped with a voice transmission system) in the same subnet, and these several devices form a plurality of packets. Each device can join N (N is a positive integer equal to or greater than 1) groups, and the group information of each group includes a group ID, the number of devices in the group, the number of devices, and the like.
When a user starts the device, the voice transmission system detects that the device starts to work, and starts a sending thread and a receiving thread for each group according to the group ID of each group. As shown in fig. 2 and 3, the N packets, packet 1, packet 2, … …, and packet N, have transmitting threads SP1, SP2, … …, and SPN, and receiving threads RP1, RP2, … …, and RPN, respectively.
In this embodiment, while the sending thread and the receiving thread are started for the device, an acquisition thread and a broadcasting thread are also started for the device according to the working state of the device. Namely, when the device is started to work, a collection thread CP and a broadcast thread WP are started for the device. Therefore, the device starts 2N +2 threads in the working state.
For example, there are 34 devices for emergency communication in a certain subnet, the device numbers of the 34 devices are 001, 002, 003, … …, 033, and 034, the emergency responder shares a device number of 005, the device is added into three groups, group 1, group 2, and group 3, and the group IDs of the three groups are: fz01, fz02, fz03, the number of the devices in the three groups is respectively: 4. 3 and 4. When a certain 005 device is started, the voice transmission system detects that the 005 device starts to operate, and the sending threads SP1, SP2, SP3 and the receiving threads RP1, RP2, RP3 are respectively started for the packet 1, the packet 2, and the packet 3 of the 005 device.
In this embodiment, when the current device sends voice to N packets, data transmission in a multicast mode is used, and in order to ensure that voice data is not out of order when actually transmitting and playing, in this embodiment, an RTP (eal-time Transport Protocol) library is called when the device is in operation, and a method for controlling packet sequencing by using RTCP (Real-time Transport Control ptotol, Real-time data transmission Control Protocol) is used, so as to ensure that packets are not out of order. In this embodiment, in order to implement data synchronization, system semaphores are used to implement synchronization of voice acquisition and voice transmission (i.e., synchronization of an acquisition thread and a transmission thread), and system semaphores are used to implement synchronization of voice reception and voice broadcast (i.e., synchronization of a reception thread and a broadcast thread).
Wherein, the multicasting the collected voice data to N groups respectively through N sending threads specifically includes:
collecting voice through a collection thread, and storing voice data into a buffer;
and the N sending threads multicast the voice data in the buffer to the N packets where the current equipment is located respectively.
In this embodiment, when a user wants to send voice to N packets, the acquisition thread acquires the voice of the user, stores the voice data in the buffer, and multicasts the voice data to the N packets through the N sending threads. When the buffer time is up, the voice data in the buffer is emptied, and the next voice data acquisition is waited to be loaded into the buffer. By the synchronization of the collection thread and the sending thread, the voice data stored in the buffer can be multicast to each group every time, and each data packet can be sent only once.
For example, if a fellow in the rescue process sees a wounded person, a nearby team member is needed to help the wounded person, and then voice is transmitted to three groups through the 005 equipment of the fellow team member. After the acquisition thread CP acquires voice, the voice data is stored in a buffer, and when the buffer time is up, the SP1 thread of the group 1, the SP2 thread of the group 2 and the SP3 thread of the group 3 multicast the voice data to three groups (the group 1, the group 2 and the group 3) in the Mesh network respectively. Four devices in group 1, three devices in group 2 and four devices in group 3, 11 devices in total, all receive speech of lie.
Wherein, receiving the voice data from the N packets through the N receiving threads respectively specifically includes:
the N receiving threads respectively receive the voice data from the N groups of the current equipment and store the voice data into the buffer;
and the broadcasting thread reads the voice data from the buffer and carries out voice broadcasting.
In this embodiment, when all N packets in which the device is located have users speaking, the N packets in which the current device is located may receive voice data from the N packets through the N receiving threads, respectively. In this embodiment, a system semaphore is used to set a receiving period mechanism, and when the voice data stored in the buffer is read by the broadcast thread, the voice data in the buffer is emptied, and the receiving thread waits for the new voice data to be stored in the buffer, so as to prevent the voice data from being covered and dirty data from being generated by race among threads, and ensure that all the voice data marked by the group ID are received once in the receiving period.
For example, in a rescue process, a team member in each of group 1, group 2, and group 3 where a certain 005 device is located speaks, and voice data transmitted by three groups needs to be received simultaneously. Then the RP1 thread of packet 1, the RP2 thread of packet 2, and the RP3 thread of packet 3 receive voice data from three packets (packet 1, packet 2, and packet 3) in the Mesh network, respectively, and store the voice data in the buffer, and the playback thread SB1 reads the voice data and plays the voice.
In summary, in the technical solution in this embodiment, for a device that adds multiple packets, by allocating an independent receiving thread and an independent sending thread to each packet, when the device sends voice, the device can multicast the voice to multiple packets simultaneously, and when the device receives the voice, the device can receive the voice sent by multiple packets simultaneously, thereby achieving the purpose of isolating voice transmission between groups and sharing the voice in the group. The synchronization of voice acquisition and voice transmission, and the synchronization of voice reception and voice broadcasting are realized through the system semaphore. By setting the buffering time during sending, the voice data stored in the buffer can be multicast to each group every time, and each data packet can be sent only once. Through the setting of a receiving period mechanism during receiving, the voice data is prevented from being covered and dirty data is prevented from being generated by competition among threads, and the voice data of each group can be received once in one receiving period.
Example two:
the embodiment provides a multi-packet voice transmission method based on PTT control, and on the basis of the first embodiment, the method further comprises the step of preempting the floor. Preemption of the floor includes two cases: the first is preemption in the initial state and the second is preemption in the intermediate talk state.
In this embodiment, to realize floor preemption among devices, ptt _ push file and ptt _ lock file are set for each device. ptt _ lock is 0, which means that there is no device speaking in the subnet and the channel status is not occupied; ptt _ lock is 1, which indicates that there is a device speaking in the subnet and the channel status is occupied. ptt _ push ═ 0, meaning that the device has no floor; ptt _ push ═ 1 indicates that the device has the floor. The values for ptt _ push and ptt _ lock are typically two cases:
1) the subnet has no device to speak, and ptt _ lock of each device is 0, and ptt _ push is 0;
2) devices in the subnet speak, ptt _ lock of all devices is 1, speak device ptt _ push is 1, and other devices ptt _ push is 0.
In this embodiment, for the way of preempting the floor among the PTT devices in the subnet, similar to the idea of the token ring network, a token is transmitted in a group, and the device that preempts the token has the floor. The ptt _ push file in the device is written with the character '1' after a device obtains the token, and the ptt _ push file is written with the character '0' after a device releases the token. The ptt _ push file serves to control the floor, and ptt _ push of only one device at a time is written with the character '1' to ensure that only one device node can share the floor at the same time.
The first step of preempting the floor specifically includes:
acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located;
and if the channel state of the subnet is unoccupied, updating the floor state of the current equipment to have the floor.
In the initial state, the subnet has no device to speak, and ptt _ lock ═ 0 and ptt _ push ═ 0 of all devices are shown in fig. 4. In this embodiment, device _1, device _2, and device _3 are used as examples, where device _1 and device _2 belong to packet 1, and device _1 and device _3 belong to packet 2.
The current device in this embodiment is an active preemptive party, and device _1 is the current device. At a certain moment, when the user presses the key of the current device _1 once, the user performs preemption once. The voice transmission system detects the ptt _ lock value of device _1, and ptt _ lock is 0, which indicates that no device is speaking in the subnet and the channel status is not occupied. device _1 writes the character '1' at ptt _ push file to override '0', while advertising that the entire subnet has ptt _ lock set to 1(ptt _ lock ═ 1). At this time, device _1 owns the floor and informs all devices in the subnet that the floor is occupied by ptt _ lock ═ 1.
If device _1 finishes speaking, device _1 rewrites the character '0' to cover '1' in ptt _ push file, and informs the whole subnet to set ptt _ lock to 0(ptt _ lock ═ 0), at which time device _1 naturally gives the right to speak.
The second step of preempting the floor specifically includes:
acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located;
if the channel state of the subnet is occupied, judging whether M (M is a positive integer) preemption instructions are received within preset time, if so, preempting to take effect, sending floor locking information to other equipment of the group where the current equipment is located, and receiving preemption success information fed back by the speaking equipment;
and updating the speaking status of the current device to be the speaking right.
In this embodiment, M is 3, for example, in the intermediate speaking state, device _2 is speaking, and the current device _1 needs to notify when there is an emergency, and wants to preempt the floor of device _ 2. When the user presses the key of the current device _1 once, preemption is performed once, and the voice transmission system detects that ptt _ lock of device _1 is 1, which indicates that a certain device in the subnet is occupying the floor. To ensure that it is not a malfunction, therefore, device _1 first preemption is not in effect. And continuously pressing the key of device _1 for three times within one second of the preset time, and confirming that the preemption is effective at the moment. After the preemption is effective, device _1 sends lock data to group 1 and group 2 where it is located (i.e. lock data is sent to devices device _2 and device _3 in the two groups, and the lock data is the floor locking information), so as to tell device _2 that device _1 preempts the floor. After receiving the lock data, device _2 updates the speaking state, sets ptt _ push of device _2 to 0, and feeds backed successful preempted data (i.e. successful information of preemption) to device _ 1. After receiving the successful floor preemption, device _1 sets ptt _ push of device _1 to 1. Then, the floor is transferred from device _2 to device _1, and device _1 can speak.
In summary, in this embodiment, on the basis of the first embodiment, the floor can be preempted between the devices. Conventional emergency devices must give up one party to speak and the other party to speak normally, in which case there is no opportunity to request assistance when the other party has an emergency. According to the technical scheme of the embodiment, under the condition that one party talks, the other party in emergency can preempt the right of speaking, and the other party can speak emergently through a mutual exclusion control mechanism of voice preemption, so that the other party in emergency is assisted in time.
Example three:
the present embodiment provides a multi-packet voice transmission method based on PTT control, where on the basis of the first embodiment or the second embodiment, the method of the present embodiment further includes a step of synchronizing a state when preempting an utterance, and specifically includes:
receiving floor locking information sent when the preemption device preempts the floor, and updating the floor state of the current device to be without the floor;
generating and sending the locked information of the equipment to other equipment of the group where the current equipment is located so that the other equipment can update the speaking status to have no speaking right;
receiving notification information fed back by other equipment after the speech state is updated;
and generating and sending the successful preemption information to all the equipment in the group where the current equipment is located so that the successful preemption information is received by the preemption equipment.
In this embodiment, to realize floor preemption among devices, ptt _ push file and ptt _ lock file are set for each device. ptt _ lock is 0, which means that there is no device speaking in the subnet and the channel status is not occupied; ptt _ lock is 1, which indicates that there is a device speaking in the subnet and the channel status is occupied. ptt _ push ═ 0, meaning that the device has no floor; ptt _ push ═ 1 indicates that the device has the floor. The values for ptt _ push and ptt _ lock are typically two cases:
1) the subnet has no device to speak, and ptt _ lock of each device is 0, and ptt _ push is 0;
2) devices in the subnet speak, ptt _ lock of all devices is 1, speak device ptt _ push is 1, and other devices ptt _ push is 0.
The current device in this embodiment is a preempted party, and device _1, device _2, and device _3 are used as examples, where device _1 and device _2 belong to group 1, and device _1 and device _3 belong to group 2. As shown in fig. 5 and 6, device _1 is the current device (speaking), and device _3 is the preempting device (wanting to preempt the floor). In the current speaking process of the device _1, the device _3 has emergency and needs to be notified, and wants to preempt the floor of the device _ 1.
When the user presses the key of device _3 once, preemption is performed once, and the voice transmission system detects that ptt _ lock of device _3 is 1, which indicates that a certain device in the subnet is occupying the floor. To ensure that it is not a malfunction, therefore, device _3 first preemption is not in effect. And continuously pressing the key of the device _3 for three times within one second of the preset time, and confirming that the preemption is effective at the moment. In this embodiment, to ensure that there is no miscellaneous packet in the speech switching, after preemption is effective, state synchronization through four handshakes is required to enable successful preemption, and after successful preemption, the preempting party can speak.
After preemption is valid, device _3 sends lock data (lock data is floor lock information) to packet 2 where it is located, so as to tell current device _1(device _1 is speaking at this time), and device _3 preempts the floor.
After receiving the lock data of device _3, device _1 knows that the floor is preempted, sets ptt _ push of device _1 to 0, and sends the locked data (i.e. the locked information of the device) to other devices (i.e. devices other than current device _1 and preempted device _ 3) in the group where device _1 is located.
After receiving the locked data, device _2 updates the speaking state, sets ptt _ push of device _2 to 0, and feeds back the notifier data (namely the notification information) to device _1, thereby telling device _1 that the state of the device is synchronized.
The device _1 receives the notice data fed back by the device _2, knows that the state synchronization is completed, and then sends the submitted data (the submitted data is successful preemption information) to the device _ 3. After receiving the successful floor preemption, the preemption device _3 sets ptt _ push of the device _3 to 1 to occupy the floor.
In summary, in this embodiment, on the basis of the first embodiment or the second embodiment, the floor can be preempted between the devices. Conventional emergency devices must give up one party to speak and the other party to speak normally, in which case there is no opportunity to request assistance when the other party has an emergency. According to the technical scheme of the embodiment, under the condition that one party talks, the other party in emergency can preempt the right of speaking, and the other party can speak emergently through a mutual exclusion control mechanism of voice preemption, so that the other party in emergency is assisted in time. In addition, in this embodiment, in order to prevent a miscellaneous packet from being introduced in the talk switching process, state synchronization of each device in the subnet is realized through four-way handshaking, so that only one device talks at the same time.
EXAMPLE III
The present embodiment provides a terminal, as shown in fig. 7, including a processor 10, an input device 11, an output device 12, and a memory 13, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described in embodiment one or embodiment two or embodiment three.
It should be understood that in the embodiments of the present invention, the Processor may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device may include a display (LCD, etc.), a speaker, etc.
The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include non-volatile random access memory. For example, the memory may also store device type information.
In a specific implementation, the processor in this embodiment is configured to call the program instruction, and may execute the implementation manner described in the method in the first embodiment, the second embodiment, or the third embodiment, which is not described herein again.
Example four
The present embodiment provides a computer-readable storage medium storing a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of embodiment one or embodiment two or embodiment three.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the computer-readable storage medium described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Those of ordinary skill in the art will appreciate that the elements or steps of the various examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present application, it should be understood that the division of the steps is only one logical functional division, and there may be other division ways in actual implementation, for example, multiple steps may be combined into one step, one step may be split into multiple steps, or some features may be omitted.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (7)

1. A multi-packet voice transmission method based on PTT control is characterized by comprising the following steps:
starting a sending thread and a receiving thread for each group according to the group information of N groups added by the current equipment;
multicasting the acquired voice data to N groups respectively through N sending threads, and receiving the voice data from the N groups respectively through N receiving threads;
the method also comprises a step of preempting the floor, wherein the step of preempting the floor comprises the following first or second type;
the first step of preempting the floor specifically includes: acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located; if the channel state of the subnet is unoccupied, updating the speaking state of the current equipment to have the speaking right;
the second step of preempting the floor specifically includes: acquiring a preemption instruction of a user, and detecting the channel state of a subnet where the current equipment is located; if the channel state of the subnet is occupied, judging whether M-time preemption instructions are received within preset time, if so, preempting to take effect, sending floor locking information to other equipment of the current equipment group, and receiving preemption success information fed back by the speaking equipment; and updating the speaking status of the current device to be the speaking right.
2. The PTT control-based multi-packet voice transmission method according to claim 1, further comprising the steps of: and starting an acquisition thread and a broadcast thread for the equipment according to the working state of the equipment.
3. The PTT-control-based multi-packet voice transmission method of claim 2, wherein the multicasting the collected voice data to N packets through N sending threads respectively comprises:
collecting voice through a collection thread, and storing voice data into a buffer;
and the N sending threads multicast the voice data in the buffer to the N packets where the current equipment is located respectively.
4. The PTT-controlled multi-packet voice transmission method according to claim 2, wherein the receiving voice data from N packets by N receiving threads respectively comprises:
the N receiving threads respectively receive voice data from the N groups where the current equipment is located and store the voice data into the buffer;
and the broadcasting thread reads the voice data from the buffer and carries out voice broadcasting.
5. The method for multi-packet voice transmission based on PTT control of claim 1, further comprising a state synchronization step during preemptive speech, specifically comprising:
receiving floor locking information sent when the preemption device preempts the floor, and updating the floor state of the current device to be without the floor;
generating and sending the locked information of the equipment to other equipment of the group where the current equipment is located so that the other equipment can update the speaking status to have no speaking right;
receiving notification information fed back by other equipment after the speech state is updated;
and generating and sending the successful preemption information to all the equipment in the group where the current equipment is located so that the successful preemption information is received by the preemption equipment.
6. A terminal, characterized in that it comprises a processor, an input device, an output device and a memory, said processor, input device, output device and memory being interconnected, wherein said memory is used to store a computer program comprising program instructions, said processor being configured to invoke said program instructions to perform the method according to any of the claims 1-5.
7. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any of claims 1-5.
CN202110498922.XA 2021-05-08 2021-05-08 Multi-packet voice transmission method based on PTT control, terminal and storage medium Active CN113099397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110498922.XA CN113099397B (en) 2021-05-08 2021-05-08 Multi-packet voice transmission method based on PTT control, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110498922.XA CN113099397B (en) 2021-05-08 2021-05-08 Multi-packet voice transmission method based on PTT control, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113099397A CN113099397A (en) 2021-07-09
CN113099397B true CN113099397B (en) 2022-05-17

Family

ID=76664210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110498922.XA Active CN113099397B (en) 2021-05-08 2021-05-08 Multi-packet voice transmission method based on PTT control, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113099397B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114554252A (en) * 2022-02-17 2022-05-27 儒安物联科技集团有限公司 QoE modeling method adaptive to user diversity

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825989A (en) * 2005-02-24 2006-08-30 华为技术有限公司 Method for implementing pushing-and speaking completing to occupy service
CN101159929A (en) * 2007-10-23 2008-04-09 中兴通讯股份有限公司 Method of implementing cluster session in digital cluster communication system
CN109792586A (en) * 2016-10-07 2019-05-21 高通股份有限公司 Groupcall service is accessed by broadcast channel

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8150922B2 (en) * 2002-07-17 2012-04-03 Research In Motion Limited Voice and text group chat display management techniques for wireless mobile terminals
US7724743B2 (en) * 2005-03-31 2010-05-25 Qualcomm Incorporated System and method for distributing VoIP data packets in group communications amoung wireless telecommunication devices
CN100370849C (en) * 2005-09-05 2008-02-20 华为技术有限公司 Method and device of processing PoC speak request
CN101527885A (en) * 2008-03-03 2009-09-09 深圳市艾派应用***有限公司 Method and system for processing PoC service
US8655833B2 (en) * 2008-06-17 2014-02-18 Qualcomm Incorporated Database architecture for supporting group communications among wireless communication devices
CN102916939A (en) * 2012-09-17 2013-02-06 惠州Tcl移动通信有限公司 Implementation method and implementation system of PTT (push-to-talk) call based on VOIP (voice over internet protocol) technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825989A (en) * 2005-02-24 2006-08-30 华为技术有限公司 Method for implementing pushing-and speaking completing to occupy service
CN101159929A (en) * 2007-10-23 2008-04-09 中兴通讯股份有限公司 Method of implementing cluster session in digital cluster communication system
CN109792586A (en) * 2016-10-07 2019-05-21 高通股份有限公司 Groupcall service is accessed by broadcast channel

Also Published As

Publication number Publication date
CN113099397A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US8249235B2 (en) Conference call prioritization
US10732924B2 (en) Teleconference recording management system
CN102694665A (en) Notifying participants that a conference is starting
KR20160025875A (en) Method for extending participants of video conference service
AU2010342701B2 (en) Method and device for switching video pictures
EP1858241A2 (en) Audio teleconference system with wireless communication portable terminals
KR102188537B1 (en) Method and system for group call using unicast and multicast
JP3638146B2 (en) Video conference system, terminal used therefor, connection control method, and connection control program
CN113099397B (en) Multi-packet voice transmission method based on PTT control, terminal and storage medium
WO2022017007A1 (en) Audio data processing method, server, and storage medium
JPWO2008126259A1 (en) COMMUNICATION SYSTEM, SERVER DEVICE, COMMUNICATION TERMINAL DEVICE, AND COMPUTER PROGRAM
JP2009016907A (en) Conference system
US10848530B2 (en) Conference system and method for interworking between audio conference and web conference
CN107666396B (en) Multi-terminal conference processing method and device
WO2012133860A1 (en) Remote conference system
US11089164B2 (en) Teleconference recording management system
CN111355919B (en) Communication session control method and device
JPH10190850A (en) Method and device for pausing and restarting live voice signal
US11516586B2 (en) Contextual latency configuration for isochronous audio transport
KR102505345B1 (en) System and method for removal of howling and computer program for the same
US20240129432A1 (en) Systems and methods for enabling a smart search and the sharing of results during a conference
WO2023181886A1 (en) Conference support device and conference support method
JP2008108122A (en) Information processor
CN116781855A (en) Conference control method and device, server and system
CN112751978A (en) Sound amplification control method and mobile terminal

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