Alarm method and device for automobile instrument sound

By defining an array of priority order in the alarm sound system of the car instrument, comparing the differences in the trigger signal and playing high-priority alarm sound, the missed-report problem caused by the masking of the low-priority alarm signal is solved, and more accurate alarms are achieved Sound processing.

CN119428177APending Publication Date: 2025-02-14DONGFENG AUTOMOBILE ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411705183.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The alarm sound system of existing automotive instruments is difficult to adapt to the diverse alarm needs, resulting in low-priority alarm signals being covered by high-priority alarm signals and being unable to recover, resulting in the problem of underreporting alarm sounds.

Method used

By defining an array to store the trigger signals of all alarm signals in priority order, each time a trigger signal is received, the difference between the current array and the last updated array is compared, the first valid high-priority trigger signal is found, and the first valid high-priority trigger signal is played Its corresponding alarm sound.

Benefits of technology

It realizes the playback of high-priority alarms, and after the high-priority alarm voice playback is completed, the low-priority alarm signals that meet the conditions are re-responded, avoiding the problem of underreporting alarm sounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119428177A_ABST
    Figure CN119428177A_ABST
Patent Text Reader

Abstract

The invention relates to an automobile instrument sound alarm method and device, and the method comprises the following steps: defining an array, storing trigger signals of all alarm signals according to a priority order, each trigger signal having a trigger state, and each alarm signal corresponding to an alarm sound; when a trigger signal of the current alarm signal is received, finding a first trigger signal of which the first trigger state is changed and effective in the current array compared with the last updated array according to a sequence from high priority to low priority; a first effective second trigger signal is found in the current array; comparing the priorities of the two found trigger signals to obtain a trigger signal with a higher priority; and executing a playing process. According to the invention, through the priority judgment logic, the alarm voice with the high priority is played firstly, and after the alarm voice with the high priority is played, the alarm signal meeting the condition is responded again, so that the problem of alarm omission of the alarm voice is avoided to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of alarm systems, and in particular to a method and device for alarming the sound of an automobile instrument. Background Art

[0002] At present, the alarm sounds of vehicle instruments are mainly buzzer alarms and sound source playback alarms. Considering the cost factor, the vehicle instrument usually has only one channel for playing alarm sounds or voices. The current instrument sound alarm system software queries and sequentially executes the alarm sound processing logic, and plays or switches to the corresponding alarm sound according to the input alarm signal.

[0003] However, with the technological innovation and social development, the number of in-vehicle electronic systems has increased day by day. As the core of human-computer interaction, the alarm sound system of automobile instruments has also become complicated. The current processing logic has been difficult to adapt to the new and diverse alarm needs. There is a problem that the low-priority alarm signal cannot be restored after being covered by the high-priority alarm signal, resulting in the problem of missed alarm sound. For example, if the priority of the newly received alarm trigger signal is higher than the currently playing alarm, the current alarm is immediately interrupted and the new alarm is played, without continuing to determine whether the interrupted low-priority alarm trigger signal is still valid, thus missing the alarm situation where the low-priority signal is still valid. Summary of the invention

[0004] In view of the above-mentioned problems existing in the prior art, the present application provides a method and device for automobile instrument sound alarm, which solves the problem of alarm sound underreporting existing in the current alarm priority judgment logic.

[0005] To achieve the above objectives, in a first aspect, the present application provides a method for sound alarm of a vehicle instrument, the method comprising:

[0006] Define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound.

[0007] When the trigger signal of the current alarm signal is received, the first trigger signal whose trigger state has changed and is valid compared to the last updated array is found in the order of priority from high to low; and the first valid second trigger signal is found in the current array.

[0008] Compare the priorities of the two found trigger signals and obtain the trigger signal with a higher priority.

[0009] If no alarm sound is currently being played, the alarm sound corresponding to the trigger signal with a higher priority is played.

[0010] If there is an alarm sound currently being played, the trigger signal corresponding to it is compared with the trigger signal with a higher priority, and the alarm sound corresponding to the trigger signal with a higher priority is played.

[0011] Further, in one embodiment, the step of finding the first trigger signal in the current array that has a first trigger state change and is valid compared to the array that was last updated includes:

[0012] Find the first trigger signal that triggers the state change, and query the alarm sound type corresponding to the trigger signal.

