Conversational data online transmission method and device, equipment, storage medium

By acquiring environmental noise, movement speed, and communication bandwidth of smart wearable devices, determining the scene type, and formulating data compensation strategies, the problem of unstable voice transmission of smart wearable devices in complex environments was solved, achieving a stable and clear online dialogue experience.

CN121122299BActive Publication Date: 2026-02-24BEIJING SUPERHEXA CENTURY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511381714.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-02-24
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

In existing technologies, the voice transmission methods of smart wearable devices cannot adapt to complex environmental changes, resulting in unstable transmission and affecting the fluency and clarity of online conversations.

Method used

By acquiring environmental noise, movement speed, and communication bandwidth of smart wearable devices, the scenario type is determined, and a data compensation strategy is developed based on the scenario type and communication bandwidth to optimize voice data processing and ensure that transmission is adapted to the current environment and bandwidth requirements.

Benefits of technology

It achieves stable and clear voice interaction in complex environments and bandwidth fluctuation scenarios, meeting users' core needs for online dialogue and avoiding latency or packet loss issues caused by fixed processing strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122299B_ABST
    Figure CN121122299B_ABST
Patent Text Reader

Abstract

The application provides a dialogue data online transmission method and device, equipment and a storage medium, and belongs to the technical field of data transmission. The method comprises the following steps: acquiring the environmental noise, the moving speed and the communication bandwidth of a smart wearable device; the smart wearable device is in communication connection with a first device; the first device is used for receiving voice data sent by a second device and transmitting the voice data to the smart wearable device; the scene type is determined based on the environmental noise and the moving speed; the data compensation strategy is determined based on the scene type and the communication bandwidth, the voice data is processed based on the data compensation strategy, the to-be-transmitted data is obtained, and the to-be-transmitted data is transmitted to the smart wearable device. The application can adapt to complex environmental changes, reduce the call delay in a complex environment, and improve the fluency and clarity of online dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data transmission technology, and more specifically, relates to methods, apparatus, devices, and storage media for online transmission of dialogue data. Background Technology

[0002] With the widespread adoption of smart wearable devices such as smart glasses and smart helmets, online voice dialogue based on these devices has become an important communication method. In online conversations, users can interact with others in real time through smart wearable devices.

[0003] However, in practical applications, voice transmission quality is affected by multiple environmental factors: on the one hand, environmental noise directly affects voice intelligibility; on the other hand, the scenarios in which users wear smart wearable devices are complex and diverse, and the stability of Bluetooth links varies greatly in different scenarios, and Bluetooth communication bandwidth fluctuates dynamically, resulting in unstable transmission and easy data transmission delays or packet loss.

[0004] In existing technologies, voice transmission often employs fixed processing strategies, such as uniform encoding formats and fixed noise reduction parameters. These methods cannot adapt to complex environmental changes and fail to meet users' demands for fluency and clarity in online conversations. Therefore, providing a method for online transmission of dialogue data that can adapt to environmental changes has become a pressing technical problem in this field. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, device, and storage medium for online transmission of dialogue data, so as to adapt to complex environmental changes and improve the fluency and clarity of online dialogue.

[0006] A first aspect of this application provides a method for online transmission of dialogue data, including:

[0007] The system acquires environmental noise, movement speed, and communication bandwidth of the smart wearable device; the smart wearable device communicates with a first device; the first device receives voice data sent by the second device and transmits the voice data to the smart wearable device.

[0008] Determine the scene type based on ambient noise and movement speed;

[0009] The data compensation strategy is determined based on the scenario type and 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.

[0010] A second aspect of this application provides an online dialogue data transmission device, comprising:

[0011] The data acquisition module 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;

[0012] The scene recognition module is used to determine the scene type based on ambient noise and movement speed;

[0013] The dialogue data transmission module is used to determine the data compensation strategy based on the scenario 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.

[0014] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described online dialogue data transmission method.

[0015] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described online dialogue data transmission method.

[0016] The beneficial effects of the online data transmission method, apparatus, device, and storage medium provided in this application are as follows:

[0017] This application 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.

[0018] The embodiments of this application do not adopt the transmission logic of the fixed encoding format of the prior art. Instead, based on the determination of the scenario type, they further combine 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 problems caused by the inability of the fixed transmission strategy to adapt to bandwidth fluctuations, and ensure smooth and uninterrupted dialogue.

[0019] In summary, the embodiments of this application optimize the existing fixed processing strategies by accurately identifying the scene and dynamically adapting the bandwidth, thereby solving the adaptation defects of the existing fixed processing strategies. This makes the online dialogue experience of smart wearable devices more in line with the actual use scenarios of users. Whether in complex and noisy mobile environments or bandwidth fluctuation scenarios, stable and clear voice interaction can be achieved, meeting the core needs of users for daily online dialogue. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating an online data transmission method for dialogue provided in an embodiment of this application;

