Electronic equipment, data transmission method and storage medium
By designing processing modules, time division multiplexing ports, vibration modules and audio playback modules in electronic devices, synchronous transmission of audio data and vibration data is achieved, and the problem of poor synchronization of the existing midrange vibration modules is solved, and the sound and vibration synergistic effect is improved.
Patent Information
- Application Number
- CN202311648108.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, there may be a large delay between the time when the vibration module vibrates and the time when the audio plays the audio, resulting in poor synchronization between the vibration module and the audio module, affecting the sound and vibration synergistic effect.
An electronic device is designed, including a processing module, a time division multiplexing port, a vibration module and an audio playback module. The input end of the time division multiplexing port is connected to the processing module, and the audio data and vibration data transmitted by the processing module are received, and the output end of the time division multiplexing port is transmitted to the vibration module and the audio playback module respectively, ensuring the synchronous transmission of audio data and vibration data.
By synchronously transmitting audio data and vibration data, the synchronization between the vibration module and the audio playback module is achieved, thereby improving the sound and vibration coordination effect, ensuring that the audio playback module can play audio simultaneously when the vibration module vibrates.
Smart Images

Figure CN120104089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to data transmission but is not limited to the field of data transmission, and in particular to an electronic device, a data transmission method and a storage medium. Background Art
[0002] In the related art, tactile data and audio data can be encapsulated in one file, and the same file can be used to trigger the vibration module to vibrate and the audio module to output audio. However, in the related art, there may be a large delay between the time when the vibration module vibrates and the time when the audio playback module plays the audio, resulting in the vibration of the vibration module and the audio played by the audio module being out of sync. In this way, in some application scenarios where the audio playback module needs to play audio synchronously when the vibration module vibrates, the effect of audio-vibration synergy is poor. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure disclose an electronic device, a data transmission method and a storage medium to solve the problem of how to achieve a good sound-vibration synergy effect.
[0004] According to a first aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0005] a processing module configured to obtain audio data and vibration data of the application;
[0006] A time division multiplexing port, an input end of which is connected to the processing module and is configured to receive the audio data and the vibration data transmitted by the processing module;
[0007] a vibration module connected to an output end of the time division multiplexing port and configured to vibrate based on the vibration data;
[0008] An audio playback module is connected to the output end of the time division multiplexing port and is configured to play audio based on the audio data.
[0009] In some embodiments, the output end of the time division multiplexing port transmits the vibration data to the vibration module through a first channel, and transmits the audio data to the audio playback module through a second channel.
[0010] In some embodiments, the vibration module includes: at least two vibration elements;
[0011] The first channel comprises: a sub-channel corresponding to each of the vibration elements;
[0012] The output end of the time division multiplexing port is configured to transmit vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element; the vibration sub-data transmitted in different sub-channels corresponding to the vibration element are different, and each of the vibration sub-data together constitutes the vibration data.
[0013] In some embodiments, the processing module is configured to adjust the sub-channel corresponding to each vibration element when the relative orientation of the at least two vibration elements changes;
[0014] The output end of the time division multiplexing port is configured to transmit the vibration sub-data to the corresponding vibration element through each adjusted sub-channel.
[0015] In some embodiments, the audio playback module includes: at least two audio playback components;
[0016] The second channel includes: a sub-channel corresponding to each of the audio playback elements;
[0017] The output end of the time division multiplexing port is configured to transmit audio sub-data to the audio playback element through a sub-channel corresponding to the audio output component; the audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and each of the audio sub-data together constitutes the audio data.
[0018] In some embodiments, the processing module is configured to adjust the sub-channels corresponding to the audio playback elements when the relative positions of the at least two audio playback elements change;
[0019] The output end of the time division multiplexing port is configured to transmit the audio sub-data to the corresponding audio playback element through each adjusted sub-channel.
[0020] In some embodiments, the processing module is configured to trigger the time-division multiplexing port to power on in response to a detected predetermined trigger event; and to trigger the time-division multiplexing port to power off when the vibration module stops vibrating and the audio playback module stops audio playback;
[0021] The output end of the time division multiplexing port is configured to transmit the vibration data to the vibration module after power-on, and to transmit the audio data to the audio playback module.
[0022] According to a second aspect of an embodiment of the present disclosure, a data transmission method is provided, the data transmission method comprising:
[0023] Get the audio data and vibration data of the application;
[0024] Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module respectively, so as to trigger the audio playback module to play the audio when the vibration module vibrates.
[0025] In some embodiments, the transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include:
[0026] Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module through the first channel, and the audio data is transmitted to the audio playback module through the second channel.
[0027] In some embodiments, the vibration module includes: at least two vibration elements; the first channel includes: a sub-channel corresponding to each of the vibration elements; the transmitting the vibration data to the vibration module through the first channel includes:
[0028] transmitting vibration sub-data to the vibration element through a sub-channel corresponding to the vibration element;
[0029] The vibration sub-data transmitted in different sub-channels corresponding to the vibration elements are different, and the various vibration sub-data together constitute the vibration data.
[0030] In some embodiments, the method further comprises:
[0031] When the relative orientations of the at least two vibration elements change, adjusting the sub-channels corresponding to the respective vibration elements;
[0032] The transmitting the vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element comprises:
[0033] The vibration sub-data is transmitted to the corresponding vibration element through each adjusted sub-channel.
[0034] In some embodiments, the audio playback module includes: at least two audio playback elements; the second channel includes: a sub-channel corresponding to each of the audio playback elements; and the transmitting the audio data to the audio playback module through the second channel includes:
[0035] transmitting audio sub-data to the audio playback element via a sub-channel corresponding to the audio output component;
[0036] The audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and the various audio sub-data together constitute the audio data.
[0037] In some embodiments, the method further comprises:
[0038] When the relative positions of the at least two audio playback elements change, adjusting the sub-channels corresponding to the audio playback elements;
[0039] The transmitting the audio sub-data to the audio playback element through the sub-channel corresponding to the audio output component comprises:
[0040] The audio sub-data are transmitted to the corresponding audio playback element through each adjusted sub-channel.
[0041] In some embodiments, the method further comprises:
[0042] In response to a detected predetermined trigger event, triggering the time division multiplexing port to power on;
[0043] The transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include:
[0044] After the time division multiplexing port is powered on, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playing module based on the same time division multiplexing port.
[0045] In some embodiments, the method further comprises:
[0046] When the vibration module stops vibrating and the audio playing module stops playing audio, the time division multiplexing port is triggered to be powered off.
[0047] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer-executable program, and when the executable program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.
[0048] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0049] In an embodiment of the present disclosure, an electronic device is provided, comprising: a processing module configured to obtain audio data and vibration data of an application; a time-division multiplexing port, the input end of the time-division multiplexing port is connected to the processing module, and is configured to receive the audio data and the vibration data transmitted by the processing module; a vibration module is connected to the output end of the time-division multiplexing port, and is configured to vibrate based on the vibration data; an audio playback module is connected to the output end of the time-division multiplexing port, and is configured to play audio based on the audio data. Here, since vibration data can be transmitted to the vibration module based on the same time-division multiplexing port to trigger the vibration module to vibrate based on the vibration data, and audio data can be transmitted to the audio playback module to trigger the audio playback module to play audio based on the audio data, therefore, the same data transmission protocol of the same time-division multiplexing port can be used to synchronously transmit audio data and vibration data, so that while the vibration module vibrates based on the vibration data, the audio playback module can synchronously play audio based on the synchronously arrived audio data. Compared with the related art that cannot ensure the synchronization between the vibration module and the audio playback module, the embodiment of the present disclosure can synchronously trigger the audio playback module to play audio while the vibration module is vibrating. In this way, the synchronization between the vibration of the vibration module and the audio playback of the audio can be ensured, thereby ensuring a good effect of sound-vibration synergy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] Figure 1 is a schematic structural diagram of a cleaning device according to an exemplary embodiment;
[0052] Figure 2 is a schematic structural diagram of a cleaning device according to an exemplary embodiment;
[0053] Figure 3 is a schematic structural diagram of a cleaning device according to an exemplary embodiment;
[0054] Figure 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment;
[0055] Figure 5 It is a flowchart of a data transmission method according to an exemplary embodiment;
[0056] Figure 6 The figure is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0058] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0059] In the following description, the terms "first / second / third" are used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged with the specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0061] In order to better understand the embodiments of the present disclosure, some application scenarios in related technologies are described below:
[0062] like Figure 1 As shown, the electronic device includes an application (APP, Application) layer, a framework (Framework) layer, a hardware abstraction (Hal) / advanced digital sound processing (ADSP, Advanced Digital Sound Processing) layer, a kernel driver (KD, Kernel Driver) layer and a hardware (Hardware) layer.
[0063] The electronic device includes: a processing module, configured to obtain an audio file of an application at an application layer, where the audio file can be an OGG (OggVobis or OggVorbis) file that combines haptic data and audio data; calling a media player (MP) interface at a framework layer, and performing audio track (AT) processing on the audio file to obtain a pulse code modulation (PCM) output stream; performing audio mixer (AM) processing on the PCM output stream to obtain initial audio data (AD) and initial vibration data (HD); fusing the initial audio data and the initial vibration data to obtain output data (OD); transmitting the output data to a Hal / ADSP layer, where the output data is preprocessed based on an ADSP algorithm to obtain processed audio data and vibration data; a sound line (SWR) The input end of the SWR port is connected to the processing module and configured to receive the processed vibration data at the kernel driver layer; the vibration module is connected to the output end of the SWR port and configured to vibrate based on the processed vibration data at the hardware layer; the time division multiplexing port, the input end of the time division multiplexing port is connected to the processing module and configured to receive the processed audio data at the kernel driver layer; the audio playback module is configured to play audio based on the processed audio data at the hardware layer.
[0064] The related technology only guarantees data synchronization when processing audio files from the APP layer to the Hal / ADSP layer to obtain audio data and vibration data. After preprocessing the output data using the ADSP algorithm to obtain the processed audio data and vibration data, the vibration data and audio data are transmitted separately using different transmission protocols corresponding to different ports. Therefore, there will be a large delay between the vibration data transmitted to the vibration module and the audio data transmitted to the audio playback module, resulting in the final electronic device being unable to synchronize vibration and audio playback at the hardware layer.
[0065] Based on this, Figure 2 As shown, an embodiment of the present disclosure provides an electronic device 1, including:
[0066] The processing module 11 is configured to obtain audio data and vibration data of the application;
[0067] A time division multiplexing port 12, an input end of the time division multiplexing port 12 is connected to the processing module 11, and is configured to receive the audio data and the vibration data transmitted by the processing module 11;
[0068] A vibration module 13 connected to an output end of the time division multiplexing port 12 and configured to vibrate based on the vibration data;
[0069] The audio playing module 14 is connected to the output end of the time division multiplexing port 12 and is configured to play audio based on the audio data.
[0070] In some embodiments, the electronic device 1 may include but is not limited to mobile communication terminals, portable entertainment devices, wearable devices, household appliances and special equipment. Among them, mobile communication terminals may include but are not limited to mobile phones, tablet computers and smart watches; portable entertainment devices may include but are not limited to audio players and digital cameras; wearable devices may include but are not limited to smart bracelets and smart glasses; household appliances may include but are not limited to televisions, stereos and video recorders; special equipment may include but are not limited to drones and electronic game consoles.
[0071] In some embodiments, the processing module 11 can be configured to obtain audio data and vibration data of an application in a predetermined scenario; a time division multiplexing port 12, the input end of the time division multiplexing port 12 is connected to the processing module 11, and is configured to receive the audio data and the vibration data transmitted by the processing module 11; a vibration module 13 is connected to the output end of the time division multiplexing port 12, and is configured to vibrate based on the vibration data; an audio playback module 14 is connected to the output end of the time division multiplexing port 12, and is configured to play audio based on the audio data.
[0072] In some embodiments, the predetermined scene is any application scene that requires the coordination of sound and vibration. Exemplarily, the predetermined scene includes but is not limited to at least one of the following scenes: a game scene and a music playing scene. For example, the game scene can be a shooting game scene. In the shooting game scene, it is necessary to play the gunshot in coordination with the vibration. At this time, the game scene is an application scene that requires the coordination of sound and vibration. For example, the music playing scene can be a scene that requires vibration with the ring. In the scene that vibrates with the ring, it is necessary to generate vibration in coordination with the drum beats in the ring. At this time, the music playing scene is an application scene that requires the coordination of sound and vibration.
[0073] In some embodiments, the electronic device 1 includes: a processing module 11, which can be configured to: parse the audio file in the application to obtain initial audio data and initial vibration data; pre-process the initial audio data and initial vibration data to obtain processed audio data and vibration data. A time division multiplexing port 12, the input end of the time division multiplexing port 12 is connected to the processing module 11, and is configured to receive the pre-processed audio data and vibration data transmitted by the processing module 11. A vibration module 13 is connected to the output end of the time division multiplexing port 12, and is configured to vibrate based on the pre-processed vibration data. An audio playback module 14 is connected to the output end of the time division multiplexing port 12, and is configured to play audio based on the pre-processed audio data.
[0074] In some embodiments, the application program may be an application program for generating an audio file. The audio file may include, but is not limited to, at least one of the following: an OGG file, a Wave Audio File (WAV), a Free Lossless Audio Codec (FLAC) file, an Advanced Audio Coding (AAC) file, and a Windows Media Audio (WMA) file. The audio file may include both audio data and vibration data.
[0075] In some embodiments, the processing module 11 is configured to detect whether there is a predetermined trigger event, and when the predetermined trigger event is detected, the time division multiplexing port 12 is triggered to transmit audio data and vibration data. The time division multiplexing port 12 can be configured to transmit vibration data to the vibration module 13 and transmit audio data to the audio playback module 14 under the triggering of the processing module 11.
[0076] In some embodiments, the predetermined trigger event may be an event in which the processing module 11 calls a predetermined instruction. The predetermined instruction may be a program pre-stored in the electronic device 1. For example, the predetermined instruction may be a pcm_start() function pre-stored in the electronic device 1, and the pcm_start() function is used to trigger the time division multiplexing port 12 to transmit audio data and vibration data.
[0077] In some embodiments, the predetermined trigger event may be an event of detecting a touch operation acting on a predetermined key. The predetermined key may include a virtual control and / or a physical key, and the touch operation may include: a text input operation and / or a click operation. Here, the time division multiplexing port 12 may be triggered to transmit audio data and vibration data based on the user's touch operation, so that the timing of the vibration module 13 vibrating based on the vibration data and the timing of the audio playback module 14 playing audio based on the audio data can meet the user's needs.
[0078] In some embodiments, the processing module 11 can be configured to predict the transmission duration corresponding to the vibration data and the transmission duration corresponding to the audio data, and determine the start time of triggering the time division multiplexing port 12 to transmit the vibration data and the start time of transmitting the audio data based on the transmission duration corresponding to the vibration data and the transmission duration corresponding to the audio data. The output end of the time division multiplexing port 12 is configured to transmit the vibration data and the audio data according to the start time determined by the processing module 11, so that when the vibration data is transmitted to the vibration module 13, the audio data is synchronously transmitted to the audio playback module 14. Here, the synchronization of the vibration of the vibration module 13 and the audio playback of the audio module can be improved.
[0079] In some embodiments, the output end of the time division multiplexing port 12 can be configured to simultaneously transmit vibration data to the vibration module 13 and to transmit audio data to the audio playback module 14. It should be noted that the transmission protocol used when the same time division multiplexing port 12 is used to transmit data is the same. The time division multiplexing port 12 can be configured to simultaneously transmit vibration data and audio data based on the same transmission protocol. Exemplarily. The transmission protocol may include an audio time division multiplexing (TDM, Time-Division Multiplexing) protocol. The time division multiplexing port 12 may be a TDM port.
[0080] In some embodiments, the vibration module 13 may include a first chip and a vibration element, wherein the first chip is connected to the output end of the time division multiplexing port 12 and is configured to drive the vibration element to vibrate based on the vibration data.
[0081] In some embodiments, the vibration data may include a vibration waveform. The first chip may be configured to drive the vibration element to vibrate based on the vibration waveform. The vibration data described in any of the embodiments of the present disclosure may also be understood as a type of tactile data.
[0082] In some embodiments, the vibration element may include a vibration motor. The first chip may be a motor driver chip.
[0083] In some embodiments, the audio playback module 14 may include a second chip and an audio playback element, wherein the second chip is connected to the output end of the time division multiplexing port 12 and is configured to drive the audio playback element to play audio based on audio data.
[0084] In some embodiments, the audio data may include a sound waveform. The audio data described in any of the embodiments of the present disclosure may also be understood as a kind of auditory data. The second chip may be configured to drive the audio playback element to play audio based on the sound waveform. The second chip may be a power amplifier chip, and the power amplifier chip may be configured to amplify the received sound waveform to drive the audio playback element to play audio based on the amplified sound waveform.
[0085] In some embodiments, the audio playback element may include a speaker. The second chip may be a speaker amplifier chip.
[0086] In the embodiment of the present disclosure, since vibration data can be transmitted to the vibration module based on the same time-division multiplexing port to trigger the vibration module to vibrate based on the vibration data, and audio data can be transmitted to the audio playback module to trigger the audio playback module to play audio based on the audio data, the same data transmission protocol of the same time-division multiplexing port can be used to synchronously transmit audio data and vibration data, so that while the vibration module vibrates based on the vibration data, the audio playback module can synchronously play audio based on the audio data that arrives synchronously. Compared with the method in the related art that cannot ensure the synchronization of the vibration module and the audio playback module, the embodiment of the present disclosure can synchronously trigger the audio playback module to play audio while the vibration module vibrates. In this way, the synchronization of the vibration of the vibration module and the audio playback module playing audio can be ensured, thereby ensuring a good effect of sound-vibration coordination.
[0087] In some embodiments, the output end of the time division multiplexing port 12 transmits the vibration data to the vibration module 13 through a first channel, and transmits the audio data to the audio playback module 14 through a second channel.
[0088] In some embodiments, the output end of the time division multiplexing port 12 can be configured to simultaneously transmit vibration data to the vibration module 13 through the first channel and transmit audio data to the audio playback module 14 through the second channel.
[0089] In some embodiments, the first channel and the second channel may be channels in different communication lines.
[0090] In some embodiments, the first channel and the second channel may be in the same communication line, and the first channel and the second channel may be two channels with different corresponding transmission times in the same communication line. Exemplarily, the transmission time of the vibration data corresponding to the first channel may be earlier than the transmission time of the audio data corresponding to the second channel, or the transmission time of the vibration data corresponding to the second channel may be later than the transmission time of the audio data corresponding to the second channel.
[0091] It should be noted that when the port for transmitting data is the time division multiplexing port 12, the audio data and vibration data transmitted in the transmission order can be understood as a continuous data stream. That is to say, when the port for transmitting data is the time division multiplexing port 12, the corresponding transmission interval time of any two data adjacent in the transmission order is less than the interval threshold. In some application scenarios, the corresponding transmission interval time of any two data adjacent in the transmission order can be 0. In the disclosed embodiment, although the transmission order and transmission time corresponding to the first channel and the second channel are different, due to the fact that the corresponding transmission interval time of any two data adjacent in the transmission order is shorter (approaching 0), therefore, the vibration data transmitted through the first channel and the audio data transmitted through the second channel can approach to simultaneously reach the vibration module 13 and the audio playback module 14, so that the vibration module 13 vibrates, and the audio playback module 14 plays the audio synchronously. In this way, the synchronization of the vibration of the vibration module 13 and the audio playback module 14 playing the audio can be ensured.
[0092] In some embodiments, the transmission time corresponding to the first channel and the second channel is different, which may mean that the time slots corresponding to the vibration data transmitted in the first channel and the audio data transmitted in the second channel are different. The time slot is used to characterize the transmission time and / or transmission order corresponding to the data in the time slot in the same line. The time slot can be used to store any of the audio data or vibration data described in the embodiments of the present disclosure.
[0093] In some embodiments, the processing module 11 can be configured to determine the transmission order corresponding to the audio data and the vibration data, and transmit the audio data and the vibration data to the time division multiplexing port 12 according to the transmission order. The output port of the time division multiplexing port 12 is configured to transmit the vibration data to the vibration module 13 through the first channel according to the transmission order, and transmit the audio data to the audio playback module 14 through the second channel. It can be understood that the transmission order can be used to determine the transmission time corresponding to the first channel and the second channel.
[0094] In some embodiments, the processing module 11 may be the master end of the time division multiplexing port 12, and the processing module 11 may be configured to determine at least one of the transmission rate, transmission order, and transmission structure corresponding to any data transmitted in the time division multiplexing port 12. The vibration module 13 and the audio playback module 14 may both be the slave ends of the time division multiplexing port 12, the vibration module 13 may process the vibration data transmitted by the module 11 through the receiving time division multiplexing port 12, and the audio playback module 14 may receive the audio playback data transmitted by the processing module 11 through the time division multiplexing port 12.
[0095] In some embodiments, the processing module 11 can be configured to obtain audio data and vibration data of the application; slice the obtained audio data to obtain audio sub-data; each audio sub-data together constitutes the audio data; slice the obtained vibration data to obtain vibration sub-data; each vibration sub-data together constitutes the vibration data. The input end of the time division multiplexing port 12 is connected to the processing module 11, and the input end of the time division multiplexing port 12 is configured to receive each vibration sub-data and each audio sub-data; the vibration module 13 is configured to vibrate based on each vibration sub-data; and the audio playback module 14 is configured to play audio based on each audio sub-data.
[0096] In some embodiments, the processing module 11 can be configured to determine the transmission order corresponding to the audio sub-data and the vibration sub-data, and transmit the audio sub-data and the vibration sub-data to the time division multiplexing port 12 according to the transmission order; the time division multiplexing port 12 is configured to continuously transmit the audio sub-data and the vibration sub-data according to the transmission order. It can be understood that the audio sub-data and the vibration sub-data transmitted in the transmission order can be understood as a continuous data stream. The data after any two adjacent slices in the transmission order, the corresponding transmission interval time is less than the interval threshold. In some application scenarios, the data after any two adjacent slices in the transmission order, the corresponding transmission interval time can be 0.
[0097] In some embodiments, the transmission time corresponding to each audio sub-data and / or vibration sub-data may be less than the time threshold. The time division multiplexing port 12 may be configured to interleave the transmission of the audio sub-data and / or vibration sub-data in a transmission order.
[0098] In the embodiment of the present disclosure, the characteristics of the time division multiplexing port 12 can be utilized to transmit vibration data to the vibration module 13 through different channels of the same time division multiplexing port 12 to trigger the vibration of the vibration module 13, and synchronously transmit audio data to the audio playback module 14 to trigger the audio playback module 14 to play audio, thereby ensuring the synchronization of the vibration of the vibration module 13 and the playback of the audio playback module 14.
[0099] In some embodiments, the vibration module 13 includes: at least two vibration elements;
[0100] The first channel comprises: a sub-channel corresponding to each of the vibration elements;
[0101] The output end of the time division multiplexing port 12 is configured to transmit vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element; the vibration sub-data transmitted in different sub-channels corresponding to the vibration element are different, and each of the vibration sub-data together constitutes the vibration data.
[0102] For example, Figure 3As shown, the vibration module 13 may include two vibration elements, namely vibration motor a and vibration motor b, the vibration data may be composed of vibration sub-data channel1 and vibration sub-data channel2, the first channel may include sub-channel slot1 and sub-channel slot2, sub-channel slot1 is used to transmit vibration sub-data channel1, and sub-channel slot2 is used to transmit vibration sub-data channel2; the output end of the time division multiplexing port 12 is configured to transmit vibration sub-data channel1 to vibration motor a through sub-channel slot1, and transmit vibration sub-data channel2 to vibration motor b through sub-channel slot2.
[0103] In some embodiments, the processing module 11 can be configured to slice the vibration data to obtain vibration sub-data; the number of vibration sub-data is determined according to the data length of the vibration data. The number of vibration sub-data may be positively correlated with the data length of the vibration data. Exemplarily, if the data length of the vibration data is greater than the first threshold, the number of vibration sub-data is greater than the second threshold; if the length of the vibration data is less than the first threshold, the number of vibration sub-data is less than the second threshold.
[0104] In some embodiments, the data length of the vibration sub-data may be less than the first length threshold. The transmission time of the vibration sub-data in the sub-channel is less than the first preset time threshold. In this way, it is possible to ensure that the intervals between the arrival times of different vibration sub-data at the vibration module 13 are small, thereby ensuring the synchronization of the vibration sub-data arriving at the vibration module 13.
[0105] In some embodiments, at least two vibration elements may be arranged on the electronic device 1 at a first predetermined distance. Here, the first predetermined distance may be flexibly set so that the vibrations of different vibration elements do not interfere with each other, thereby improving the anti-interference ability of the vibration element. Furthermore, since the distances between two different vibration elements are the same, when the vibration elements vibrate, at least two vibration elements can make different parts of the electronic device 1 vibrate uniformly, thereby ensuring a good vibration effect.
[0106] In some embodiments, at least two vibration elements may form a vibration element array on the electronic device 1 .
[0107] In some embodiments, at least two vibration elements may be relatively arranged on the electronic device 1. Exemplarily, at least two vibration elements may be relatively arranged on the left and right sides of the electronic device 1, or at least two vibration elements may be relatively arranged on the front frame and the back frame of the electronic device 1. Here, since at least two vibration elements may be relatively arranged on the electronic device 1, it is possible to ensure that when the vibration elements vibrate, at least two vibration elements can relatively vibrate, thereby ensuring that the overall vibration of the electronic device 1 is uniform and a three-dimensional vibration sense can be formed.
[0108] In some embodiments, the vibration module 13 includes: at least one vibration element group, each of which includes: two vibration elements arranged opposite to each other on the electronic device 1. The first channel includes: a sub-channel corresponding to each of the vibration elements; the output end of the time division multiplexing port 12 is configured to transmit vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element; the vibration sub-data transmitted in different sub-channels corresponding to the vibration element are different, and each of the vibration sub-data together constitutes the vibration data. Here, since the vibration elements in the vibration module 13 are arranged in pairs in the electronic device 1, and the positions of the vibration elements arranged in pairs are relative, when the vibration module 13 vibrates, it can ensure that when any vibration element vibrates, there is a vibration element arranged opposite to it that vibrates synchronously, thereby ensuring that the overall vibration of the vibration module 13 is uniform and can form a three-dimensional vibration.
[0109] In the disclosed embodiment, since the vibration module 13 includes at least two vibration elements, the vibration sub-data transmitted in different sub-channels corresponding to the vibration elements are different, so when all the vibration elements vibrate, at least two vibration elements can be used to generate different vibration sensations at at least two positions of the electronic device 1. In this way, the stereoscopic vibration effect of the electronic device 1 can be ensured to be good.
[0110] In some embodiments, the processing module 11 is configured to adjust the sub-channel corresponding to each vibration element when the relative orientation of the at least two vibration elements changes;
[0111] The output end of the time division multiplexing port 12 is configured to transmit the vibration sub-data to the corresponding vibration element through each adjusted sub-channel.
[0112] In some embodiments, the processing module 11 is configured to adjust the subchannels corresponding to the respective vibration elements when the change amplitude of the relative orientation of at least two vibration elements is greater than the first amplitude threshold; or, when the change amplitude of the relative orientation of at least two vibration elements is less than the first amplitude threshold, not adjust the subchannels corresponding to the respective vibration elements. Here, when the change amplitude of at least two vibration elements is small, the situation that the vibration effect after adjustment is poor and the resource overhead is large due to frequent misadjustment of the subchannels corresponding to the vibration elements can be reduced.
[0113] In some embodiments, the processing module 11 is configured to adjust the sub-channel corresponding to each vibration element when the relative positions of at least two vibration elements are exchanged.
[0114] It can be understood that the relative orientation of at least two vibration elements here is exchanged, which may refer to the orientation of at least one vibration element relative to another vibration element and the orientation of the other vibration element relative to the at least one vibration element being exchanged. Exemplarily, the at least two vibration elements include vibration element A and vibration element B, vibration element A is arranged on the left side of the electronic device 1, and vibration element B is arranged on the right side of the electronic device 1. At this time, the orientation of vibration element A relative to vibration element B is the left, and the orientation of vibration element B relative to vibration element A is the right. The processing module 11 can be configured to adjust the subchannels corresponding to vibration element A and vibration element B when the relative orientation of vibration element A and vibration element B is exchanged. That is, the subchannels corresponding to vibration element A and vibration element B can be adjusted when the orientation of vibration element A relative to vibration element B changes to the right, and the orientation of vibration element B relative to vibration element A changes to the left.
[0115] In some embodiments, the processing module 11 may also be configured to exchange the sub-channels corresponding to the at least two vibration elements when the relative positions of the at least two vibration elements are exchanged.
[0116] Exemplarily, the vibration module 13 may include two vibration elements, namely, a vibration motor a and a vibration motor b, and the vibration motor a and the vibration motor b may be relatively arranged on the electronic device 1. The first channel may include a sub-channel slot1 and a sub-channel slot2, wherein the sub-channel slot1 is used to transmit the vibration sub-data channel1, and the sub-channel slot2 is used to transmit the vibration sub-data channel2; the vibration data may be composed of the vibration sub-data channel1 and the vibration sub-data channel2. When the relative orientation of the vibration motor a and the vibration motor b does not change, the output end of the time division multiplexing port 12 may be configured to transmit the vibration sub-data channel1 to the vibration motor a through the sub-channel slot1, and to transmit the vibration sub-data channel2 to the vibration motor b through the sub-channel slot2. The processing module 11 can be configured to adjust the sub-channel corresponding to vibration motor a to sub-channel slot2, and adjust the sub-channel corresponding to vibration motor b to slot1 when the relative orientation of vibration motor a and vibration motor b changes; the output end of the time division multiplexing port 12 can be configured to transmit vibration sub-data channel2 to vibration motor a through sub-channel slot2, and transmit vibration sub-data channel1 to vibration motor b through sub-channel slot1.
[0117] In some embodiments, the processing module 11 may be configured to swap sub-channels corresponding to at least two vibration elements when detecting that the electronic device is flipped.
[0118] In some embodiments, the processing module 11 may be configured to detect the posture change information of the electronic device 1; determine the posture change amplitude of the electronic device 1 based on the posture change information; and determine whether the relative orientation of at least two vibration elements has changed based on the posture change amplitude. The posture change information may include the change information of the position and posture of the electronic device 1. The processing module 11 may also be configured to determine whether the change amplitude of the relative orientation of at least two vibration elements is greater than a first amplitude threshold based on the posture change amplitude of the electronic device 1.
[0119] In the disclosed embodiment, since the processing module 11 is configured to adjust the sub-channel corresponding to each vibration element when the relative orientation of the at least two vibration elements changes, and the output end of the time division multiplexing port 12 is configured to transmit the vibration sub-data to the corresponding vibration element through each adjusted sub-channel, therefore, when the relative orientation of at least two vibration elements changes, the sub-channel corresponding to each vibration element can be adjusted to adjust the vibration sub-data transmitted to each vibration element, so as to ensure that when the adjusted vibration element vibrates, the vibration feeling of the electronic device 1 experienced by the user is the same as the initial vibration feeling. In this way, it can be ensured that the vibration effect of the electronic device 1 is good and the user's experience is good.
[0120] In some embodiments, the audio playback module 14 includes: at least two audio playback components;
[0121] The second channel includes: a sub-channel corresponding to each of the audio playback elements;
[0122] The output end of the time division multiplexing port 12 is configured to transmit audio sub-data to the audio playback element through the sub-channel corresponding to the audio output component; the audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and each of the audio sub-data together constitutes the audio data.
[0123] For example, Figure 3 As shown, the audio playback module 14 may include two audio playback elements, namely speaker c and speaker d, the audio playback data may be composed of audio sub-data channel3 and audio sub-data channel4, the second channel may include sub-channel slot3 and sub-channel slot4, sub-channel slot3 is used to transmit audio sub-data channel3, and sub-channel slot4 is used to transmit audio sub-data channel4; the output end of the time division multiplexing port 12 is configured to transmit audio sub-data channel3 to speaker c through sub-channel slot3, and transmit audio sub-data channel4 to speaker d through sub-channel slot4.
[0124] In some embodiments, the processing module 11 can be configured to slice the audio data to obtain audio sub-data; the number of audio sub-data is determined according to the data length of the audio data. The number of audio sub-data may be positively correlated with the data length of the audio data. Exemplarily, if the data length of the audio data is greater than the third threshold, the number of audio sub-data is greater than the fourth threshold; if the length of the audio data is less than the third threshold, the number of audio sub-data is less than the fourth threshold.
[0125] In some embodiments, the data length of the audio sub-data may be less than the second length threshold. The transmission time of the audio sub-data in the sub-channel is less than the second preset time threshold. In this way, it is possible to ensure that the intervals between the arrival times of different audio sub-data at the audio playback module 14 are small, thereby ensuring the synchronization of the audio sub-data arriving at the audio playback module 14. It should be noted that the second length threshold here may be the same as the first length threshold described in any of the embodiments of the present disclosure, or the second length threshold here may be different from the first length threshold described in any of the embodiments of the present disclosure. The second preset time threshold here may be the same as the first preset time threshold described in any of the embodiments of the present disclosure, or the second preset time threshold here may be different from the first preset time threshold described in any of the embodiments of the present disclosure.
[0126] In some embodiments, at least two audio elements may be arranged on the electronic device 1 at a second predetermined distance. Here, the second predetermined distance may be flexibly set so that the audio between different audio elements does not interfere with each other, thereby improving the anti-interference capability of the audio playback element. Furthermore, since the distance between two different audio elements is the same, when the audio playback element plays audio, at least two audio playback elements can make different parts of the electronic device 1 play audio uniformly, thereby ensuring a good audio playback effect.
[0127] In some embodiments, at least two audio playback elements may form an audio playback element array on the electronic device 1 .
[0128] In some embodiments, at least two audio playback elements may be relatively arranged on the electronic device 1. Exemplarily, at least two audio playback elements may be relatively arranged on the left and right sides of the electronic device 1, or at least two audio playback elements may be relatively arranged on the front frame and the back frame of the electronic device 1. Here, since at least two audio playback elements may be relatively arranged on the electronic device 1, it is possible to ensure that when the audio playback elements play audio, at least two audio playback elements can play audio relatively, thereby ensuring that the sound effect of the electronic device 1 is uniform and a stereo sound effect can be formed.
[0129] In some embodiments, the audio playback module 14 includes: at least one audio playback element group, each of which includes: two audio playback elements arranged oppositely on the electronic device 1. The first channel includes: a sub-channel corresponding to each of the audio playback elements; the output end of the time division multiplexing port 12 is configured to transmit audio sub-data to the audio playback element through the sub-channel corresponding to the audio playback element; the audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and each of the audio sub-data together constitutes the audio data. Here, since the audio playback elements in the audio playback module 14 are arranged in pairs in the electronic device 1, and the positions of the paired audio playback elements are relative, when the audio playback module 14 plays audio, it can ensure that when any audio playback element plays audio, there is an audio playback element arranged oppositely to play audio synchronously, thereby ensuring that the overall sound effect of the audio playback module 14 is uniform and can form a stereo sound effect.
[0130] In the embodiment of the present disclosure, since the audio playback module 14 includes at least two audio playback elements, the audio sub-data transmitted in different sub-channels corresponding to the audio playback elements are different, so when all audio playback elements play audio, at least two audio playback elements can be used to produce different audio playback effects at at least two positions of the electronic device 1. In this way, the stereo sound effect of the electronic device 1 can be ensured to be good.
[0131] In some embodiments, the processing module 11 is configured to adjust the sub-channels corresponding to the audio playback elements when the relative positions of the at least two audio playback elements change;
[0132] The output end of the time division multiplexing port 12 is configured to transmit the audio sub-data to the corresponding audio playback element through each adjusted sub-channel.
[0133] In some embodiments, the processing module 11 is configured to adjust the subchannels corresponding to the respective audio playback elements when the change amplitude of the relative orientation of at least two audio playback elements is greater than the second amplitude threshold; or, when the change amplitude of the relative orientation of at least two audio playback elements is less than the first amplitude threshold, not adjust the subchannels corresponding to the respective audio playback elements. Here, when the change amplitude of at least two audio playback elements is small, the situation that the adjusted audio playback effect is poor and the resource overhead is large due to frequent misadjustment of the subchannels corresponding to the audio playback elements can be reduced.
[0134] In some embodiments, the processing module 11 is configured to adjust the sub-channel corresponding to each audio playback element when the relative positions of at least two audio playback elements are exchanged.
[0135] It can be understood that the relative positions of at least two audio playback elements here are exchanged, which may refer to the position of at least one audio playback element relative to another audio playback element and the position of another audio playback element relative to the at least one audio playback element being exchanged. Exemplarily, the at least two audio playback elements include an audio playback element C and an audio playback element D, the audio playback element C is arranged on the left side of the electronic device 1, and the audio playback element D is arranged on the right side of the electronic device 1. At this time, the position of the audio playback element C relative to the audio playback element D is the left side, and the position of the audio playback element D relative to the audio playback element C is the right side. The processing module 11 can be configured to adjust the subchannels corresponding to the audio playback element C and the audio playback element D when the relative positions of the audio playback element C and the audio playback element D are exchanged. That is, the subchannels corresponding to the audio playback element C and the audio playback element D can be adjusted when the position of the audio playback element C relative to the audio playback element D changes to the right side and the position of the audio playback element D relative to the audio playback element C changes to the left side.
[0136] In some embodiments, the processing module 11 may also be configured to exchange the sub-channels corresponding to the at least two audio playback elements when the relative positions of the at least two audio playback elements are exchanged.
[0137] Exemplarily, the audio playback module 14 may include two audio playback elements, namely, a speaker c and a speaker d, and the speaker c and the speaker d may be relatively arranged on the electronic device 1. The audio playback data may be composed of audio sub-data channel3 and audio sub-data channel4, and the second channel may include sub-channel slot3 and sub-channel slot4, sub-channel slot3 is used to transmit audio sub-data channel3, and sub-channel slot4 is used to transmit audio sub-data channel4. When the relative positions of the speaker c and the speaker d do not change, the output end of the time division multiplexing port 12 is configured to transmit the audio sub-data channel3 to the speaker c through the sub-channel slot3, and transmit the audio sub-data channel4 to the speaker d through the sub-channel slot4. The processing module 11 can be configured to adjust the sub-channel corresponding to the speaker c to the sub-channel slot4 and the sub-channel corresponding to the speaker d to the slot3 when the relative positions of the speaker c and the speaker d change; the output end of the time division multiplexing port 12 can be configured to transmit the audio sub-data channel4 to the speaker 3 through the sub-channel slot4, and transmit the vibration sub-data channel3 to the speaker 4 through the sub-channel slot3.
[0138] In some embodiments, the processing module 11 may be configured to swap sub-channels corresponding to at least two audio playback elements when detecting that the electronic device 1 is flipped.
[0139] In some embodiments, the processing module 11 may be configured to detect the posture change information of the electronic device 1; determine the posture change amplitude of the electronic device 1 based on the posture change information; and determine whether the relative positions of at least two audio playback components have changed based on the posture change amplitude. The posture change information may include the change information of the position and posture of the electronic device 1. The processing module 11 may also be configured to determine whether the change amplitude of the relative positions of at least two audio playback components is greater than a second amplitude threshold based on the posture change amplitude of the electronic device 1.
[0140] In the disclosed embodiment, since the processing module 11 is configured to adjust the sub-channels corresponding to the respective audio playback elements when the relative positions of the at least two audio playback elements change, and the output end of the time division multiplexing port 12 is configured to transmit the audio sub-data to the corresponding audio playback elements through the adjusted sub-channels, therefore, when the relative positions of the at least two audio playback elements change, the sub-channels corresponding to the respective audio playback elements can be adjusted to adjust the audio sub-data transmitted to the respective audio playback elements, so as to ensure that when the adjusted audio playback elements play audio, the stereo sound effect of the electronic device 1 experienced by the user is the same as the initial sound effect. In this way, the sound effect of the electronic device 1 can be ensured to be good, and the user's experience can be ensured to be good.
[0141] In some embodiments, the processing module 11 is configured to trigger the time-division multiplexing port 12 to power on in response to a detected predetermined trigger event; and to trigger the time-division multiplexing port 12 to power off when the vibration module 13 stops vibrating and the audio playback module 14 stops audio playback;
[0142] The output end of the time division multiplexing port 12 is configured to transmit the vibration data to the vibration module 13 and transmit the audio data to the audio playback module 14 after power-on.
[0143] It can be understood that when the time division multiplexing port 12 is powered off, the time division multiplexing port 12 stops transmitting the vibration data and the audio data.
[0144] In some embodiments, the processing module 11 may also be configured to, in response to a detected predetermined trigger event, trigger the vibration module 13 and the audio playback module 14 to power on; when the vibration module 13 stops vibrating, trigger the vibration module 13 to power off; when the audio playback module 14 stops vibrating, trigger the audio playback module 14 to power off. The vibration module 13 may be configured to vibrate based on vibration data when powered on, and stop receiving vibration data when powered off; the audio playback module 14 may be configured to play audio based on audio data when powered on, and stop playing audio when powered off.
[0145] In some embodiments, the processing module 11 can be configured to transmit a first trigger instruction in response to a detected predetermined trigger event. When the time-division multiplexing port 12 is powered off, the time-division multiplexing port 12 may be in a dormant state, at which point the time-division multiplexing port 12 may be configured to monitor a predetermined first trigger instruction; in response to monitoring the first trigger instruction, perform a power-on operation and transmit a second trigger instruction to the vibration module 13 and the audio playback module 14, respectively. When the vibration module 13 and the audio playback module 14 are powered off, the vibration module 13 and the audio playback module 14 may both be in a dormant state, at which point the vibration module 13 may be configured to monitor a second trigger instruction; in response to monitoring the second trigger instruction, perform a power-on operation and vibrate based on vibration data. The audio playback module 14 may be configured to monitor a second trigger instruction; in response to monitoring the second trigger instruction, perform a power-on operation and play audio based on audio data. In this way, in response to a detected predetermined trigger event, a communication connection can be quickly established between the time division multiplexing port 12 and the vibration module 13, as well as a communication connection can be established between the time division multiplexing port 12 and the audio playback module 14, so as to quickly transmit vibration data and audio playback data, so that the vibration module 13 quickly vibrates based on the vibration data, and the audio playback module 14 quickly plays audio based on the audio data.
[0146] In the disclosed embodiment, since the time-division multiplexing port 12 can be triggered to power on in response to a detected predetermined trigger event, and the time-division multiplexing port 12 can be triggered to power off when the vibration module 13 stops vibrating and the audio playback module 14 stops audio playback, the power-on and power-off states of the time-division multiplexing port 12 can be flexibly controlled, and the time-division multiplexing port 12 can be quickly triggered to power on in response to a predetermined trigger event when data needs to be transmitted, which can improve the efficiency of data transmission. When the time-division multiplexing port 12 is quickly triggered to power off when data does not need to be transmitted, the power consumption of the time-division multiplexing port 12 can be reduced.
[0147] To better understand the technical solutions in the embodiments of the present disclosure, please refer to Figure 3 , Figure 3 An electronic device 1 is shown as an example.
[0148] The electronic device 1 includes an application layer, a framework layer, a hardware abstraction / advanced digital sound processing layer, a kernel driver layer and a hardware layer.
[0149] The electronic device 1 comprises: a processing module 11, configured to obtain an audio file of an application program at an application layer, where the audio file may be an OGG file that combines tactile data and audio data; call a media player interface at a framework layer, and perform track processing on the audio file to obtain a pulse code modulation output stream; perform mixing processing on the pulse code modulation output stream to obtain initial vibration data and initial audio data; perform fusion of the initial audio data and the initial vibration data to obtain output data; transmit the output data to a hardware abstraction / advanced digital sound processing layer, and perform processing on the hardware abstraction / advanced digital sound The processing layer pre-processes the output data based on an advanced digital sound processing algorithm to obtain processed audio data and vibration data; the time division multiplexing port 12, the input end of the time division multiplexing port 12 is connected to the processing module 11, and is configured to receive the processed vibration data and the processed audio data at the kernel driver layer; the vibration module 13 is connected to the output end of the time division multiplexing port 12, and is configured to vibrate at the hardware layer based on the processed vibration data; the audio playback module 14 is connected to the output end of the time division multiplexing port 12, and is configured to play audio at the hardware layer based on the processed audio data.
[0150] like Figure 5 As shown, an embodiment of the present disclosure provides a data transmission method, the data transmission method comprising:
[0151] Get the audio data and vibration data of the application;
[0152] Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module respectively, so as to trigger the audio playback module to play the audio when the vibration module vibrates.
[0153] It should be noted that any data transmission method described in the embodiments of the present disclosure can be applied to any electronic device described in the embodiments of the present disclosure.
[0154] In some embodiments, audio data and vibration data of an application are obtained in a predetermined scenario; based on the same time-division multiplexing port, the vibration data are transmitted to a vibration module and the audio data are transmitted to an audio playback module respectively to trigger the audio playback module to play audio when the vibration module vibrates.
[0155] In some embodiments, the predetermined scene is any application scene that requires the coordination of sound and vibration. Exemplarily, the predetermined scene includes but is not limited to at least one of the following scenes: a game scene and a music playing scene. For example, the game scene can be a shooting game scene. In the shooting game scene, it is necessary to play the gunshot in coordination with the vibration. At this time, the game scene is an application scene that requires the coordination of sound and vibration. For example, the music playing scene can be a scene that requires vibration with the ring. In the scene that vibrates with the ring, it is necessary to generate vibration in coordination with the drum beats in the ring. At this time, the music playing scene is an application scene that requires the coordination of sound and vibration.
[0156] In some embodiments, the audio file in the application is parsed to obtain initial audio data and initial vibration data; the initial audio data and initial vibration data are preprocessed to obtain processed audio data and vibration data. Based on the same time-division multiplexing port, the processed vibration data is transmitted to the vibration module and the processed audio data is transmitted to the audio playback module respectively, so as to trigger the audio playback module to play audio when the vibration module vibrates.
[0157] In some embodiments, the application may be an application for generating an audio file. The audio file may include but is not limited to at least one of the following: an OGG file, a WAV file, a FLAC file, an AAC file, and a WMA file. The audio file may include both audio data and vibration data.
[0158] In some embodiments, it is detected whether a predetermined trigger event exists. When the predetermined trigger event is detected, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module based on the same time division multiplexing port, so as to trigger the audio playback module to play audio when the vibration module vibrates.
[0159] In some embodiments, the predetermined trigger event may be an event in which the processing module calls a predetermined instruction. The predetermined instruction may be a program pre-stored in the electronic device. For example, the predetermined instruction may be a pcm_start() function pre-stored in the electronic device, and the pcm_start() function is used to trigger the time division multiplexing port to transmit audio data and vibration data.
[0160] In some embodiments, the predetermined trigger event may be an event of detecting a touch operation acting on a predetermined key. The predetermined key may include a virtual control and / or a physical key, and the touch operation may include: a text input operation and / or a click operation. Here, the time-division multiplexing port may be triggered to transmit audio data and vibration data based on the user's touch operation, so that the timing of the vibration module vibrating based on the vibration data and the timing of the audio playback module playing audio based on the audio data can meet the user's needs.
[0161] In some embodiments, the transmission duration corresponding to the vibration data and the transmission duration corresponding to the audio data can be predicted, and based on the transmission duration corresponding to the vibration data and the transmission duration corresponding to the audio data, the start time of triggering the time-division multiplexing port to transmit the vibration data and the start time of transmitting the audio data are determined. Based on the same time-division multiplexing port, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module according to the start time, so as to trigger the audio playback module to synchronously play the audio when the vibration module vibrates. Here, the synchronization of the vibration module vibration and the audio module playing the audio can be improved.
[0162] In some embodiments, audio data and vibration data of an application can be obtained; based on the same time-division multiplexing port, the vibration data is transmitted to a vibration module and the audio data is transmitted to an audio playback module respectively to trigger the audio playback module to play audio when the vibration module vibrates.
[0163] In some embodiments, based on the same time division multiplexing port, vibration data is transmitted to the vibration module and audio data is transmitted to the audio playback module at the same time. It should be noted that the transmission protocol used when the same time division multiplexing port is used to transmit data is the same. The time division multiplexing port can be configured to transmit vibration data and audio data simultaneously based on the same transmission protocol. Exemplarily. The transmission protocol may include an audio time division multiplexing (TDM, Time-Division Multiplexing) protocol. The time division multiplexing port may be a TDM port.
[0164] In the embodiment of the present disclosure, since vibration data can be transmitted to the vibration module based on the same time-division multiplexing port to trigger the vibration module to vibrate based on the vibration data, and audio data can be transmitted to the audio playback module to trigger the audio playback module to play audio based on the audio data, the same data transmission protocol of the same time-division multiplexing port can be used to synchronously transmit audio data and vibration data, so that while the vibration module vibrates based on the vibration data, the audio playback module can synchronously play audio based on the audio data that arrives synchronously. Compared with the method in the related art that cannot ensure the synchronization of the vibration module and the audio playback module, the embodiment of the present disclosure can synchronously trigger the audio playback module to play audio while the vibration module vibrates. In this way, the synchronization of the vibration of the vibration module and the audio playback module playing audio can be ensured, thereby ensuring a good effect of sound-vibration coordination.
[0165] In some embodiments, the transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include:
[0166] Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module through the first channel, and the audio data is transmitted to the audio playback module through the second channel.
[0167] In some embodiments, based on the same time division multiplexing port, vibration data is transmitted to the vibration module through the first channel, and audio data is transmitted to the audio playback module through the second channel.
[0168] In some embodiments, the first channel and the second channel may be channels in different communication lines.
[0169] In some embodiments, the first channel and the second channel may be in the same communication line, and the first channel and the second channel may be two channels with different corresponding transmission times in the same communication line. Exemplarily, the transmission time of the vibration data corresponding to the first channel may be earlier than the transmission time of the audio data corresponding to the second channel, or the transmission time of the vibration data corresponding to the second channel may be later than the transmission time of the audio data corresponding to the second channel.
[0170] It should be noted that, when the port for transmitting data is a time-division multiplexing port, the audio data and vibration data transmitted in the transmission order can be understood as a continuous data stream. In other words, when the port for transmitting data is a time-division multiplexing port, the corresponding transmission interval time of any two data adjacent in the transmission order is less than the interval threshold. In some application scenarios, the corresponding transmission interval time of any two data adjacent in the transmission order can be 0. In the disclosed embodiment, although the transmission order and transmission time corresponding to the first channel and the second channel are different, due to the fact that the corresponding transmission interval time of any two data adjacent in the transmission order is shorter (approaching 0), therefore, the vibration data transmitted through the first channel and the audio data transmitted through the second channel can approach to simultaneously reach the vibration module and the audio playback module, so that the vibration module vibrates, and the audio playback module plays the audio synchronously. In this way, the synchronization of the vibration module vibration and the audio playback module playing the audio can be ensured.
[0171] In some embodiments, the transmission time corresponding to the first channel and the second channel is different, which may mean that the time slots corresponding to the vibration data transmitted in the first channel and the audio data transmitted in the second channel are different. The time slot is used to characterize the transmission time and / or transmission order corresponding to the data in the time slot in the same line. The time slot can be used to store any of the audio data or vibration data described in the embodiments of the present disclosure.
[0172] In some embodiments, the transmission order corresponding to the audio data and the vibration data can be determined, and the audio data and the vibration data are transmitted to the time division multiplexing port according to the transmission order. Based on the same time division multiplexing port and the transmission order, the vibration data is transmitted to the vibration module through the first channel, and the audio data is transmitted to the audio playback module through the second channel. It is understandable that the transmission order can be used to determine the transmission time corresponding to the first channel and the second channel.
[0173] In some embodiments, it can be configured to determine at least one of a transmission rate, a transmission order, and a transmission structure corresponding to any data transmitted in a time division multiplexing port.
[0174] In some embodiments, the audio data and vibration data of the application are obtained; the obtained audio data is sliced to obtain audio sub-data; each audio sub-data together constitutes the audio data; the obtained vibration data is sliced to obtain vibration sub-data; each vibration sub-data together constitutes the vibration data. Based on the same time-division multiplexing port, the vibration sub-data is transmitted to the vibration module and the audio sub-data is transmitted to the audio playback module respectively, so as to trigger the audio playback module to play audio based on each audio sub-data when the vibration module vibrates based on each vibration sub-data.
[0175] In some embodiments, the transmission order corresponding to the audio sub-data and the vibration sub-data is determined, and the audio sub-data and the vibration sub-data are transmitted to the time division multiplexing port according to the transmission order; based on the same time division multiplexing port and transmission order, the audio sub-data and the vibration sub-data are continuously transmitted. It can be understood that the audio sub-data and the vibration sub-data transmitted in the transmission order can be understood as a continuous data stream. The data after any two adjacent slices in the transmission order, the corresponding transmission interval time is less than the interval threshold. In some application scenarios, the data after any two adjacent slices in the transmission order, the corresponding transmission interval time can be 0.
[0176] In some embodiments, the transmission time corresponding to each audio sub-data and / or vibration sub-data may be less than the time threshold. The time division multiplexing port may be configured to interleave the transmission of the audio sub-data and / or vibration sub-data in a transmission order.
[0177] In the disclosed embodiment, the characteristics of the time-division multiplexing port can be utilized to transmit vibration data to the vibration module through different channels of the same time-division multiplexing port to trigger the vibration module to vibrate, and synchronously transmit audio data to the audio playback module to trigger the audio playback module to play audio, thereby ensuring the synchronization of the vibration of the vibration module and the playback of the audio playback module.
[0178] In some embodiments, the vibration module includes: at least two vibration elements; the first channel includes: a sub-channel corresponding to each of the vibration elements; the transmitting the vibration data to the vibration module through the first channel includes:
[0179] transmitting vibration sub-data to the vibration element through a sub-channel corresponding to the vibration element;
[0180] The vibration sub-data transmitted in different sub-channels corresponding to the vibration elements are different, and the various vibration sub-data together constitute the vibration data.
[0181] For example, Figure 3 As shown, the vibration module may include two vibration elements, namely vibration motor a and vibration motor b. The vibration data may be composed of vibration sub-data channel1 and vibration sub-data channel2. The first channel may include sub-channel slot1 and sub-channel slot2. Sub-channel slot1 is used to transmit vibration sub-data channel1, and sub-channel slot2 is used to transmit vibration sub-data channel2. Vibration sub-data channel1 is transmitted to vibration motor a through sub-channel slot1, and vibration sub-data channel2 is transmitted to vibration motor b through sub-channel slot2.
[0182] In some embodiments, the vibration data is sliced to obtain vibration sub-data; the number of vibration sub-data is determined according to the data length of the vibration data. The number of vibration sub-data may be positively correlated with the data length of the vibration data. Exemplarily, if the data length of the vibration data is greater than a first threshold, the number of vibration sub-data is greater than a second threshold; if the length of the vibration data is less than the first threshold, the number of vibration sub-data is less than the second threshold.
[0183] In some embodiments, the data length of the vibration sub-data may be less than the first length threshold. The transmission time of the vibration sub-data in the sub-channel is less than the first preset time threshold. In this way, it is possible to ensure that the interval between the arrival times of different vibration sub-data at the vibration module is small, and ensure the synchronization of the vibration sub-data arriving at the vibration module.
[0184] In some embodiments, at least two vibration elements may be arranged on the electronic device at a first predetermined distance. Here, the first predetermined distance may be flexibly set so that the vibrations of different vibration elements do not interfere with each other, thereby improving the anti-interference ability of the vibration element. Furthermore, since the distances between two different vibration elements are the same, when the vibration elements vibrate, at least two vibration elements can make different parts of the electronic device vibrate uniformly, thereby ensuring a good vibration effect.
[0185] In some embodiments, at least two vibration elements may form a vibration element array on the electronic device.
[0186] In some embodiments, at least two vibration elements may be relatively arranged on the electronic device. Exemplarily, at least two vibration elements may be relatively arranged on the left and right sides of the electronic device, or at least two vibration elements may be relatively arranged on the front frame and back frame of the electronic device. Here, since at least two vibration elements may be relatively arranged on the electronic device, it is possible to ensure that when the vibration elements vibrate, at least two vibration elements can vibrate relatively, thereby ensuring that the overall vibration of the electronic device is uniform and a three-dimensional vibration sense can be formed.
[0187] In some embodiments, the vibration module includes: at least one vibration element group, each of the vibration element groups includes: two vibration elements arranged opposite to each other on the electronic device. The first channel includes: a sub-channel corresponding to each of the vibration elements; vibration sub-data is transmitted to the vibration element through the sub-channel corresponding to the vibration element; the vibration sub-data transmitted in different sub-channels corresponding to the vibration element are different, and each of the vibration sub-data together constitutes the vibration data. Here, since the vibration elements in the vibration module are arranged in pairs in the electronic device, and the positions of the vibration elements arranged in pairs are relative, when the vibration module vibrates, it can ensure that when any vibration element vibrates, there is a vibration element arranged opposite to it that vibrates synchronously, thereby ensuring that the overall vibration of the vibration module is uniform and a three-dimensional vibration feeling can be formed.
[0188] In the disclosed embodiment, since the vibration module includes at least two vibration elements, the vibration sub-data transmitted in different sub-channels corresponding to the vibration elements are different, so when all the vibration elements vibrate, at least two vibration elements can be used to generate different vibration sensations at at least two positions of the electronic device. In this way, a good stereoscopic vibration effect of the electronic device can be ensured.
[0189] In some embodiments, the method further comprises:
[0190] When the relative orientations of the at least two vibration elements change, adjusting the sub-channels corresponding to the respective vibration elements;
[0191] The transmitting the vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element comprises:
[0192] The vibration sub-data is transmitted to the corresponding vibration element through each adjusted sub-channel.
[0193] In some embodiments, when the change amplitude of the relative orientation of at least two vibration elements is greater than the first amplitude threshold, the subchannel corresponding to each vibration element is adjusted; or, when the change amplitude of the relative orientation of at least two vibration elements is less than the first amplitude threshold, the subchannel corresponding to each vibration element is not adjusted. Here, when the change amplitude of at least two vibration elements is small, the situation that the vibration effect after adjustment is poor and the resource overhead is large due to frequent misadjustment of the subchannel corresponding to the vibration element can be reduced.
[0194] In some embodiments, when the relative positions of at least two vibration elements are exchanged, the sub-channels corresponding to the respective vibration elements are adjusted.
[0195] It can be understood that the relative orientation of at least two vibration elements here is exchanged, which may mean that the orientation of at least one vibration element relative to another vibration element is exchanged with the orientation of the other vibration element relative to the at least one vibration element. Exemplarily, the at least two vibration elements include vibration element A and vibration element B, vibration element A is arranged on the left side of the electronic device, and vibration element B is arranged on the right side of the electronic device. At this time, the orientation of vibration element A relative to vibration element B is to the left, and the orientation of vibration element B relative to vibration element A is to the right. In the case where the relative orientations of vibration element A and vibration element B are exchanged, the subchannels corresponding to vibration element A and vibration element B are adjusted. That is, the subchannels corresponding to vibration element A and vibration element B can be adjusted when the orientation of vibration element A relative to vibration element B changes to the right, and the orientation of vibration element B relative to vibration element A changes to the left.
[0196] In some embodiments, when the relative positions of at least two vibration elements are exchanged, the sub-channels corresponding to the at least two vibration elements are exchanged.
[0197] Exemplarily, the vibration module may include two vibration elements, namely, vibration motor a and vibration motor b, and vibration motor a and vibration motor b may be relatively arranged on the electronic device. The first channel may include sub-channel slot1 and sub-channel slot2, sub-channel slot1 is used to transmit vibration sub-data channel1, and sub-channel slot2 is used to transmit vibration sub-data channel2; the vibration data may be composed of vibration sub-data channel1 and vibration sub-data channel2. When the relative orientation of vibration motor a and vibration motor b does not change, vibration sub-data channel1 is transmitted to vibration motor a through sub-channel slot1, and vibration sub-data channel2 is transmitted to vibration motor b through sub-channel slot2. When the relative orientation of vibration motor a and vibration motor b changes, the sub-channel corresponding to vibration motor a is adjusted to sub-channel slot2, and the sub-channel corresponding to vibration motor b is adjusted to slot1; vibration sub-data channel2 is transmitted to vibration motor a through sub-channel slot2, and vibration sub-data channel1 is transmitted to vibration motor b through sub-channel slot1.
[0198] In some embodiments, the posture change information of the electronic device is detected; the posture change amplitude of the electronic device is determined based on the posture change information; and based on the posture change amplitude, it is determined whether the relative orientation of at least two vibration elements has changed. The posture change information may include change information of the position and posture of the electronic device.
[0199] In some embodiments, whether the change amplitude of the relative orientation of at least two vibration elements is greater than a first amplitude threshold is determined based on the change amplitude of the posture of the electronic device.
[0200] In the disclosed embodiment, since the subchannels corresponding to the respective vibration elements are adjusted when the relative orientation of the at least two vibration elements changes, and the vibration sub-data are transmitted to the corresponding vibration elements through the adjusted subchannels, when the relative orientation of the at least two vibration elements changes, the subchannels corresponding to the respective vibration elements can be adjusted to adjust the vibration sub-data transmitted to the respective vibration elements, so as to ensure that when the adjusted vibration elements vibrate, the vibration sensation of the electronic device experienced by the user is the same as the initial vibration sensation. In this way, the vibration effect of the electronic device can be ensured to be good, and the user's experience can be ensured to be good.
[0201] In some embodiments, the audio playback module includes: at least two audio playback elements; the second channel includes: a sub-channel corresponding to each of the audio playback elements; and the transmitting the audio data to the audio playback module through the second channel includes:
[0202] transmitting audio sub-data to the audio playback element via a sub-channel corresponding to the audio output component;
[0203] The audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and the various audio sub-data together constitute the audio data.
[0204] For example, Figure 3 As shown, the audio playback module may include two audio playback elements, namely, speaker c and speaker d, the audio playback data may be composed of audio sub-data channel3 and audio sub-data channel4, the second channel may include sub-channel slot3 and sub-channel slot4, sub-channel slot3 is used to transmit audio sub-data channel3, and sub-channel slot4 is used to transmit audio sub-data channel4. Audio sub-data channel3 can be transmitted to speaker c through sub-channel slot3, and audio sub-data channel4 can be transmitted to speaker d through sub-channel slot4.
[0205] In some embodiments, the audio data is sliced to obtain audio sub-data; the number of audio sub-data is determined according to the data length of the audio data. The number of audio sub-data may be positively correlated with the data length of the audio data. Exemplarily, if the data length of the audio data is greater than the third threshold, the number of audio sub-data is greater than the fourth threshold; if the length of the audio data is less than the third threshold, the number of audio sub-data is less than the fourth threshold.
[0206] In some embodiments, the data length of the audio sub-data may be less than the second length threshold. The transmission time of the audio sub-data in the sub-channel is less than the second preset time threshold. In this way, it is possible to ensure that the intervals between the arrival times of different audio sub-data at the audio playback module are small, thereby ensuring the synchronization of the audio sub-data arriving at the audio playback module. It should be noted that the second length threshold here may be the same as the first length threshold described in any of the embodiments of the present disclosure, or the second length threshold here may be different from the first length threshold described in any of the embodiments of the present disclosure. The second preset time threshold here may be the same as the first preset time threshold described in any of the embodiments of the present disclosure, or the second preset time threshold here may be different from the first preset time threshold described in any of the embodiments of the present disclosure.
[0207] In some embodiments, at least two audio elements may be arranged on the electronic device at a second predetermined distance. Here, the second predetermined distance may be flexibly set so that the audio between different audio elements does not interfere with each other, thereby improving the anti-interference ability of the audio playback element. Furthermore, since the distance between two different audio elements is the same, when the audio playback element plays audio, at least two audio playback elements can make different parts of the electronic device play audio uniformly, thereby ensuring a good audio playback effect.
[0208] In some embodiments, at least two audio playback elements may form an audio playback element array on the electronic device.
[0209] In some embodiments, at least two audio playback elements may be relatively arranged on the electronic device. Exemplarily, at least two audio playback elements may be relatively arranged on the left and right sides of the electronic device, or at least two audio playback elements may be relatively arranged on the front frame and back frame of the electronic device. Here, since at least two audio playback elements may be relatively arranged on the electronic device, it is possible to ensure that when the audio playback element plays audio, at least two audio playback elements can play audio relatively, thereby ensuring that the sound effect of the electronic device is uniform and a stereo sound effect can be formed.
[0210] In some embodiments, the audio playback module includes: at least one audio playback element group, each of which includes: two audio playback elements arranged opposite to each other on the electronic device. The first channel includes: a sub-channel corresponding to each of the audio playback elements; audio sub-data can be transmitted to the audio playback element through the sub-channel corresponding to the audio playback element; the audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and each of the audio sub-data together constitutes the audio data. Here, since the audio playback elements in the audio playback module are arranged in pairs in the electronic device, and the positions of the paired audio playback elements are relative, when the audio playback module plays audio, it can ensure that when any audio playback element plays audio, there is an audio playback element arranged opposite to play audio synchronously, thereby ensuring that the overall sound effect of the audio playback module is uniform and can form a stereo sound effect.
[0211] In the disclosed embodiment, since the audio playback module includes at least two audio playback elements, the audio sub-data transmitted in different sub-channels corresponding to the audio playback elements are different, so when all audio playback elements play audio, different audio playback effects can be generated at at least two positions of the electronic device using at least two audio playback elements. In this way, the stereo sound effect of the electronic device can be ensured to be good.
[0212] In some embodiments, the method further comprises:
[0213] When the relative positions of the at least two audio playback elements change, adjusting the sub-channels corresponding to the audio playback elements;
[0214] The transmitting the audio sub-data to the audio playback element through the sub-channel corresponding to the audio output component comprises:
[0215] The audio sub-data are transmitted to the corresponding audio playback element through each adjusted sub-channel.
[0216] In some embodiments, when the change amplitude of the relative orientation of at least two audio playback elements is greater than the second amplitude threshold, the subchannels corresponding to the respective audio playback elements are adjusted; or, when the change amplitude of the relative orientation of at least two audio playback elements is less than the first amplitude threshold, the subchannels corresponding to the respective audio playback elements are not adjusted. Here, when the change amplitude of at least two audio playback elements is small, the situation that the adjusted audio playback effect is poor and the resource consumption is large due to frequent misadjustment of the subchannels corresponding to the audio playback elements can be reduced.
[0217] In some embodiments, when the relative positions of at least two audio playback elements are exchanged, the sub-channels corresponding to the respective audio playback elements are adjusted.
[0218] It can be understood that the relative positions of at least two audio playback elements here are exchanged, which may refer to the position of at least one audio playback element relative to another audio playback element and the position of another audio playback element relative to the at least one audio playback element. Exemplarily, at least two audio playback elements include an audio playback element C and an audio playback element D, the audio playback element C is arranged on the left side of the electronic device, and the audio playback element D is arranged on the right side of the electronic device. At this time, the position of the audio playback element C relative to the audio playback element D is the left side, and the position of the audio playback element D relative to the audio playback element C is the right side. In the case where the relative positions of the audio playback element C and the audio playback element D are exchanged, the subchannels corresponding to the audio playback element C and the audio playback element D are adjusted. That is, the subchannels corresponding to the audio playback element C and the audio playback element D can be adjusted when the position of the audio playback element C relative to the audio playback element D changes to the right side and the position of the audio playback element D relative to the audio playback element C changes to the left side.
[0219] In some embodiments, when the relative positions of at least two audio playback elements are exchanged, the sub-channels corresponding to the at least two audio playback elements are exchanged.
[0220] Exemplarily, the audio playback module may include two audio playback elements, namely, a speaker C and a speaker D, and the speaker C and the speaker D may be relatively arranged on the electronic device. The audio playback data may be composed of audio sub-data channel3 and audio sub-data channel4, and the second channel may include sub-channel slot3 and sub-channel slot4, sub-channel slot3 is used to transmit audio sub-data channel3, and sub-channel slot4 is used to transmit audio sub-data channel4. When the relative orientation of the speaker C and the speaker D does not change, the audio sub-data channel3 is transmitted to the speaker C through the sub-channel slot3, and the audio sub-data channel4 is transmitted to the speaker D through the sub-channel slot4. When the relative orientation of the speaker C and the speaker D changes, the sub-channel corresponding to the speaker C is adjusted to the sub-channel slot4, and the sub-channel corresponding to the speaker D is adjusted to the slot3; the audio sub-data channel4 is transmitted to the speaker 3 through the sub-channel slot4, and the vibration sub-data channel3 is transmitted to the speaker 4 through the sub-channel slot3.
[0221] In some embodiments, the electronic device's posture change information is detected; the posture change range of the electronic device is determined based on the posture change information; and based on the posture change range, it is determined whether the relative positions of at least two audio playback components have changed. The posture change information may include change information of the position and posture of the electronic device.
[0222] In some embodiments, it is determined whether the change amplitude of the relative positions of at least two audio playback elements is greater than a second amplitude threshold based on the change amplitude of the posture of the electronic device.
[0223] In the disclosed embodiment, since the subchannels corresponding to the respective audio playback elements are adjusted when the relative orientation of the at least two audio playback elements changes, and the audio sub-data are transmitted to the corresponding audio playback elements through the adjusted subchannels, when the relative orientation of the at least two audio playback elements changes, the subchannels corresponding to the respective audio playback elements can be adjusted to adjust the audio sub-data transmitted to the respective audio playback elements, so as to ensure that when the adjusted audio playback elements play audio, the stereo sound effect of the electronic device experienced by the user is the same as the initial sound effect. In this way, the sound effect of the electronic device can be ensured to be good, and the user's experience can be ensured to be good.
[0224] In some embodiments, the method further comprises:
[0225] In response to a detected predetermined trigger event, triggering the time division multiplexing port to power on;
[0226] The transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include:
[0227] After the time division multiplexing port is powered on, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playing module based on the same time division multiplexing port.
[0228] In some embodiments, in response to a detected predetermined trigger event, the vibration module and the audio playback module are triggered to power on. After the time division multiplexing port, the vibration module, and the audio playback module are all powered on, based on the same time division multiplexing port, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module.
[0229] In some embodiments, in response to a detected predetermined trigger event, a first trigger instruction is transmitted. When the time-division multiplexing port is powered off, the time-division multiplexing port may be in a dormant state, at which point the time-division multiplexing port may be configured to monitor a predetermined first trigger instruction; in response to monitoring the first trigger instruction, the time-division multiplexing port is triggered to power on and transmit a second trigger instruction to the vibration module and the audio playback module based on the same time-division multiplexing port. When the vibration module and the audio playback module are powered off, the vibration module and the audio playback module may both be in a dormant state, at which point the vibration module may be configured to monitor the second trigger instruction; in response to monitoring the second trigger instruction, the vibration module is triggered to power on and vibrate based on the vibration data. The audio playback module may be configured to monitor the second trigger instruction; in response to monitoring the second trigger instruction, the audio playback component store is triggered and audio is played based on the audio data. In this way, in response to a detected predetermined trigger event, a communication connection between the time division multiplexing port and the vibration module, as well as a communication connection between the time division multiplexing port and the audio playback module can be quickly established to facilitate the rapid transmission of vibration data and audio playback data, so that the vibration module quickly vibrates based on the vibration data, and the audio playback module quickly plays audio based on the audio data.
[0230] In the embodiment of the present disclosure, since the time division multiplexing port can be triggered to power on in response to a detected predetermined trigger event, the time division multiplexing port can be quickly triggered to power on in response to the predetermined trigger event when data needs to be transmitted, which can improve the efficiency of data transmission.
[0231] In some embodiments, the method further comprises:
[0232] When the vibration module stops vibrating and the audio playing module stops playing audio, the time division multiplexing port is triggered to be powered off.
[0233] It can be understood that when the time division multiplexing port is powered off, the time division multiplexing port stops transmitting the vibration data and the audio data.
[0234] In some embodiments, when the vibration module stops vibrating, the vibration module is triggered to be powered off; when the audio playback module stops vibrating, the audio playback module is triggered to be powered off. It is understandable that when the vibration module is powered off, the vibration module stops receiving vibration data and stops vibrating; when the audio playback module is powered off, it stops receiving audio data and stops playing audio.
[0235] In the embodiment of the present disclosure, since the time-division multiplexing port is triggered to power off when the vibration module stops vibrating and the audio playback module stops audio playback, the time-division multiplexing port can be quickly triggered to power off when data transmission is not required, thereby reducing the power consumption of the time-division multiplexing port.
[0236] In some embodiments, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, wherein the executable program implements any one of the methods described in the present disclosure when executed by a processor.
[0237] Figure 6 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. The disclosed method can be applied to the electronic device.
[0238] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0239] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0240] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0241] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0242] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not sense the boundaries of the touch or slide action, but also detects the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0243] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operation mode, such as a call mode, a recording mode, and a voice determination mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0244] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0245] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0246] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency determination (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0247] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0248] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0249] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed in this disclosure.
[0250] It will be appreciated that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. An electronic device, It is characterized in that include: a processing module configured to obtain audio data and vibration data of the application; A time division multiplexing port, an input end of which is connected to the processing module and is configured to receive the audio data and the vibration data transmitted by the processing module; a vibration module connected to an output end of the time division multiplexing port and configured to vibrate based on the vibration data; An audio playback module is connected to the output end of the time division multiplexing port and is configured to play audio based on the audio data.
2. The electronic device according to claim 1, It is characterized in that The output end of the time division multiplexing port transmits the vibration data to the vibration module through a first channel, and transmits the audio data to the audio playback module through a second channel.
3. The electronic device according to claim 2, It is characterized in that The vibration module comprises: at least two vibration elements; The first channel comprises: a sub-channel corresponding to each of the vibration elements; The output end of the time division multiplexing port is configured to transmit vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element; the vibration sub-data transmitted in different sub-channels corresponding to the vibration element are different, and each of the vibration sub-data together constitutes the vibration data.
4. The electronic device according to claim 3, It is characterized in that The processing module is configured to adjust the sub-channel corresponding to each vibration element when the relative orientation of the at least two vibration elements changes; The output end of the time division multiplexing port is configured to transmit the vibration sub-data to the corresponding vibration element through each adjusted sub-channel.
5. The electronic device according to claim 2, It is characterized in that The audio playback module includes: at least two audio playback components; The second channel includes: a sub-channel corresponding to each of the audio playback elements; The output end of the time division multiplexing port is configured to transmit audio sub-data to the audio playback element through a sub-channel corresponding to the audio output component; the audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and each of the audio sub-data together constitutes the audio data.
6. The electronic device according to claim 5, It is characterized in that The processing module is configured to adjust the sub-channels corresponding to the audio playback elements when the relative positions of the at least two audio playback elements change; The output end of the time division multiplexing port is configured to transmit the audio sub-data to the corresponding audio playback element through each adjusted sub-channel.
7. The electronic device according to claim 1, It is characterized in that The processing module is configured to trigger the time-division multiplexing port to power on in response to a detected predetermined trigger event; and to trigger the time-division multiplexing port to power off when the vibration module stops vibrating and the audio playback module stops audio playback; The output end of the time division multiplexing port is configured to transmit the vibration data to the vibration module after power-on, and to transmit the audio data to the audio playback module.
8. A data transmission method, It is characterized in that The data transmission method comprises: Get the audio data and vibration data of the application; Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playback module respectively, so as to trigger the audio playback module to play the audio when the vibration module vibrates.
9. The transmission method according to claim 8, It is characterized in that The transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include: Based on the same time division multiplexing port, the vibration data is transmitted to the vibration module through the first channel, and the audio data is transmitted to the audio playback module through the second channel.
10. The data transmission method according to claim 9, It is characterized in that The vibration module comprises: at least two vibration elements; the first channel comprises: a sub-channel corresponding to each of the vibration elements; the transmitting the vibration data to the vibration module through the first channel comprises: transmitting vibration sub-data to the vibration element through a sub-channel corresponding to the vibration element; The vibration sub-data transmitted in different sub-channels corresponding to the vibration elements are different, and the various vibration sub-data together constitute the vibration data.
11. The data transmission method according to claim 10, It is characterized in that The method further comprises: When the relative orientations of the at least two vibration elements change, adjusting the sub-channels corresponding to the respective vibration elements; The transmitting the vibration sub-data to the vibration element through the sub-channel corresponding to the vibration element comprises: The vibration sub-data is transmitted to the corresponding vibration element through each adjusted sub-channel.
12. The data transmission method according to claim 9, It is characterized in that The audio playback module includes: at least two audio playback elements; the second channel includes: a sub-channel corresponding to each of the audio playback elements; the audio data is transmitted to the audio playback module through the second channel, including: transmitting audio sub-data to the audio playback element via a sub-channel corresponding to the audio output component; The audio sub-data transmitted in different sub-channels corresponding to the audio playback element are different, and the various audio sub-data together constitute the audio data.
13. The data transmission method according to claim 12, It is characterized in that The method further comprises: When the relative positions of the at least two audio playback elements change, adjusting the sub-channels corresponding to the audio playback elements; The transmitting the audio sub-data to the audio playback element through the sub-channel corresponding to the audio output component comprises: The audio sub-data are transmitted to the corresponding audio playback element through each adjusted sub-channel.
14. The data transmission method according to claim 8, It is characterized in that The method further comprises: In response to a detected predetermined trigger event, triggering the time division multiplexing port to power on; The transmitting the vibration data to the vibration module and the transmitting the audio data to the audio playback module based on the same time division multiplexing port respectively include: After the time division multiplexing port is powered on, the vibration data is transmitted to the vibration module and the audio data is transmitted to the audio playing module based on the same time division multiplexing port.
15. The data transmission method according to claim 8, It is characterized in that The method further comprises: When the vibration module stops vibrating and the audio playing module stops playing audio, the time division multiplexing port is triggered to be powered off.
16. A computer-readable storage medium, It is characterized in that The readable storage medium stores an executable program, wherein the executable program implements the method according to any one of claims 8 to 15 when executed by a processor.