Disclosure of Invention
The invention aims to provide a vehicle alarm method, vehicle-mounted equipment, a computer storage medium and a system, which can improve driving safety and improve user experience.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a vehicle alarm method, which is applied to a vehicle-mounted device, where the vehicle-mounted device includes a system on a chip, a micro control unit, a switch, a digital signal processing chip, and a power amplifier; the system on chip comprises a big core, a microkernel, a first serial port and a second serial port, wherein the big core is communicated with the digital signal processing chip sequentially through the first serial port and the switch, the microkernel is communicated with the digital signal processing chip sequentially through the second serial port and the switch, the digital signal processing chip is connected with the power amplifier, and the system on chip is connected with the micro control unit; the vehicle alarm method comprises the following steps:
the microkernel is started when detecting that the control system running on the macrokernel is crashed, and vehicle state information is obtained in real time through the micro control unit;
and when the microkernel determines that the vehicle has a fault according to the vehicle state information, an alarm audio signal is sent to the power amplifier through the digital signal processing chip, so that the power amplifier plays the alarm audio signal through a loudspeaker in the vehicle.
As one implementation mode, the vehicle-mounted device further comprises a memory storing an alarm audio file, and the microkernel reads an alarm audio signal from the alarm audio file stored in the memory.
As one embodiment, before the micro core sends an alarm audio signal to the power amplifier through the digital signal processing chip, the method further includes:
the microkernel determines the fault type of the vehicle with faults according to the vehicle state information, and determines the corresponding alarm type according to the fault type;
and the microkernel acquires a corresponding alarm audio signal according to the alarm type.
As one embodiment, before the micro core sends an alarm audio signal to the power amplifier through the digital signal processing chip, the method further includes:
and the microkernel switches the communication between the system on chip and the digital signal processing chip to the second serial port through the switch.
As one embodiment, the acquiring, by the micro control unit, vehicle state information in real time by the micro core includes:
the microkernel sends a vehicle state information acquisition request to the micro control unit and receives vehicle state information which is sent by the micro control unit in real time and acquired through a CAN bus.
In a second aspect, an embodiment of the present invention provides an on-board device, where the on-board device includes a system on a chip, a micro control unit, a switch, a digital signal processing chip, and a power amplifier; the system on chip comprises a big core, a microkernel, a first serial port and a second serial port, wherein the big core is communicated with the digital signal processing chip sequentially through the first serial port and the switch, the microkernel is communicated with the digital signal processing chip sequentially through the second serial port and the switch, the digital signal processing chip is connected with the power amplifier, and the system on chip is connected with the micro control unit; wherein the microkernel is configured to perform the vehicle alert method of the first aspect.
In a third aspect, an embodiment of the present invention provides a computer storage medium, which stores a computer program, and when the computer program is executed by a processor, the vehicle alarm method according to the first aspect is implemented.
In a fourth aspect, an embodiment of the present invention provides a vehicle alarm system, where the vehicle alarm system includes an in-vehicle device and a speaker; the vehicle-mounted equipment comprises a system on chip, a micro control unit, a switch, a digital signal processing chip and a power amplifier; the system on chip comprises a big core, a microkernel, a first serial port and a second serial port, wherein the big core is communicated with the digital signal processing chip sequentially through the first serial port and the switch, the microkernel is communicated with the digital signal processing chip sequentially through the second serial port and the switch, the digital signal processing chip is connected with the power amplifier, and the system on chip is connected with the micro control unit; wherein,
the microkernel is used for starting when detecting that the control system running on the macrokernel is crashed, and acquiring vehicle state information in real time through the micro control unit; when the vehicle is determined to have a fault according to the vehicle state information, sending an alarm audio signal to the power amplifier through the digital signal processing chip so that the power amplifier can play the alarm audio signal through a loudspeaker in the vehicle;
and the loudspeaker is used for playing the alarm audio signal after receiving the alarm audio signal sent by the power amplifier.
As one implementation mode, the vehicle-mounted device further comprises a memory storing an alarm audio file, and the microkernel is used for reading an alarm audio signal from the alarm audio file stored in the memory.
As one embodiment, the microkernel is further configured to switch communication between the system on chip and the digital signal processing chip to the second serial port through the switch.
The vehicle alarm method, the vehicle-mounted equipment, the computer storage medium and the system are provided by the embodiment of the invention, the vehicle alarm method is applied to the vehicle-mounted equipment, and the vehicle-mounted equipment comprises a system on a chip, a micro control unit, a switch, a digital signal processing chip and a power amplifier; the system on chip comprises a big core, a microkernel, a first serial port and a second serial port, and the method comprises the following steps: the microkernel is started when detecting that the control system running on the macrokernel is crashed, and vehicle state information is obtained in real time through the micro control unit; and when the microkernel determines that the vehicle has a fault according to the vehicle state information, an alarm audio signal is sent to the power amplifier through the digital signal processing chip, so that the power amplifier plays the alarm audio signal through a loudspeaker in the vehicle. So, under the condition of the control system collapse of operation on the big core of mobile unit, if the vehicle breaks down, then send out the warning through the little kernel control vehicle in speaker of mobile unit, solved the mobile unit and broken down and the vehicle breaks down this moment, the problem that can't normally broadcast vehicle alarm sound for the driver can in time obtain trouble information, has improved driving safety, and has promoted user and used experience. In addition, the cost of the vehicle-mounted equipment does not need to be additionally increased.
Detailed Description
The technical scheme of the invention is further elaborated by combining the drawings and the specific embodiments in the specification. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a vehicle alarm system provided for an embodiment of the present invention includes an in-vehicle device 1 and a speaker 2; the vehicle-mounted equipment 1 comprises a system on chip 10, a micro control unit 11, a switch 12, a digital signal processing chip 13 and a power amplifier 14; the system on chip 10 includes a large core 101, a micro core 102, a first serial port 103 and a second serial port 104, the large core 101 communicates with the digital signal processing chip 13 sequentially through the first serial port 103 and the switch 12, the micro core 102 communicates with the digital signal processing chip 13 sequentially through the second serial port 104 and the switch 12, the digital signal processing chip 13 is connected with the power amplifier 14, and the system on chip 10 is connected with the micro control unit 11; wherein,
the microkernel 102 is configured to start when detecting that a control system running on the macrokernel 101 crashes, and obtain vehicle state information in real time through the microcontrol unit 11; when the vehicle is determined to have a fault according to the vehicle state information, an alarm audio signal is sent to the power amplifier 14 through the digital signal processing chip 13;
the power amplifier 14 is used for sending the alarm audio signal to a loudspeaker 2 in the vehicle;
the loudspeaker 2 is configured to play the alarm audio signal after receiving the alarm audio signal sent by the power amplifier 14.
It should be noted that the large core 101 refers to a relatively high-performance or high-power-consumption core, the micro core 102 refers to a relatively low-performance or low-power-consumption core, and the control system operates on the large core 101 when the vehicle-mounted device 1 normally operates, so that the large core 101 controls the digital processing chip to send 13 various audio frequencies, including multimedia sound, navigation sound, electric voice, and the like. The control system crash running on the big core 101 may refer to an operating system crash running on the big core 101, and when the control system crashes, the big core 101 loses control over the memory, the Flash, and the serial port, and cannot control the digital processing chip 13 to send out audio.
Here, microkernel 102 may detect the state of macrokernel 101 through a heartbeat packet detection mechanism, that is, detect whether a control system running on macrokernel 101 has a crash situation. The microkernel 102 is started when detecting that the control system running on the macrocore 101 crashes, and at this time, the switch 12 switches the communication between the system on chip 10 and the digital signal processing chip 13 to the second serial port 104, so as to form a system capable of generating sound with the memory, the Flash, the micro control unit 11, the digital signal processing chip 13, the power amplifier 14 and the power supply unit.
Here, the in-vehicle device 1 further includes a memory 15 storing an alarm audio file, and the microkernel 102 is configured to read an alarm audio signal from the alarm audio file stored in the memory 15. In one embodiment, microkernel 102 is specifically configured to: determining the fault type of the vehicle with faults according to the vehicle state information, and determining the corresponding alarm type according to the fault type; and acquiring a corresponding alarm audio signal according to the alarm type. It will be appreciated that for different types of fault, the corresponding warning audio signal may be different to facilitate driver differentiation between different fault warnings. For example, the warning audio signal for excessive engine water temperature and the warning audio signal for insufficient remaining fuel may be different. Therefore, the corresponding alarm audio signal is determined according to the fault type, so that different alarm information can be distinguished conveniently, and the user experience is further improved.
Here, the microkernel 102 may acquire the vehicle state information in real time through the micro control unit 11, where the microkernel 102 sends a vehicle state information acquisition request to the micro control unit 11, and receives the vehicle state information acquired through the CAN bus sent by the micro control unit 11 in real time. It CAN be understood that the micro control unit 11 may acquire the vehicle state information through the CAN bus, where the micro control unit 11 receives the vehicle state information sent by the vehicle body controller through the CAN bus, or sends a vehicle state information acquisition request to the vehicle body controller through the CAN bus, and receives the vehicle state information returned by the vehicle body controller, and in addition, may also read the vehicle state information from the CAN bus.
Here, the power amplifier 14 is connected to the speaker 2, and the power amplifier 14 gives an alarm by driving the speaker 2.
In summary, in the vehicle alarm system provided in the above embodiment, under the condition that the control system running on the large core of the vehicle-mounted device is broken down, if the vehicle is broken down, the micro-core of the vehicle-mounted device controls the speaker in the vehicle to send an alarm, so that the problem that the vehicle alarm sound cannot be played normally when the vehicle is broken down due to the system breakdown of the vehicle-mounted device is solved, a driver can acquire fault information in time, driving safety is improved, and user experience is improved. In addition, the cost of the vehicle-mounted equipment does not need to be additionally increased.
Based on the same inventive concept of the foregoing embodiment, referring to fig. 2, a vehicle alarm method provided in an embodiment of the present invention may be executed by a vehicle alarm device provided in an embodiment of the present invention, where the vehicle alarm device may be implemented in a software and/or hardware manner, and in a specific application, the vehicle alarm device may specifically be a vehicle-mounted device such as a car machine and an intelligent cabin, and in this embodiment, the vehicle alarm method is applied to the vehicle-mounted device as an example, and referring to fig. 1 again, the vehicle-mounted device includes a system on chip 10, a micro control unit 11, a switch 12, a digital signal processing chip 13, and a power amplifier 14; the system on chip 10 includes a large core 101, a micro core 102, a first serial port 103 and a second serial port 104, the large core 101 communicates with the digital signal processing chip 13 sequentially through the first serial port 103 and the switch 12, the micro core 102 communicates with the digital signal processing chip 13 sequentially through the second serial port 104 and the switch 12, the digital signal processing chip 13 is connected with the power amplifier 14, and the system on chip 10 is connected with the micro control unit 11; the vehicle alarming method comprises the following steps:
step S201: the microkernel is started when detecting that the control system running on the macrokernel is crashed, and vehicle state information is obtained in real time through the micro control unit;
here, microkernel 102 may detect the state of macrokernel 101 through a heartbeat packet detection mechanism, that is, detect whether a control system running on macrokernel 101 has a crash situation. The microkernel 102 is started when detecting that the control system running on the macrocore 101 crashes, and at this time, the switch 12 switches the communication between the system on chip 10 and the digital signal processing chip 13 to the second serial port 104, so as to form a system capable of generating sound with the memory, the Flash, the micro control unit 11, the digital signal processing chip 13, the power amplifier 14 and the power supply unit. It should be noted that the large core 101 refers to a relatively high-performance or high-power-consumption core, the micro core 102 refers to a relatively low-performance or low-power-consumption core, and the control system operates on the large core 101 when the vehicle-mounted device 1 normally operates, so that the large core 101 controls the digital processing chip to send 13 various audio frequencies, including multimedia sound, navigation sound, electric voice, and the like. The control system crash running on the big core 101 may refer to an operating system crash running on the big core 101, and when the control system crashes, the big core 101 loses control over the memory, the Flash, and the serial port, and cannot control the digital processing chip 13 to send out audio.
Step S202: and when the microkernel determines that the vehicle has a fault according to the vehicle state information, an alarm audio signal is sent to the power amplifier through the digital signal processing chip, so that the power amplifier plays the alarm audio signal through a loudspeaker in the vehicle.
Specifically, when determining that the vehicle has a fault according to the vehicle state information, the microkernel 102 sends an alarm audio signal to the power amplifier 14 through the digital signal processing chip 13, so that the power amplifier 14 sends the alarm audio signal to a speaker in the vehicle connected to the power amplifier 14, so that the speaker in the vehicle plays the alarm audio signal, and if the vehicle has a fault, the microkernel 102 of the vehicle-mounted device controls the speaker in the vehicle to send an alarm.
In one embodiment, the vehicle-mounted device further includes a memory 15 storing an alarm audio file, and the microkernel 102 reads an alarm audio signal from the alarm audio file stored in the memory 15. In one embodiment, before the micro core sends an alarm audio signal to the power amplifier through the digital signal processing chip, the method further includes: the microkernel 102 determines the fault type of the vehicle with fault according to the vehicle state information, and determines the corresponding alarm type according to the fault type; and the microkernel 102 acquires a corresponding alarm audio signal according to the alarm type. It will be appreciated that for different types of fault, the corresponding warning audio signal may be different to facilitate driver differentiation between different fault warnings. For example, the warning audio signal for excessive engine water temperature and the warning audio signal for insufficient remaining fuel may be different. Therefore, the corresponding alarm audio signal is determined according to the fault type, so that different alarm information can be distinguished conveniently, and the user experience is further improved.
In one embodiment, the obtaining, by the micro control unit, vehicle state information in real time by the micro core includes: the microkernel 102 sends a vehicle status information acquisition request to the micro control unit 11, and receives vehicle status information acquired through a CAN bus, which is sent by the micro control unit 11 in real time. It CAN be understood that the micro control unit 11 may acquire the vehicle state information through the CAN bus, where the micro control unit 11 receives the vehicle state information sent by the vehicle body controller through the CAN bus, or sends a vehicle state information acquisition request to the vehicle body controller through the CAN bus, and receives the vehicle state information returned by the vehicle body controller, and in addition, may also read the vehicle state information from the CAN bus.
In summary, in the vehicle alarm method provided in the above embodiment, when the control system running on the large core of the vehicle-mounted device is in a breakdown state, if the vehicle fails, the micro-core of the vehicle-mounted device controls the speaker in the vehicle to issue an alarm, so that the problem that the vehicle alarm sound cannot be played normally when the vehicle fails due to the system breakdown of the vehicle-mounted device is solved, a driver can acquire failure information in time, driving safety is improved, and user experience is improved. In addition, the cost of the vehicle-mounted equipment does not need to be additionally increased.
Based on the same inventive concept of the foregoing embodiments, the present embodiment describes technical solutions of the foregoing embodiments in detail through specific examples. In this embodiment, the vehicle-mounted device is taken as a vehicle-mounted device as an example for description. Referring to fig. 3, a schematic structural diagram of the car machine provided in this embodiment is shown, where the car machine uses a System-on-a-chip (SoC) 20 with multiple cores and multiple heterogeneous cores, and the SoC20 has multiple Central Processing Units (CPUs), that is, core controllers such as a large core 21, a Graphics Processing Unit (GPU), and a micro core 22. The microkernel 22 has the highest authority, has a Static Random-Access Memory (SRAM) that is shared by itself, can directly run without depending on an operating system, and has control and Access to a Double Data Rate Synchronous Random-Access Memory (DDR) 23, a Flash24, and a Power Management Integrated Circuit (PMIC) 25, has a serial port configuration that is controlled independently, and can perform work state monitoring and on-chip Power-on timing configuration for a CPU and a GPU in the SoC. Two groups of serial ports (I2C/SPI/UART and the like) output by the SoC are switched by the Switch26 and then communicate with the DSP 27. When the system normally operates, the big core 21 controls a group of common serial ports to control the DSP27, and various rich audio frequencies such as media sound, navigation sound, electric voice, system prompt sound, automobile alarm sound and the like can be played. When the system crashes, the big core 21 loses the control of the memory, the Flash24 and the serial port, and can not control the DSP27 to make sound. At the moment, the microkernel 22 starts to work, the communication with the DSP27 is switched to a serial port controlled by the microkernel 22, a small system capable of producing sound is formed by the memory, the Flash24, a Micro Control Unit (MCU) 28, the DSP26, the built-in power amplifier 29 and the like, the vehicle body CAN information is obtained through the MCU28, the MCU28 sends the vehicle fault information to the microkernel 22, and the microkernel 22 drives the loudspeaker 30 to give out alarm sound through the built-in power amplifier 29 by using a sound file in the memory after receiving the information. At the moment, videos, audio such as navigation, multimedia and telephone cannot be played, but all alarm sounds can be played, so that driving safety is guaranteed.
Here, the process of the vehicle warning is as follows:
1) the SoC keeps serial port communication with the DSP through Switch in design, the system communicates with the DSP through a large-core serial port during normal operation, and communicates with the DSP through a micro-core serial port during system crash.
2) When the car machine works normally, the operating system runs on the big core, and the big core controls the DSP to send out various audios including multimedia sounds, navigation sounds, electric voices and the like.
3) When the system crashes, the microkernel is started and is communicated with the DSP through independent serial port configuration. The MCU keeps working and acquires the automobile state information through the CAN bus.
4) When the automobile has a fault, the MCU is informed to the MCU through the CAN bus, the MCU reports the information to the micro-kernel of the SoC, and the micro-kernel receives the information and then drives the loudspeaker to send out an alarm sound through the built-in power amplifier by utilizing the sound file in the memory.
In summary, in the vehicle alarm method provided in the above embodiment, the main controller, i.e., the large core and the micro core of the SoC, is used to control the memory and the DSP under normal and breakdown conditions of the system, and the speaker can continue to send out the alarm sound of the vehicle when the vehicle system is broken down through the bus information obtained by the MCU without adding additional hardware, so as to save cost, ensure driving safety, and avoid property and life loss.
Based on the same inventive concept of the foregoing embodiments, an embodiment of the present invention provides an on-board device, which may be a car machine, an intelligent cabin, or the like, and as shown in fig. 4, the on-board device includes: a processor 110 and a memory 111 for storing computer programs capable of running on the processor 110; the processor 110 illustrated in fig. 4 is not used to refer to the number of the processors 110 as one, but is only used to refer to the position relationship of the processor 110 relative to other devices, and in practical applications, the number of the processors 110 may be one or more; similarly, the memory 111 illustrated in fig. 4 is also used in the same sense, that is, it is only used to refer to the position relationship of the memory 111 relative to other devices, and in practical applications, the number of the memory 111 may be one or more. The processor 110 is configured to implement the vehicle alarm method applied to the vehicle-mounted device when the computer program is executed.
The vehicle-mounted device may further include: at least one network interface 112. The various components in the in-vehicle device are coupled together by a bus system 113. It will be appreciated that the bus system 113 is used to enable communications among the components. The bus system 113 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 113 in FIG. 4.
The memory 111 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (DRMB Random Access Memory), Synchronous joint Dynamic Random Access Memory (DRAM). The memory 111 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 111 in the embodiment of the present invention is used to store various types of data to support the operation of the in-vehicle apparatus. Examples of such data include: any computer program for operating on the in-vehicle device, such as an operating system and an application program; contact data; telephone book data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
Based on the same inventive concept of the foregoing embodiments, this embodiment further provides a computer storage medium, where a computer program is stored in the computer storage medium, where the computer storage medium may be a Memory such as a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash Memory (flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read Only Memory (CD-ROM), and the like; or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc. When the computer program stored in the computer storage medium is executed by a processor, the vehicle alarm method applied to the above-mentioned vehicle-mounted device is realized. Please refer to the description of the embodiment shown in fig. 2 for a specific step flow realized when the computer program is executed by the processor, which is not described herein again.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
As used herein, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, including not only those elements listed, but also other elements not expressly listed.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.