[0013] If the alarm sound corresponding to the trigger signal is a non-continuous alarm, determine the validity of the alarm sound. If valid, the trigger signal is the first trigger signal found. If invalid, change the alarm sound to valid and use the trigger signal as the first trigger signal found.

[0014] If the alarm sound corresponding to the trigger signal is a continuous alarm, the trigger signal is taken as the first trigger signal found.

[0015] Further, in one embodiment, finding the first valid second trigger signal in the current array according to the trigger signal and the alarm sound of the corresponding alarm signal includes:

[0016] Find the first valid trigger signal, query the alarm sound type corresponding to the trigger signal, if the alarm sound of the alarm signal corresponding to the trigger signal is a non-continuous alarm, determine the validity of the alarm sound, if valid, use the trigger signal as the second trigger signal found; if invalid, continue searching.

[0017] If the alarm sound of the alarm signal corresponding to the trigger signal is a continuous alarm, the trigger signal is used as the second trigger signal found.

[0018] Furthermore, in one embodiment, if only one of the first valid first trigger signal and the first valid second trigger signal is found, the alarm sound corresponding to the trigger signal is directly played.

[0019] Furthermore, in one embodiment, it also includes:

[0020] If neither the first valid first trigger signal nor the first valid second trigger signal is found, no alarm is played.

[0021] Furthermore, in one embodiment, before the alarm sound is played, different alarm sounds are set by controlling the playing time and interval of the spliced ​​sound sources.

[0022] Furthermore, in one embodiment, after each comparison of the priorities of the first valid first trigger signal and the first valid second trigger signal, the current array is updated.

[0023] Further, in one embodiment, playing the alarm sound corresponding to the trigger signal includes:

[0024] The non-continuous alarm sound adopts a single-cycle playback mode, and the alarm sound is played continuously for a set number of times in one cycle.

[0025] The continuous alarm sound adopts a cyclic playback mode, completing the single-cycle playback process for a set number of times in one cycle. When the single-cycle playback ends and reaches the waiting stage, the playback is immediately paused. After the waiting time is over, the single-cycle playback is restarted until the entire cycle is completed.

[0026] Furthermore, in one embodiment, the cyclical playback mode determines whether there is a trigger signal with a higher priority each time the cyclical playback is completed. If so, the alarm sound corresponding to the trigger signal with the higher priority is played; if not, the current alarm sound continues to be played.

[0027] In a second aspect, based on the above-mentioned automobile instrument sound alarm method, the present application provides an automobile instrument sound alarm device, the device comprising:

[0028] The array module is used to define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound.

[0029] The judgment module is used to find the first trigger signal in the current array whose trigger state has changed and is valid compared to the array after the last update in order of priority when receiving the trigger signal of the current alarm signal; and find the first valid second trigger signal in the current array.

[0030] The comparison module is used to compare the priorities of the two found trigger signals to obtain the trigger signal with the higher priority; it is also used to compare the trigger signal corresponding to the alarm sound currently being played with the trigger signal with the higher priority.

[0031] The execution module is used to play the alarm sound corresponding to the trigger signal with a higher priority.

[0032] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0033] This application uses an array to store the trigger signals of all alarm signals in order of priority. Each time a trigger signal is received, the current array is compared with the last updated array, and the first valid second trigger signal is found in the current array to play the high priority alarm. Through the priority judgment logic, the alarm voice with high priority is played first, and after the alarm voice with high priority is played, the alarm signal that meets the conditions is responded to again, which avoids the problem of missed alarm sound to a certain extent.

[0034] By controlling the playing time and interval of the same sound source to distinguish different alarm sounds, the code complexity is reduced, the workload and error rate of code modification are reduced, and it is convenient for designers to manage and maintain the instrument sound alarm system. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 The present invention is a flowchart of a method for providing an automobile instrument sound alarm according to an embodiment of the present invention.

[0036] Figure 2 For this application Figure 1 Logic judgment flow chart of finding the first trigger signal in step S2.

[0037] Figure 3 For this application Figure 1 Logic judgment flow chart of searching for the second trigger signal in step S2.

[0038] Figure 4 For this application Figure 1 Logic judgment flow chart of comparing trigger signal priority in step S3.

[0039] Figure 5 This is a logic judgment flow chart for obtaining the alarm sound in an embodiment of the present application.