[0022] Figure 2 A structural block diagram of a dialogue data online transmission device provided in an embodiment of this application;

[0023] Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0026] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for online transmission of dialogue data according to an embodiment of this application. The method can be executed by an electronic device, and specifically, the method may include S101 to S103.

[0027] S101: Obtain the ambient noise, moving speed and communication bandwidth of the smart wearable device; the smart wearable device communicates with 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.

[0028] In this embodiment, acquiring the ambient noise, moving speed, and communication bandwidth of the smart wearable device specifically includes:

[0029] Receives environmental noise data and movement speed sent by a smart wearable device, wherein the environmental noise data includes noise decibel value, noise frequency range and noise duration;

[0030] Environmental noise is calculated based on noise decibel value, noise frequency range, and noise duration.

[0031] Acquire communication bandwidth data of smart wearable devices, including peak bandwidth, real-time available bandwidth value, and bandwidth fluctuation frequency;

[0032] The communication bandwidth is calculated based on the peak bandwidth, the real-time available bandwidth value, and the bandwidth fluctuation frequency.

[0033] In this embodiment, environmental noise data is data collected and transmitted by the smart wearable device to reflect the characteristics of the surrounding environmental noise. Movement speed is a parameter characterizing the movement state of the smart wearable device and the first user. Communication bandwidth data reflects the transmission capability of the communication link between the smart wearable device and the first device, including peak bandwidth, real-time available bandwidth, and bandwidth fluctuation frequency. Environmental noise is a parameter calculated based on environmental noise data, characterizing the overall level of environmental noise, and is used to determine whether the environment is quiet or noisy. Communication bandwidth is a parameter calculated based on communication bandwidth data, characterizing the actual transmission capability of the communication link, and is used to subsequently determine the data transmission strategy.

[0034] The consideration behind this embodiment is that a single parameter cannot comprehensively and accurately characterize the actual situation of environmental noise and communication bandwidth. For example, relying solely on noise decibel values ​​cannot distinguish the impact of different frequencies of noise at the same decibel level on voice transmission; referring only to real-time available bandwidth values ​​is insufficient to reflect the interference of bandwidth fluctuations on transmission stability. This embodiment improves data accuracy by collecting multi-dimensional environmental noise and communication bandwidth data, and then calculating environmental noise and communication bandwidth based on this data. This provides a reliable basis for subsequent scenario type determination, data compensation strategies, and transmission strategy formulation, avoiding inappropriate strategy adaptation due to errors in a single parameter, and ensuring the clarity and stability of voice transmission.

[0035] For example, the specific implementation process of this embodiment may include:

