CN110072011B - Method for adjusting code rate and related product - Google Patents

Method for adjusting code rate and related product Download PDF

Info

Publication number
CN110072011B
CN110072011B CN201910335688.1A CN201910335688A CN110072011B CN 110072011 B CN110072011 B CN 110072011B CN 201910335688 A CN201910335688 A CN 201910335688A CN 110072011 B CN110072011 B CN 110072011B
Authority
CN
China
Prior art keywords
code rate
target
preset
adjusting
voice data
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
CN201910335688.1A
Other languages
Chinese (zh)
Other versions
CN110072011A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910335688.1A priority Critical patent/CN110072011B/en
Publication of CN110072011A publication Critical patent/CN110072011A/en
Application granted granted Critical
Publication of CN110072011B publication Critical patent/CN110072011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a method for adjusting code rate and a related product, wherein the electronic equipment comprises a Bluetooth communication module, and the method comprises the following steps: in the process of carrying out Bluetooth voice call through the Bluetooth communication module, acquiring preset parameters of the electronic equipment, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call; dynamically adjusting the code rate of a vocoder according to the preset parameters; encoding the original voice data according to the adjusted code rate to obtain target voice data; and sending the target voice data to opposite terminal equipment through the Bluetooth communication module. The method and the device are beneficial to improving the intelligence and the accuracy of the electronic equipment in the code rate adjusting process.

Description