[0040] Figure 6 This is a logic judgment flow chart for playing the alarm sound in the embodiment of the present application.

[0041] Figure 7 The block diagram of the automobile instrument sound alarm device according to the embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described 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, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] In a first aspect, an embodiment of the present application provides a vehicle instrument sound alarm method.

[0045] In one embodiment, see Figure 1 As shown, the above alarm method includes:

[0046] S1. Define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound.

[0047] S2. When the trigger signal of the current alarm signal is received, the first trigger signal whose trigger state has changed and is valid compared to the last updated array is found in the current array in descending order of priority; and the first valid second trigger signal is found in the current array.

[0048] S3, compare the priorities of the two found trigger signals, and obtain the trigger signal with a higher priority; determine whether an alarm sound is currently being played, if not, no alarm sound is currently being played, and enter S4; if yes, an alarm sound is currently being played, and enter S5.

[0049] S4. Play the alarm sound corresponding to the trigger signal with a higher priority.

[0050] S5. Compare the trigger signal corresponding to the alarm sound currently being played with the trigger signal with a higher priority, and play the alarm sound corresponding to the trigger signal with a higher priority.

[0051] The automobile instrument sound alarm method provided in the present application is designed with a priority judgment logic. After the high-priority alarm voice is played, it is judged whether the masked low-priority alarm signal still meets the alarm condition. If so, it is responded to again, thereby avoiding the problem of missed alarm sound to a certain extent.

[0052] Secondly, as the number of alarm sounds increases, if different sound sources are used to play different alarm sounds, programmers need to make a lot of modifications to the alarm logic of different sound sources, which not only increases the complexity of the code, but also increases the workload and reduces work efficiency. For inexperienced programmers, the risk of errors in the logic modification process is high, making code maintenance difficult. Therefore, in this embodiment, different alarm sounds are set by controlling the playback time and interval of the spliced ​​sound sources.

[0053] Specifically, for the same sound source, different alarm sounds may be generated, including but not limited to the following methods:

[0054] 1. Play the sound source continuously in a loop until it becomes a long sound.

[0055] 2. After playing a sound source of a certain length, mute it for a certain period of time and repeat it a certain number of times.

[0056] By controlling the playing time and interval of the same sound source to distinguish different alarm sounds, the code complexity can be reduced, the workload and error rate of code modification can be reduced, and it is convenient for designers to manage and maintain the instrument sound alarm system.

[0057] Furthermore, in one embodiment, the types of the alarm sound include non-continuous and continuous types. During the non-continuous alarm process, a new alarm request can only be responded to after the current alarm cycle ends; while during the continuous alarm process, a new alarm request can be responded to immediately.

[0058] Preferably, in the above step S1, the trigger signals in the array can be stored in order from high to low priority, or in order from low to high. In order to facilitate the comparison in order from high to low priority in subsequent steps, they are stored in order from high to low in this embodiment.

[0059] Furthermore, in one embodiment, in the above step S2, the step of finding the first trigger signal in the current array that has a first trigger state change and is valid compared to the array after the last update includes:

[0060] Find the first trigger signal that triggers the state change, and obtain the alarm sound type corresponding to the trigger signal.

[0061] If the alarm sound corresponding to the trigger signal is a non-continuous alarm, the validity of the alarm sound is further determined. If valid, the trigger signal is the first trigger signal found; if invalid, the alarm sound is changed to valid and the trigger signal is used as the first trigger signal found.

[0062] If the alarm sound corresponding to the trigger signal is a continuous alarm, the trigger signal is taken as the first trigger signal found.

[0063] Optionally, in one embodiment, see Figure 2 As shown, in the above step S2, the first trigger signal whose trigger state has changed and is valid in the current array compared with the array after the last update is found, and the specific steps include:

[0064] A201. Compare the current alarm trigger signal in the current array with the corresponding alarm trigger signal in the array after the last update in order of priority from high to low, and enter A202.

[0065] A202, determine whether the current alarm trigger signal status has changed, if not, enter A203; if yes, enter A204.

[0066] A203, compare the next alarm trigger signal and enter A202.

[0067] A204. Obtain the alarm sound corresponding to the alarm trigger signal and proceed to A205.

[0068] A205. Determine whether the alarm sound type is a continuous alarm. If not, proceed to A206; if so, proceed to A209.