[0036] Before the conversation begins, the first user can enable Bluetooth on both the smart wearable device (such as smart glasses) and the first device (such as the first user's mobile phone). The smart glasses will search for and match the phone's Bluetooth signal to establish a Bluetooth connection. Once the Bluetooth connection is stable, the first user can control the phone through the smart glasses to make a voice call with the second user.

[0037] The smart wearable device can collect ambient noise signals through its built-in dual MEMS microphones (main microphone and reference microphone). The main microphone collects signals mixed with speech and noise, while the reference microphone collects pure noise signals. After processing by an adaptive filtering algorithm, the noise decibel value, noise frequency range, and noise duration are extracted to form ambient noise data. At the same time, the smart wearable device collects acceleration vectors in three-dimensional space through its built-in 3-axis accelerometer. After jitter reduction and baseline calibration, the movement speed is obtained. Subsequently, the smart wearable device can send the ambient noise data and movement speed to the first device through a communication link.

[0038] After receiving environmental noise data and movement speed from the smart wearable device, the first device can first determine whether the noise frequency range covers the core voice frequency band (200-3400Hz). If it does, the weight of the noise decibel value is increased. Then, combined with whether the noise duration exceeds a stable threshold of 20ms, the environmental noise that represents the overall level of environmental noise is calculated.

[0039] The first device initiates bandwidth detection through a Bluetooth communication link established with the smart wearable device, and calculates the maximum transmission rate supported by the link in the past second to determine the peak bandwidth. At the same time, it counts the number of bytes of voice data actually transmitted in the past 100ms and converts it into the real-time available bandwidth value. In addition, the first device can record the number of times the real-time available bandwidth value changes every 100ms to determine the bandwidth fluctuation frequency, thereby obtaining communication bandwidth data.

[0040] The first device uses the peak bandwidth as the upper limit constraint, excludes abnormal real-time available bandwidth values ​​that exceed the peak value, and then combines the bandwidth fluctuation frequency. If the fluctuation frequency exceeds twice every 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 obtained through comprehensive calculation.

[0041] S102: Determine the scene type based on ambient noise and movement speed.

[0042] In this embodiment, the scene type is determined based on ambient noise and movement speed, specifically including:

[0043] 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.

[0044] 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.

[0045] 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.

[0046] 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.

[0047] In this embodiment, a data compensation strategy is determined based on the scenario type and communication bandwidth, specifically including:

[0048] 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.

[0049] 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.

[0050] 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.

[0051] In this embodiment, the first noise threshold is a benchmark value for distinguishing between quiet and noisy environments, used to determine the ambient noise level. The first speed threshold is a benchmark value for distinguishing between static and mobile states of the smart wearable device, used to determine the speed level. The second speed threshold is a benchmark value for distinguishing between normal and high-speed movement of the device. The first to fourth scene types are scene categories based on ambient noise and movement speed, corresponding to quiet static, noisy static, noisy mobile, and quiet high-speed scenes, respectively, used to characterize different usage environments. The first bandwidth threshold is a benchmark value for distinguishing between high and low communication bandwidth, used to classify bandwidth levels. The first compensation strategy mapping table and the second compensation strategy mapping table are tables that store the correspondence between scene types and data compensation strategies, containing multiple one-to-one correspondences between scene types and data compensation strategies. The data compensation strategy is a voice processing strategy adapted to the scene and bandwidth, used to optimize voice transmission effects, and may include parameters such as sound quality compensation and latency compensation.

[0052] The consideration behind this embodiment is that classifying scenarios based on a single parameter can easily lead to judgment bias. This embodiment combines dual noise thresholds and dual speed thresholds to achieve fine-grained scenario classification, accurately covering different usage scenarios such as quiet / noisy, static / mobile / high-speed mobile. Simultaneously, considering that communication bandwidth directly determines the implementation capability of the compensation strategy, and that the amount of compensation data that can be carried differs between high and low bandwidth, this embodiment uses a first bandwidth threshold to distinguish bandwidth levels and corresponds to different compensation strategy mapping tables. This avoids compensation failure or resource waste due to bandwidth mismatch, ensuring that the data compensation strategy both meets the core needs of the scenario and conforms to the actual bandwidth carrying capacity, thus improving the adaptability and stability of voice transmission.

[0053] For example, the specific implementation process of determining the scene type based on environmental noise and movement speed, and determining the data compensation strategy based on the scene type and communication bandwidth, may include:

[0054] The first device compares the ambient noise value with a first noise threshold, and compares the moving speed value with a first speed threshold and a second speed threshold respectively: if the ambient noise value is less than the first noise threshold and the moving speed value is less than the first speed threshold, the current scene type is determined to be the first scene type; if the ambient noise value is greater than the first noise threshold and the moving speed value is less than the first speed threshold, the current scene type is determined to be the second scene type; if the ambient noise value is greater than the first noise threshold and the moving speed value is greater than or equal to the first speed threshold and less than the second speed threshold, the current scene type is determined to be the third scene type; if the ambient noise value is less than the first noise threshold and the moving speed value is greater than or equal to the second speed threshold, the current scene type is determined to be the fourth scene type.

[0055] The first device compares the communication bandwidth value with the first bandwidth threshold: if the communication bandwidth value is greater than the first bandwidth threshold, it is determined that the current scenario is a high bandwidth scenario, and then the device storage module calls the pre-stored first compensation strategy mapping table; if the communication bandwidth value is less than or equal to the first bandwidth threshold, it is determined that the current scenario is a low bandwidth scenario, and then the device storage module calls the pre-stored second compensation strategy mapping table.

[0056] The first device searches for the corresponding mapping entry in the invoked compensation strategy mapping table based on the determined scenario type. This entry records the data compensation strategy adapted to the current bandwidth level for that scenario type. For example, scenario type 1 corresponds to a strategy of enabling audio enhancement and disabling latency compensation in the first compensation strategy mapping table, while scenario type 3 corresponds to a strategy of disabling audio enhancement and enabling latency compensation in the second compensation strategy mapping table. The first device extracts the data compensation strategy information from the mapping entry, verifies the completeness of the strategy, and confirms that it includes core parameters such as audio quality compensation and latency compensation.

[0057] S103: Determine the data compensation strategy based on the scenario 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.

[0058] 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.

[0059] 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:

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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:

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] In this embodiment, determining the data compensation strategy corresponding to the scene type based on the second compensation strategy mapping table includes:

[0073] 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.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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).

[0082] 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.

[0083] 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:

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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.

[0090] 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;

[0091] The voice data is processed based on a data compensation strategy to obtain the data to be transmitted, including:

