Dialogue data online transmission method and device, equipment and storage medium
By acquiring environmental noise and movement speed data of smart wearable devices, combining this with communication bandwidth to determine the scene type, and formulating data compensation strategies, the instability of online voice transmission for smart wearable devices was resolved, resulting in a stable and clear voice interaction experience.
Patent Information
- Application Number
- CN202511381714.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-09-25
AI Technical Summary
In existing technologies, online voice transmission of smart wearable devices is affected by environmental noise and differences in Bluetooth link stability, resulting in unstable transmission and making it difficult to meet users' requirements for smoothness and clarity in online conversations.
By acquiring environmental noise, movement speed, and communication bandwidth of smart wearable devices, the scene type is determined, and a data compensation strategy is formulated based on the scene type and communication bandwidth to optimize voice data processing and ensure that voice data transmission is adapted to the current environment and bandwidth.
It achieves stable and clear voice interaction in complex environments and under bandwidth fluctuations, improving the online dialogue experience of smart wearable devices and meeting users' daily communication needs.
Smart Images

Figure CN121122299A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data transmission, and more particularly to an online conversation data transmission method and device, equipment and storage medium. BACKGROUND
[0002] With the popularity of smart glasses, smart helmets and other smart wearable devices, online voice conversations based on such devices have become an important communication method. In online conversations, users can interact with others in real time through smart wearable devices.
[0003] However, in actual applications, the voice transmission effect is affected by multiple environmental factors: on the one hand, environmental noise directly affects the intelligibility of speech; on the other hand, the scene when the user wears the smart wearable device is complex and diverse, the stability of the Bluetooth link is quite different in different scenes, and the Bluetooth communication bandwidth fluctuates dynamically, resulting in unstable transmission and easy data transmission delay or packet loss.
[0004] In the prior art, fixed processing strategies are often used for voice transmission, such as uniform coding format and fixed noise reduction parameters, which cannot adapt to complex environmental changes and are difficult to meet the user's demand for smoothness and clarity of online conversations. Therefore, how to provide a conversation data online transmission method that can adapt to environmental changes has become a technical problem to be solved in the field. SUMMARY
[0005] The purpose of the present application is to provide an online conversation data transmission method and device, equipment and storage medium to adapt to complex environmental changes and improve the smoothness and clarity of online conversations.
[0006] The first aspect of the embodiment of the present application provides an online conversation data transmission method, comprising: obtaining the environmental noise, the moving speed and the communication bandwidth of the smart wearable device; the smart wearable device is in communication connection with a first device; the first device is used to receive voice data sent by a second device and transmit the voice data to the smart wearable device; determining the scene type based on the environmental noise and the moving speed; determining a data compensation strategy based on the scene type and the communication bandwidth, processing the voice data based on the data compensation strategy to obtain to-be-transmitted data, and transmitting the to-be-transmitted data to the smart wearable device.
[0007] The second aspect of the embodiment of the present application provides an online conversation data transmission device, comprising: The data acquisition module is configured to obtain the environmental noise, the moving speed and the communication bandwidth of the smart wearable device; the smart wearable device is in communication connection with a first device; the first device is used to receive voice data sent by a second device and transmit the voice data to the smart wearable device; a scene recognition module configured to determine a scene type based on ambient noise and moving speed; a dialogue data transmission module configured to determine a data compensation strategy based on the scene type and communication bandwidth, process voice data based on the data compensation strategy, obtain to-be-transmitted data, and transmit the to-be-transmitted data to the smart wearable device.
[0008] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the dialogue data online transmission method described above are implemented.
[0009] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the dialogue data online transmission method described above are implemented.
[0010] The dialogue data online transmission method and device, the electronic device, and the storage medium provided by the embodiments of the present application have the following beneficial effects: The embodiments of the present application do not use the fixed processing mode of the unified noise reduction parameter in the prior art, but first acquire noise data of the environment in which the smart wearable device is located, and simultaneously combines the moving speed of the user when wearing the device, to determine the current actual scene type through both, so that the subsequent data processing can accurately match the noise interference degree in the current scene, avoiding the problem of insufficient effect in a noisy environment and excessive processing leading to voice distortion in a quiet environment due to the fixed noise reduction parameter, thereby ensuring voice intelligibility from the source.
[0011] The embodiments of the present application do not use the transmission logic of the fixed coding format in the prior art, but further combine real-time communication bandwidth data between the smart wearable device and the first device on the basis of determining the scene type, to formulate a targeted data compensation strategy, meet the dialogue transmission requirements in different scenes, and balance voice quality and transmission efficiency, thereby avoiding the problems of delay or packet loss due to the fixed transmission strategy failing to adapt to bandwidth fluctuations, and ensuring smooth dialogue without interruption.
[0012] In summary, through the two aspects of accurate scene recognition and dynamic bandwidth adaptation, the embodiments of the present application solve the adaptation defects of the existing fixed processing strategy, so that the online dialogue experience of the smart wearable device is more in line with the actual use scene of the user, and stable and clear voice interaction can be realized in complex noisy mobile environments or bandwidth fluctuation scenes, thereby meeting the core needs of the user's daily online dialogue. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0014] Figure 1 A flowchart of an online transmission method of dialogue data provided by an embodiment of the present application is shown in the figure. Figure 2 A structural block diagram of an online transmission device of dialogue data provided by an embodiment of the present application is shown in the figure. Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0015] In the following description, specific details such as specific system structures, techniques, etc. are presented for the purpose of explanation, but not for the purpose of limitation, so as to make a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits and methods are omitted, so as not to obscure the description of the present application with unnecessary details.
[0016] In order to make the purpose, technical solutions and advantages of the present application clearer, the following will be described by specific embodiments in conjunction with the drawings.
[0017] Reference will be made to Figure 1 , Figure 1 A flowchart of an online transmission method of dialogue data provided by an embodiment of the present application is shown in the figure, which can be executed by an electronic device. Specifically, the method can include S101-S103.
[0018] S101: Obtain the environmental noise, moving speed and communication bandwidth of the smart wearable device; the smart wearable device is in communication connection with a first device; the first device is used to receive voice data sent by a second device and transmit the voice data to the smart wearable device.
[0019] In the embodiment, the environmental noise, moving speed and communication bandwidth of the smart wearable device are obtained, specifically including: Receiving environmental noise data and moving speed sent by the smart wearable device, the environmental noise data including noise decibel value, noise frequency range and noise duration; Calculating the environmental noise based on the noise decibel value, noise frequency range and noise duration; obtaining communication bandwidth data of the smart wearable device, the communication bandwidth data comprising a bandwidth peak value, a real-time available bandwidth value, and a bandwidth fluctuation frequency; calculating the communication bandwidth based on the bandwidth peak value, the real-time available bandwidth value, and the bandwidth fluctuation frequency.
[0020] In this embodiment, the environmental noise data is data collected and sent by the smart wearable device to reflect the characteristics of the environment in which the smart wearable device is located. The moving speed is a parameter representing the moving state of the smart wearable device and the first user. The communication bandwidth data is data reflecting the transmission capability of the communication link between the smart wearable device and the first device, including the bandwidth peak value, the real-time available bandwidth value, and the bandwidth fluctuation frequency. The environmental noise is a parameter representing the overall level of the environmental noise calculated based on the environmental noise data, which is used to determine whether the environment is quiet or noisy. The communication bandwidth is a parameter representing the actual transmission capability of the communication link calculated based on the communication bandwidth data, which is used to determine the data transmission strategy subsequently.
[0021] The consideration behind this embodiment is that a single parameter cannot comprehensively and accurately represent the actual situation of the environmental noise and the communication bandwidth. For example, relying only on the noise decibel value cannot distinguish the influence of different frequency noises on voice transmission under the same decibel. Referring only to the real-time available bandwidth value cannot reflect the interference of bandwidth fluctuation on transmission stability. This embodiment collects multi-dimensional environmental noise data and communication bandwidth data, and then calculates the environmental noise and the communication bandwidth based on these data, which can improve the data accuracy, provide reliable basis for subsequent scene type determination, data compensation strategy and transmission strategy formulation, avoid improper strategy adaptation due to single parameter error, and ensure the clarity and stability of voice transmission.
[0022] For example, the specific implementation process of this embodiment can include: Before the conversation, the first user can operate the smart wearable device (such as smart glasses) to turn on the Bluetooth function of the first device (such as the first user's mobile phone), the smart glasses search and match the Bluetooth signal of the mobile phone, complete the establishment of Bluetooth connection, and after the Bluetooth connection is stable, the first user can control the mobile phone through the smart glasses to connect the voice call with the second user.
[0023] The smart wearable device can collect environmental noise signals through the built-in dual-path MEMS microphone (main microphone and reference microphone), the main microphone collects mixed voice and noise signals, and the reference microphone collects pure noise signals. After being processed by the adaptive filtering algorithm, the noise decibel value, noise frequency range, and noise duration are extracted to form the environmental noise data. At the same time, the smart wearable device collects the acceleration vector in three-dimensional space through the built-in 3-axis acceleration sensor, and after de-bouncing and baseline calibration processing, the moving speed is obtained. Subsequently, the smart wearable device can send the environmental noise data and the moving speed to the first device through the communication link with the first device.
[0024] After the first device receives the environmental noise data and the moving speed sent by the smart wearable device, it can first determine whether the noise frequency range covers the voice core frequency band (200-3400Hz). If it covers, the weight of the noise decibel value is increased. Then, combined with whether the noise duration exceeds the stable threshold of 20ms, the environmental noise representing the overall level of the environment is calculated.
[0025] The first device starts bandwidth detection through the Bluetooth communication link established with the smart wearable device, and real-time statistics the maximum transmission rate supported by the link in the past 1 second to determine the bandwidth peak value. At the same time, the number of bytes of actual voice data transmission in the past 100ms is counted to convert the real-time available bandwidth value. In addition, the first device can record the number of changes of the real-time available bandwidth value every 100ms to determine the bandwidth fluctuation frequency, and then obtain the communication bandwidth data.
[0026] The first device excludes abnormal real-time available bandwidth values that exceed the peak value with the bandwidth peak value as the upper limit constraint, and combines the bandwidth fluctuation frequency. If the fluctuation frequency exceeds 2 times per 100ms, the real-time available bandwidth value is corrected by 80%. Finally, the communication bandwidth that can accurately reflect the actual transmission capacity of the link is calculated.
[0027] S102: Determine the scene type based on the environmental noise and the moving speed.
[0028] In this embodiment, the scene type is determined based on the environmental noise and the moving speed, specifically including: If the environmental noise is less than the first noise threshold and the moving speed is less than the first speed threshold, the scene type is determined as the first scene type. If the environmental noise is greater than the first noise threshold and the moving speed is less than the first speed threshold, the scene type is determined as the second scene type. If the environmental noise is greater than the first noise threshold, the moving speed is greater than or equal to the first speed threshold and less than the second speed threshold, the scene type is determined as the third scene type. If the environmental noise is less than the first noise threshold, the moving speed is greater than or equal to the second speed threshold, the scene type is determined as the fourth scene type.
[0029] In this embodiment, the data compensation strategy is determined based on the scene type and the communication bandwidth, specifically including: If the communication bandwidth is greater than the first bandwidth threshold, the data compensation strategy corresponding to the scene type is determined based on the first compensation strategy mapping table. If the communication bandwidth is less than or equal to the first bandwidth threshold, the data compensation strategy corresponding to the scene type is determined based on the second compensation strategy mapping table. The first compensation strategy mapping table and the second compensation strategy mapping table each include a one-to-one correspondence relationship between a plurality of scene types and a plurality of data compensation strategies, and the data compensation strategies in the first compensation strategy mapping table and the second compensation strategy mapping table are different.
[0030] In the embodiment, the first noise threshold is a reference value for distinguishing quiet and noisy environments, and is used to judge the ambient noise level. The first speed threshold is a reference value for distinguishing the static and moving states of the smart wearable device, and is used to judge the moving speed level. The second speed threshold is a reference value for distinguishing ordinary and high-speed movements of the device. The first to fourth scene types are scene categories based on the ambient noise and the moving speed, and correspond to quiet static, noisy static, noisy moving, and quiet high-speed scenes, respectively, and are used to represent different use environments. The first bandwidth threshold is a reference value for distinguishing high and low communication bandwidths, and is used to divide the bandwidth level. The first compensation strategy mapping table and the second compensation strategy mapping table are tables for storing the corresponding relationship between the scene types and the data compensation strategies, and include a plurality of one-to-one corresponding items of the scene types and the data compensation strategies. The data compensation strategy is a voice processing strategy adapted to the scene and the bandwidth, and is used to optimize the voice transmission effect, for example, and can include parameters such as sound quality compensation and delay compensation.
[0031] The consideration behind the embodiment is that only a single parameter is used to divide the scene, which is easy to cause judgment deviation. The embodiment combines the double noise threshold and the double speed threshold, can realize fine classification of the scene, and accurately covers different use scenes such as quiet / noisy, static / moving / high-speed moving. At the same time, considering that the communication bandwidth directly determines the landing ability of the compensation strategy, and the amount of compensation data that can be carried under high bandwidth and low bandwidth is different, the embodiment divides the bandwidth level by the first bandwidth threshold, corresponds to different compensation strategy mapping tables, can avoid compensation failure or resource waste caused by bandwidth mismatch, ensures that the data compensation strategy not only meets the core needs of the scene, but also meets the actual carrying capacity of the bandwidth, and improves the adaptability and stability of voice transmission.
[0032] For example, the specific implementation process of determining the scene type based on the ambient noise and the moving speed, and determining the data compensation strategy based on the scene type and the communication bandwidth can include: The first device compares the environmental noise value with the first noise threshold value, compares the moving speed value with the first speed threshold value and the second speed threshold value respectively, determines that the current scene type is the first scene type if the environmental noise value is less than the first noise threshold value and the moving speed value is less than the first speed threshold value, determines that the current scene type is the second scene type if the environmental noise value is greater than the first noise threshold value and the moving speed value is less than the first speed threshold value, determines that the current scene type is the third scene type if the environmental noise value is greater than the first noise threshold value and the moving speed value is greater than or equal to the first speed threshold value and less than the second speed threshold value, and determines that the current scene type is the fourth scene type if the environmental noise value is less than the first noise threshold value and the moving speed value is greater than or equal to the second speed threshold value.
[0033] The first device compares the communication bandwidth value with the first bandwidth threshold value, determines that the current is a high-bandwidth scene if the communication bandwidth value is greater than the first bandwidth threshold value, and then calls the pre-stored first compensation strategy mapping table from the device storage module, and determines that the current is a low-bandwidth scene if the communication bandwidth value is less than or equal to the first bandwidth threshold value, and then calls the pre-stored second compensation strategy mapping table from the device storage module.
[0034] The first device finds the corresponding mapping entry in the called compensation strategy mapping table according to the determined scene type. The entry records the data compensation strategy adapted to the current bandwidth level under the scene type, for example, the first scene type corresponds to the strategy of opening the sound quality enhancement and closing the delay compensation in the first compensation strategy mapping table, and the third scene type corresponds to the strategy of closing the sound quality enhancement and opening the delay compensation in the second compensation strategy mapping table. The first device extracts the data compensation strategy information in the mapping entry, verifies the integrity of the strategy, and confirms that the core parameters such as sound quality compensation and delay compensation are included.
[0035] S103: Determine the data compensation strategy based on the scene type and the communication bandwidth, process the voice data based on the data compensation strategy, obtain the to-be-transmitted data, and transmit the to-be-transmitted data to the intelligent wearable device.
[0036] In this embodiment, the underlying consideration is that voice data processing needs to adapt to both scenario requirements and bandwidth capabilities. Different scenario types have different requirements for voice quality (such as clarity) and real-time performance. For example, quiet scenarios require high-quality audio, while mobile scenarios require low latency. Considering that communication bandwidth determines the amount of voice data that can be carried, high bandwidth can support more enhanced data, while low bandwidth requires simplified data. If a compensation strategy is formulated without considering the scenario and bandwidth, it is easy to cause problems such as excessive audio quality wasting bandwidth or missing core voice data. Therefore, this embodiment first determines an appropriate compensation strategy based on the scenario type and communication bandwidth, and then uses this strategy to process the voice data to obtain the data to be transmitted. This ensures that the data to be transmitted not only meets the user's needs in the current scenario, but can also be transmitted stably under the existing bandwidth, ultimately guaranteeing the voice experience on the smart wearable device.
[0037] For example, the specific implementation process of determining a data compensation strategy based on scenario type and communication bandwidth, processing voice data to obtain the data to be transmitted, and transmitting it may include: The first device retrieves the corresponding preset data compensation strategy from the local preset compensation strategy library based on the combination relationship between scene type and communication bandwidth. For example, when the scene type is the first scene type and the communication bandwidth is greater than the first bandwidth threshold, the data compensation strategy of turning on sound quality enhancement and turning off latency compensation is retrieved.
[0038] The first device acquires the raw voice data sent by the second device through the communication network. This data is a continuous voice stream in PCM format. Then, the raw voice data is processed according to the retrieved data compensation strategy. For example, the semantic base layer data of 200-3400Hz is extracted from the voice data, and the sound quality enhancement layer data of 5000-8000Hz is generated to ensure that the processed data meets the strategy requirements.
[0039] The first device structurally encapsulates the processed semantic base layer data and audio enhancement layer data according to a preset format of frame header + semantic layer + enhancement layer. The frame header contains data type identifiers (such as identifier bits representing semantics + enhancement), forming the data to be transmitted, ensuring that the data format can be recognized by the decoding module of the smart wearable device. The first device sends the data to be transmitted in a high-priority queue through the established Bluetooth link with the smart wearable device. During transmission, the first device receives transmission confirmation signals from the smart wearable device in real time. If no confirmation signal is received, the corresponding data to be transmitted is retransmitted according to preset rules until the data is completely transmitted to the smart wearable device.
[0040] As can be seen from the above, this embodiment does not adopt the fixed processing method of uniform noise reduction parameters in the prior art. Instead, it first obtains the noise data of the environment in which the smart wearable device is located, and at the same time combines the user's movement speed when wearing the device. The two together determine the current actual scene type, so that the subsequent data processing can accurately match the noise interference level in the current scene. This avoids the problem that fixed noise reduction parameters are not effective in noisy environments and that excessive processing in quiet environments leads to speech distortion, thus ensuring speech intelligibility from the source.
[0041] This embodiment does not adopt the transmission logic of the fixed encoding format of existing technology. Instead, based on the determination of the scenario type, it further combines the real-time communication bandwidth data between the smart wearable device and the first device to formulate a targeted data compensation strategy to meet the dialogue transmission needs under different scenarios, take into account both voice quality and transmission efficiency, avoid delay or packet loss caused by the inability of the fixed transmission strategy to adapt to bandwidth fluctuations, and ensure smooth and uninterrupted dialogue.
[0042] In summary, this embodiment addresses the adaptation deficiencies of existing fixed processing strategies by optimizing both accurate scene recognition and dynamic bandwidth adaptation. This makes the online dialogue experience of smart wearable devices more closely match the actual usage scenarios of users. Whether in complex and noisy mobile environments or bandwidth fluctuation scenarios, it can achieve stable and clear voice interaction, meeting the core needs of users for daily online dialogue.
[0043] In one embodiment of this application, determining the data compensation strategy corresponding to the scene type based on the first compensation strategy mapping table includes: If the scene type is the first scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the first scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the first sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the second sound quality compensation coefficient. If the scene type is the third scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the third sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the first delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fourth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the second delay compensation coefficient. The fourth sound quality compensation coefficient is less than the first sound quality compensation coefficient, the first sound quality compensation coefficient is less than the third sound quality compensation coefficient, the third sound quality compensation coefficient is less than the second sound quality compensation coefficient, and the second delay compensation coefficient is less than the first delay compensation coefficient.
[0044] In this embodiment, determining the data compensation strategy corresponding to the scene type based on the second compensation strategy mapping table includes: If the scene type is the first scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the first scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fourth sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the third sound quality compensation coefficient. If the scene type is the third scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the first sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the third delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fifth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the second delay compensation coefficient. The fifth sound quality compensation coefficient is less than the fourth sound quality compensation coefficient, and the third delay compensation coefficient is greater than the first delay compensation coefficient.
[0045] In this embodiment, the first scenario type refers to a scenario where the ambient noise of the environment where the smart wearable device is located is less than a first noise threshold, and the moving speed of the smart wearable device is less than a first speed threshold. Its core characteristics are quietness and static state. In the first scenario type, there is no significant ambient noise interference, and the first user does not move significantly. The Bluetooth link between the smart wearable device and the first device is relatively stable. Typical application scenarios include the first user using the smart wearable device for online conversations while sitting quietly in an office or resting at home. The second scenario type refers to a scenario where the ambient noise of the environment where the smart wearable device is located is greater than a first noise threshold, and the moving speed of the smart wearable device is less than a first speed threshold. Its core characteristics are noise and static state. In the third scenario type, there is significant ambient noise, such as crowds or equipment noise, but the first user does not move significantly. The Bluetooth link is less affected by ambient noise, but voice intelligibility is easily interfered with. Typical application scenarios include the first user using the smart wearable device for online conversations while sitting quietly in noisy places such as shopping malls or restaurants.
[0046] The third scenario type refers to a scenario where the ambient noise of the smart wearable device's environment is greater than the first noise threshold, and the smart wearable device's moving speed is greater than or equal to the first speed threshold but less than the second speed threshold. Its core characteristics are noise and normal movement. In the third scenario type, both ambient noise interference and the user's movement (e.g., walking, slow cycling) exist. In this case, the Bluetooth link is prone to slight fluctuations due to movement, reducing voice intelligibility and transmission stability. Typical application scenarios include users using smart wearable devices for online conversations while commuting on foot or riding shared bicycles through noisy areas. The fourth scenario type refers to a scenario where the ambient noise of the smart wearable device's environment is less than the first noise threshold, and the smart wearable device's moving speed is greater than or equal to the second speed threshold. Its core characteristics are quietness and high-speed movement. In the fourth scenario type, there is no significant ambient noise interference, but the user is moving at high speed, such as on a high-speed train, airplane, or fast-moving car. In this case, the Bluetooth link is prone to signal jitter or delay due to high-speed movement.
[0047] The first to fifth audio quality compensation coefficients are parameters that control the degree of audio quality enhancement for speech data. They are used to adapt to audio quality requirements under different scenarios and bandwidths. For example, they can include relative values such as 0.2, 0.3, 0.5, 0.6, and 0.8. The larger the value, the stronger the audio quality enhancement effect. 1 represents full audio quality enhancement. The first to third delay compensation coefficients are parameters that control the delay masking effect for speech data. They are used to adapt to delay requirements under different scenarios. For example, they can correspond to transition tone durations such as 15ms, 30ms, and 45ms. The larger the value, the stronger the delay compensation effect.
[0048] The consideration behind this embodiment is that the data compensation strategy needs to be deeply correlated with bandwidth capacity and scenario requirements. The first compensation strategy mapping table corresponds to high bandwidth scenarios (communication bandwidth is greater than the first bandwidth threshold). In this case, the bandwidth can carry more audio quality enhancement data, so a higher audio quality compensation coefficient is set: the second audio quality compensation coefficient is the largest (adapting to the noisy static requirements of the second scenario type, which requires strong noise resistance), and the third, first, and fourth audio quality compensation coefficients decrease in sequence. At the same time, latency compensation is configured for mobile scenarios (the third and fourth).
[0049] The second compensation strategy mapping table corresponds to low-bandwidth scenarios (communication bandwidth less than or equal to the first bandwidth threshold). It requires reducing the amount of audio data to avoid stuttering; therefore, the overall audio quality compensation coefficient is lower than that of the first mapping table. The fifth audio quality compensation coefficient is the smallest (adapting to the quiet, high-speed, low-bandwidth requirements of the fourth scenario, prioritizing real-time performance), while the third and first audio quality compensation coefficients increase sequentially. Simultaneously, to address the higher latency risk in the third scenario (noisy mobile) under low bandwidth, a larger third latency compensation coefficient is set to ensure effective latency masking. This embodiment, through differentiated coefficient configuration, avoids audio quality waste under high bandwidth and prevents transmission blockage under low bandwidth, achieving precise adaptation of bandwidth, scenario, and compensation.
[0050] For example, the specific implementation process of determining the data compensation strategy and processing the voice data based on the first and second compensation strategy mapping tables may include: The first device compares the real-time communication bandwidth with the first bandwidth threshold: if the communication bandwidth is greater than the first bandwidth threshold, it retrieves the first compensation strategy mapping table from the local storage module; if the communication bandwidth is less than or equal to the first bandwidth threshold, it retrieves the second compensation strategy mapping table to ensure that the mapping table matches the bandwidth level.
[0051] The first device searches for the corresponding entry in the retrieved mapping table based on the previously determined scene type: If it is the first scene type, it finds "sound quality compensation based on the first sound quality compensation coefficient" in the first mapping table and "sound quality compensation based on the fourth sound quality compensation coefficient" in the second mapping table; if it is the second scene type, it finds "sound quality compensation based on the second sound quality compensation coefficient" in the first mapping table and "sound quality compensation based on the third sound quality compensation coefficient" in the second mapping table; if it is the third scene type, it finds "sound quality compensation based on the third sound quality compensation coefficient + delay compensation based on the first delay compensation coefficient" in the first mapping table and "sound quality compensation based on the first sound quality compensation coefficient + delay compensation based on the third delay compensation coefficient" in the second mapping table; if it is the fourth scene type, it finds "sound quality compensation based on the fourth sound quality compensation coefficient + delay compensation based on the second delay compensation coefficient" in the first mapping table and "sound quality compensation based on the fifth sound quality compensation coefficient + delay compensation based on the second delay compensation coefficient" in the second mapping table.
[0052] The first device acquires the raw voice data sent by the second device and processes the data according to the obtained sound quality compensation coefficient: if it is the second sound quality compensation coefficient (the largest value), it extracts the full-frequency harmonics and high signal-to-noise ratio background sounds of the voice to enhance the anti-noise effect; if it is the fifth sound quality compensation coefficient (the smallest value), it only retains the basic enhancement of the core semantic frequency band of the voice (200-3400Hz) to reduce the amount of data.
[0053] If the compensation strategy includes delay compensation, the first device generates a transition tone based on the delay compensation coefficient: if it is the first delay compensation coefficient (smaller value), a 30ms transition tone is generated; if it is the third delay compensation coefficient (larger value), a 45ms transition tone is generated, and the fundamental frequency of the transition tone matches the fundamental frequency of the speech.
[0054] The first device encapsulates the audio data with sound quality compensation and transition tones in a format of "frame header + audio quality compensation data + latency compensation data" to form the data to be transmitted, ensuring that the data structure can be decoded and recognized by the smart wearable device. The first device sends the data to be transmitted to the smart wearable device via Bluetooth link, receiving feedback from the device in real time during transmission. If packet loss occurs, the core audio data with sound quality compensation is retransmitted first to ensure the intelligibility of the dialogue.
[0055] This embodiment achieves precise adaptation between compensation strategies and bandwidth through differentiated design of the first and second compensation strategy mapping tables. Under high bandwidth, a high-quality audio compensation coefficient ensures voice quality, while under low bandwidth, a low-quality audio compensation coefficient controls data volume, avoiding bandwidth waste or transmission congestion. The audio compensation coefficient is deeply matched to scene requirements; a higher coefficient is configured in noisy scenes to enhance noise reduction, while the coefficient is reasonably reduced in quiet scenes, balancing effect and efficiency. The latency compensation coefficient is dynamically adjusted according to the scene and bandwidth; under low bandwidth and mobile scenes, a larger coefficient is used to enhance latency masking and improve smoothness. Ultimately, this achieves the optimal balance between voice transmission quality and stability under different scenes and bandwidths, significantly improving the user experience.
[0056] In one embodiment of this application, the voice data includes multiple consecutive voice frames; the data compensation strategy is: to perform voice quality compensation on the voice data based on a fourth voice quality compensation coefficient, and to perform delay compensation on the voice data after voice quality compensation based on a second delay compensation coefficient; The voice data is processed based on a data compensation strategy to obtain the data to be transmitted, including: The first audio segment with a frequency within a first frequency band is extracted from the speech data, and the first audio segment is encoded to obtain the first speech feature; the first frequency band is a narrowband speech frequency range; Extract a second audio segment with frequencies within the second frequency band from the speech data, and extract human voice harmonics and intonation features from the second audio segment; the second frequency band is the vowel formant dominant frequency band. The naturalness feature is obtained by compressing the harmonics and intonation features of human voice based on the fourth sound quality compensation coefficient. The first speech feature and naturalness feature corresponding to the same semantic frame are concatenated to obtain speech data after sound quality compensation. Based on the second delay compensation coefficient, delay compensation is performed on the audio data after sound quality compensation to obtain the data to be transmitted.
[0057] In this embodiment, delay compensation is performed on the audio data after sound quality compensation based on the second delay compensation coefficient to obtain the data to be transmitted, specifically including: Extract the average transmission delay and average fundamental frequency of the audio data after sound quality compensation; The duration of the transition tone is calculated based on the average transmission delay and the second delay compensation coefficient. The first transition tone data is generated based on the average fundamental frequency and the duration of the transition tone. Obtain the historical voice data of the first user and extract the speech rate parameter based on the historical voice data; The envelope parameters are determined based on the speech rate parameters, and the first transition tone data is adjusted based on the envelope parameters to obtain the second transition tone data. The second transition tone data is inserted into the beginning of the audio data after sound quality compensation to obtain the data to be transmitted.
[0058] In this embodiment, the first frequency band refers to a narrowband speech frequency range, which is the core frequency band ensuring the semantic intelligibility of speech. For example, it may include parameters such as 300-3400Hz. This frequency band covers the core frequencies of vowels and consonants that determine semantics in human speech. The second frequency band refers to the vowel formant-dominated frequency band, which is a key frequency band affecting the naturalness of speech. For example, it may include parameters such as 500-3000Hz, covering the frequency range of the first, second, and third formants of vowels. The first audio segment is the audio portion extracted from the speech data whose frequency falls within the first frequency band. It is used to generate core features that ensure semantics, and may include speech waveform data in the 300-3400Hz frequency band. The second audio segment is the audio portion extracted from the speech data whose frequency falls within the second frequency band. It is used to extract features that improve the naturalness of speech, and may include vowel audio data in the 500-3000Hz frequency band. The first speech feature is the feature data obtained by encoding the first audio segment, used to carry the core semantics of the speech. For example, it may include 80 bytes / frame feature data generated based on G.729 encoding.
[0059] Vocal harmonics are frequency components that are integer multiples of the fundamental frequency in speech, used to enhance the fullness of speech. Examples include harmonic components at 240Hz and 360Hz corresponding to a fundamental frequency of 120Hz. Pitch features are the frequency variations of speech over time, used to distinguish intonation (e.g., statements, questions). Examples include parameters such as a 50Hz rise in pitch at the end of a sentence and a pitch change rate of 10Hz / ms. Naturalness features are data obtained by compressing vocal harmonics and pitch features based on a fourth sound quality compensation coefficient. This is used to preserve the naturalness of speech while controlling data volume. Examples include 20% of the compressed core harmonics and pitch data. Semantic frames are combinations of consecutive speech frames carrying the same complete semantic meaning, used to ensure the semantic coherence of feature splicing. Examples include semantic units composed of 5 consecutive speech frames (100ms in duration). Average transmission delay is the average time difference of the sound quality-compensated speech data during transmission, used to determine the basic duration of transitional tones. Examples include parameters such as 40ms and 50ms. The average fundamental frequency is the base frequency of the speech data after sound quality compensation. It is used to generate transitional tones that match the speech spectrum. For example, it may include parameters such as 120Hz for male speech and 220Hz for female speech.
[0060] The transition tone duration is the duration of the transition tone calculated based on the average transmission delay and the second delay compensation coefficient, and may include parameters such as 15ms or 20ms. The first transition tone data is an initial transition tone generated based on the average fundamental frequency and the transition tone duration, and may include 15ms audio data generated by a 120Hz sine wave. Historical voice data is the first user's past online dialogue voice data, used to extract user speaking habit parameters, and may include 100 or 200 historical call voice data entries. The speech rate parameter is the first user's speaking speed extracted from the historical voice data, used to determine the envelope of the transition tone, and may include parameters such as 150 words / minute or 180 words / minute. The envelope parameter controls the volume change of the transition tone, used to match the first user's speaking rhythm, and may include volume change duration parameters such as a 3ms rise, a 9ms steady state, and a 3ms fall. The second transition tone data is a personalized transition tone obtained by adjusting the first transition tone data based on the envelope parameter, and may include 15ms audio data with a 3ms crescendo and a 3ms diminuendo effect.
[0061] The consideration behind this embodiment is that speech data processing needs to achieve a balance among semantic integrity, natural sound quality, bandwidth adaptation, and latency masking. From the perspective of frequency band division, the first frequency band (narrowband core) is the foundation of speech semantics. Extracting data from this frequency band and encoding it as the first speech feature ensures that core semantics can be transmitted even when bandwidth is limited. The second frequency band (vowel formants) determines the naturalness of speech. Extracting the harmonics and intonation features of the human voice from this frequency band can avoid the mechanical feeling caused by speech compression. The compression of naturalness features based on the fourth sound quality compensation coefficient is because the coefficient value is small, adapting to the bandwidth constraints of low bandwidth or quiet high-speed scenarios (fourth scenario type), preserving key naturalness information while controlling the amount of data. Semantic frame splicing features can prevent feature misalignment between different semantics and ensure a coherent listening experience.
[0062] In the delay compensation stage, the average transmission delay reflects the actual link delay. Combined with the second delay compensation coefficient (with a small value to avoid excessively long transition tones), the duration of the transition tones is calculated, which can accurately mask the delay without disrupting the fluency of the dialogue. The transition tones are generated based on the average fundamental frequency, which can avoid conflicts between the transition tones and the speech spectrum. The speech rate parameters extracted from historical speech data are used to determine the envelope, which can make the transition tones fit the first user's speaking habits and reduce abruptness. Inserting the transition tones at the beginning can directly fill the auditory gaps caused by the delay, achieving the overall processing goals of no loss of semantics, natural sound quality, imperceptible delay, and bandwidth adaptation.
[0063] For example, the specific implementation process of processing voice data based on a data compensation strategy to obtain the data to be transmitted may include: The first device acquires voice data sent by the second device. The voice data consists of multiple consecutive PCM format voice frames (16kHz sampling rate, 16-bit depth, 20ms / frame), for example, receiving 10 consecutive frames of voice data (total duration 200ms).
[0064] The first device uses a 300-3400Hz bandpass filter to filter each frame of speech data and extract the first audio segment whose frequency is within the first frequency band. Then, the encoding module is started and the first audio segment is encoded using the G.729 speech encoding algorithm. Each frame generates 80 bytes of first speech features, and 10 frames generate a total of 800 bytes of first speech feature data.
[0065] The first device uses a 500-3000Hz bandpass filter to filter each frame of speech data and extracts the second audio segment whose frequency is in the second frequency band. The feature extraction module is activated to analyze the spectrum of the second audio segment through short-time Fourier transform and extract human voice harmonics (frequency components that are 2-4 times the fundamental frequency, such as 240Hz and 360Hz harmonics corresponding to a fundamental frequency of 120Hz) and intonation features (frequency change rate of each frame of speech, such as intonation change rate of 8Hz / ms in a sentence).
[0066] The first device calls the fourth sound quality compensation coefficient (e.g., 0.2) to compress the extracted human voice harmonics and intonation features, retaining only 20% of the core harmonics (e.g., the 3rd to 4th harmonic of the fundamental frequency) and key intonation features (e.g., intonation changes at the end of sentences). Each frame generates 204 bytes of naturalness features, and 10 frames generate a total of 2040 bytes of naturalness feature data.
[0067] The first device divides 10 frames of speech data into 2 semantic frames (each semantic frame consists of 5 frames and lasts for 100ms) based on the semantic coherence of the speech. It then starts the feature splicing module to splice the 5 frames of first speech features (5×80=400 bytes) and 5 frames of naturalness features (5×204=1020 bytes) corresponding to each semantic frame in the order of "first speech features first, naturalness features second" to obtain 2 sets of speech data after sound quality compensation (1420 bytes each).
[0068] The first device extracts the average transmission delay of the audio data after sound quality compensation: the transmission time of the first 5 frames of sound quality compensation data (the time difference from the first device to the smart wearable device) is calculated, such as 38ms, 42ms, 39ms, 41ms, and 40ms respectively, and the average transmission delay is calculated to be 40ms; the average fundamental frequency of the sound quality compensation data is extracted through spectrum analysis, such as the average fundamental frequency of 120Hz obtained from the analysis.
[0069] The first device calls the second delay compensation coefficient (e.g., 0.3) and calculates according to "transition tone duration = average transmission delay × second delay compensation coefficient", resulting in 40ms × 0.3 = 12ms. To ensure the masking effect, the transition tone duration is rounded up to 15ms.
[0070] The first device, based on an average fundamental frequency of 120Hz, calls a local sine wave generation template to generate 15ms of sine wave audio data (corresponding to 240 sampling points at a sampling rate of 16kHz), forming the first transition tone data (3840 bytes).
[0071] The first device calculates the average speech rate of the first user from the first user's historical voice data stored locally (such as 100 past call voices). For example, the analysis shows that the average speech rate is 150 words / minute. Based on the speech rate parameter, it queries the preset envelope parameter library and matches the envelope parameter of "3ms rise, 9ms stability, and 3ms fall" (the speech rate of 150 words / minute corresponds to this parameter).
[0072] The first device adjusts the volume of the first transition tone data according to the envelope parameters: the volume increases linearly from 0 to 100% in the first 3ms (gradually increasing), the volume remains at 100% for the middle 9ms (stable), and the volume decreases linearly from 100% to 0 in the last 3ms (gradually decreasing), thus obtaining the second transition tone data (still 15ms, 3840 bytes).
[0073] The first device inserts the second transition tone data into the header of the two sets of audio data after sound quality compensation, forming two sets of data to be transmitted (3840+1420=5260 bytes each); it then starts the data encapsulation module to add a 1-byte frame header (identifying the type "transition tone + sound quality compensation data") to each set of data to be transmitted, and finally completes the generation of the data to be transmitted.
[0074] The first device sends the generated data to be transmitted to the smart wearable device in semantic frame order. During the transmission process, it receives the transmission confirmation signal from the device in real time. If a certain set of data does not receive confirmation, it only retransmits the first speech feature and the second transition tone data in that set of data to ensure that the core data is transmitted first.
[0075] This embodiment extracts speech features by frequency band segmentation. The first frequency band ensures semantic integrity, while the second frequency band preserves naturalness. Combined with a fourth sound quality compensation coefficient, the data is compressed, adapting to bandwidth constraints in low-bandwidth or quiet high-speed scenarios while avoiding the loss of naturalness due to excessive compression. This embodiment splices features according to semantic frames to prevent misalignment of features with different semantic meanings, ensuring a smooth listening experience. The latency compensation in this embodiment is based on actual transmission latency and user speech rate habits. Transition sounds are synchronized with the speech frequency and match the user's speaking rhythm, resulting in a natural and seamless latency masking effect. This embodiment inserts transition sounds at the beginning to accurately fill latency gaps, avoiding any sense of stuttering. Overall, it achieves an optimal balance between semantics, sound quality, latency, and bandwidth, significantly improving the online dialogue experience on smart wearable devices.
[0076] Corresponding to the online transmission method of dialogue data in the above embodiment, Figure 2 This is a structural block diagram of a dialogue data online transmission device provided according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The online dialogue data transmission device 20 includes: a data acquisition module 21, a scene recognition module 22, and a dialogue data transmission module 23.
[0077] The data acquisition module 21 is used to acquire the ambient noise, moving speed and communication bandwidth of the smart wearable device; the smart wearable device is connected to the first device; the first device is used to receive voice data sent by the second device and send the voice data to the smart wearable device. Scene recognition module 22 is used to determine the scene type based on ambient noise and movement speed; The dialogue data transmission module 23 is used to determine the data compensation strategy based on the scene type and communication bandwidth, process the voice data based on the data compensation strategy to obtain the data to be transmitted, and transmit the data to be transmitted to the smart wearable device.
[0078] In one embodiment of this application, when determining the scene type based on ambient noise and movement speed, the scene recognition module 22 is specifically used for: If the ambient noise is less than the first noise threshold and the moving speed is less than the first speed threshold, then the scene type is determined to be the first scene type. If the ambient noise is greater than the first noise threshold and the moving speed is less than the first speed threshold, then the scene type is determined to be the second scene type. If the ambient noise is greater than the first noise threshold and the moving speed is greater than or equal to the first speed threshold and less than the second speed threshold, then the scene type is determined to be the third scene type. If the ambient noise is less than the first noise threshold and the moving speed is greater than or equal to the second speed threshold, then the scene type is determined to be the fourth scene type.
[0079] In one embodiment of this application, when determining a data compensation strategy based on scene type and communication bandwidth, the dialogue data transmission module 23 is specifically used for: If the communication bandwidth is greater than the first bandwidth threshold, the data compensation strategy corresponding to the scenario type is determined based on the first compensation strategy mapping table. If the communication bandwidth is less than or equal to the first bandwidth threshold, the data compensation strategy corresponding to the scenario type is determined based on the second compensation strategy mapping table. Both the first compensation strategy mapping table and the second compensation strategy mapping table include a one-to-one correspondence between multiple scenario types and multiple data compensation strategies. The data compensation strategies in the first compensation strategy mapping table and the second compensation strategy mapping table are different.
[0080] In one embodiment of this application, when the dialogue data transmission module 23 determines the data compensation strategy corresponding to the scene type based on the first compensation strategy mapping table, it is specifically used for: If the scene type is the first scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the first scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the first sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the second sound quality compensation coefficient. If the scene type is the third scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the third sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the first delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fourth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the second delay compensation coefficient. The fourth sound quality compensation coefficient is less than the first sound quality compensation coefficient, the first sound quality compensation coefficient is less than the third sound quality compensation coefficient, the third sound quality compensation coefficient is less than the second sound quality compensation coefficient, and the second delay compensation coefficient is less than the first delay compensation coefficient.
[0081] In one embodiment of this application, when the dialogue data transmission module 23 determines the data compensation strategy corresponding to the scene type based on the second compensation strategy mapping table, it is specifically used for: If the scene type is the first scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the first scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fourth sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the third sound quality compensation coefficient. If the scene type is the third scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the first sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the third delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the fifth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the second delay compensation coefficient. The fifth sound quality compensation coefficient is less than the fourth sound quality compensation coefficient, and the third delay compensation coefficient is greater than the first delay compensation coefficient.
[0082] In one embodiment of this application, the voice data includes multiple consecutive voice frames; the data compensation strategy is: to perform voice quality compensation on the voice data based on a fourth voice quality compensation coefficient, and to perform delay compensation on the voice data after voice quality compensation based on a second delay compensation coefficient; when the dialogue data transmission module 23 processes the voice data based on the data compensation strategy to obtain the data to be transmitted, it is specifically used for: The first audio segment with a frequency within a first frequency band is extracted from the speech data, and the first audio segment is encoded to obtain the first speech feature; the first frequency band is a narrowband speech frequency range; Extract a second audio segment with frequencies within the second frequency band from the speech data, and extract human voice harmonics and intonation features from the second audio segment; the second frequency band is the vowel formant dominant frequency band. The naturalness feature is obtained by compressing the harmonics and intonation features of human voice based on the fourth sound quality compensation coefficient. The first speech feature and naturalness feature corresponding to the same semantic frame are concatenated to obtain speech data after sound quality compensation. Based on the second delay compensation coefficient, delay compensation is performed on the audio data after sound quality compensation to obtain the data to be transmitted.
[0083] In one embodiment of this application, when the dialogue data transmission module 23 performs delay compensation on the voice data after sound quality compensation based on the second delay compensation coefficient to obtain the data to be transmitted, it is specifically used for: Extract the average transmission delay and average fundamental frequency of the audio data after sound quality compensation; The duration of the transition tone is calculated based on the average transmission delay and the second delay compensation coefficient. The first transition tone data is generated based on the average fundamental frequency and the duration of the transition tone. Obtain the historical voice data of the first user and extract the speech rate parameter based on the historical voice data; The envelope parameters are determined based on the speech rate parameters, and the first transition tone data is adjusted based on the envelope parameters to obtain the second transition tone data. The second transition tone data is inserted into the beginning of the audio data after sound quality compensation to obtain the data to be transmitted.
[0084] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The functions of the data acquisition module 21, scene recognition module 22, and dialogue data transmission module 23 are shown.
[0085] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it 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, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0086] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0087] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store information related to dialogue data.
[0088] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation methods described in the embodiments of the online dialogue data transmission method provided in the embodiments of this application, or they can execute the implementation methods of the electronic device 300 described in the embodiments of this application, which will not be repeated here.
[0089] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to implement these processes. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0090] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0091] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0092] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules, units, or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.
[0094] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0095] Furthermore, the functional modules / units in the various embodiments of this application can be integrated into one processing module / unit, or each module / unit can exist physically separately, or two or more modules / units can be integrated into one module / unit. The integrated modules / units described above can be implemented in hardware or in the form of software functional modules / units.
[0096] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for online transmission of dialogue data, characterized in that, include: Acquire ambient noise, movement speed, and communication bandwidth of smart wearable devices; The smart wearable device is communicatively connected to the first device; The first device is used to receive voice data sent by the second device and transmit the voice data to the smart wearable device; The scene type is determined based on the ambient noise and the movement speed; A data compensation strategy is determined based on the scenario type and the communication bandwidth. The voice data is then processed based on the data compensation strategy to obtain the data to be transmitted, and the data to be transmitted is then transmitted to the smart wearable device.
2. The online transmission method for dialogue data as described in claim 1, characterized in that, The process of determining the scene type based on the ambient noise and the movement speed includes: If the ambient noise is less than a first noise threshold and the moving speed is less than a first speed threshold, then the scene type is determined to be the first scene type. If the ambient noise is greater than the first noise threshold and the moving speed is less than the first speed threshold, then the scene type is determined to be the second scene type. If the ambient noise is greater than the first noise threshold, and the moving speed is greater than or equal to the first speed threshold and less than the second speed threshold, then the scene type is determined to be the third scene type. If the ambient noise is less than the first noise threshold and the moving speed is greater than or equal to the second speed threshold, then the scene type is determined to be the fourth scene type.
3. The online transmission method for dialogue data as described in claim 2, characterized in that, The process of determining a data compensation strategy based on the scenario type and the communication bandwidth includes: If the communication bandwidth is greater than the first bandwidth threshold, then the data compensation strategy corresponding to the scenario type is determined based on the first compensation strategy mapping table; If the communication bandwidth is less than or equal to the first bandwidth threshold, then the data compensation strategy corresponding to the scenario type is determined based on the second compensation strategy mapping table; Both the first compensation strategy mapping table and the second compensation strategy mapping table include a one-to-one correspondence between multiple scene types and multiple data compensation strategies, and the data compensation strategies in the first compensation strategy mapping table and the second compensation strategy mapping table are different.
4. The online transmission method for dialogue data as described in claim 3, characterized in that, The step of determining the data compensation strategy corresponding to the scene type based on the first compensation strategy mapping table includes: If the scenario type is the first scenario type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the first scenario type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the first sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the second sound quality compensation coefficient. If the scenario type is the third scenario type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scenario type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the third sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the first delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the first compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the fourth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated voice data based on the second delay compensation coefficient. The fourth sound quality compensation coefficient is less than the first sound quality compensation coefficient, the first sound quality compensation coefficient is less than the third sound quality compensation coefficient, the third sound quality compensation coefficient is less than the second sound quality compensation coefficient, and the second delay compensation coefficient is less than the first delay compensation coefficient.
5. The online transmission method for dialogue data as described in claim 4, characterized in that, The step of determining the data compensation strategy corresponding to the scene type based on the second compensation strategy mapping table includes: If the scene type is the first scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the first scene type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the fourth sound quality compensation coefficient. If the scene type is the second scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the second scene type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the third sound quality compensation coefficient. If the scenario type is the third scenario type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scenario type. The data compensation strategy obtained is: to perform sound quality compensation on the speech data based on the first sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated speech data based on the third delay compensation coefficient. If the scene type is the fourth scene type, then the data compensation strategy is queried from the second compensation strategy mapping table based on the third scene type. The data compensation strategy obtained is: to perform sound quality compensation on the voice data based on the fifth sound quality compensation coefficient, and to perform delay compensation on the sound quality-compensated voice data based on the second delay compensation coefficient. The fifth sound quality compensation coefficient is less than the fourth sound quality compensation coefficient, and the third delay compensation coefficient is greater than the first delay compensation coefficient.
6. The online transmission method for dialogue data as described in claim 4, characterized in that, The voice data includes multiple consecutive voice frames; the data compensation strategy is as follows: the voice data is compensated for in terms of sound quality based on a fourth sound quality compensation coefficient, and the voice data after sound quality compensation is compensated for in terms of delay based on a second delay compensation coefficient. The process of processing the voice data based on the data compensation strategy to obtain the data to be transmitted includes: A first audio segment with a frequency within a first frequency band is extracted from the speech data, and the first audio segment is encoded to obtain a first speech feature; the first frequency band is a narrowband speech frequency range; A second audio segment with a frequency within a second frequency band is extracted from the speech data, and human voice harmonics and intonation features are extracted from the second audio segment; the second frequency band is the vowel formant dominant frequency band. The naturalness feature is obtained by compressing the human voice harmonics and the intonation features based on the fourth sound quality compensation coefficient. The first speech feature and naturalness feature corresponding to the same semantic frame are concatenated to obtain speech data after sound quality compensation. The audio data after sound quality compensation is delayed based on the second delay compensation coefficient to obtain the data to be transmitted.
7. The online transmission method for dialogue data as described in claim 6, characterized in that, The process of performing delay compensation on the audio data after sound quality compensation based on the second delay compensation coefficient to obtain the data to be transmitted includes: Extract the average transmission delay and average fundamental frequency of the audio data after sound quality compensation; The duration of the transition tone is calculated based on the average transmission delay and the second delay compensation coefficient. First transition tone data is generated based on the average fundamental frequency and the transition tone duration; Obtain the historical voice data of the first user, and extract the speech rate parameter based on the historical voice data; The envelope parameters are determined based on the speech rate parameters, and the first transition tone data is adjusted based on the envelope parameters to obtain the second transition tone data; The second transition tone data is inserted into the beginning of the audio data after sound quality compensation to obtain the data to be transmitted.
8. A device for online transmission of dialogue data, characterized in that, include: The data acquisition module is used to acquire environmental noise, movement speed, and communication bandwidth of the smart wearable device; The smart wearable device is communicatively connected to the first device; the first device is used to receive voice data sent by the second device and send the voice data to the smart wearable device. The scene recognition module is used to determine the scene type based on the ambient noise and the moving speed; The dialogue data transmission module is used to determine a data compensation strategy based on the scenario type and the communication bandwidth, process the voice data based on the data compensation strategy to obtain the data to be transmitted, and transmit the data to be transmitted to the smart wearable device.
9. A smart wearable device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Bandwidth dependent audio quality adjustment
CN103426432A
Voice compensation method and device for Bluetooth headset
CN115188392A
Bluetooth earphone low-delay transmission method
CN117440440A
Audio data processing method, related device, equipment and storage medium
CN118113249A
Bluetooth earphone audio intelligent regulation and control method and system based on environmental noise
CN118338175A