[0069] A206, determine whether the alarm sound has expired, if not, proceed to A207; if yes, proceed to A208.

[0070] A207. Take the trigger signal as the first trigger signal found, number the alarm trigger signal as Ta and output it.

[0071] A208. After changing the alarm sound to valid, go to A209.

[0072] A209, determine whether the status of the alarm trigger signal is valid, if so, enter A207; if not, enter A210.

[0073] A210, determine whether all alarm trigger signals in the array have been compared. If so, enter A211; if not, enter A203.

[0074] A211. Set the alarm trigger signal to invalid and enter A207.

[0075] Further, in one embodiment, see Figure 3 As shown, in the above step S2, the step of finding the first valid second trigger signal in the current array includes:

[0076] B201. Search the current alarm trigger signal in the current array in order of priority from high to low, and enter B202.

[0077] B202. Determine whether the status of the alarm trigger signal is valid. If so, proceed to B203; if not, proceed to B204.

[0078] B203. Obtain the alarm sound corresponding to the trigger signal and proceed to B205.

[0079] B204, find the next alarm trigger signal and enter B202.

[0080] B205. Determine whether the alarm sound type is a continuous alarm. If not, proceed to B206; if yes, proceed to B207.

[0081] B206. Determine whether the alarm sound has expired. If not, proceed to B207; if yes, proceed to B208.

[0082] B207. Use the trigger signal as the second trigger signal found, number the alarm trigger signal as Tb and output it.

[0083] B208. Determine whether all alarm trigger signals in the array have been compared. If so, go to B209; if not, go to B204.

[0084] B209. Set the alarm trigger signal to invalid and enter B207.

[0085] Furthermore, in one embodiment, in the above step S2, if only one of the first valid first trigger signal and the first valid second trigger signal is found, the alarm sound corresponding to the trigger signal is played directly; if neither the first valid first trigger signal nor the first valid second trigger signal is found, the alarm is not played.

[0086] Further, according to the specific implementation, a more specific alarm method embodiment is given. First, in order to more conveniently obtain various parameters, configuration properties can be defined first, including:

[0087] 1. Define an alarm sound enumeration BeepAlarm{A1, A2, A3, ..., An, N}, where the enumeration members are all alarm sound names, and N is the number of alarm sounds. In this embodiment, the enumeration members are arranged in descending order of priority.

[0088] 2. Define the trigger signal enumeration BeepSignal{T1, T2, T3, …, Tn, N}, where the enumeration members are the input trigger signals of all alarm signals, N is the number of trigger signals, and the members are arranged from high to low in terms of priority.

[0089] 3. Define the alarm sound array g_alarm_invalid[N], with subscripts A1, A2, A3, ...An, which is used to save the invalid status of the current alarm sound. The invalid status value is TRUE, and the valid status value is FALSE.

[0090] 4. Define the trigger status array NewAlarmSignalTable[N] of the current alarm trigger signal. The array subscripts are T1, T2, T3, ... Tn. It is used to save the trigger status of the current alarm trigger signal. The trigger status value is TRUE, and the trigger status value is FALSE.

[0091] 5. Define the trigger status array OldAlarmSignalTable[N] of the alarm trigger signal after the last update, which is used to save the trigger status of the alarm trigger signal after the last update.

[0092] 6. Define a static structure array Global_Beep[N] with subscripts A1, A2, A3, ...An. N is the length of the array. Global_Beep[N] contains the following members:

[0093] alarm, alarm number, one-to-one correspondence with the name in BeepAlarm;

[0094] beep_name, sound source name;

[0095] times, the number of times the audio is played continuously in a single cycle;

[0096] on_delay_ms, turn on delay time;

[0097] off_delay_ms, shutdown delay time;

[0098] cycles, cycle period;

[0099] type, alarm type.

[0100] Further, for finding the first trigger signal in the above step S2, a specific logic judgment embodiment is provided, including:

[0101] C201. Compare the data in NewAlarmSignalTable with the data in OldAlarmSignalTable one by one in descending order of priority to find the first alarm trigger signal T with a state change.

[0102] C202. Get the alarm sound A corresponding to the alarm trigger signal T, and query the type of A through Global_Beep[A].type: If A is a non-continuous alarm, if g_alarm_invalid[A] is TRUE, force g_alarm_invalid[A] to be FALSE, if NewAlarmSignalTable[T] is TRUE, return T, otherwise skip T; if A is a continuous alarm, if NewAlarmSignalTable[T] is TRUE, return T, otherwise skip T.