[0092] 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;

[0093] Extract a second audio segment from the speech data, which is located in the second frequency band. Extract human voice harmonics and intonation features from the second audio segment. The second frequency band is the vowel formant dominant frequency band.

[0094] The naturalness feature is obtained by compressing the harmonics and intonation features of human voice based on the fourth sound quality compensation coefficient.

[0095] The first speech feature and naturalness feature corresponding to the same semantic frame are concatenated to obtain speech data after sound quality compensation.

[0096] 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.

[0097] 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:

[0098] Extract the average transmission delay and average fundamental frequency of the audio data after sound quality compensation;

[0099] The duration of the transition tone is calculated based on the average transmission delay and the second delay compensation coefficient.

[0100] The first transition tone data is generated based on the average fundamental frequency and the duration of the transition tone.

[0101] Obtain the historical voice data of the first user and extract the speech rate parameter based on the historical voice data;

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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:

[0110] 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).

[0111] 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.

[0112] 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).

[0113] 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.

[0114] 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).

[0115] 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.

[0116] 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.

[0117] 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).

[0118] The first device calculates the average speech rate of the first user from the first user's historical voice data (such as 100 past call voices) stored locally. For example, if the analysis shows that the average speech rate is 150 words / minute, the device queries the preset envelope parameter library based on the speech rate parameter and matches the envelope parameter of "3ms rise, 9ms stability, and 3ms fall" (the speech rate of 150 words / minute corresponds to this parameter).

[0119] 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).

[0120] 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.

[0121] 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.

[0122] 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.

[0123] 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.

[0124] 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.

[0125] Scene recognition module 22 is used to determine the scene type based on ambient noise and movement speed;

[0126] 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.

[0127] 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:

[0128] 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.

[0129] 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.

[0130] 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.

[0131] 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.

[0132] 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:

[0133] 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.

[0134] 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.

[0135] 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.

[0136] 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:

[0137] 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.

[0138] 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.

[0139] 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.

[0140] 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.

[0141] 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.

[0142] 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:

[0143] 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.

[0144] 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.

[0145] 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.

[0146] 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.

[0147] 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.

[0148] 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:

[0149] 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;

[0150] Extract a second audio segment from the speech data, which is located in the second frequency band. Extract human voice harmonics and intonation features from the second audio segment. The second frequency band is the vowel formant dominant frequency band.

[0151] The naturalness feature is obtained by compressing the harmonics and intonation features of human voice based on the fourth sound quality compensation coefficient.

[0152] The first speech feature and naturalness feature corresponding to the same semantic frame are concatenated to obtain speech data after sound quality compensation.

[0153] 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.

[0154] 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:

[0155] Extract the average transmission delay and average fundamental frequency of the audio data after sound quality compensation;

[0156] The duration of the transition tone is calculated based on the average transmission delay and the second delay compensation coefficient.

[0157] The first transition tone data is generated based on the average fundamental frequency and the duration of the transition tone.

[0158] Obtain the historical voice data of the first user and extract the speech rate parameter based on the historical voice data;

[0159] 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.

[0160] 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.

[0161] 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 2The functions of the data acquisition module 21, scene recognition module 22, and dialogue data transmission module 23 are shown.

[0162] 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.

[0163] 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.

[0164] 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.

[0165] 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.

[0166] 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 complete the process. 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.

[0167] 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.

[0168] 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.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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.

[0173] 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; 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. 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, 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. The data compensation strategies in the first compensation strategy mapping table and the second compensation strategy mapping table are different. The voice data is processed based on the data compensation strategy to obtain the data to be transmitted, and the data to be transmitted is transmitted to the smart wearable device. 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.

2. The online transmission method for dialogue data as described in claim 1, 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.

3. The online transmission method for dialogue data as described in claim 1, 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.

4. The online transmission method for dialogue data as described in claim 3, 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.

5. 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 as a first scene type if the ambient noise is less than a first noise threshold and the moving speed is less than a first speed threshold. 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. The dialogue data transmission module is used to determine the data compensation strategy corresponding to the scenario type based on the first compensation strategy mapping table if the communication bandwidth is greater than the first bandwidth threshold. 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. The data compensation strategies in the first compensation strategy mapping table and the second compensation strategy mapping table are different. The dialogue data transmission module is specifically used to query a data compensation strategy from the first compensation strategy mapping table based on the first scenario type if the scenario type is the first scenario type. The data compensation strategy obtained by querying 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. The voice data is 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.

6. 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 4.

7. 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 4.

Citation Information

Patent Citations

  • Bluetooth earphone low-delay transmission method

    CN117440440A

  • Anti-interference method and device, wearable equipment and storage medium

    CN118555016A