Method for adjusting code rate and related product
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method for adjusting a code rate and a related product.
Background
At present, mobile communication between a mobile phone and teammates or friends cannot be carried out under the conditions that mobile networks are not covered or mobile network systems are limited in places such as outdoor hiking, geological disaster areas, foreign group tourism, airport gateways and the like. Then, by using the Bluetooth function of the mobile phone, the mobile phones among teammates/friends establish a communication channel through the Bluetooth long-distance technology, so that long-distance voice telephone communication is realized. However, bluetooth BLE voice telephone communication is far away, and voice call quality is poor when BLE network is poor, and normal voice call cannot be carried out.
Disclosure of Invention
The embodiment of the application provides a method for adjusting code rate and a related product, and the method is beneficial to improving the intelligence and the accuracy of an electronic device in the process of adjusting the code rate.
In a first aspect, an embodiment of the present application provides a method for adjusting a code rate, where the method is applied to an electronic device including a bluetooth communication module, and the method includes:
in the process of carrying out Bluetooth voice call through the Bluetooth communication module, acquiring preset parameters of the electronic equipment, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
dynamically adjusting the code rate of a vocoder according to the preset parameters;
encoding the original voice data according to the adjusted code rate to obtain target voice data;
and sending the target voice data to opposite terminal equipment through the Bluetooth communication module.
In a second aspect, an embodiment of the present application provides a device for adjusting a bit rate, where the device is applied to an electronic device that includes a bluetooth communication module, and the device for adjusting a bit rate includes:
the acquisition unit is used for acquiring preset parameters of the electronic equipment in the process of carrying out Bluetooth voice call through the Bluetooth communication module, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
the adjusting unit is used for dynamically adjusting the code rate of the vocoder according to the preset parameters;
the coding unit is used for coding the original voice data according to the adjusted code rate to obtain target voice data;
and the sending unit is used for sending the target voice data to opposite-end equipment through the Bluetooth communication module.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for some or all of the steps as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is used to make a computer execute some or all of the steps described in the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
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 structural diagram of a system for adjusting a code rate according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for adjusting a code rate according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another method for adjusting a code rate according to an embodiment of the present application;
fig. 4 is a flowchart illustrating another method for adjusting a code rate according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of an apparatus for adjusting a bit rate according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, 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.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic devices involved in the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal equipment (terminal device), and so on. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
The following describes embodiments of the present application in detail.
Please refer to fig. 1, fig. 1 is a schematic structural diagram of a system for adjusting a code rate according to an embodiment of the present disclosure, in an embodiment of the present disclosure, the system for adjusting a code rate may include at least two electronic devices, each of the electronic devices includes at least one wireless radio frequency transceiver module of a LoRa module, a Sigfox module, a bluetooth5.0 module, a WIFI module, and a mobile data module, and any two electronic devices in the system for adjusting a code rate may be communicatively connected, for example, may be communicatively connected through the LoRa module, through the Sigfox module, through the bluetooth5.0 module, through the WIFI module, or through the mobile data module.
Among them, Long Range (LoRa) technology is one Of low power consumption wide area communication, and may support a Time Of Flight (TOF) function. The TOF function is used for measuring the distance between two objects, is an ultra-long distance wireless transmission technology based on a spread spectrum technology, and has the advantages of low power consumption, wide coverage range and strong penetrability compared with the similar technology.
The ultra narrow band (Sigfox) technology is also one of low power consumption wide area communications, and radio information exchange can be performed on a 200kHz frequency band of a public frequency band. Each message has a width of 100Hz and transmits 100 or 600 bits of data per second, depending on the region. Therefore, long-distance communication can be realized while resisting noise.
Among them, Bluetooth5.0 is a new generation Bluetooth standard issued by Bluetooth Special Interest Group in 2016, and its transmission distance is longer and speed is faster than the previous generation Bluetooth 4.2. The theoretical effective distance is 300 meters, i.e. the mobile devices in the whole home or office can be stably connected. The fastest speed can reach 2Mbps, so that Bluetooth equipment with faster response and higher performance is more likely to be used. In addition, it has still strengthened the data transmission of bluetooth broadcast by a wide margin, can bring better prospect for commercial bluetooth, and it is more powerful to let the thing networking application that uses the bluetooth as standard.
The electronic device may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and so on.
The following describes embodiments of the present application in detail.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for adjusting a code rate according to an embodiment of the present application, where the method for adjusting a code rate described in the embodiment is applied to an electronic device as shown in fig. 1, and the method for adjusting a code rate includes:
s201, in the process of carrying out Bluetooth voice call through the Bluetooth communication module, the electronic equipment acquires preset parameters of the electronic equipment, wherein the preset parameters comprise at least one of the following parameters: the change trend of the distance between the electronic equipment and the equipment at the opposite end of the call, the distance parameter and the signal quality.
The preset parameters may further include a signal-to-noise ratio, a channel quality, an output power, a total harmonic, and the like, which are not limited herein.
S202, the electronic equipment dynamically adjusts the code rate of the vocoder according to the preset parameters.
Wherein, the code rate of the vocoder is the coding code rate.
Wherein the dynamic adjustment may adjust a high code rate to a low code rate or a low code rate to a low code rate.
S203, the electronic equipment encodes the original voice data according to the adjusted code rate to obtain target voice data.
And S204, the electronic equipment sends the target voice data to opposite-end equipment through the Bluetooth communication module.
Optionally, detecting the target voice data; judging whether blank voice data exists in the target voice data or not; and if the blank voice data exists, readjusting the code rate of the vocoder.
It can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
In one possible example, the preset parameter includes a trend of a change in a distance between the electronic device and a device at the opposite end of the call, and the dynamically adjusting the code rate of the vocoder according to the preset parameter includes: detecting the variation trend of the distance between the electronic equipment and the opposite-end equipment for communication; adjusting the step length according to the change trend; querying a preset database to obtain a target code rate corresponding to the adjusted step length, wherein the preset database comprises a mapping relation between the step length and the code rate; and updating the code rate of the vocoder according to the target code rate.
The mapping relationship between the step size and the code rate may include, but is not limited to, one-to-one, one-to-many, many-to-many, and the like, and is not limited herein.
For example, when the electronic device detects that the variation trend is increasing or decreasing in the first time period, the code rate starts to be adjusted, if the step size is reduced by one step size every 5 meters, the corresponding target code rate is found according to the step size, and the target code rate is updated. The step length can be obtained by analyzing and calculating historical data, that is, the relationship between the step length and the change trend of the distance can be obtained by analyzing and calculating the historical data.
Therefore, in this example, in the process of performing the bluetooth call, the step length is changed based on the change trend of the distance, and then the code rate of the vocoder is dynamically adjusted, thereby avoiding the occurrence of delay and packet loss caused by poor call quality in the bluetooth call process, and being beneficial to improving the intelligence and accuracy of the electronic device in adjusting the code rate.
In one possible example, the adjusting the step size according to the variation trend includes: analyzing the change stage of the change trend according to historical data; and determining the corresponding step length according to the change stage.
The change stage may be dynamically adjusted according to the location of the electronic device, for example, in a remote mountain area, one stage with five step lengths, in a busy urban area, one stage with three step lengths, and the like, which is not limited herein.
Therefore, in this example, the electronic device dynamically adjusts the step lengths under different transformation trends according to different variation trends, so as to flexibly adjust the code rate, ensure that good call quality can be provided under any circumstances, and be beneficial to improving the intelligence and flexibility of the electronic device in adjusting the code rate.
In one possible example, the preset parameter includes signal quality, and the dynamically adjusting the code rate of the vocoder according to the preset parameter includes: detecting the current signal quality; scoring according to the signal quality to obtain a target score; and adjusting the code rate of the vocoder according to the target score.
The scoring can be performed according to a preset scoring calculation strategy, and the preset scoring calculation strategy can be obtained by integrating semantic analysis, interruption times, noise ratio and the like of the call records, and is not limited uniquely here.
Optionally, the electronic device queries a preset score-code rate list according to the target score, obtains a corresponding code rate according to the preset score-code rate list, and adjusts the code rate.
For example, the electronic device scores the current signal quality according to the number of times of interruption of the bluetooth call, and if the bluetooth call is interrupted for 5 times within ten minutes, the score of the current signal quality is 50 minutes, the code rate of the vocoder is changed from the high code rate to the low code rate.
Therefore, in this example, the electronic device may score according to the quality of the signal, and dynamically adjust the code rate of the vocoder according to the score, that is, timely determine the network state of the current electronic device, and perform timely response, which is beneficial to improving the intelligence and flexibility of the electronic device in adjusting the code rate.
In one possible example, the preset parameter includes a distance parameter, and the dynamically adjusting the code rate of the vocoder according to the preset parameter includes: acquiring a target position of the current electronic equipment; determining a target range of the distance parameter according to the target position; acquiring a first distance from a first terminal to an opposite terminal; if the first distance exceeds the target range, inquiring a code rate-distance list to obtain a target code rate; and updating the code rate of the vocoder according to the target code rate.
The corresponding relation between the target position and the target range of the distance parameter can be preset, and the target range of the distance parameter is dynamically changed according to the specific situation of the current position.
The data in the code rate-distance list can be obtained through historical data statistics or can be customized according to a factory manufacturer at the time of factory shipment, and the data is not limited uniquely here.
Therefore, in this example, the electronic device dynamically adjusts according to different distance parameters to obtain different code rates, which is beneficial to more flexibly adjusting the code rates when the electronic device is in a motion state, and improves intelligence and flexibility of the electronic device in the process of adjusting the code rates.
In one possible example, after the dynamically adjusting the code rate of the vocoder according to the preset parameter, the method further comprises: continuously monitoring the adjusted code rate; if the adjusted code rate is not within the preset threshold range, performing secondary adjustment to obtain a reference code rate; and setting the reference code rate in a preset time length for updating.
The preset threshold range may be obtained according to historical data, obtained according to big data analysis, or determined by a manufacturer at the time of factory shipment, and is not limited uniquely here.
The preset duration can be obtained according to historical data, obtained according to big data analysis or determined by a manufacturer when leaving a factory, and is not limited uniquely here.
Therefore, in this example, the electronic device avoids the influence of frequent switching on the interruption of the voice call by monitoring the code rate and adjusting the switching time, that is, after the time length between two times of switching with different code rates is set to be longer than a certain time length, the switching is allowed, so that the intelligence and flexibility in the process of adjusting the code rate can be improved.
In a possible example, after the original speech data is encoded according to the adjusted code rate to obtain the target speech data, the method further includes: determining the type of the target voice data; acquiring a code rate corresponding to the data type of the target voice data as a target code rate according to the preset corresponding relation between the type of the voice data and the code rate; and acquiring a code rate range of the target code rate as a preset code rate threshold range.
The different types of voice data may correspond to different coding rates, and a correspondence between the types of the voice data and the coding rates is preset and stored in the electronic device, where the correspondence may be one-to-one, one-to-many, or many-to-many, and is not limited herein.
The coding rate corresponding to the type with higher requirement on the real-time performance can be lower than the coding rate of the type with higher requirement on the tone quality, and particularly, the coding rate corresponding to the different types can be obtained according to the big data.
Optionally, when the bluetooth voice call of the electronic device is started, the encoding rate corresponding to the type of the voice data is greater than a preset code rate threshold; and when the Bluetooth voice call is disconnected, the encoding rate corresponding to the type of the voice data is smaller than a preset code rate threshold value.
Therefore, in this example, the electronic device flexibly adjusts different code rates according to different voice data types, and further obtains a preset code rate threshold range during secondary adjustment, which is beneficial to intelligence and accuracy in the process of adjusting the code rate.
Referring to fig. 3, fig. 3 is a schematic flowchart of a method for adjusting a bit rate according to an embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a bluetooth communication module. As shown in the figure, the method for adjusting the code rate includes:
s301, in the process of carrying out Bluetooth voice call through the Bluetooth communication module, the electronic equipment acquires preset parameters of the electronic equipment.
S302, the electronic equipment detects the variation trend of the distance between the electronic equipment and the opposite-end equipment for communication.
And S303, the electronic equipment adjusts the step length according to the change trend.
S304, the electronic equipment queries a preset database to obtain the target code rate corresponding to the adjusted step length, wherein the preset database comprises a mapping relation between the step length and the code rate.
S305, the electronic equipment updates the code rate of the vocoder according to the target code rate.
S306, the electronic equipment encodes the original voice data according to the adjusted code rate to obtain target voice data.
S307, the electronic device sends the target voice data to the opposite terminal device through the Bluetooth communication module.
It can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
In addition, in the process of Bluetooth communication of the electronic equipment, the step length is changed based on the change trend of the distance, so that the code rate of the vocoder is dynamically adjusted, the situations of delay and packet loss caused by poor communication quality in the Bluetooth communication process are avoided, and the intelligence and the accuracy of the electronic equipment for adjusting the code rate are improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a method for adjusting a bit rate according to an embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a bluetooth communication module. As shown in the figure, the method for adjusting the code rate includes:
s401, in the process of carrying out Bluetooth voice call through the Bluetooth communication module, the electronic equipment acquires preset parameters of the electronic equipment.
S402, the electronic equipment acquires the current target position of the electronic equipment.
S403, the electronic equipment determines a target range of the distance parameter according to the target position.
S404, the electronic equipment acquires a first distance from the first terminal to the opposite terminal.
S405, if the first distance exceeds a target range, the electronic equipment queries a code rate-distance list to obtain a target code rate.
S406, the electronic device updates the code rate of the vocoder according to the target code rate.
S407, the electronic device continuously monitors the adjusted code rate.
And S408, if the adjusted code rate is not within the preset threshold range, the electronic equipment performs secondary adjustment to obtain a reference code rate.
And S409, the electronic equipment sets the reference code rate in a preset time length for updating.
S410, the electronic equipment encodes the original voice data according to the adjusted code rate to obtain target voice data.
S411, the electronic device sends the target voice data to the opposite terminal device through the Bluetooth communication module.
It can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
In addition, the electronic equipment dynamically adjusts according to different distance parameters to obtain different code rates, so that the code rates can be adjusted more flexibly when the electronic equipment is in a motion state, and the intelligence and flexibility of the electronic equipment in the process of adjusting the code rates are improved.
In addition, the electronic equipment avoids the influence of frequent switching on the interruption of voice communication by monitoring the code rate and adjusting the switching time, namely, the switching is allowed only after the time length between two times of switching with different code rates is set to be longer than a certain time length, so that the intelligence and flexibility in the process of adjusting the code rate can be improved.
Consistent with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, and fig. 5 is a schematic structural diagram of an electronic device 500 provided in an embodiment of the present application, as shown in the figure, the electronic device 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for:
in the process of carrying out Bluetooth voice call through the Bluetooth communication module, acquiring preset parameters of the electronic equipment, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
dynamically adjusting the code rate of a vocoder according to the preset parameters;
encoding the original voice data according to the adjusted code rate to obtain target voice data;
and sending the target voice data to opposite terminal equipment through the Bluetooth communication module.
It can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
In one possible example, the preset parameter includes a trend of a change in a distance between the electronic device and a device at the opposite end of a call, and in the aspect of dynamically adjusting a code rate of a vocoder according to the preset parameter, the program includes instructions for performing the following steps: detecting the variation trend of the distance between the electronic equipment and the opposite-end equipment for communication; adjusting the step length according to the change trend; querying a preset database to obtain a target code rate corresponding to the adjusted step length, wherein the preset database comprises a mapping relation between the step length and the code rate; and updating the code rate of the vocoder according to the target code rate.
In one possible example, in said adjusting the step size by said trend of change, said program comprises instructions for performing the following steps: analyzing the change stage of the change trend according to historical data; and determining the corresponding step length according to the change stage.
In one possible example, the preset parameter comprises a signal quality, and in the aspect of dynamically adjusting the code rate of the vocoder according to the preset parameter, the program comprises instructions for: detecting the current signal quality; scoring according to the signal quality to obtain a target score; and adjusting the code rate of the vocoder according to the target score.
In one possible example, the preset parameter comprises a distance parameter, and in the aspect of dynamically adjusting the code rate of the vocoder according to the preset parameter, the program comprises instructions for: acquiring a target position of the current electronic equipment; determining a target range of the distance parameter according to the target position; acquiring a first distance from a first terminal to an opposite terminal; if the first distance exceeds the target range, inquiring a code rate-distance list to obtain a target code rate; and updating the code rate of the vocoder according to the target code rate.
In one possible example, after said dynamically adjusting the code rate of the vocoder according to said preset parameters, said program further comprises instructions for performing the steps of: continuously monitoring the adjusted code rate; if the adjusted code rate is not within the preset threshold range, performing secondary adjustment to obtain a reference code rate; and setting the reference code rate in a preset time length for updating.
In one possible example, after the encoding the original speech data at the adjusted code rate to obtain the target speech data, the program further includes instructions for performing the following steps: determining the type of the target voice data; acquiring a code rate corresponding to the data type of the target voice data as a target code rate according to the preset corresponding relation between the type of the voice data and the code rate; and acquiring a code rate range of the target code rate as a preset code rate threshold range.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. 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 application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
The following is an embodiment of the apparatus of the present invention, which is used to perform the method implemented by the embodiment of the method of the present invention. The apparatus 600 for adjusting code rate shown in fig. 6 is applied to an electronic device, the electronic device includes a bluetooth communication module, the apparatus 600 for adjusting code rate includes an obtaining unit 601, an adjusting unit 602, an encoding unit 603, and a transmitting unit 604, wherein,
the obtaining unit 601 is configured to obtain preset parameters of the electronic device in a process of performing a bluetooth voice call through the bluetooth communication module, where the preset parameters include at least one of the following: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
the adjusting unit 602 is configured to dynamically adjust a code rate of the vocoder according to the preset parameter;
the encoding unit 603 is configured to encode the original speech data according to the adjusted code rate to obtain target speech data;
the sending unit 604 is configured to send the target voice data to an opposite device through the bluetooth communication module.
It can be seen that the method for adjusting a code rate and the related product described in the embodiments of the present application are applied to an electronic device, where the electronic device includes a bluetooth communication module, and first, in a process of performing a bluetooth voice call through the bluetooth communication module, a preset parameter of the electronic device is obtained, where the preset parameter includes at least one of: the method comprises the steps of obtaining a target voice data, and sending the target voice data to an opposite terminal device through a Bluetooth communication module. Therefore, the electronic equipment monitors the preset parameters in real time in the process of carrying out the Bluetooth voice call, and adjusts the code rate of the vocoder in time, thereby effectively avoiding the conditions of delay, packet loss and the like in the Bluetooth voice call, ensuring that the best voice quality can be provided in any network scene, and being beneficial to improving the intelligence and the accuracy of the electronic equipment in the process of adjusting the code rate.
In a possible example, the preset parameter includes a variation trend of a distance between the electronic device and a device at the opposite end of a call, and in terms of dynamically adjusting a code rate of a vocoder according to the preset parameter, the adjusting unit 602 is specifically configured to: detecting the variation trend of the distance between the electronic equipment and the opposite-end equipment for communication; adjusting the step length according to the change trend; querying a preset database to obtain a target code rate corresponding to the adjusted step length, wherein the preset database comprises a mapping relation between the step length and the code rate; and updating the code rate of the vocoder according to the target code rate.
In a possible example, in terms of the adjusting the step size according to the variation trend, the adjusting unit 602 is specifically configured to: analyzing the change stage of the change trend according to historical data; and determining the corresponding step length according to the change stage.
In a possible example, the preset parameter includes signal quality, and in terms of the dynamically adjusting the code rate of the vocoder according to the preset parameter, the adjusting unit 602 is specifically configured to: detecting the current signal quality; scoring according to the signal quality to obtain a target score; and adjusting the code rate of the vocoder according to the target score.
In a possible example, the preset parameter includes a distance parameter, and in terms of the dynamically adjusting the code rate of the vocoder according to the preset parameter, the adjusting unit 602 is specifically configured to: acquiring a target position of the current electronic equipment; determining a target range of the distance parameter according to the target position; acquiring a first distance from a first terminal to an opposite terminal; if the first distance exceeds the target range, inquiring a code rate-distance list to obtain a target code rate; and updating the code rate of the vocoder according to the target code rate.
In a possible example, after the dynamically adjusting the code rate of the vocoder according to the preset parameter, the adjusting unit 602 is further specifically configured to: continuously monitoring the adjusted code rate; if the adjusted code rate is not within the preset threshold range, performing secondary adjustment to obtain a reference code rate; and setting the reference code rate in a preset time length for updating.
In a possible example, after the original speech data is encoded according to the adjusted code rate to obtain the target speech data, the encoding unit 603 is specifically configured to: determining the type of the target voice data; acquiring a code rate corresponding to the data type of the target voice data as a target code rate according to the preset corresponding relation between the type of the voice data and the code rate; and acquiring a code rate range of the target code rate as a preset code rate threshold range.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods for adjusting a bit rate as described in the above method embodiments.
Embodiments of the present application further provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform part or all of the steps of any one of the methods for adjusting a bit rate as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, 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 memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A method for adjusting code rate, applied to an electronic device, wherein the electronic device includes a Bluetooth communication module, the method comprising:
in the process of carrying out Bluetooth voice call through the Bluetooth communication module, acquiring preset parameters of the electronic equipment, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
dynamically adjusting the code rate of a vocoder according to the preset parameters;
encoding the original voice data according to the adjusted code rate to obtain target voice data;
the target voice data is sent to opposite terminal equipment through the Bluetooth communication module;
after the dynamically adjusting the code rate of the vocoder according to the preset parameters, the method further comprises:
continuously monitoring the adjusted code rate;
if the adjusted code rate is not within the preset threshold range, performing secondary adjustment to obtain a reference code rate;
setting the reference code rate in a preset time length for updating;
after the original voice data is encoded according to the adjusted code rate to obtain the target voice data, the method further comprises:
determining the type of the target voice data;
acquiring a code rate corresponding to the data type of the target voice data as a target code rate according to the preset corresponding relation between the type of the voice data and the code rate;
and acquiring a code rate range of the target code rate as a preset code rate threshold range.
2. The method of claim 1, wherein the preset parameter includes a trend of a change in a distance between the electronic device and a device at the opposite end of the call, and the dynamically adjusting the code rate of the vocoder according to the preset parameter includes:
detecting the variation trend of the distance between the electronic equipment and the opposite-end equipment for communication;
adjusting the step length according to the change trend;
querying a preset database to obtain a target code rate corresponding to the adjusted step length, wherein the preset database comprises a mapping relation between the step length and the code rate;
and updating the code rate of the vocoder according to the target code rate.
3. The method of claim 2, wherein the adjusting the step size by the trend of change comprises:
analyzing the change stage of the change trend according to historical data;
and determining the corresponding step length according to the change stage.
4. The method of claim 1, wherein the predetermined parameter comprises signal quality, and wherein dynamically adjusting the code rate of the vocoder according to the predetermined parameter comprises:
detecting the current signal quality;
scoring according to the signal quality to obtain a target score;
and adjusting the code rate of the vocoder according to the target score.
5. The method of claim 1, wherein the predetermined parameter comprises a distance parameter, and wherein dynamically adjusting the code rate of the vocoder according to the predetermined parameter comprises:
acquiring a target position of the current electronic equipment;
determining a target range of the distance parameter according to the target position;
acquiring a first distance from a first terminal to an opposite terminal;
if the first distance exceeds the target range, inquiring a code rate-distance list to obtain a target code rate;
and updating the code rate of the vocoder according to the target code rate.
6. The device for adjusting the code rate is applied to an electronic device, the electronic device comprises a Bluetooth communication module, and the device for adjusting the code rate comprises:
the acquisition unit is used for acquiring preset parameters of the electronic equipment in the process of carrying out Bluetooth voice call through the Bluetooth communication module, wherein the preset parameters comprise at least one of the following parameters: the change trend, the distance parameter and the signal quality of the distance between the electronic equipment and the equipment at the opposite end of the call;
the adjusting unit is used for dynamically adjusting the code rate of the vocoder according to the preset parameters;
the coding unit is used for coding the original voice data according to the adjusted code rate to obtain target voice data;
the transmitting unit is used for transmitting the target voice data to opposite-end equipment through the Bluetooth communication module;
the adjusting unit is further configured to continuously monitor the adjusted code rate; if the adjusted code rate is not within the preset threshold range, performing secondary adjustment to obtain a reference code rate; setting the reference code rate in a preset time length for updating;
an encoding unit further configured to determine a type of the target speech data; acquiring a code rate corresponding to the data type of the target voice data as a target code rate according to the preset corresponding relation between the type of the voice data and the code rate; and acquiring a code rate range of the target code rate as a preset code rate threshold range.
7. An electronic device, comprising: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the method of any of claims 1-5.
8. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN201910335688.1A 2019-04-24 2019-04-24 Method for adjusting code rate and related product Active CN110072011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910335688.1A CN110072011B (en) 2019-04-24 2019-04-24 Method for adjusting code rate and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910335688.1A CN110072011B (en) 2019-04-24 2019-04-24 Method for adjusting code rate and related product