[0103] C203. If T is skipped, find the next alarm trigger signal T with a state change, and repeat the process of 2 until the first valid trigger signal with a change is returned, which is recorded as Ta.

[0104] Based on this embodiment, if all alarm trigger signals are skipped, set Ta as invalid.

[0105] Further, for finding the second trigger signal in step S2 above, a specific logical judgment embodiment is given, including:

[0106] D201. Search for alarm trigger signals in the NewAlarmSignalTable one by one in the order of decreasing priority until the first alarm trigger signal T that is TRUE (valid) is found.

[0107] D202. Obtain the alarm A corresponding to the input corresponding to T, and query its alarm type through the alarm type query function Global_Beep[A].type: If A is a non - continuous alarm and g_alarm_invalid[A] is FALSE (invalid), then return T; otherwise, skip T; if A is a continuous alarm, directly return T.

[0108] D203. If T is skipped, find the next T that is TRUE and repeat the process in step 2 until the first valid alarm trigger signal is returned, denoted as Tb.

[0109] Based on this embodiment, if all alarm trigger signals are skipped, set Tb as invalid.

[0110] Further, as shown in Figure 4 For comparing the priorities of the two found trigger signals in step S3 above to obtain the trigger signal with a higher priority, a specific logical judgment embodiment is given, including:

[0111] A301. Judge whether Ta is a valid value. If it is, enter A302; if not, enter A303.

[0112] A302. Judge whether Tb is a valid value. If it is, enter A304; if not, enter A305.

[0113] A303. Judge whether Tb is a valid value. If it is, enter A306; if not, enter A307.

[0114] A304. Judge whether Ta < Tb. If it is, enter A305; if not, enter A306.

[0115] A305. Assign Ta to the high - priority alarm trigger signal Tx and enter A308.

[0116] A306. Assign Tb to Tx and enter A308.

[0117] A307. Set Tx as an invalid value and enter A308.

[0118] A308, output Tx.

[0119] Further, in one embodiment, see Figure 5 As shown, for obtaining the alarm sound corresponding to the alarm signal, a specific logic judgment embodiment is given, including:

[0120] A401. Determine whether Tx is a valid value. If so, proceed to A402; if not, proceed to A405.

[0121] A402. Obtain the alarm sound Ax corresponding to Tx and proceed to A403.

[0122] A403, determine whether the Tx status is valid, if so, go to A406; if not, go to A404.

[0123] A404 and Ax become invalid and enter A405.

[0124] A405, set Ax to no alarm and enter A406.

[0125] A406, output Ax.

[0126] Optionally, in one embodiment, for obtaining an alarm sound corresponding to an alarm signal, another specific logic judgment embodiment is provided, including:

[0127] Query the alarm sound Ax corresponding to Tx.

[0128] If NewAlarmSignalTable[Tx] is TRUE, the alarm sound Ax is returned.

[0129] If NewAlarmSignalTable[Tx] is FALSE, Ax is returned as invalid (i.e., the alarm is not played) and g_alarm_invalid[Tx] is set to TRUE.

[0130] If Tx is invalid (i.e., invalid trigger signal), then Ax is returned as invalid (i.e., no alarm is played).

[0131] Further, in one embodiment, after comparing the priorities of the first valid first trigger signal and the first valid second trigger signal each time, the current array is updated as follows: If Tx is valid, the data from NewAlarmSignalTable[Tx] to NewAlarmSignalTable[T1] are copied one by one to OldAlarmSignalTable[Tx] to OldAlarmSignalTable[T1]; if Tx is invalid, all the data in NewAlarmSignalTable are copied to OldAlarmSignalTable.

[0132] Further, in one embodiment, step S5 above includes determining the priorities of the alarm sound being played and the alarm sound corresponding to the trigger signal with a higher priority. The specific steps are as follows:

[0133] Define the new alarm as alarm_new and the current alarm as alarm_now.

[0134] If Ax is valid, assign Ax to alarm_new; otherwise, directly skip the alarm priority judgment logic.

[0135] If there is no current alarm, assign alarm_new to alarm_now.

