Audio playing method and system and vehicle
By using the existing car bus for audio playback in the car, the problem of high audio playback cost in the existing technology is solved, and the effects of cost reduction and simplified layout are achieved.
Patent Information
- Application Number
- CN202411019768.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, audio playback in cars requires the A2B audio bus and adapted audio playback equipment to be laid out in advance, resulting in high costs.
The audio bus data is obtained through the upper computer and transmitted to the car bus. The lower computer receives and drives the vehicle's motor or audio output device for playback. The existing car bus is used for audio playback, avoiding the need for additional audio buses and audio output devices. .
It reduces the cost of implementing the audio playback function, simplifies the layout and maintenance of the audio playback system, and improves the flexibility and economy of the system.
Smart Images

Figure CN118544976A
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio communication technology, and in particular to an audio playback method, system and vehicle. Background Art
[0002] Audio playback has been widely used in cars. Currently, the A2B bus (Automotive Audio Bus) is usually used to transmit audio signals in cars. The A2B audio bus enables two-way communication, allowing audio playback devices to receive control instructions from other systems and achieve flexible audio management and playback. For example, audio data is efficiently transmitted from audio source devices (such as media players, mobile phones, etc.) to audio playback devices in the car, such as audio systems or speakers, via the A2B audio bus. These playback devices receive and decode digital audio signals, and then convert them into analog signals for amplification and playback.
[0003] However, to transmit and play audio signals through the A2B audio bus, not only does it require the A2B audio bus to be pre-installed in the vehicle, but it also requires the audio playback device to be compatible with the A2B audio bus, which increases the cost. Therefore, how to reduce the cost of implementing the audio playback function is an urgent problem to be solved. Summary of the invention
[0004] The embodiment of the present application provides an audio playback method, which can reduce the cost of implementing the audio playback function, so as to at least partially solve the above-mentioned technical problems.
[0005] In order to achieve the above object, according to a first aspect of the present application, there is provided an audio playback method, comprising: The host computer obtains audio bus data; The host computer transmits the audio bus data to the vehicle bus; The lower computer receives audio bus data from the car bus; wherein the upper computer and the lower computer are connected via the car bus; The lower computer drives a motor or an audio output device of the vehicle to play audio based on the audio bus data.
[0006] Optionally, the audio bus data includes a state control message for controlling the playback state and audio byte data for providing playback content; Optionally, before the host computer obtains the audio bus data, it also includes: The host computer receives a first user instruction, and generates a state control message based on the first user instruction; The host computer obtains the original audio file, and parses the original audio file to obtain audio byte data.
[0007] Optionally, the host computer transmits the audio bus data to the car bus, including: The host computer transmits the status control message to the vehicle bus; The host computer sends or stops sending the audio byte data to the vehicle bus based on the status control message.
[0008] Optionally, the lower computer receives audio bus data from the car bus, including: The lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the status control message, so as to execute the action represented by the first user instruction.
[0009] Optionally, the lower computer drives the motor or audio output device of the vehicle to play audio based on the audio bus data, including: The lower computer caches the audio byte data into a cache area, and parses the audio byte data in the cache area to drive the motor or audio output device of the vehicle to play the original audio file.
[0010] Optionally, the host computer obtains an original audio file, and parses the original audio file to obtain audio byte data, including: The host computer parses the original audio file based on the audio transmission parameters to obtain the audio byte data.
[0011] Optionally, before the host computer parses the original audio file based on the audio transmission parameter to obtain the audio byte data, it further includes: The host computer obtains a second user instruction, determines an audio transmission parameter based on the second user instruction, and sends the audio transmission parameter to the vehicle bus.
[0012] Optionally, the host computer sends or stops sending the audio byte data to the vehicle bus based on the status control message, including: Based on the feedback message and the state control message, the host computer sends the audio byte data to the vehicle bus at a preset sending cycle, or stops sending the audio byte data to the vehicle bus.
[0013] Optionally, before the host computer sends the audio byte data to the vehicle bus at a preset sending cycle based on the feedback message and the state control message, or stops sending the audio byte data to the vehicle bus, it further includes: The host computer obtains a third user instruction, and determines a preset sending period for sending each frame of the audio byte data based on the third user instruction; The upper computer receives a feedback message returned by the lower computer after receiving the audio byte data.
[0014] Optionally, parsing the audio byte data in the buffer area includes: The lower computer receives audio transmission parameters via the vehicle bus; The lower computer parses the audio byte data in the buffer area based on the audio transmission parameters.
[0015] Optionally, after the lower computer caches the audio byte data into a buffer area and parses the audio byte data in the buffer area, the method further includes: The lower computer records a write count value of the audio byte data cached to the buffer area, and records a read count value of the audio byte data parsed from the buffer area; The lower computer compares the write count value and the read count value to obtain a comparison result; The lower computer generates a feedback message based on the comparison result, and sends the feedback message to the upper computer through the vehicle bus to control the upper computer to send or stop sending the audio byte data to the vehicle bus.
[0016] Optionally, the state control message includes a start playing message and a stop playing message; the lower computer receives or stops receiving the audio byte data from the car bus in response to the state control message, including: The lower computer, in response to the start playing message, clears the buffer area and resets the write count value and the read count value of the buffer area to receive the audio byte data from the vehicle bus; In response to the stop playing message, the lower computer clears the buffer area and resets the write count value and the read count value of the buffer area, and stops receiving the audio byte data from the vehicle bus.
[0017] Optionally, the state control message further includes a pause play message and a continue play message; the lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the state control message, and further includes: In response to the pause playback message, the lower computer retains the audio byte data in the buffer area and retains the write count value and the read count value, and stops receiving the audio byte data from the vehicle bus; In response to the continue playing message, the lower computer continues to receive the audio byte data from the vehicle bus based on the audio byte data retained in the buffer area, the write count value and the read count value.
[0018] Optionally, the audio playback method further includes: The host computer receives real-time audio data from an audio input device, and uses the real-time audio data as the original audio file.
[0019] Optionally, the lower computer includes a control unit of the motor.
[0020] According to a second aspect of the present application, there is provided an audio playback system comprising: a host computer, a slave computer and a car bus; the host computer and the slave computer are connected via the car bus; Wherein, the host computer includes: An audio acquisition module, used by the host computer to acquire audio bus data; a data transmission module, used by the host computer to transmit the audio bus data to the vehicle bus; The lower computer comprises: A data receiving module, used for the lower computer to receive audio bus data from the car bus; The audio playing module is used for the lower computer to drive the motor or audio output device of the vehicle to play audio based on the audio bus data.
[0021] According to a third aspect of the present application, an audio playback system and a vehicle are provided, comprising the above-mentioned audio playback system.
[0022] In the audio playback method of the embodiment of the present application, after the upper computer obtains the audio bus data, it transmits the audio bus data to the car bus, and the car bus transmits the audio data to the lower computer. After the lower computer receives the audio bus data, it drives the vehicle's motor or audio output device based on the audio bus data to play the original audio file to realize the in-vehicle audio playback function. In this process, the lower computer already in the vehicle is used to communicate directly with the car bus to play the audio, without the need to set up a separate audio bus and audio output device, thereby reducing costs.
[0023] Other features and advantages of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0024] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same figure numbers represent the same parts in the following description.
[0025] Figure 1 It is an interaction diagram between a host computer and a slave computer in an audio playback method provided in an exemplary embodiment of the present disclosure.
[0026] Figure 2 It is a flow chart of a method for a host computer to parse audio byte data provided in an exemplary embodiment of the present disclosure.
[0027] Figure 3 It is an interactive diagram of a host computer and a slave computer controlling the stop or continuation of transmission of audio byte data provided in an exemplary embodiment of the present disclosure.
[0028] Figure 4 1 is an architectural diagram of an audio playback system provided in an exemplary embodiment of the present disclosure applied to a vehicle.
[0029] Figure 5 It is a functional module diagram of an audio playback system provided in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0031] According to the first aspect of the present application, referring to Figure 1 The present disclosure provides an audio playback method, which is applied to a vehicle. The vehicle includes a host computer and a slave computer connected via a vehicle bus communication. The audio playback method includes steps S101 to S104, which are described in detail below.
[0032] Step S101: The host computer obtains audio bus data; Step S102: the host computer transmits the audio bus data to the vehicle bus; Step S103: The lower computer receives the audio bus data from the car bus; wherein the upper computer and the lower computer are connected via the car bus; Step S104: the lower computer drives the motor or audio output device of the vehicle to play audio based on the audio bus data.
[0033] As an example, the audio bus data includes a state control message for controlling the playing state and audio byte data for providing playing content.
[0034] As an example, the lower computer includes a control unit of the motor.
[0035] In the above implementation mode, after the upper computer obtains the audio bus data, it transmits the audio bus data to the car bus, and the car bus transmits the audio data to the lower computer. After the lower computer receives the audio bus data, it drives the vehicle's motor or audio output device based on the audio bus data to play the original audio file to realize the vehicle audio playback function. In this process, the lower computer already in the vehicle is used to communicate directly with the car bus to play the audio, without the need to set up a separate audio bus and audio output device, thereby reducing costs.
[0036] Reference Figure 2 As an example, before step S101, steps S201 to S202 are also included, which are described in detail below.
[0037] Step S201: The host computer receives a first user instruction, and generates a state control message based on the first user instruction.
[0038] As an example, the first user instruction can be obtained by the user operating the host computer, such as the user can click on the display screen of the host computer to output the first user instruction. For example, when the user clicks to start playing audio, the host computer generates a start playing message and sends it to the lower computer through the car bus; when the user clicks to stop the currently playing audio, the host computer generates a stop playing message and sends it to the lower computer; when the user clicks to pause the currently playing audio, the host computer generates a pause playing message and sends it to the lower computer; when the user clicks to continue the previously paused audio playback, the host computer sends a continue playing message and sends it to the lower computer. In this way, the user can issue different first user instructions by operating the host computer, so that the host computer can output different state control messages.
[0039] As an example, when the host computer receives a first user instruction for instructing to stop playing, the host computer stops sending audio byte data and clears the data cached in the host computer, and the cached data may be audio byte data that has been sent or audio byte data that has been parsed but not sent. When the host computer receives a first user instruction for instructing to pause playing, the host computer stops sending audio byte data and retains the data cached in the host computer so that the audio byte data can be quickly continued to be sent the next time the user instructs to continue playing.
[0040] Step S202: The host computer obtains the original audio file, and parses the original audio file to obtain audio byte data.
[0041] As an example, step S201 includes the host computer parsing the original audio file based on the audio transmission parameters to obtain audio byte data.
[0042] Furthermore, before the host computer parses the original audio file based on the audio transmission parameters to obtain the audio byte data, it also includes: the host computer obtains a second user instruction, determines the audio transmission parameters based on the second user instruction, and sends the audio transmission parameters to the vehicle bus.
[0043] As an example, the host computer can first save the original audio file as an audio file list, and then convert each audio in the audio file list to obtain audio byte data respectively, so that the required audio in the original audio file can be converted into audio byte data at any time, so that when the user switches audio, it can quickly respond to the user's needs.
[0044] As an example, the second user instruction is a transmission parameter selected by the user through the host computer, so that the host computer can determine the audio transmission parameters based on the second user instruction. For example, the audio transmission parameters may include sampling rate, channel value, filter range, etc. The sampling rate refers to the number of audio samples collected / recorded in one second. In this embodiment, the sampling rate can be optionally set at 44.1 kHz, 48 kHz, 96 kHz or other values. The channel value includes mono and dual channels so that the user can select the desired playback effect. The filter range refers to the frequency range used in audio processing. By selecting the filter range, noise can be removed to obtain better quality audio.
[0045] In the above implementation, the second user instruction enables the host computer to generate audio transmission parameters based on the sampling rate, channel value, filter range, etc. selected by the user, and use the audio transmission parameters to parse the original audio file, so that the audio effect that better meets the actual needs of the user can be played later. At the same time, the host computer sends the audio transmission parameters determined based on the second user instruction to the slave computer through the car bus, so that the slave computer parses the audio byte data in the buffer area based on the same audio transmission parameters. Matching the audio transmission parameters between the host computer and the slave computer helps to ensure the consistency of the audio data, thereby achieving better audio transmission and playback effects.
[0046] In some embodiments, step S102 includes step S1021-step S1022, which are described in detail below.
[0047] Step S1021: the host computer transmits the state control message to the vehicle bus; Step S1022: The host computer sends or stops sending the audio byte data to the vehicle bus based on the status control message.
[0048] As an example, step S1022 may include: the host computer sends the audio byte data to the vehicle bus at a preset sending cycle based on the feedback message and the state control message, or stops sending the audio byte data to the vehicle bus.
[0049] Reference Figure 3 Furthermore, the host computer sends the audio byte data to the vehicle bus at a preset sending cycle based on the feedback message and the status control message, or stops sending the audio byte data to the vehicle bus, and also includes steps S301-S302, which are described in detail below.
[0050] Step S301: the host computer obtains a third user instruction, and determines a preset sending period for sending each frame of audio byte data based on the third user instruction.
[0051] As an example, the third user instruction is the sending period set by the user in the host computer. For example, the sending period of the host computer can be selected as 1 frame / 1ms, 1 frame / 2ms, 1 frame / 4ms, 1 frame / 5ms or sent at the maximum speed (sending multiple frames in 1ms).
[0052] Step S302: the upper computer receives the feedback message returned by the lower computer after receiving the audio byte data.
[0053] Among them, the feedback message includes pausing to send feedback or stopping to send feedback, and the feedback message can represent the efficiency of the lower computer in processing the audio byte data. For example, when the processing efficiency of the lower computer matches that of the upper computer, the feedback message can be to continue to send feedback to instruct the lower computer to continue to send audio byte data; when the processing efficiency of the lower computer is lower than that of the upper computer, if the upper computer continues to send audio byte data, it may cause the lower computer data to overflow. At this time, the feedback message can be to stop sending feedback to instruct the upper computer to suspend the sending of audio byte data.
[0054] The difference between the feedback message and the first user instruction is that the feedback message is a means of adjusting the transmission rate between the lower computer and the upper computer to avoid data loss caused by data overflow. When the upper computer receives the feedback message and stops sending audio byte data to the car bus, the lower computer will not stop parsing the received audio byte data. At this time, the original audio file is in a normal playback state. The first user instruction is to stop sending audio byte data to the car bus based on the user's instructions. At this time, the lower computer will synchronously stop receiving audio byte data and stop parsing the received audio byte data, thereby stopping the audio playback.
[0055] In the above implementation, the host computer determines the transmission cycle of the audio byte data by receiving the third user instruction. In the process of sending data, the host computer receives the feedback message sent by the slave computer to adjust the data transmission efficiency between the host computer and the slave computer by sending or stopping the sending of the audio byte data to the vehicle bus. At the same time, the host computer also receives the first user instruction to execute the start or stop of the playback indicated by the user, thereby realizing the interaction between the host computer, the slave computer and the user.
[0056] In some embodiments, step S103 includes: the lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the status control message to execute the action represented by the first user instruction.
[0057] As an example, the state control message includes a start playing message and a stop playing message. The lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the state control message, which may include steps S601 and S602.
[0058] Step S601: In response to the start of playing the message, the lower computer clears the buffer area and resets the write count value and the read count value of the buffer area to receive the audio byte data from the vehicle bus; Step S602: In response to the stop playing message, the lower computer clears the buffer area and resets the write count value and the read count value of the buffer area, and stops receiving the audio byte data from the vehicle bus.
[0059] As an example, the state control message also includes a pause play message and a continue play message. The lower computer receives or stops receiving the audio byte data from the car bus in response to the state control message, and further includes steps S701-S702.
[0060] Step S701: the lower computer responds to the pause playback message, retains the audio byte data in the buffer area and retains the write count value and the read count value, and stops receiving the audio byte data from the vehicle bus; Step S702: In response to the continue playing message, the lower computer continues to receive the audio byte data from the vehicle bus based on the audio byte data retained in the buffer area, the write count value and the read count value.
[0061] In some embodiments, step S104 includes: the lower computer caches the audio byte data into a cache area, and parses the audio byte data in the cache area to drive the motor or audio output device of the vehicle to play the original audio file.
[0062] As an example, parsing the audio byte data in the buffer area may include steps S401 and S402, which are described in detail below.
[0063] Step S401: the lower computer receives audio transmission parameters through the vehicle bus; Step S402: The lower computer parses the audio byte data in the buffer based on the audio transmission parameters.
[0064] Reference Figure 3 As an example, after the lower computer caches the audio byte data into the cache area and parses the audio byte data in the cache area, it also includes steps S501 to S503, which are described in detail below.
[0065] Step S501: The lower computer records a write count value of the audio byte data cached to the cache area, and records a read count value of the audio byte data parsed from the cache area.
[0066] Step S502: The lower computer compares the write count value and the read count value to obtain a comparison result.
[0067] The comparison result may be the difference between the write count value and the read count value. For example, if the lower computer fails to read the audio byte data in the buffer in time, resulting in excessive accumulation of data in the buffer, then the comparison result based on the write count value and the read count value is larger, and the comparison result can indicate whether the write speed of the upper computer matches the read speed of the lower computer.
[0068] Step S503: the lower computer generates a feedback message based on the comparison result, and sends the feedback message to the upper computer through the vehicle bus to control the upper computer to send or stop sending audio byte data to the vehicle bus.
[0069] As an example, when the comparison result is greater than 12000, the write speed is greater than the read speed, and the feedback message that can be sent at this time is to stop sending feedback to inform the host computer to stop sending audio byte data. When the comparison result is less than 10000, the feedback message that can be sent is to continue sending feedback to inform the host computer to continue sending audio byte messages.
[0070] In the above implementation, by comparing the write count value and the read count value of the upper computer, a feedback message can be dynamically output to control the upper computer to send or stop sending audio byte data, thereby avoiding the loss of audio byte data due to overflow of the lower computer buffer area. Through the dynamic adjustment of the feedback message, the upper computer can send audio byte data at the maximum speed without data loss, so that the upper computer and the lower computer can communicate at the maximum communication speed.
[0071] In some embodiments, the host computer receives real-time audio data from an audio input device and uses the real-time audio data as an original audio file.
[0072] As an example, the audio input device may be a microphone. When the real-time audio data is an original audio file, the host computer may set the preset sending period to send at the maximum speed, so as to achieve real-time playback of the original audio file recorded by the audio input device.
[0073] In some embodiments, the automotive bus includes a CAN bus, a CAN FD bus, a LIN bus, a FlexRay bus, an Ethernet bus, or an ASec bus.
[0074] As an example, the selection of the vehicle bus may be specified by the user, or a vehicle bus with a small load may be selected.
[0075] The present disclosure exemplarily describes the working process of the audio playback method, in conjunction with Table 1, which is a communication protocol defined between the upper computer and the lower computer.
[0076] Table 1
[0077] Based on the contents of Table 1, first, the host computer sends a 0x62B message to the lower computer through the car bus, and the content of the 0x62B message is a start play message of 0x11, controls the lower computer to clear the buffer area and reset the write count value and read count value of the buffer area, so that the lower computer is ready to receive audio byte data. Then, the host computer sends a 0x62B message to the lower computer through the car bus, and the content of the 0x62B message is Flag2 of the audio transmission parameter. Next, the host computer sends a 0x62C message to the lower computer through the car bus, and the 0x62C message carries the audio byte data, thereby realizing the effect that the host computer controls the lower computer to start receiving data, sends audio transmission parameters to the lower computer, and sends audio byte data to the lower computer, so that the lower computer can parse the audio byte data.
[0078] In the process of the lower computer sending audio byte data to the lower computer through the car bus, the lower computer generates a feedback message according to its write count value and read count value, and sends a 0x62A message to the upper computer. The content of the 0x62A message is 0xA5 indicating stop sending feedback or 0xA6 indicating continue sending feedback, so as to control the upper computer to stop sending audio byte data or continue sending audio byte data, thereby realizing the interaction between the upper computer and the lower computer during the data transmission process.
[0079] In addition, the present application embodiment discloses an audio playback system. The audio playback system can be applied to a vehicle, for example Figure 4, which is a schematic diagram of the architecture of a vehicle 1 for implementing the above method provided by an embodiment of the present invention. In this embodiment, the vehicle 1 may include an audio playback system 10, a first memory 11, a first controller 12, a second memory 13, and a second controller 14. The audio playback system 10 includes a host computer 101 and a slave computer 102 that are communicatively connected via a vehicle bus 103.
[0080] The first memory 11 stores a computer program executed by the first controller 12 . When the computer program is executed by the first controller 12 , the first controller 12 executes the audio playing method applied to the host computer 101 as described above.
[0081] The second memory 13 stores a computer program executed by the second controller 14 . When the computer program is executed by the second controller 14 , the second controller 14 executes the audio playing method applied to the lower computer 102 as described above.
[0082] As an example, the vehicle may be a fuel vehicle, a plug-in hybrid vehicle, or a new energy vehicle, etc., and the present disclosure does not make any specific limitation on this.
[0083] In this embodiment, the first memory 11 and the first controller 12 may be part of the host computer 101, the second memory 13 and the second controller 14 may be part of the lower computer 102, and the first memory 11 and the first controller 12 may be located in the vehicle 1 and the two are separately arranged. The first memory 11 may also be independent of the vehicle 1 and accessed by the first controller 12. The host computer 101 may include a plurality of functional modules stored in the first memory 11, such as the various software functional modules included in the host computer 101. When the first controller 12 executes the computer program corresponding to the software functional module in the host computer 101, the steps performed by the host computer 101 provided in the aforementioned method embodiment are implemented.
[0084] In this embodiment, the second memory 13 and the second controller 14 may be located in the vehicle 1 and the two may be separately arranged. The second memory 13 may also be independent of the vehicle 1 and accessed by the second controller 14. The lower computer 102 may include a plurality of functional modules stored in the second memory 13, such as various software functional modules included in the lower computer 102. When the second controller 14 executes the computer program corresponding to the software functional module in the lower computer 102, the steps performed by the lower computer 102 provided in the aforementioned method embodiment are implemented.
[0085] In this embodiment, the vehicle 1 may include one or more first controllers 12 and second controllers 14. The first controller 12 and the second controller 14 may respectively process information and / or data related to the service request to perform one or more functions described in the present invention. In some embodiments, the first controller 12 and the second controller 14 may respectively include one or more processing engines (e.g., a single-core processor or a multi-core processor). Just to give an example, the first controller 12 and the second controller 14 may respectively include one or more hardware processors, such as a central processing unit CPU, an application-specific integrated circuit ASIC, an application-specific instruction set processor ASIP, a graphics processor GPU, a physical processing unit PPU, a digital signal processor DSP, a field programmable gate array FPGA, a programmable logic device PLD, a controller, a microcontroller unit, a reduced instruction set computer RISC, a microprocessor, etc., or similar or any combination thereof.
[0086] The first memory 11 and the second memory 13 can store data and / or instructions. In some embodiments, the first memory 11 and the second memory 13 can store acquired data or information. In some embodiments, the first memory 11 and the second memory 13 can store data and / or instructions for the vehicle 1 to execute or use, and the vehicle 1 can implement the exemplary method described in the present application by executing or using the data and / or instructions. In some embodiments, the first memory 11 and the second memory 13 may include a large-capacity memory, a removable memory, a volatile read-write memory, a read-only memory ROM, etc. or any combination of the above examples. Exemplary large-capacity memory may include a disk, an optical disk, a solid-state disk, etc. Exemplary removable memory may include a flash drive, a floppy disk, an optical disk, a memory card, a compressed disk, a tape, etc. Exemplary volatile read-write memory may include a random access memory RAM. Exemplary random access memory may include dynamic RAM, double-rate synchronous dynamic RAM, static RAM, thyristor RAM, and zero-capacitor RAM, etc. Exemplary ROM may include a masked ROM, a programmable ROM, an erasable programmable ROM, an electronically erasable programmable ROM, a compressed disk ROM, and a digital universal disk ROM, etc.
[0087] The audio playback system 10 included in the vehicle 1 may include one or more software function modules. The software function modules may be programs and instructions stored in the first memory 11 and the second memory 13. When these software function modules are respectively executed by the corresponding first controller 12 and the second controller 14, they are used to implement the above-mentioned method, for example, when they are executed by the processor of the drone, they are used to implement the method steps executed by the drone, or when they are executed by the vehicle 1, they are used to implement the method steps executed by the vehicle 1.
[0088] For details, refer to Figure 4 and Figure 5 The audio playback system 10 provided in this embodiment may include a host computer 101, a slave computer 102 and a vehicle bus 103; the host computer 101 and the slave computer 102 are connected via the vehicle bus 103, which will be described in detail below.
[0089] As an example, the host computer 101 includes an audio acquisition module 200 and a data sending module 300 .
[0090] The audio acquisition module 200 is used by the host computer to acquire audio bus data.
[0091] The data sending module 300 is used for the host computer to transmit the audio bus data to the vehicle bus.
[0092] As an example, the lower computer 102 includes a data receiving module 400 and an audio playing module 500 .
[0093] The data receiving module 400 is used for the lower computer to receive audio bus data from the car bus.
[0094] The audio playing module 500 is used for the lower computer to drive the motor or audio output device of the vehicle to play audio based on the audio bus data.
[0095] Among them, the audio acquisition module 200, the data sending module 300, the data receiving module 400 and the audio playback module 500 can be used to execute steps S101-S104 in the aforementioned method embodiment respectively. The specific contents of these modules and their implementation methods can correspond to the introduction of the method steps and will not be repeated here.
[0096] The present invention also discloses a computer-readable storage medium, comprising a computer program that can be loaded by a controller and executed as in any one of the above methods.
[0097] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0098] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0099] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] The embodiments, implementation methods and related technical features of the present application can be combined and replaced with each other without conflict.
[0102] The above are only preferred embodiments of the present application and do not constitute any form of limitation to the present application. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. An audio playback method, characterized in that: include: The host computer obtains audio bus data; The host computer transmits the audio bus data to the vehicle bus; The lower computer receives audio bus data from the car bus; wherein the upper computer and the lower computer are connected via the car bus; The lower computer drives a motor or an audio output device of the vehicle to play audio based on the audio bus data.
2. The audio playback method according to claim 1, characterized in that: The audio bus data includes a state control message for controlling the playing state and audio byte data for providing playing content.
3. The audio playback method according to claim 2, characterized in that: Before the host computer obtains the audio bus data, it also includes: The host computer receives a first user instruction, and generates a state control message based on the first user instruction; The host computer obtains the original audio file, and parses the original audio file to obtain audio byte data.
4. The audio playback method according to claim 3, characterized in that: The host computer transmits the audio bus data to the car bus, including: The host computer transmits the status control message to the vehicle bus; The host computer sends or stops sending the audio byte data to the vehicle bus based on the status control message.
5. The audio playback method according to claim 3, characterized in that: The lower computer receives audio bus data from the car bus, including: The lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the status control message, so as to execute the action represented by the first user instruction.
6. The audio playback method according to claim 5, characterized in that: The lower computer drives the motor or audio output device of the vehicle to play audio based on the audio bus data, including: The lower computer caches the audio byte data into a cache area, and parses the audio byte data in the cache area to drive the motor or audio output device of the vehicle to play the original audio file.
7. The audio playback method according to claim 3, characterized in that: The host computer obtains an original audio file, and parses the original audio file to obtain audio byte data, including: The host computer parses the original audio file based on the audio transmission parameters to obtain the audio byte data.
8. The audio playing method according to claim 7, characterized in that: The host computer parses the original audio file based on the audio transmission parameters to obtain the audio byte data, and also includes: The host computer obtains a second user instruction, determines an audio transmission parameter based on the second user instruction, and sends the audio transmission parameter to the vehicle bus.
9. The audio playing method according to claim 4, characterized in that: The host computer sends or stops sending the audio byte data to the vehicle bus based on the status control message, including: Based on the feedback message and the state control message, the host computer sends the audio byte data to the vehicle bus at a preset sending cycle, or stops sending the audio byte data to the vehicle bus.
10. The audio playing method according to claim 9, characterized in that: The host computer sends the audio byte data to the vehicle bus at a preset sending cycle based on the feedback message and the state control message, or before stopping sending the audio byte data to the vehicle bus, further includes: The host computer obtains a third user instruction, and determines a preset sending period for sending each frame of the audio byte data based on the third user instruction; The upper computer receives a feedback message returned by the lower computer after receiving the audio byte data.
11. The audio playing method according to claim 6, characterized in that: The parsing of the audio byte data in the buffer area includes: The lower computer receives audio transmission parameters via the vehicle bus; The lower computer parses the audio byte data in the buffer area based on the audio transmission parameters.
12. The audio playing method according to claim 6, characterized in that: After the lower computer caches the audio byte data into a buffer area and parses the audio byte data in the buffer area, the method further includes: The lower computer records a write count value of the audio byte data cached to the buffer area, and records a read count value of the audio byte data parsed from the buffer area; The lower computer compares the write count value and the read count value to obtain a comparison result; The lower computer generates a feedback message based on the comparison result, and sends the feedback message to the upper computer through the vehicle bus to control the upper computer to send or stop sending the audio byte data to the vehicle bus.
13. The audio playing method according to claim 6, characterized in that: The state control message includes a start playing message and a stop playing message; The lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the status control message, including: The lower computer, in response to the start playing message, clears the buffer area and resets the write count value and the read count value of the buffer area to receive the audio byte data from the vehicle bus; In response to the stop playing message, the lower computer clears the buffer area and resets the write count value and the read count value of the buffer area, and stops receiving the audio byte data from the vehicle bus.
14. The audio playing method according to claim 6, characterized in that: The state control message also includes a pause play message and a continue play message; The lower computer receives or stops receiving the audio byte data from the vehicle bus in response to the status control message, and further includes: In response to the pause playback message, the lower computer retains the audio byte data in the buffer area and retains the write count value and the read count value, and stops receiving the audio byte data from the vehicle bus; In response to the continue playing message, the lower computer continues to receive the audio byte data from the vehicle bus based on the audio byte data retained in the buffer area, the write count value and the read count value.
15. The audio playing method according to claim 4, characterized in that: The audio playing method further comprises: The host computer receives real-time audio data from an audio input device, and uses the real-time audio data as the original audio file.
16. The audio playing method according to any one of claims 1 to 15, characterized in that: The lower computer includes a control unit of the motor.
17. An audio playback system, characterized in that: include: A host computer, a slave computer and a vehicle bus; the host computer and the slave computer are connected via the vehicle bus; Wherein, the host computer includes: An audio acquisition module, used by the host computer to acquire audio bus data; a data sending module, used by the host computer to transmit the audio bus data to the car bus; The lower computer comprises: A data receiving module, used for the lower computer to receive audio bus data from the car bus; The audio playing module is used for the lower computer to drive the motor or audio output device of the vehicle to play audio based on the audio bus data.
18. A vehicle, characterized in that: Includes the audio playback system described in claim 17.
Citation Information
Patent Citations
Wireless media source for communication with devices on data bus of vehicle
CN103002383A
Vehicle-mounted network audio apparatus, vehicle-mounted network audio system and automobile
CN202796057U
Automotive audio system and a method of controlling the same
EP1033715A2
Car stereo head unit with built-in wireless communication module system
US20130176231A1
Cited By
Audio transmission method, device and equipment, computer readable storage medium and vehicle
CN118733512A
Audio transmission method and apparatus, device, computer-readable storage medium, and vehicle
WO2026045647A1