Publications (2)

Publication Number Publication Date
CN110072011A CN110072011A (en) 2019-07-30
CN110072011B true CN110072011B (en) 2021-07-20

Family

ID=67368786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910335688.1A Active CN110072011B (en) 2019-04-24 2019-04-24 Method for adjusting code rate and related product

Country Status (1)

Country Link
CN (1) CN110072011B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110689899A (en) * 2019-09-17 2020-01-14 重庆百瑞互联电子技术有限公司 Dynamic adjustment method and system for Bluetooth audio
CN116437329A (en) * 2019-12-25 2023-07-14 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and terminal equipment
CN112135282A (en) * 2020-09-25 2020-12-25 北京百瑞互联技术有限公司 Bluetooth Mesh network voice intercom method, system and storage medium
CN114244383B (en) * 2021-12-27 2023-06-09 东莞市阿尔法电子科技有限公司 Signal processing method, system, bluetooth headset and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530449A (en) * 2014-09-30 2016-04-27 阿里巴巴集团控股有限公司 Coding parameter adjusting method and device
WO2016191989A1 (en) * 2015-05-30 2016-12-08 华为技术有限公司 Method and device for adjusting voice coding rate
CN107170460A (en) * 2017-06-30 2017-09-15 深圳Tcl新技术有限公司 Sound quality adjusting method, system, host side and storage medium
CN109041024A (en) * 2018-08-14 2018-12-18 Oppo广东移动通信有限公司 Optimization of rate method, apparatus, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617797A (en) * 2013-12-09 2014-03-05 腾讯科技(深圳)有限公司 Voice processing method and device
CN109151861A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Encoding rate method of adjustment, device and electronic equipment
CN109102816B (en) * 2018-08-14 2020-12-29 Oppo广东移动通信有限公司 Encoding control method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530449A (en) * 2014-09-30 2016-04-27 阿里巴巴集团控股有限公司 Coding parameter adjusting method and device
WO2016191989A1 (en) * 2015-05-30 2016-12-08 华为技术有限公司 Method and device for adjusting voice coding rate
CN107170460A (en) * 2017-06-30 2017-09-15 深圳Tcl新技术有限公司 Sound quality adjusting method, system, host side and storage medium
CN109041024A (en) * 2018-08-14 2018-12-18 Oppo广东移动通信有限公司 Optimization of rate method, apparatus, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110072011A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN110072011B (en) Method for adjusting code rate and related product
CN107820723B (en) Frequency selection method, random access method and device
US20200145890A1 (en) Channel switching method and apparatus, and communication device
US10187858B2 (en) System for boosting a network signal, and the method thereof
US20140092889A1 (en) Method and Apparatus for Providing Location-Aware Wi-Fi Access
CN107666366B (en) Method, device and system for adjusting coding rate
CN110149167B (en) Method and device for dynamically adjusting codes, mobile terminal and storage medium
CN110445511B (en) Self-adaptive synchronous frequency hopping method and device, wireless AP and communication system
CN108712778B (en) Channel selection method and related product
US10142388B2 (en) Method and device for transmitting media data
CN106993317B (en) SSID (service set identifier) selection method and device based on dual-frequency wireless router
CN105723629A (en) Relay node aggregation of data transfers in a wireless telecommunication system
US11606725B2 (en) Wireless band priority metrics analysis and response
CN113783877B (en) Voice calling method and system based on VoNR
KR20160027076A (en) Uplink power control method and device thereof
Fiandrino et al. Network-assisted offloading for mobile cloud applications
CN110234169B (en) Communication interference adjustment control method and related product
CN108605263B (en) Device-to-device based communication method and terminal
US11382016B2 (en) Communication system, base station, and control method
CN109982395B (en) Method and device for configuring switching parameters
CN109565677B (en) Network capacity adjusting method and network equipment
CN103167567A (en) Method and device for mobile terminal to switch base stations
CN103796333A (en) Data communication method, terminal and system
CN111770530B (en) Data transmission method and related equipment
KR102027853B1 (en) Apparatus and method for adjusting mobile resource

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