[0136] If there is a current alarm, then judge the priority. If alarm_new < alarm_now, it means the priority of the new alarm is higher than that of the current alarm. At this time, do not immediately update alarm_now, but notify the playback module that alarm_now is about to change and the current alarm playback is interrupted. The playback module will query and update the value of alarm_now by itself. If alarm_new >= alarm_now, then set alarm_new to no alarm.

[0137] Further, in one embodiment, the non - continuous alarm sound adopts a single - cycle playback mode, and the alarm sound is continuously played a set number of times within one cycle; the continuous alarm sound adopts a cyclic - cycle playback mode. Within one cycle, a set number of single - cycle playback processes are completed. Immediately after the single - cycle playback ends and reaches the waiting stage, the playback is paused. After the waiting time ends, the single - cycle playback starts again until the entire cyclic cycle is completed.

[0138] Based on this embodiment, for the above cyclic - cycle playback mode, after each cyclic playback is completed, determine whether there is a trigger signal with a higher priority. If there is, play the alarm sound corresponding to the trigger signal with a higher priority; if not, continue to play the current alarm sound.

[0139] Furthermore, in one embodiment, a specific logic judgment embodiment is provided for the alarm sound playback, including:

[0140] When the alarm sound is played in a single cycle: If alarm_now changes from invalid to valid, find the current alarm structure Global_Beep[alarm_now], play the audio file named Global_Beep[alarm_now].beep_name, and play Global_Beep[alarm_now].times times continuously.

[0141] When the alarm sound is played in a loop: detect the current single-cycle playback time, and when it reaches on_delay_ms, stop playing immediately, wait silently for Global_Beep[alarm_now].off_delay_ms, and then restart the single-cycle playback until Global_Beep[alarm_now].cycles cycles are completed; each time the alarm playback completes a playback cycle, check whether alarm_now has changed. If it has changed, update the value of alarm_now to alarm_new at this moment, and start playing the new alarm. If there is no change, continue playing the current alarm.

[0142] Optional, see Figure 6 As shown, for the alarm sound playing, another specific logic judgment embodiment is provided, including:

[0143] A601, determine whether alarm_now is valid, if yes, go to A602; if no, continue to determine whether alarm_now is valid. Here, alarm_now is constantly updated.

[0144] A602. Play the audio file Global_Beep[alarm_now].beep_name and enter A603.

[0145] A603, determine whether the audio file has been played, if so, go to A604; if not, go to A605.

[0146] A604. Determine whether the audio file is played continuously for Global_Beep[alarm_now].times times. If so, proceed to A605; if not, proceed to A606.

[0147] A605. Determine whether the audio file playback time reaches Global_Beep[alarm_now].on_delay_ms. If so, go to A607; if not, go to A603.

[0148] A606. Continue playing the Global_Beep[alarm_now].beep_name audio file and enter A603.

[0149] A607, stop playing audio, change to mute state, and enter A608.

[0150] A608, determine whether the silent time reaches Global_Beep[alarm now].off_delay_ms, if so, enter A609; if not, enter A607.

[0151] A609, determine whether the audio file loop playback reaches Global_Beep[alarm_now].cycles times, if so, enter A610; if not, enter A611.

[0152] A610, set alarm_now to no alarm and enter A612.

[0153] A611. Determine whether the value of alarm_now has changed. If so, proceed to A613; if not, proceed to A602.

[0154] A612, set alarm_now to invalid, enter A601

[0155] A613: Update alarm_now to the changed value and enter A602.

[0156] Further, in one embodiment, when the alarm ends, alarm_now is set to no playback, and g_alarm_invalid[alarm_now] is set to TRUE.

[0157] In the second aspect, based on the above-mentioned embodiment of the automobile instrument sound alarm method, the present application embodiment provides an embodiment of an automobile instrument sound alarm device. Figure 7 As shown, the above device includes an array module, a judgment module, a comparison module and an execution module, specifically:

[0158] The array module is used to define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound.

[0159] The judgment module is used to find the first trigger signal in the current array whose trigger state has changed and is valid compared to the array after the last update in order of priority when receiving the trigger signal of the current alarm signal; and find the first valid second trigger signal in the current array.

[0160] The comparison module is used to compare the priorities of the two found trigger signals to obtain the trigger signal with the higher priority; it is also used to compare the trigger signal corresponding to the alarm sound currently being played with the trigger signal with the higher priority.

[0161] The execution module is used to play the alarm sound corresponding to the trigger signal with a higher priority.

