Function mode switching method and device and related equipment
Ultrasonic signals with defined frequency points and energy thresholds enhance the accuracy of functional mode switching in electronic devices, addressing inaccuracies in existing methods.
Patent Information
- Application Number
- CN202411211268.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
AI Technical Summary
Existing methods for switching functional modes in electronic devices, such as flight or silent modes, often suffer from inaccuracies due to reliance on accelerometers or WiFi signals, leading to misjudgments and reduced efficiency.
Utilizing ultrasonic signals with specific frequency points and energy thresholds to determine and switch functional modes, ensuring accurate mode transitions by identifying predefined frequency bands and energy values.
Improves the accuracy of functional mode switching by using ultrasonic signals, reducing misjudgments and enhancing operational efficiency in electronic devices.
Smart Images

Figure CN119172008A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and specifically relates to a function mode switching method, device and related equipment. Background Art
[0002] With the development of electronic technology, the functional modes of electronic devices are gradually increasing. Users can turn on or off different functional modes of electronic devices in different scenarios. For example, they need to turn on the flight mode before an airplane takes off, turn on the silent mode or vibrate mode in a conference room for a meeting, etc.
[0003] In the related art, if an electronic device turns on or off the flight mode, the user needs to manually turn it on or off, or the electronic device uses an accelerometer to determine whether the current aircraft is in a take-off state, so that the flight mode can be turned on or off according to the determined aircraft state.
[0004] However, in the above technical solutions, whether relying on an accelerometer to determine whether the electronic device is in flight mode or not, or relying on detecting and identifying the SSID of a wifi, it is very easy to make a misjudgment, thereby affecting the accuracy of the electronic device in turning on or off the functional mode. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a function mode switching method, apparatus and related equipment, which can improve the accuracy of switching function modes of electronic devices.
[0006] In a first aspect, an embodiment of the present application provides a functional mode switching method, which includes: a first device obtains N frequency points corresponding to a first ultrasonic signal, where the first ultrasonic signal is an ultrasonic signal sent by a second device, and N is a positive integer; the first device determines N energy values corresponding to the N frequency points one by one; when the N frequency points belong to a first preset frequency band and the N energy values are greater than or equal to a first threshold, the first device switches the functional mode of the first device to a target functional mode, and the target functional mode is the functional mode corresponding to the first preset frequency band.
[0007] In the second aspect, an embodiment of the present application provides a functional mode switching method, which includes: the second device broadcasts a first ultrasonic signal, the first ultrasonic signal includes a frequency domain signal of N frequency points, and N energy values corresponding to the N frequency points are greater than or equal to a first threshold; wherein the first ultrasonic signal is used to instruct the first device to switch the functional mode of the first device to a target functional mode, the target functional mode is a functional mode corresponding to a first preset frequency band, the first preset frequency band is a preset frequency band to which the frequency domain signal of the N frequency points belongs, and N is a positive integer.
[0008] In the third aspect, an embodiment of the present application provides a functional mode switching device, which includes: an acquisition module, a determination module and a switching module; the acquisition module is used to acquire N frequency points corresponding to a first ultrasonic signal, the first ultrasonic signal is an ultrasonic signal sent by a second device, and N is a positive integer; the determination module is used to determine N energy values corresponding to the N frequency points one by one; the switching module is used to, when the N frequency points belong to a first preset frequency band and the N energy values are greater than or equal to a first threshold, the first device switches the functional mode of the first device to a target functional mode, the target functional mode being the functional mode corresponding to the first preset frequency band.
[0009] In fourth aspect, an embodiment of the present application provides a functional mode switching device, which includes: a sending module; the sending module is used to broadcast and send a first ultrasonic signal, the first ultrasonic signal includes a frequency domain signal of N frequency points, and N energy values corresponding to the N frequency points one by one are greater than or equal to a first threshold; wherein the first ultrasonic signal is used to instruct the first device to switch the functional mode of the first device to a target functional mode, the target functional mode is a functional mode corresponding to a first preset frequency band, the first preset frequency band is a preset frequency band to which the frequency domain signal of the N frequency points belongs, and N is a positive integer.
[0010] In a fifth aspect, an embodiment of the present application provides a first device, which includes a processor and a memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0011] In a sixth aspect, an embodiment of the present application provides a second device, which includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the second aspect are implemented.
[0012] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0013] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect or the second aspect.
[0014] In a ninth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0015] In an embodiment of the present application, the first device obtains N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is an ultrasonic signal sent by the second device, and N is a positive integer; the first device determines N energy values corresponding to the N frequency points one by one; when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, the first device switches the functional mode of the first device to the target functional mode, and the target functional mode is the functional mode corresponding to the first preset frequency band. In this solution, the first device obtains the N frequency points corresponding to the ultrasonic signal by parsing the acquired ultrasonic signal, and switches the functional mode to the target functional mode when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, so that the first device can determine the target functional mode to be switched by identifying the ultrasonic signal of a specific frequency point, thereby improving the accuracy of the first device switching the functional mode.
[0016] In an embodiment of the present application, the second device broadcasts and sends a first ultrasonic signal, the first ultrasonic signal includes a frequency domain signal of N frequency points, and the N energy values corresponding to the N frequency points are greater than or equal to the first threshold value; wherein the first ultrasonic signal is used to instruct the first device to switch the functional mode of the first device to the target functional mode, the target functional mode is the functional mode corresponding to the first preset frequency band, the first preset frequency band is the preset frequency band to which the frequency band of the frequency domain signal of the N frequency points belongs, and N is a positive integer. In this solution, the second device can determine the ultrasonic signal of the specific frequency band frequency point to be sent under a specific environment, and send the determined ultrasonic signal to the first device, thereby instructing the first device to switch the functional mode of the first device to the target functional mode, thereby improving the accuracy of the first device switching the functional mode. In addition, due to the weak penetration of the ultrasonic signal, it will not interfere with other devices, thereby further improving the accuracy of the first device in identifying the ultrasonic signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of a function mode switching method provided in an embodiment of the present application;
[0018] Figure 2 This is a flow chart of an electronic device detecting an ultrasonic signal provided by an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of another function mode switching method provided in an embodiment of the present application;
[0020] Figure 4 is a flow chart of interaction between a mobile phone and a broadcasting device provided in an embodiment of the present application;
[0021] Figure 5This is one of the structural schematic diagrams of a functional mode switching device provided in an embodiment of the present application;
[0022] Figure 6 This is the second structural diagram of a functional mode switching device provided in an embodiment of the present application;
[0023] Figure 7 is a structural schematic diagram of another functional mode switching device provided in an embodiment of the present application;
[0024] Figure 8 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;
[0025] Fig. 9 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] The terms "at least one (item)", "at least one of" and the like in the specification and claims of this application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" means two or more, and its meaning is similar to that of "at least one (item)".
[0029] It should be noted that the functional mode switching method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the functional mode switching method is executed by an electronic device as an example to illustrate the functional mode switching method provided in the embodiments of the present application.
[0030] The first device in the embodiment of the present application may be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, etc., and the embodiment of the present application is not limited to this.
[0031] The second device in the embodiment of the present application may be: a broadcasting device, a projector device, a wireless network device, or other device that has the function of broadcasting ultrasonic signals, and the embodiment of the present application is not limited to this.
[0032] The functional mode switching method, apparatus and related equipment provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] With the development of electronic technology, the functional modes of electronic devices are gradually increasing. Users can turn on or off different functional modes of electronic devices in different scenarios. For example, they need to turn on the flight mode before an airplane takes off, turn on the silent mode or vibrate mode in a conference room for a meeting, etc.
[0034] In the related art, if the electronic device turns on or off the flight mode, the user needs to turn it on or off manually, or the electronic device uses an accelerometer to determine whether the current aircraft is in the take-off state, so that the flight mode can be turned on or off according to the determined aircraft state. Or, if the electronic device turns on or off the silent mode, the user also needs to turn it on or off manually, or by detecting and identifying the wifi service set identifier (SSID) to determine whether the electronic device is near the wifi, triggering the electronic device to turn on or off the silent mode.
[0035] However, in the above technical solution, when the electronic device relies on the accelerometer to determine whether the electronic device is in flight mode, the accelerometer may not accurately determine that the aircraft is in take-off state even though the electronic device is not on the aircraft. Therefore, it is easy to cause misjudgment. In addition, when the electronic device relies on detecting and identifying the SSID of wifi, since radio frequency signals such as Wifi have strong wall penetration ability, it may cause misjudgment in the process of determining whether the silent mode needs to be turned on or off, thereby making the efficiency of turning on or off the functional mode of the electronic device low.
[0036] In the functional mode switching method provided in the embodiment of the present application, the first device obtains N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is the ultrasonic signal sent by the second device, and N is a positive integer; the first device determines the N energy values corresponding to the N frequency points one by one; when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, the first device switches the functional mode of the first device to the target functional mode, and the target functional mode is the functional mode corresponding to the first preset frequency band. In this solution, the first device obtains the N frequency points corresponding to the ultrasonic signal by parsing the acquired ultrasonic signal, and switches the functional mode to the target functional mode when the N frequency points meet the condition of "belonging to the first preset frequency band and the N energy values are greater than or equal to the first threshold", so that the first device can determine the target functional mode to be switched by identifying the ultrasonic signal of a specific frequency point, thereby improving the accuracy of the first device switching the functional mode.
[0037] The execution subject of the function mode switching method provided in this embodiment may be a function mode switching device, and the function mode switching device may be a first device, such as an electronic device or a mobile phone, or a control module or a processing module in the first device. The technical solution provided in the embodiment of the present application is described below by taking the first device as an example.
[0038] The present application embodiment provides a method for switching a functional mode. Figure 1 FIG. 1 is a flow chart of a method for switching a functional mode provided in an embodiment of the present application, and the method can be applied to a first device. Figure 1 As shown, the function mode switching method provided in the embodiment of the present application may include the following steps 201 to 203.
[0039] Step 201: The first device obtains N frequency points corresponding to the first ultrasonic signal, where N is a positive integer.
[0040] In some embodiments of the present application, the first device may be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a PDA, or an in-vehicle electronic device.
[0041] In some embodiments of the present application, the first ultrasonic signal is an ultrasonic signal sent by the second device.
[0042] In some embodiments of the present application, the first device performs fast Fourier transform on the first ultrasonic signal to obtain N frequency domain signals.
[0043] For example, fast Fourier transform is one of the most commonly used processing methods for digital signal data. It can transform the signal from the time domain to the frequency domain and generate a statistical spectrum to analyze the ultrasonic signal.
[0044] In some embodiments of the present application, each frequency domain signal corresponds to a frequency point, for example, the frequency point may be 21 kHz, or 23 kHz.
[0045] It should be noted that the ultrasonic signal for environmental indication needs to be specially designed to be clearly distinguished from the ultrasonic noise that may exist in the environment, so as to eliminate the possibility of false triggering. Ultrasonic noise in the environment usually exists in the form of the entire ultrasonic spectrum. The working frequency of special electrical appliances, such as some ultrasonic cleaning machines; or some ultrasonic noise from structural noise, such as pulse noise, usually exists in the form of a single frequency.
[0046] In order to clearly distinguish these two common ultrasonic noises, any encoded ultrasonic signal can be used as an indication signal to instruct the first device to switch the functional mode. However, this will increase the number of ultrasonic signal analysis steps, which is likely to generate high power consumption for a daily frequently used application. At the same time, due to the complex indoor viewing, the path loss will be large, which also increases the difficulty of parsing complex information. Therefore, a simple multi-frequency point, that is, the ultrasonic signal of the above N frequencies, can be used to directly indicate the device. In this way, it can not only be clearly distinguished from the ambient noise, but also avoid complex analytical operations.
[0047] Any multi-frequency ultrasonic signal with obvious characteristics can be directly used as an indication signal for indicating that the first device switches the functional mode. For example, within the ultrasonic frequency band of 20kHz to 24kHz, three frequencies with intervals of 0.5kHz and 1kHz, such as 20.5kHz, 21kHz, and 22kHz, are selected as the transmitting signal source. At the receiving end, that is, the first device mentioned above records for a period of time t, and then transforms the ultrasonic signal into the frequency domain through a simple Fourier transform, and the spectra of the three frequency points can be parsed. When the parsed spectra of the three frequency points are consistent with the set spectrum, it can be considered that the ultrasonic signal is the set indication signal for indicating that the first device switches the functional mode. At the same time, because the selected ultrasonic frequency band is narrow, in the same environment, the path loss of each frequency point in the frequency band is not much different. The three frequency points of the sound source can be further set to emit sounds of the same amplitude to further avoid interference from sudden noise in the environment.
[0048] Optionally, in some embodiments of the present application, the first device may acquire an ultrasonic signal through a microphone of the first device.
[0049] Exemplarily, the first device turns on the microphone of the first device and continuously or periodically records to obtain ultrasonic signals in the environment. When the average energy value of the ultrasonic signal reaches a second threshold, the first device determines that the ultrasonic signal sent by the second device is detected, and analyzes it to obtain N frequency points corresponding to the ultrasonic signal in the recording.
[0050] Optionally, in some embodiments of the present application, before the above step 201 "the first device obtains N frequency points corresponding to the first ultrasonic signal", the function mode switching method provided in the embodiment of the present application further includes step 301:
[0051] Step 301: The first device turns on a first microphone of the first device within a first time period to collect a first ultrasonic signal through the first microphone.
[0052] In some embodiments of the present application, the first time period may be determined by the first device based on travel information recorded by the user in the first device, or may be set by the user.
[0053] In some embodiments of the present application, the above-mentioned travel information may be the meeting information recorded by the user in the calendar of the first device, or may be the user's ticket purchase information, which is not limited in the present application.
[0054] In some embodiments of the present application, the first microphone is a recording device of the first device.
[0055] In some embodiments of the present application, the first microphone is turned on to record ultrasound in the environment, and the first device opens a detection window to receive and analyze the ultrasonic signal collected in the recording.
[0056] In some embodiments of the present application, the first device turns on the first microphone of the first device within the first time period, including any of the following:
[0057] The first device turns on the first microphone within a first time period;
[0058] The first device turns on the first microphone once every first time period within the first time period.
[0059] In one example, the first device may continuously collect ultrasonic signals during a first time period.
[0060] In another example, the first device may periodically collect ultrasonic signals within a first time period.
[0061] For example, if the user's itinerary information is the flight ticket purchase information at 8 a.m., the first time period is set to be from 7:30 to 8:30. The first device turns on the microphone at 7:30 and continues recording to collect ultrasonic signals until the microphone is turned off at 8:30 to stop collecting.
[0062] Alternatively, the first device starts at 7:30 and turns on the microphone for 1 second to record at intervals of 1 minute to collect ultrasonic signals, until the microphone is turned off at 8:30 to stop collecting.
[0063] In a possible embodiment, the first microphone is used for recording, collecting ultrasonic signals, and then receiving the collected ultrasonic signals through the detection window of the first device, and performing fast Fourier transform to analyze the collected ultrasonic signals.
[0064] Further, in combination with the above step 301, the above step 201 "the first device obtains N frequency points corresponding to the first ultrasonic signal" specifically includes step 201a:
[0065] Step 201a: When the average energy value of the first ultrasonic signal in the first time period is greater than the second threshold, the first device acquires N frequency points.
[0066] In some embodiments of the present application, the second threshold may be set by a user or by the first device.
[0067] In some embodiments of the present application, the first device will continue to use a microphone to record within a first time period. When the average energy value collected by the recording is greater than a second threshold, it indicates that an ultrasonic signal is sent. Furthermore, the first device will analyze the collected ultrasonic signal to obtain N frequency points.
[0068] In this way, the presence of noise in the environment may also generate energy values, but the energy values may be small. Therefore, setting a second threshold can eliminate noise interference to a certain extent and determine the accuracy of the target functional mode based on the frequency of the ultrasonic signal.
[0069] Optionally, in some embodiments of the present application, before the above step 301 "the first device turns on the first microphone of the first device within the first time period", the function mode switching method provided in the embodiment of the present application further includes steps 401 and 402:
[0070] Step 401: The first device obtains first travel information.
[0071] In some embodiments of the present application, the first trip information includes a first start time and a first end time.
[0072] In some embodiments of the present application, the first travel information may be meeting information recorded by the user in the calendar of the first device, or may be the user's ticket purchase information, which is not limited in the present application.
[0073] For example, during the working process, the microphone of the mobile phone, that is, the first device, needs to be turned on periodically or continuously to receive information. The purpose of the periodicity is to reduce the power consumption as much as possible. At the same time, the microphone can also be turned on in a specific time period, that is, the first time period mentioned above, in combination with the itinerary information or meeting information in the calendar of the mobile phone, to receive the ultrasonic signal in the environment and perform signal analysis.
[0074] Step 402: The first device determines a time period from a first start time to a first end time as a first time period.
[0075] For example, if the user's itinerary information is flight ticket purchase information for 8 a.m., the first time period is set to 7:30 to 8:30.
[0076] For example, if the user's itinerary information is meeting information recorded in a memo, and the meeting information is that the meeting starts at 7 o'clock, then the first time period is from 6:30 to 8:30.
[0077] In this way, the first device can read the itinerary and turn on the microphone to collect ultrasonic signals only during the meeting or flight take-off time period, thereby avoiding the power consumption problem caused by the microphone of the first device being turned on continuously.
[0078] Step 202: The first device determines N energy values corresponding to N frequency points one by one.
[0079] In some embodiments of the present application, each frequency point corresponds to an energy value. It is understandable that a certain energy value will be generated at each frequency point, indicating the signal value of the ultrasonic signal at the frequency point.
[0080] In some embodiments of the present application, the first device obtains the energy value corresponding to each frequency band through energy calculation.
[0081] In some embodiments of the present application, the magnitude of the above energy value is represented by the amplitude displayed in the ultrasonic frequency spectrum.
[0082] In some embodiments of the present application, after the ultrasonic signal is analyzed, a spectrum is obtained, and the spectrum includes the frequency point corresponding to each frequency domain signal and the amplitude of the energy value corresponding to the frequency point.
[0083] It can be understood that if the amplitude of the energy value at a certain frequency point in the ultrasonic spectrum is greater than a predetermined threshold, it means that the ultrasonic signal sent by the second device is an ultrasonic signal of the frequency point.
[0084] Step 203: When the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, the first device switches the function mode of the first device to the target function mode.
[0085] In some embodiments of the present application, the target functional mode is a functional mode corresponding to the first preset frequency band.
[0086] In some embodiments of the present application, the first preset frequency band is a user-defined setting, and may also be pre-set for the first device and the second device.
[0087] In some embodiments of the present application, the first preset frequency band is a preset frequency band to which the frequency band of the frequency domain signal of N frequency points belongs.
[0088] Exemplarily, the first preset frequency band may be 20kHz-22kHz, or 21kHz-23kHz, which is not limited in the present application.
[0089] In some embodiments of the present application, the above-mentioned target function mode can be an airplane mode, a silent mode, a ringing mode, etc.
[0090] In some embodiments of the present application, the energy value is greater than or equal to the first threshold, which means that the amplitude of the energy value is greater than or equal to the first threshold.
[0091] In some embodiments of the present application, the energy value being greater than or equal to the first threshold represents that there is an ultrasonic signal at the frequency point corresponding to the energy value.
[0092] In some embodiments of the present application, the first threshold is a user-defined setting, and may also be pre-set for the first device and the second device.
[0093] In some embodiments of the present application, after collecting the first ultrasonic signal, the first device analyzes the first ultrasonic signal to obtain the frequency point of at least one frequency domain signal in the ultrasonic signal and the energy value corresponding to each frequency point. If each frequency point is in the first preset frequency band, and the energy value of each frequency band is greater than the first threshold, the first device determines the target functional mode to be switched based on the frequency point and the first preset frequency band where the frequency point is located. Then, the first device switches the functional mode to the target functional mode.
[0094] For example, if the ultrasonic signal belongs to the 20-22kHz frequency band and the frequency points of the ultrasonic signal are 20.5kHz and 21.5kHz, the target functional mode is determined to be the flight mode. After the first device collects the ultrasonic signal, it analyzes the ultrasonic signal. If the energy value of the ultrasonic signal at the frequency points of 20.5kHz and 21.5kHz is greater than the first threshold, the first device determines that the target functional mode is the flight mode and switches the functional mode to the flight mode.
[0095] For another example, if the ultrasonic signal belongs to the 21-23kHz frequency band, and the frequency points of the ultrasonic signal are 21kHz and 22.5kHz, the target functional mode is determined to be the silent mode. After the first device collects the ultrasonic signal, it analyzes the ultrasonic signal, and if the energy value of the ultrasonic signal at the frequency points of 21kHz and 22.5kHz is greater than the first threshold, the first device determines that the target functional mode is the silent mode, and switches the functional mode to the silent mode.
[0096] It is understandable that the weak penetration of ultrasonic signals and a relatively closed environment can together form an environmental sensing system, thereby enabling specific functional modes in specific environments. Since the ultrasonic frequency band does not interfere with the human ear, the closed environment and the weak penetration of ultrasound ensure that it will not affect devices outside the environment, thereby reducing the misjudgment rate of electronic equipment about the environment.
[0097] It should be noted that due to path loss, the amplitude of the resolved frequency point and energy value may have some errors with the emitted ultrasonic signal, so it can be determined that the indication signal has been received within a certain error range.
[0098] Optionally, in some embodiments of the present application, when N is a positive integer greater than 1, the above step 203 specifically includes step 203a:
[0099] Step 203a: When any two energy values match, the first device switches the functional mode of the first device to the target functional mode.
[0100] In some embodiments of the present application, the matching of any two energy values mentioned above may be that the amplitudes of the two energy values are the same, or the difference between the amplitudes of the two energy values is less than a predetermined threshold.
[0101] For example, if two ultrasonic signals with almost the same amplitude and close to the preset frequency points, for example, 20.5 kHz and 21.5 kHz, are analyzed, it can be considered that it is necessary to switch to the target function mode.
[0102] In the functional mode switching method provided in the embodiment of the present application, the first device obtains N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is the ultrasonic signal sent by the second device, and N is a positive integer; the first device determines N energy values corresponding to the N frequency points one by one; when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, the first device switches the functional mode of the first device to the target functional mode, and the target functional mode is the functional mode corresponding to the first preset frequency band. In this solution, the first device obtains the N frequency points corresponding to the ultrasonic signal by parsing the acquired ultrasonic signal, and switches the functional mode to the target functional mode when the N frequency points meet the condition of "belonging to the first preset frequency band and the N energy values are greater than or equal to the first threshold", so that the first device can determine the target functional mode to be switched by identifying the ultrasonic signal of a specific frequency point, thereby improving the accuracy of the first device switching the functional mode.
[0103] In one possible embodiment, Figure 2As shown, taking the first device as an electronic device and the first device needing to turn on or off the silent mode as an example, the steps of the function mode switching method provided in the embodiment of the present application are fully described, specifically, including steps A1 to A7:
[0104] Step A1: The electronic device opens an ultrasonic detection window for 1 second every 1 minute to collect ultrasonic signal data. When an ultrasonic signal is detected, step A2 is executed.
[0105] Step A2: The electronic device calculates the average energy value of the ultrasonic signal detected by the detection window, and then executes step A3.
[0106] Step A3: The electronic device determines whether the average energy value calculated in step A2 is greater than a threshold value. If it is greater than the threshold value, it indicates that an ultrasonic signal sent by the broadcasting device is detected, and step A4 is executed; otherwise, it indicates that the broadcasting device does not send an ultrasonic signal, and step A7 is executed.
[0107] Step A4: The electronic device performs fast Fourier transform analysis on the ultrasonic signal detected in the detection window, converts the ultrasonic signal into a frequency domain signal, obtains the frequency point and energy value amplitude of the ultrasonic signal, and then executes step A5.
[0108] Step A5: The electronic device determines the frequency and energy amplitude of the ultrasonic signal. If there are two peaks, the energy amplitudes are similar, and the energy value is less than a preset threshold, then step A6 is executed; otherwise, step A7 is executed.
[0109] Step A6: Turn on silent mode of the electronic device.
[0110] Step A7: Turn off silent mode on the electronic device.
[0111] In this way, the electronic device can continuously detect and analyze ultrasonic signals, and when a preset ultrasonic signal is obtained, the electronic device's functional mode can be switched to a target functional mode. The switching functional mode is relatively simple and efficient, thereby improving the accuracy of the electronic device's switching functional mode.
[0112] The execution subject of the function mode switching method provided in this embodiment may be a function mode switching device, and the function mode switching device may be a second device, such as an electronic device or a broadcasting device, or a control module or a processing module in the second device. The technical solution provided in the embodiment of the present application is described below by taking the second device as an example.
[0113] The present application embodiment provides a method for switching a functional mode. Figure 3 FIG. 1 is a flow chart of a method for switching a functional mode provided by an embodiment of the present application, and the method can be applied to a second device. Figure 3As shown, the function mode switching method provided in the embodiment of the present application may include the following step 501.
[0114] Step 501: The second device broadcasts a first ultrasonic signal.
[0115] In some embodiments of the present application, the second device may be: a broadcast device, a projector device, a wireless network device, or other device that has the function of broadcasting ultrasonic signals, which is not limited in the embodiments of the present application.
[0116] In some embodiments of the application, the second device may continuously send the first ultrasonic signal, may periodically send the ultrasonic signal, or may send the ultrasonic signal after receiving the indication information.
[0117] In some embodiments of the present application, the second device performs environmental perception through indication information to determine whether to send various ultrasonic signals.
[0118] For example, on an airplane, the environment can be perceived using the in-cabin broadcasting equipment before takeoff, and in a conference room, the environment can be perceived using projection devices such as a large screen.
[0119] Exemplarily, the above instruction information may be that the aircraft receives a take-off instruction and then instructs the broadcasting equipment of the aircraft to send a broadcast instruction information.
[0120] For example, the aircraft's takeoff button, or hardware facilities such as a joystick can be connected to the broadcasting device, that is, the second device mentioned above. When the captain operates the aircraft to take off, the broadcasting device receives the take-off instruction and starts broadcasting ultrasonic signals in a specific frequency band.
[0121] Exemplarily, the above-mentioned indication information may be indication information that a projector device receives a start indication in a conference room.
[0122] For example, the switch button or remote control of the projector device and other hardware facilities can be connected to the projector device, that is, the second device mentioned above. When the user turns on the projector device, the projector device receives an instruction to start the meeting and then starts broadcasting ultrasonic signals in a specific frequency band.
[0123] In some embodiments of the present application, the first ultrasonic signal includes a frequency domain signal of N frequency points, where N is a positive integer.
[0124] In some embodiments of the present application, the N energy values corresponding to the N frequency points are greater than or equal to the first threshold.
[0125] In some embodiments of the present application, the first ultrasonic signal is used to instruct the first device to switch the function mode of the first device to the target function mode.
[0126] In some embodiments of the present application, the target functional mode is a functional mode corresponding to the first preset frequency band.
[0127] In some embodiments of the present application, the first preset frequency band is a preset frequency band to which the frequency band of the frequency domain signal of N frequency points belongs.
[0128] It should be noted that due to the weak penetration of ultrasonic signals, the sound in a room is difficult to be transmitted outside the room, so there is no need to distinguish the special fields of the equipment. That is, all conference rooms can use a common sound template, that is, the same ultrasonic signal, which also simplifies the complexity of the entire process.
[0129] In the function mode switching method provided in the embodiment of the present application, the second device can determine the ultrasonic signal of the specific frequency band frequency point to be sent under a specific environment, and send the determined ultrasonic signal to the first device, thereby instructing the first device to switch the function mode of the first device to the target function mode, thereby improving the accuracy of the first device switching the function mode. In addition, due to the weak penetration of the ultrasonic signal, it will not interfere with other devices, thus further improving the accuracy of the first device in identifying the ultrasonic signal.
[0130] In a possible embodiment, taking the first device as a mobile phone and the second device as a broadcasting device as an example, the process of switching the functional mode provided in the embodiment of the present application is explained, such as Figure 4 As shown: in the ultrasonic frequency band, for example, within 20 to 22 kHz, two frequency points, such as 20.5 kHz and 21.5 kHz, are selected as indication signals for instructing the mobile phone to switch function modes.
[0131] First, in a closed environment, the broadcasting device continuously broadcasts ultrasonic signals of equal power at two frequencies of 0.5kHz and 21.5kHz, as a bimodal ultrasonic signal to inform the mobile broadcasting device of the environmental information perceived by the mobile phone, such as the take-off of the plane, the landing of the plane, or the start of the meeting. At this time, the mobile phone reads the itinerary stored in the mobile phone, and periodically turns on the mobile phone microphone for recording at the beginning of the trip, for example, during the duration of the meeting or flight. For example, the mobile phone turns on the microphone for 1s every 1min at the beginning of the trip, receives the ultrasonic signal through the detection window, and performs fast Fourier transform (FFT) analysis. If two ultrasonic signals with almost the same amplitude and close to the preset frequencies, 20.5kHz and 21.5kHz, are analyzed, it can be considered to be in a specified closed environment. Then, the special settings of the mobile phone are triggered, that is, different functional modes are switched to realize the ability to turn on the self-perceived flight mode or the silent mode of the conference room. When the ultrasonic signal of the above-mentioned preset frequency band and frequency point cannot be detected, the function mode will no longer be switched, that is, the special settings will be turned off, and then after the travel time is over, the detection window will be closed and the mobile phone settings will be restored.
[0132] In this way, in conference room applications, the projection device can continue to send ultrasonic signals without worrying about power consumption. The mobile phone performs energy detection at intervals of 1 minute before analysis, which can reduce power consumption as much as possible without affecting actual needs. The projection device sends ultrasonic signals at two frequencies to distinguish them from the ultrasonic noise in the environment as much as possible to avoid false triggering. The continuous inspection of the mobile phone can not only turn on the silent mode in time when entering the conference room, but also turn off the silent mode in time after leaving the conference room.
[0133] In the application of flight mode, the microphone can be kept turned on for ultrasonic detection during the flight phase. The aircraft broadcasts 20.5kHz with an amplitude twice that of 21.5kHz to indicate takeoff, turning on the flight mode and keeping it on. After arrival, the amplitude of 20.5kHz is half of 21.5kHz to indicate arrival, avoiding turning it on midway.
[0134] It is understandable that due to the weak penetration of ultrasound, there is no need to distinguish the special fields of the device, and a set of voice templates can be used in all instantiated scenarios, thus simplifying the recognition process.
[0135] Each of the above-mentioned method embodiments, or various possible implementation methods in each method embodiment can be executed separately, or any two or more of them can be executed in combination with each other. The specific implementation method can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.
[0136] It should be noted that the functional mode switching method provided in the embodiment of the present application can be executed by a functional mode switching device, or an electronic device, or a functional module or entity in the electronic device. In the embodiment of the present application, the functional mode switching method executed by the functional mode switching device is taken as an example to illustrate the functional mode switching device provided in the embodiment of the present application.
[0137] Figure 5 A possible structural diagram of a functional mode switching device involved in an embodiment of the present application is shown. Figure 5 As shown, the functional mode switching device is a first functional mode switching device 600 which may include: an acquisition module 601, a determination module 602 and a switching module 603;
[0138] Among them, the above-mentioned acquisition module 601 is used to obtain N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is an ultrasonic signal sent by the second functional mode switching device, and N is a positive integer; the above-mentioned determination module 602 is used to determine the N energy values corresponding to the N frequency points acquired by the above-mentioned acquisition module 601; the above-mentioned switching module 603 is used to switch the functional mode of the first functional mode switching device to the target functional mode when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold value. The target functional mode is the functional mode corresponding to the first preset frequency band.
[0139] Optionally, in some embodiments of the present application, the switching module 603 is further configured to switch the functional mode of the first functional mode switching device to a target functional mode when any two energy values match.
[0140] Optionally, in some embodiments of the present application, combined with Figure 5 ,like Figure 6 As shown, the above-mentioned device 600 also includes: an opening module 604; the opening module 604 is used to turn on the first microphone of the first functional mode switching device within a first time period before the above-mentioned acquisition module 601 acquires the N frequency points corresponding to the first ultrasonic signal, so as to collect the first ultrasonic signal through the first microphone; the above-mentioned acquisition module 601 is specifically used to acquire N frequency points when the average energy value of the first ultrasonic signal in the first time period is greater than the second threshold.
[0141] Optionally, in some embodiments of the present application, the above-mentioned opening module is specifically used for any of the following:
[0142] The first function mode switching device turns on the first microphone within a first time period;
[0143] The first function mode switching device turns on the first microphone once every first time period within a first time period.
[0144] Optionally, in some embodiments of the present application, the above-mentioned acquisition module 601 is also used to obtain first travel information before the start module turns on the first microphone of the first function mode switching device within the first time period, and the first travel information includes a first start time and a first end time; the above-mentioned determination module 602 is also used to determine the time period from the first start time to the first end time as the first time period.
[0145] In the functional mode switching device provided in the embodiment of the present application, the functional mode switching device obtains N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is the ultrasonic signal sent by the second functional mode switching device, and N is a positive integer; the functional mode switching device determines the N energy values corresponding to the N frequency points one by one; when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, the functional mode switching device switches the functional mode of the functional mode switching device to the target functional mode, and the target functional mode is the functional mode corresponding to the first preset frequency band. In this solution, the first functional mode switching device obtains the N frequency points corresponding to the ultrasonic signal by parsing the acquired ultrasonic signal, and switches the functional mode to the target functional mode when the N frequency points meet the condition of "belonging to the first preset frequency band and the N energy values are greater than or equal to the first threshold", so that the first functional mode switching device can determine the target functional mode to be switched by identifying the ultrasonic signal of a specific frequency point, thereby improving the accuracy of the first functional mode switching device switching the functional mode.
[0146] Figure 7 A possible structural diagram of a functional mode switching device involved in an embodiment of the present application is shown. Figure 7 As shown, the functional mode switching device is a second functional mode switching device 700 which may include: a sending module 701;
[0147] Among them, the above-mentioned sending module 701 is used to broadcast and send a first ultrasonic signal, the first ultrasonic signal includes a frequency domain signal of N frequency points, and N energy values corresponding to the N frequency points are greater than or equal to a first threshold value; wherein the first ultrasonic signal is used to instruct the first function mode switching device to switch the function mode of the first function mode switching device to a target function mode, the target function mode is a function mode corresponding to a first preset frequency band, the first preset frequency band is a preset frequency band to which the frequency domain signal of the N frequency points belongs, and N is a positive integer.
[0148] In the functional mode switching device provided in the embodiment of the present application, the second functional mode switching device can determine the ultrasonic signal of the specific frequency band frequency point to be sent under a specific environment, and send the determined ultrasonic signal to the first functional mode switching device, thereby instructing the first functional mode switching device to switch the functional mode of the first functional mode switching device to the target functional mode, thereby improving the accuracy of the first functional mode switching device switching the functional mode. In addition, due to the weak penetration of ultrasonic signals, they will not interfere with other devices, thus further improving the accuracy of the first functional mode switching device in identifying ultrasonic signals.
[0149] The functional mode switching device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0150] The functional mode switching device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0151] The functional mode switching device provided in the embodiment of the present application can implement each process implemented in the functional mode switching method embodiment. To avoid repetition, it will not be repeated here.
[0152] Alternatively, if Figure 8As shown, an embodiment of the present application also provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned functional mode switching method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0153] It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device, the non-mobile electronic device, the first device, and the second device mentioned above.
[0154] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0155] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
[0156] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here. It can be understood that the electronic device can be the first device.
[0157] Among them, the above-mentioned RF unit 101 is used to obtain N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is an ultrasonic signal sent by the second device, and N is a positive integer; the above-mentioned processor 110 is used to determine the N energy values corresponding to the N frequency points obtained by the above-mentioned RF unit 101; the above-mentioned processor 110 is also used to switch the functional mode of the first device to the target functional mode when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold, and the target functional mode is the functional mode corresponding to the first preset frequency band.
[0158] Optionally, in some embodiments of the present application, the processor 110 is specifically configured to switch the functional mode of the first device to a target functional mode when any two energy values match.
[0159] Optionally, in some embodiments of the present application, the processor 110 is also used to turn on the first microphone of the first device within a first time period before the RF unit 101 obtains the N frequency points corresponding to the first ultrasonic signal, so as to collect the first ultrasonic signal through the first microphone; the RF unit 101 is specifically used to obtain N frequency points when the average energy value of the first ultrasonic signal in the first time period is greater than a second threshold.
[0160] Optionally, in some embodiments of the present application, the processor 110 is specifically used for any of the following:
[0161] The first device turns on the first microphone within a first time period;
[0162] The first device turns on the first microphone once every first time period within the first time period.
[0163] Optionally, in some embodiments of the present application, the above-mentioned RF unit 101 is also used to obtain first travel information before the start-up module turns on the first microphone of the first device within the first time period, and the first travel information includes a first start time and a first end time; the above-mentioned processor 110 is also used to determine the time period from the first start time to the first end time as the first time period.
[0164] In the electronic device provided in the embodiment of the present application, the electronic device obtains N frequency points corresponding to the first ultrasonic signal, the first ultrasonic signal is the ultrasonic signal sent by the second device, and N is a positive integer; the electronic device determines N energy values corresponding to the N frequency points one by one; when the N frequency points belong to the first preset frequency band and the N energy values are greater than or equal to the first threshold value, the electronic device switches the function mode of the electronic device to the target function mode, and the target function mode is the function mode corresponding to the first preset frequency band. In this solution, the first device obtains the N frequency points corresponding to the ultrasonic signal by parsing the acquired ultrasonic signal, and switches the function mode to the target function mode when the N frequency points meet the condition of "belonging to the first preset frequency band and the N energy values are greater than or equal to the first threshold value", so that the first device can determine the target function mode to be switched by identifying the ultrasonic signal of a specific frequency point, thereby improving the accuracy of the first device switching the function mode.
[0165] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0166] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile 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), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0167] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.
[0168] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned functional mode switching method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0169] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0170] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned functional mode switching method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0171] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0172] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the functional mode switching method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0173] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0174] 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, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0175] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for switching a functional mode, It is characterized in that The method comprises: The first device obtains N frequency points corresponding to the first ultrasonic signal, where the first ultrasonic signal is an ultrasonic signal sent by the second device, and N is a positive integer; The first device determines N energy values corresponding to the N frequency points one by one; When N of the frequency points belong to the first preset frequency band and N of the energy values are greater than or equal to a first threshold, the first device switches the functional mode of the first device to a target functional mode, and the target functional mode is a functional mode corresponding to the first preset frequency band.
2. The method according to claim 1, It is characterized in that When N is a positive integer greater than 1, the first device switches the functional mode of the first device to the target functional mode, including: When any two of the energy values match, the first device switches the functional mode of the first device to the target functional mode.
3. The method according to claim 1, It is characterized in that Before the first device acquires the N frequency points corresponding to the first ultrasonic signal, the method further includes: The first device turns on a first microphone of the first device within a first time period to collect the first ultrasonic signal through the first microphone; The first device obtains N frequency points corresponding to the first ultrasonic signal, including: When the average energy value of the first ultrasonic signal in the first time period is greater than a second threshold, the first device acquires N frequency points.
4. The method according to claim 3, It is characterized in that The first device turning on a first microphone of the first device within a first time period includes any of the following: The first device turns on the first microphone within the first time period; The first device turns on the first microphone once every first time period within the first time period.
5. The method according to claim 3, It is characterized in that Before the first device turns on the first microphone of the first device within the first time period, the method further includes: The first device acquires first trip information, where the first trip information includes a first start time and a first end time; The first device determines a time period from the first start time to the first end time as the first time period.
6. A method for switching a functional mode, It is characterized in that include: The second device broadcasts and sends a first ultrasonic signal, where the first ultrasonic signal includes a frequency domain signal of N frequency points, and N energy values corresponding to the N frequency points are greater than or equal to a first threshold; Among them, the first ultrasonic signal is used to instruct the first device to switch the functional mode of the first device to a target functional mode, the target functional mode is a functional mode corresponding to a first preset frequency band, the first preset frequency band is a preset frequency band to which the frequency domain signal of the N frequency points belongs, and N is a positive integer.
7. A function mode switching device, the function mode switching device being a first function mode switching device, It is characterized in that The first functional mode switching device includes: an acquisition module, a determination module and a switching module; The acquisition module is used to acquire N frequency points corresponding to the first ultrasonic signal, where the first ultrasonic signal is an ultrasonic signal sent by the second functional mode switching device, and N is a positive integer; The determining module is used to determine the N energy values corresponding to the N frequency points acquired by the acquiring module one by one; The switching module is used to switch the functional mode of the first functional mode switching device to a target functional mode when the N frequency points belong to a first preset frequency band and the N energy values determined by the determination module are greater than or equal to a first threshold, and the target functional mode is a functional mode corresponding to the first preset frequency band.
8. The device according to claim 7, It is characterized in that The switching module is further configured to switch the functional mode of the first functional mode switching device to the target functional mode when any two of the energy values match.
9. The device according to claim 7, It is characterized in that The device further comprises: an opening module; The activation module is configured to activate the first microphone of the first functional mode switching device within a first time period before the acquisition module acquires the N frequency points corresponding to the first ultrasonic signal, so as to collect the first ultrasonic signal through the first microphone; The acquisition module is specifically configured to acquire the N frequency points when an average energy value of the first ultrasonic signal in the first time period is greater than a second threshold.
10. The device according to claim 9, It is characterized in that The opening module is specifically used for any of the following: The first function mode switching device turns on the first microphone during the first time period; The first function mode switching device turns on the first microphone once every first time period within the first time period.
11. The device according to claim 9, It is characterized in that The acquisition module is further configured to acquire first travel information before the activation module activates the first microphone of the first function mode switching device within the first time period, wherein the first travel information includes a first start time and a first end time; The determining module is further configured to determine a time period from the first start time to the first end time as the first time period.
12. A function mode switching device, the function mode switching device being a second function mode switching device, It is characterized in that The second functional mode switching device includes: a sending module; The sending module is used to broadcast and send a first ultrasonic signal, wherein the first ultrasonic signal includes a frequency domain signal of N frequency points, and N energy values corresponding to the N frequency points are greater than or equal to a first threshold; Among them, the first ultrasonic signal is used to instruct the first functional mode switching device to switch the functional mode of the first functional mode switching device to a target functional mode, and the target functional mode is a functional mode corresponding to a first preset frequency band. The first preset frequency band is a preset frequency band to which the frequency domain signal of the N frequency points belongs, and N is a positive integer.
13. An electronic device, It is characterized in that It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the functional mode switching method as described in any one of claims 1 to 5 are implemented, or the steps of the functional mode switching method as described in claim 6 are implemented.
14. A computer-readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the functional mode switching method as described in any one of claims 1 to 5, or the steps of the functional mode switching method as described in claim 6 are implemented.