[0162] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0163] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0164] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0165] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0166] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0168] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A car instrument sound alarm method, characterized in that: The method comprises: Define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound; When receiving the trigger signal of the current alarm signal, find the first trigger signal in the current array that has a changed trigger state and is valid compared to the last updated array in the order of priority from high to low; and find the first valid second trigger signal in the current array; Compare the priorities of the two found trigger signals and obtain the trigger signal with a higher priority; If no alarm sound is currently being played, the alarm sound corresponding to the trigger signal with a higher priority is played; If there is an alarm sound currently being played, the trigger signal corresponding to it is compared with the trigger signal with a higher priority, and the alarm sound corresponding to the trigger signal with a higher priority is played.

2. The automobile instrument sound alarm method according to claim 1, characterized in that: The step of finding the first trigger signal in the current array that has a first trigger state change and is valid compared to the last updated array includes: Find the first trigger signal that triggers the state change, and query the alarm sound type corresponding to the trigger signal; If the alarm sound corresponding to the trigger signal is a non-continuous alarm, determine the validity of the alarm sound. If valid, the trigger signal is the first trigger signal found; if invalid, change the alarm sound to valid and use the trigger signal as the first trigger signal found; If the alarm sound corresponding to the trigger signal is a continuous alarm, the trigger signal is taken as the first trigger signal found.

3. The automobile instrument sound alarm method according to claim 1, characterized in that: In the current array, according to the trigger signal and the alarm sound of the corresponding alarm signal, find the first valid second trigger signal, including: Find the first valid trigger signal, query the alarm sound type corresponding to the trigger signal, if the alarm sound of the alarm signal corresponding to the trigger signal is a non-continuous alarm, determine the validity of the alarm sound, if valid, use the trigger signal as the second trigger signal found; if invalid, continue searching; If the alarm sound of the alarm signal corresponding to the trigger signal is a continuous alarm, the trigger signal is used as the second trigger signal found.

4. The automobile instrument sound alarm method according to claim 1, characterized in that: If only one of the first valid first trigger signal and the first valid second trigger signal is found, the alarm sound corresponding to the trigger signal is played directly.

5. The automobile instrument sound alarm method according to claim 1, characterized in that: Also includes: If neither the first valid first trigger signal nor the first valid second trigger signal is found, no alarm is played.

6. The automobile instrument sound alarm method according to claim 1, characterized in that: Before the alarm sound is played, different alarm sounds are set by controlling the playing time and interval of the spliced ​​sound sources.

7. The automobile instrument sound alarm method according to claim 1, characterized in that: After each comparison of the priorities of the first valid first trigger signal and the first valid second trigger signal, the current array is updated.

8. The automobile instrument sound alarm method according to claim 1, characterized in that: Play the alarm sound corresponding to the trigger signal, including: The non-continuous alarm sound adopts a single-cycle playback mode, and the alarm sound is played continuously for a set number of times in one cycle; The continuous alarm sound adopts a cyclic playback mode, completing the single-cycle playback process for a set number of times in one cycle. When the single-cycle playback ends and reaches the waiting stage, the playback is immediately paused. After the waiting time is over, the single-cycle playback is restarted until the entire cycle is completed.

9. The automobile instrument sound alarm method according to claim 8, characterized in that: In the cyclical playback mode, each time a cyclic playback is completed, it is determined whether there is a trigger signal with a higher priority. If so, the alarm sound corresponding to the trigger signal with the higher priority is played; if not, the current alarm sound continues to be played.

10. An alarm device based on the automobile instrument sound alarm method according to any one of claims 1 to 9, characterized in that: The device comprises: An array module is used to define an array to store the trigger signals of all alarm signals in order of priority, and each trigger signal has a trigger state, and each alarm signal corresponds to an alarm sound; A judgment module, which is used to find the first trigger signal in the current array whose trigger state has changed and is valid compared to the last updated array in the order of priority from high to low when receiving the trigger signal of the current alarm signal; and find the first valid second trigger signal in the current array; A comparison module, which is used to compare the priorities of the two found trigger signals to obtain the trigger signal with a higher priority; and is also used to compare the trigger signal corresponding to the alarm sound currently being played with the trigger signal with a higher priority; The execution module is used to play the alarm sound corresponding to the trigger signal with a higher priority.