Acoustic wave communication method and electronic device

By adding the attitude authentication method of angle change value and chirp signal to acoustic communication, the high overhead problem caused by the increase in random number recording time is solved, and real-time communication security verification and low-overhead acoustic communication are achieved.

WO2025200692A1PCT designated stage Publication Date: 2025-10-02HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/144576
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-29
Filing Date
2024-12-31
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In existing acoustic wave communications, the increase in random number recording time leads to a large overhead for the sending and receiving devices to store and query random numbers, affecting communication security.

Method used

By adding the angle change value of the first electronic device to the audio data signal, a resulting sound wave signal is generated, and the chirp signal is received by a microphone at the receiving end to determine the angle change value, posture authentication is performed to prevent replay and replication attacks, and reduce dependence on random number storage.

Benefits of technology

It realizes real-time communication security verification, prevents replay and replication attacks, reduces communication overhead, and improves the security of acoustic wave communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024144576_02102025_PF_FP_ABST
    Figure CN2024144576_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of acoustic wave communications, and discloses an acoustic wave communication method and an electronic device, for use in improving the security of acoustic wave communication. In the method, a first electronic device generates and sends a first signal comprising a first angle change value, the first signal being used for transmitting audio data, and the first angle change value being used for representing an angle change of the first electronic device; upon receiving the first signal, a second electronic device determines a second angle change value on the basis of the first signal, the second angle change value being used for representing an angle change of the electronic device sending the first signal; and when the difference value between the first angle change value and the second angle change value is smaller than an angle deviation threshold, the second electronic device receives the audio data. In this way, on the basis of the first angle change value and the second angle change value, the second electronic device can perform orientation verification on the electronic device sending the first signal, so that the attack of replication and replay can be prevented, thereby improving the security of acoustic wave communication.
Need to check novelty before this filing date? Find Prior Art

Description

Sound wave communication method and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on March 29, 2024, with application number 202410388425.8 and application name "A Sound Wave Communication Method and Electronic Device", the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of sound wave communication technology, and in particular to a sound wave communication method and electronic equipment. Background Art

[0004] Ultrasonic communication, as an emerging wireless communication technology, has faced significant challenges in recent years regarding communication security. Currently, transmitting devices can ensure the security of acoustic communication by adding random numbers (or token-like data such as serial numbers) to the transmitted acoustic signals. Both the transmitting device and the receiving device that receives the ultrasonic signal need to store the used random numbers. However, as the random number recording time increases, the overhead of storing and querying the random numbers becomes significant for both the transmitting and receiving devices. Summary of the Invention

[0005] The embodiments of the present application provide an acoustic wave communication method and an electronic device to ensure the security of acoustic wave communication.

[0006] In a first aspect, embodiments of the present application provide a sound wave communication method, applied to a first electronic device. In this method, the first electronic device generates a first signal, the first signal being used to transmit audio data, and the first signal including a first angle change value representing an angle change of the first electronic device. The first electronic device may also transmit the first signal.

[0007] In this method, the first electronic device adds a first angle change value to the first signal in the transmitted audio data, so that the electronic device receiving the first signal can restore the sound wave scene according to the first signal, thereby realizing posture verification of the sending end at the receiving end, and then realizing ultrasonic communication that is anti-replay and anti-replica attack, thereby ensuring communication security.

[0008] In a possible design, the first electronic device may further encode the first angle change value and the audio data to obtain a first signal.

[0009] Through this design, the first electronic device adds the posture changes of the first electronic device to the signal transmitting audio data, so that the electronic device receiving the first signal can restore the sound wave scene according to the first signal, realize the posture authentication of the sender, thereby preventing replay and replication attacks and improving the security of communication.

[0010] In one possible design, the first electronic device may encode the first angle change value and the audio data to obtain an initial signal; the first electronic device may also segmentally embed a chirp signal into the initial signal to obtain the first signal.

[0011] Through this design, the first electronic device embeds a chirp signal in the first signal transmitting audio data and adds the posture changes of the first electronic device, so that the electronic device receiving the first signal can authenticate the posture of the first electronic device based on the first signal, thereby preventing replay and replication attacks and improving the security of sound wave communication.

[0012] In one possible design, the first electronic device may further embed a chirp signal into the initial signal at a set time interval to obtain the first signal; or, the first electronic device may further randomly embed a chirp signal into the initial signal to obtain the first signal.

[0013] Through this design, the first electronic device can improve the unpredictability of the communication verification process by randomly embedding the chirp signal in the initial signal, thereby improving the security performance of the acoustic wave communication.

[0014] In one possible design, the first angle change value is the difference between the first angle and the second angle, wherein the first angle is the angle of the first electronic device at the start moment of sending the first signal, and the second angle is the angle of the first electronic device at the end moment of sending the first signal.

[0015] Through this design, the first electronic device can change the angle during the transmission of the first signal, so that the electronic device that subsequently receives the first signal can perform posture authentication, thereby improving the security of sound wave communication.

[0016] In one possible design, the first signal also includes a first timestamp, which is used to indicate the time when the first signal is sent.

[0017] In one possible design, the first signal includes an ultrasonic signal.

[0018] In a second aspect, embodiments of the present application provide a sound wave communication method, applied to a second electronic device. In this method, after receiving a first signal, the second electronic device can determine a second angle change value based on the first signal; wherein the first signal is used to transmit audio data, the first signal includes the first angle change value, and the second angle change value is used to represent the angle change of the electronic device transmitting the first signal. When the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device can receive the audio data.

[0019] In this method, the second electronic device can restore the sending scene of the first signal based on the received first signal, and perform posture authentication on the electronic device that sends the first signal based on the first angle change value and the second angle change value, thereby realizing real-time communication security verification, thereby preventing replay and replication attacks and greatly improving the security of sound wave communication.

[0020] In one possible design, the first signal includes a chirp signal.

[0021] In one possible design, the second electronic device includes a first microphone and a second microphone, and the distance between the first microphone and the second microphone is greater than or equal to a set threshold. The second electronic device can determine a displacement distance based on the time when the first microphone receives the first signal and the time when the second microphone receives the first signal, and determine the second angle change value based on the displacement distance.

[0022] Optionally, the displacement distance is used to represent the movement distance of the electronic device that sends the first signal.

[0023] Through this design, the second electronic device can accurately determine the distance moved by the electronic device sending the first signal during the transmission of the first signal based on the time when different microphones receive the first signal, thereby accurately obtaining the angle change of the electronic device sending the first signal.

[0024] In one possible design, the second electronic device can also display the first information or the first operation.

[0025] Optionally, when the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device may further display a first message or a first operation, wherein the first message is used to indicate communication security, and the first operation is an operation to be performed when communication security is achieved.

[0026] Optionally, when the difference between the first angle change value and the second angle change value is greater than or equal to a preset angle deviation threshold, the second electronic device may further display a first message or a first operation, wherein the first message indicates that an attack has occurred, and the first operation is an operation to be performed when an attack has occurred.

[0027] In one possible design, the first signal also includes a first timestamp, which is used to indicate the time when the first signal is sent.

[0028] In one possible design, the second electronic device may further determine a time difference between the first timestamp and the second timestamp, where the second timestamp is used to indicate the moment the first signal was received. When the time difference is less than a preset time threshold and the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device may receive the audio data.

[0029] Through this design, after the second electronic device successfully authenticates the posture of the electronic device that sends the first signal during the acoustic wave communication process, it can also perform timestamp redundancy verification based on the first signal, thereby further improving the security of the acoustic wave communication while preventing replay and replication attacks.

[0030] In a third aspect, an embodiment of the present application provides a sound wave communication method, which is applied to a system including a first electronic device and a second electronic device. In this method, the first electronic device generates a first signal, the first signal is used to transmit audio data, the first signal includes a first angle change value, and the first angle change value is used to indicate the angle change of the first electronic device. The first electronic device can send the first signal to the second electronic device. The second electronic device can determine the second angle change value based on the received first signal, and the second angle change value is used to indicate the angle change of the electronic device that sent the first signal. When the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device receives the audio data.

[0031] In a fourth aspect, an embodiment of the present application provides an acoustic wave communication system, comprising a first electronic device and a second electronic device; wherein the first electronic device executes the method executed by the first electronic device in any aspect of the above-mentioned first aspect, and the second electronic device executes the method executed by the second electronic device in any aspect of the above-mentioned second aspect.

[0032] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising one or more memories and one or more processors; wherein the one or more memories are used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the one or more processors, the electronic device executes the method described in any possible design of any one of the first or second aspects above.

[0033] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the method described in any possible design of any aspect of the first or second aspect above.

[0034] In the seventh aspect, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on an electronic device, the electronic device executes the method described in any possible design of any one of the first or second aspects above.

[0035] In an eighth aspect, the present application provides a chip system comprising a processor and a memory, wherein the memory stores instructions; when the instructions are executed by the processor, the method described in any possible design of either the first or second aspect is implemented. The chip system may be composed of a chip alone, or may include a chip and other discrete components.

[0036] For the beneficial effects of the third to eighth aspects mentioned above, please refer to the description of the beneficial effects of the relevant contents of the first and second aspects mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] FIG1 is a schematic diagram of the architecture of an acoustic wave communication system exemplarily provided in this application;

[0038] FIG2 is a schematic diagram of the hardware structure of a possible electronic device exemplarily provided in this application;

[0039] FIG3 is a flow chart of an acoustic wave communication method provided by the present application;

[0040] FIG4 is a schematic diagram of a coordinate system of an electronic device provided by this application;

[0041] FIG5 is a schematic diagram of a process of position movement provided by the present application;

[0042] FIG6 is a schematic diagram of an embedded chirp signal provided by the present application;

[0043] FIG7 is a flow chart of an acoustic wave communication method provided by the present application;

[0044] FIG8 is a schematic diagram of a posture change provided by the present application;

[0045] FIG9 is a schematic diagram of transmission of a chirp signal provided by the present application;

[0046] FIG10 is a geometric diagram provided by this application;

[0047] FIG11 is a flow chart of a sound wave communication use case provided by this application;

[0048] FIG12 is a schematic diagram of an interactive process of acoustic wave communication provided by the present application;

[0049] FIG13 is a flow chart of another acoustic wave communication method provided by the present application;

[0050] FIG14 is a schematic diagram of a flow chart of another acoustic wave communication method provided by the present application;

[0051] FIG15 is a flow chart of another acoustic wave communication method provided in this application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the following embodiments of the present application.

[0053] First, the concepts related to the embodiments of the present application are explained.

[0054] (1) Chirp signal is a wave whose frequency changes with time. Chirp signal describes the change of frequency components generated by the signal source over time.

[0055] (2) Time of arrival (TOA) positioning algorithm refers to an algorithm that determines the location by measuring the time interval from sending a signal to receiving a signal.

[0056] (3) Azimuth refers to the angle at which an electronic device rotates around the z-axis in a three-dimensional coordinate system. In other words, azimuth refers to the angle between the current compass direction of the electronic device and the magnetic north pole. An azimuth of 0 degrees represents due north, 90 degrees represents due east, 180 degrees represents due south, and 270 degrees represents due west.

[0057] The tilt angle (also known as the roll angle) refers to the angle at which an electronic device tilts (rotates) around the x-axis in a three-dimensional coordinate system. The tilt angle is the angle between a plane parallel to the electronic device's screen and a plane parallel to the ground.

[0058] The rotation angle (also known as the roll angle) refers to the angle at which the electronic device rotates along the y-axis in a three-dimensional space coordinate system. The rotation angle refers to the angle between a plane perpendicular to the screen of the electronic device and a plane perpendicular to the ground.

[0059] (4) Electronic device refers to an electronic device that has a sound wave communication function. For example, when the electronic device is a transmitting device, the electronic device may be an electronic device with a speaker. When the electronic device is a receiving device, the electronic device may be an electronic device with two or more MICs.

[0060] In some embodiments of the present application, the electronic device may be a portable device, such as a mobile phone, a tablet computer, a wearable device with wireless communication function (such as a watch, a bracelet, etc.), a vehicle-mounted terminal device, augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), smart home devices (such as smart TVs, smart speakers, etc.), smart robots, workshop equipment, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, flying equipment (such as smart robots, drones, airplanes), etc.

[0061] Among them, a wearable device is a portable device that a user can wear directly on the body or integrate into the user's clothes or accessories.

[0062] In some embodiments of the present application, the electronic device may also be a portable terminal device that also includes other functions such as a personal digital assistant and / or a music player. Or a portable terminal device with other operating systems. The portable terminal device may also be other portable terminal devices, such as a laptop computer with a touch-sensitive surface (eg, a touch panel).

[0063] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0064] Unless otherwise specified, ordinal numbers such as "first" and "second" in the embodiments of this application are used to distinguish between multiple objects and are not used to limit the size, content, order, timing, priority, or importance of the multiple objects. For example, the first file and the second file are only used to distinguish different files and do not indicate a difference in size, content, priority, or importance between the two files.

[0065] Currently, transmitting devices in acoustic wave communications can ensure communication security by adding random numbers (or token-like data such as serial numbers) to the transmitted acoustic wave signals. Both the transmitting device and the receiving device that receives the ultrasonic signal need to store the used random numbers. However, as the random number recording time increases, the overhead of storing and querying the random numbers becomes high for both the transmitting and receiving devices.

[0066] Based on the above problems, an embodiment of the present application provides a sound wave communication method and an electronic device for ensuring the communication security of sound wave communication while reducing overhead. In this method, a first electronic device sends a result sound wave signal to a second electronic device. The result sound wave signal includes a chirp signal and an initial sound wave signal carrying a first angle change value, and the first angle change value is used to characterize the angle change of the first electronic device in the process of sending the result sound wave signal. After receiving the result sound wave signal, the second electronic device can determine the second angle change value based on the time difference between the multiple microphones in the second electronic device in receiving the chirp signal in the result sound wave signal. The second angle change value is used to characterize the angle change of the electronic device that sent the result sound wave signal received by the second electronic device. When the difference between the first angle change value and the second angle change value is less than the angle deviation threshold, the second electronic device can receive the audio data in the result sound wave signal. In this way, the second electronic device can perform posture authentication on the first electronic device based on the resulting sound wave signal, and then prevent replication and replay attacks by determining whether the electronic device that sends the resulting sound wave signal and the electronic device that generates the resulting sound wave signal are the same device, thereby ensuring communication security. There is no need to occupy read-only memory (ROM) to store token-like data such as random numbers or serial numbers, and the overhead is low.

[0067] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0068] The embodiments of the present application can be applied to various scenarios where related functions are performed through acoustic wave communication. For example, as shown in Figure 1, an acoustic wave communication system includes a first electronic device 10 and a second electronic device 20. For example, the first electronic device 10 can be a transmitting device in the acoustic wave communication system, and the second electronic device can be a receiving device in the acoustic wave communication system.

[0069] The first electronic device 10 may include at least one speaker, and the second electronic device 20 may include multiple microphones. For example, the first electronic device 10 may also include at least one microphone, and the second electronic device 20 may also include at least one speaker. For example, as shown in FIG1 , the first electronic device 10 includes a speaker 101 and a microphone 102, and the second electronic device 20 includes microphones 201, 202, and a speaker 203.

[0070] In some embodiments, when the first electronic device 10 determines to send audio data to the second electronic device 20, it can periodically collect angle information of the first electronic device 10. The first electronic device 10 can determine a first angle change value based on the collected angle information. The first angle change value is used to characterize the angle change of the first electronic device 10. The first electronic device 10 can generate an initial sound wave signal based on the first angle change value, and embed a chirp signal in the initial sound wave signal to obtain a resulting sound wave signal. The first electronic device 10 can send the resulting sound wave signal to the second electronic device 20. The initial sound wave signal includes but is not limited to: a first angle change value and audio data, and the first angle change value is located in the communication field of the initial sound wave signal.

[0071] After receiving the resulting sound wave signal, the second electronic device 20 can determine a second angle change value based on the time between microphone 201 and microphone 202 when the chirp signal in the resulting sound wave signal is received. The second angle change value is used to represent the angle change of the electronic device that sent the resulting sound wave signal received by the second electronic device. After receiving the resulting sound wave signal, the second electronic device 20 can also decode the resulting sound wave signal to obtain the first angle change value. Based on the first and second angle change values, the second electronic device 20 can determine whether the electronic device that sent the resulting sound wave signal is the same as the first electronic device 10, thereby completing gesture authentication. As an example, if gesture authentication succeeds, the second electronic device 20 can determine that the source is the first electronic device 10 and can obtain the audio data in the resulting sound wave signal. If gesture authentication fails, the second electronic device 20 can determine that it is under attack and can perform attack protection operations. In this way, the sound wave communication system can implement real-time gesture security verification using the above method, thereby ensuring the security of sound wave communication.

[0072] FIG2 shows a schematic diagram of the hardware structure of a possible electronic device. The electronic device 100 may be the first electronic device 10 in FIG1 or the second electronic device 20 in FIG1. ​​As shown in FIG2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0073] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a microcontroller unit (MCU), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device 100. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.

[0074] In an embodiment of the present application, the processor 110 can save one or more applications and can send a result sound wave signal through the speaker 170A. The result sound wave signal includes a first angle change value and audio data. In addition, the processor 110 can also receive the sound wave signal through the microphone 170C and determine the second angle change value of the source end of the result sound wave signal based on the result sound wave signal. The processor 110 can also decode the result sound wave signal to obtain the first angle change value. When the processor 110 determines that the source end is the first electronic device based on the first angle change value and the second angle change value, it receives the audio data in the result sound wave signal.

[0075] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.

[0076] The wireless communication functionality of electronic device 100 can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0077] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0078] The wireless communication module 160 can provide wireless communication solutions including wireless local area network (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0079] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with a network and other devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), the fifth generation (5G) mobile communication system, future communication systems such as the sixth generation (6G) system, BT, GNSS, WLAN, NFC, FM and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0080] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 194 can be used to display the main interface, application interface, granularity adjustment controls, etc.

[0081] The camera 193 is used to capture still images or videos. The camera 193 may include a front camera and a rear camera.

[0082] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application (such as Huawei Video, Changlian, etc.). The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.

[0084] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0085] It is understood that the components shown in FIG2 do not constitute a specific limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine or separate certain components, or arrange the components differently. The various components shown in the figure may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0086] The following describes in detail the acoustic wave communication method used in the acoustic wave communication system composed of the first electronic device and the second electronic device according to specific embodiments. In the accompanying drawings corresponding to the various embodiments of the present application, all optional steps are indicated by dotted lines.

[0087] In various embodiments of the present application, the first electronic device may be a transmitting device in a sound wave communication system, and the second electronic device may be a receiving device in the sound wave communication system; or, the first electronic device may be a receiving device in a sound wave communication system, and the second electronic device may be a transmitting device in the sound wave communication system. To facilitate understanding of a sound wave communication method provided in the present application, the implementation process of the method provided in the present application is described below in conjunction with the contents shown in Figures 3 to 12.

[0088] FIG3 is a schematic diagram of a sound wave communication method provided by an embodiment of the present application. The sound wave communication process is described by taking the first electronic device as a transmitting device and the second electronic device as a receiving device as an example. As shown in FIG3 , the method includes:

[0089] S301: The first electronic device obtains angle information.

[0090] In some embodiments, when the first electronic device determines to send audio data to the second electronic device, it can obtain the angle information of the first electronic device. For example, the first electronic device can collect the angle information of the first electronic device during the process of sending the audio data.

[0091] The first electronic device can obtain the angle information of the first electronic device by regularly collecting information through an orientation sensor, a gyroscope or an angle sensor. For example, the orientation sensor of the first electronic device can collect the three-dimensional posture angle of the first electronic device in real time. The three-dimensional posture angle includes the azimuth angle, the tilt angle and the rotation angle. The first electronic device can obtain the three-dimensional posture angle collected by the orientation sensor by regularly collecting the angle information through the registered orientation sensor listener. For example, the first electronic device can determine the three-dimensional posture angle based on the rotation matrix of the first electronic device. The rotation matrix is ​​used to represent the change between the coordinate system of the first electronic device and the world coordinate system. The coordinate system of the first electronic device can be shown in Figure 4.

[0092] As an example, the first electronic device may collect the first angle of the first electronic device through the direction sensor when determining to send audio data to the second electronic device. The collection time of the first angle is the first moment. The first electronic device may also collect the second angle of the first electronic device through the direction sensor at the second moment. The second moment may be the moment after the set time period of the first moment. In an embodiment of the present application, the first moment may be the starting moment when the first electronic device sends the audio data, and the second moment may be the ending moment when the first electronic device sends the audio data. In this case, the angle information may include the first angle at the first moment and the second angle at the second moment. For example, as shown in Figure 5, point P1 represents the position of the first electronic device at the first moment, and point P2 represents the position of the first electronic device at the second moment.

[0093] S302: The first electronic device determines a first angle change value according to the acquired angle information.

[0094] The first angle change value is used to represent the angle change of the first electronic device.

[0095] In some embodiments, the first electronic device may determine an angle deviation of the first electronic device based on the angle information. For example, when the angle information includes a first angle and a second angle, the angle deviation is the difference between the second angle and the first angle. The first electronic device may determine a first angle change value based on the angle deviation. For example, the first electronic device may use a gradient value of the angle deviation as the first angle change value.

[0096] As an example, when the first electronic device collects angle information through a direction sensor, the first angle change value may be an orientation gradient δA.

[0097] In one scenario, when the second electronic device is placed on a plane parallel to the ground (such as the second electronic device is placed on a table), δA can be approximated as the azimuth angle change of the first electronic device. The first electronic device can obtain the azimuth of the first electronic device by registering the direction sensor and use the difference in the azimuth as the first angle change value. For example, the first electronic device can use the difference between the azimuth at the first moment and the azimuth at the second moment as the first angle change value.

[0098] In some examples, when the coordinate system of the first electronic device is as shown in FIG4 , the first electronic device can determine the first angle change value of the first electronic device by determining the change between the coordinate system of the first electronic device and the world coordinate system. Exemplarily, the first electronic device can determine the first angle change value in the following manner:

[0099] A1: The first electronic device may determine a rotation matrix of the first electronic device.

[0100] The rotation matrix is ​​used to characterize the rotation change of the first electronic device in three-dimensional space. Exemplarily, the first electronic device can obtain the current magnetic field data of the first electronic device through a magnetometer, and obtain the current gravity data of the first electronic device through an accelerometer. The first electronic device can determine the current rotation matrix of the first electronic device based on the magnetic field data and the gravity data. The rotation matrix R = {R[0], R[1], R[2]; R[3], R[4], R[5]; R[6], R[7], R[8]}. Exemplarily, the first electronic device can calculate the rotation matrix R of the first electronic device by the following formula:

[0101] R[0]=Ey*Az-Ez*Ay;

[0102] R[1]=Ez*Ax-Ex*Az;

[0103] R[2]=Ex*Ay-Ey*Ax;

[0104] R[3]=Ay*Hz-Az*Hy;

[0105] R[4]=Az*Hx-Ax*Hz;

[0106] R[5]=Ax*Hy-Ay*Hx;

[0107] R[6]=Ax;

[0108] R[7]=Ay;

[0109] R[8]=Az。

[0110] Where Ex represents the magnetic induction intensity Ex along the x-axis of the coordinate system of the first electronic device, Ey represents the magnetic induction intensity along the y-axis of the coordinate system of the first electronic device, and Ez represents the magnetic induction intensity along the z-axis of the coordinate system of the first electronic device. Ax represents the gravity along the x-axis of the coordinate system of the first electronic device, Ay represents the gravity along the y-axis of the coordinate system of the first electronic device, and Az represents the gravity along the z-axis of the coordinate system of the first electronic device. R[0] represents the rotation angle between the x-axis of the coordinate system of the first electronic device and the x-axis of the world coordinate system, R[1] represents the rotation angle between the y-axis of the coordinate system of the first electronic device and the x-axis of the world coordinate system, R[2] represents the rotation angle between the z-axis of the coordinate system of the first electronic device and the x-axis of the world coordinate system, R[3] represents the rotation angle between the x-axis of the coordinate system of the first electronic device and the y-axis of the world coordinate system, R[4] represents the rotation angle between the y-axis of the coordinate system of the first electronic device and the y-axis of the world coordinate system, R[5] represents the rotation angle between the z-axis of the coordinate system of the first electronic device and the y-axis of the world coordinate system, R[6] represents the rotation angle between the x-axis of the coordinate system of the first electronic device and the z-axis of the world coordinate system, R[7] represents the rotation angle between the y-axis of the coordinate system of the first electronic device and the z-axis of the world coordinate system, and R[8] represents the rotation angle between the z-axis of the coordinate system of the first electronic device and the z-axis of the world coordinate system.

[0111] A2: The first electronic device determines the azimuth angle of the first electronic device according to the rotation matrix.

[0112] In some examples, the first electronic device may obtain a first rotation matrix of the first electronic device at a first moment and a second rotation matrix of the first electronic device at a second moment. The first electronic device may determine the azimuth, flip angle, and roll angle of the first electronic device before and after the rotation based on the change between the first rotation matrix and the second rotation matrix. That is, the first electronic device may determine the azimuth, flip angle, and roll angle of the first electronic device at the first moment and the azimuth, flip angle, and roll angle of the first electronic device at the second moment based on the change between the first rotation matrix and the second rotation matrix.

[0113] When the second electronic device is placed on a plane parallel to the ground (such as the second electronic device is placed on a desktop), δA can be approximated as the change in the azimuth angle before and after the first electronic device is rotated. For existing operating systems, such as HarmonyOS, iOS, Android, etc., the azimuth of the first electronic device can be directly obtained by registering the direction sensor. That is, the first electronic device can obtain the azimuth of the first electronic device by registering the direction sensor. Among them, the direction sensor in the first electronic device can obtain the azimuth, flip angle and roll angle of the first electronic device through the above steps A1-A2.

[0114] A3: The first electronic device uses the difference between the azimuth angle of the first electronic device at the first moment and the difference between the azimuth angle of the first electronic device at the second moment as the first angle change value.

[0115] S303: The first electronic device generates a result sound wave signal based on the first angle change value, wherein the result sound wave signal includes but is not limited to: the first angle change value, audio data, and a chirp signal.

[0116] The first electronic device may generate a result sound wave signal through the following steps B1 to B3:

[0117] B1: The first electronic device embeds the first angle change value into the communication content to obtain sound wave information.

[0118] In some embodiments, when the first electronic device determines to send audio data to the second electronic device, it may generate communication content to be sent to the second electronic device. The communication content may be as shown in Table 1 below:

[0119] Table 1: Communication content

[0120] The core data includes but is not limited to: audio data sent by the first electronic device to the second electronic device.

[0121] The first electronic device can also embed the determined first angle change value into a communication field within the communication content and send it along with the audio data to the second electronic device. This allows the second electronic device to perform posture verification on the first electronic device based on the first angle change value, thereby ensuring the security of acoustic communication.

[0122] Optionally, the sound wave information may further include a first timestamp, wherein the first timestamp is used to indicate the time when the first electronic device sends the sound wave signal.

[0123] B2: The first electronic device encodes, encrypts and modulates the sound wave information to obtain an initial sound wave signal, wherein the initial sound wave signal may be an ultrasonic wave signal.

[0124] Exemplarily, the first electronic device may perform American Standard Code for Information Interchange (ASCII) encoding on the B1 communication content to obtain the encoded B1 communication content.

[0125] The first electronic device may also encrypt and modulate the encoded B1 communication content. For example, the first electronic device may encrypt the encoded B1 communication content using a preset angle deviation threshold. The angle deviation threshold may be the maximum value of the difference between the first angle change value determined by the first electronic device and the angle change value of the first electronic device determined by the second electronic device.

[0126] B3: The first electronic device embeds the chirp signal into the initial sound wave signal in segments to obtain a result sound wave signal.

[0127] In some embodiments, the first electronic device may periodically embed a chirp signal into the initial sound wave signal. That is, the first electronic device may transmit a chirp signal within the initial sound wave signal at regular intervals. For example, the first electronic device may embed a chirp signal within the initial sound wave signal every three seconds.

[0128] For example, as shown in FIG6 , the first electronic device may divide the initial sound wave signal into N segments at 2-second intervals and embed a chirp signal between every two segments, where the N segments are segment-1, segment-2, ..., segment-N.

[0129] In other embodiments, the first electronic device may also occasionally embed a chirp signal into the initial sound wave signal. In this case, the chirp signal cannot be detected regularly by other users, that is, the irregularly embedded chirp signal is unpredictable, thereby enhancing the security of ultrasonic communication.

[0130] In the embodiment of the present application, there is no particular order in which steps B1-B2 and step B3 are performed, and step B3 can be performed before steps B1-B2. That is, when the first electronic device generates the result sound wave signal, it can also embed the chirp signal before generating the initial sound wave signal.

[0131] S304: The first electronic device sends a result sound wave signal.

[0132] Exemplarily, the first electronic device may send the resulting sound wave signal to the second electronic device.

[0133] FIG7 is a schematic diagram of an acoustic wave communication method provided by an embodiment of the present application. As shown in FIG7 , the method includes:

[0134] S701: The second electronic device receives a result sound wave signal. The result sound wave signal includes but is not limited to: a chirp signal and an initial sound wave signal. The result sound wave signal may be an ultrasonic signal.

[0135] In some embodiments, the second electronic device may perform an autocorrelation match of a chirp signal on the received sound wave signal to determine whether the received sound wave signal is a result sound wave signal. When the second electronic device matches the chirp signal from the received sound wave signal, the second electronic device may execute subsequent steps S702 and S703 to perform gesture authentication. When the second electronic device determines that the chirp signal is not matched in the sound wave signal, the second electronic device does not need to perform the gesture authentication process.

[0136] S702: The second electronic device decodes the resulting sound wave signal to obtain a first angle change value, wherein the first angle change value is the angle change of the source end of the sound wave signal, that is, the angle change of the first electronic device.

[0137] For example, the second electronic device may demodulate and decode the resulting sound wave signal to obtain sound wave information. The sound wave information may include, but is not limited to, the first angle change value, the audio data, and the first timestamp. The second electronic device may parse the sound wave information to obtain the first angle change value.

[0138] S703: The second electronic device determines a second angle change value according to the chirp signal in the resultant sound wave signal, wherein the second angle change value is used to represent the angle change of the electronic device that sends the resultant sound wave signal.

[0139] In some embodiments, the second electronic device may determine the second angle change value based on a TOA (Time of Arrival) algorithm. Exemplarily, the second electronic device may determine the second angle change value through the following steps C1 to C4.

[0140] C1: The second electronic device determines the first distance and the second distance.

[0141] The first distance is the distance between the speaker of the first electronic device and the multiple microphones of the second electronic device at the first moment. The first moment is the start time when the first electronic device starts sending audio data. The second distance is the distance between the speaker of the first electronic device and the multiple microphones of the second electronic device at the second moment. The second moment is the end time when the first electronic device stops sending audio data.

[0142] For example, as shown in Figure 8, the second electronic device includes microphones A and B, and the first electronic device includes a speaker. The first electronic device begins transmitting audio data at a first moment and ends at a second moment. Between the first moment and the second moment, the first electronic device transmits a resulting sound wave signal to the second electronic device via the speaker, and the second electronic device receives the resulting sound wave signal from the first electronic device via microphones A and B.

[0143] As shown in FIG8 , the first distance includes a distance S1 between the speaker of the first electronic device and microphone A, and a distance S2 between the speaker of the first electronic device and microphone B at the first moment. The second distance includes a distance S3 between the speaker of the first electronic device and microphone A, and a distance S4 between the speaker of the first electronic device and microphone B at the second moment.

[0144] For another example, when the second electronic device includes three or more microphones, the second electronic device may select two microphones from the three or more microphones. The distance between the two microphones selected by the second electronic device is greater than or equal to a set threshold, for example, the set threshold may be 5 cm. For example, the second electronic device may include microphone A, microphone B, and microphone C, the distance between microphone A and microphone B is 5 cm, the distance between microphone A and microphone C is 3 cm, and the distance between microphone B and microphone C is 4 cm. The second electronic device may select microphone A and microphone B from microphone A, microphone B, and microphone C, and determine the distance from the speaker of the first electronic device to microphone A, and the distance from the speaker of the first electronic device to microphone B.

[0145] As an example, the second electronic device can determine the distance S from the speaker of the first electronic device to the microphone of the second electronic device based on the sound speed v and the transmission time T. Where S is the propagation distance of the sound wave signal, S can be S1 / S2 / S3 / S4, and the sound speed v can be set to 340m / s by default. Exemplarily, the second electronic device can determine the propagation distance S by:

[0146] As shown in Figure 9, the electronic device that sends the resulting sound wave signal to the second electronic device is the first electronic device. The first electronic device sends a chirp signal to the second electronic device at time t1. After receiving the chirp signal, the second electronic device can determine the time t1 when the first electronic device sent the chirp signal and the time t2 when the chirp signal was received. The second electronic device can also send the same chirp signal to the first electronic device at time t2 and determine the time t3 when the first electronic device received the chirp signal. The second electronic device can determine the transmission time T based on t1, t2, and t3. The transmission time T = (t3-t1) / 2. The second electronic device can determine S = v*T.

[0147] Since the process of determining the propagation distance S requires the first electronic device and the second electronic device to maintain relatively stable time synchronization, and the ultrasonic communication range is usually short, within about 2m, the time granularity that the communication range can cover is within 100ms (340m / s*100ms>>2m). In this case, the first electronic device can send a chirp signal every time the timestamp (unit ms) is a multiple of 100. After receiving the chirp signal, the second electronic device immediately returns the same chirp signal to the first electronic device. If the processing time of the second electronic device is ignored, the second electronic device can determine that the time delay between the first electronic device and the second electronic device is (t2-t1-(t3-t2)) / 2=(2t2-t3-t1) / 2. Among them, the moment t1 when the first electronic device sends the chirp signal can be calibrated by multiples of 100, thereby improving accuracy. In this case, the second electronic device can determine the propagation distance based on the time delay, propagation time and sound speed. Exemplarily, the propagation distance S=v*(T-(2t2-t3-t1) / 2)=v*(t3-t2).

[0148] C2: The second electronic device determines a third distance and a fourth distance. The third distance is the distance between two microphones among the plurality of microphones in the second electronic device, and the fourth distance is the distance from the top to the bottom of the first electronic device. For example, if the first electronic device is a mobile phone, the fourth distance is the length of the long side of the mobile phone.

[0149] For example, as shown in FIG8 , the third distance may be the physical straight-line distance D from microphone A to microphone B of the second electronic device, and the fourth distance may be the physical straight-line distance H from the top to the bottom of the first electronic device.

[0150] C3: The second electronic device determines the displacement distance of the first electronic device based on the first distance, the second distance, and the third distance.

[0151] Among them, the displacement distance is used to characterize the change in the position distance of the speaker of the first electronic device before and after rotation. The displacement distance can be the distance from the position of the speaker of the first electronic device at the first moment to the position of the speaker of the first electronic device at the second moment. For example, as shown in Figure 8, the displacement distance can be the distance X from the speaker of the first electronic device at the first moment to the speaker of the first electronic device at the second moment. In an embodiment of the present application, the process of the second electronic device determining the displacement distance shown in Figure 8 can be approximated as a process of solving a geometric problem. That is, the embodiment of the present application can approximate the process of determining the displacement distance X shown in Figure 8 to the process of solving the variable X in the geometric diagram shown in Figure 10. As shown in Figure 10, the meanings of the various variables in Figure 10 are as follows:

[0152] D: indicates the physical straight-line distance between microphones A and B in the second electronic device;

[0153] S1 / S2: used to represent the distances from the speaker of the first electronic device to microphones A and B, respectively, at a first moment;

[0154] S3 / S4: used to represent the distances from the speaker of the first electronic device to microphones A and B, respectively, at the second moment;

[0155] H: used to represent the length of the long side of the first electronic device;

[0156] X: used to indicate the change in position distance of the speaker of the first electronic device before and after the rotation;

[0157] ΔA: used to represent the rotation angle of the first electronic device;

[0158] Since the three side lengths S1 / D / S4 and the two diagonals S2 / S3 of the quadrilateral are known, the second electronic device can easily obtain the value of X.

[0159] C4: The second electronic device determines a second angle change value according to the displacement distance and the fourth distance.

[0160] In some embodiments, the second electronic device can determine the rotation angle based on the displacement distance and the fourth distance. For example, the first electronic device experiences a slight angular change during the transmission of audio data, resulting in a certain displacement, as represented by the variable X in FIG10 . Since the angular change is small, it can be approximated as a certain arc change along the long side of the first electronic device, so X = H * ΔA. Therefore, the second electronic device can determine the rotation angle ΔA = X / H.

[0161] As an example, the second electronic device may use the rotation angle as the second angle change value. Exemplarily, when the first angle change value is an angle difference, the second electronic device may use the rotation angle as the second angle change value. For example, when the first angle change value is δA, the second angle change value may be a rotation angle ΔA.

[0162] As another example, the second electronic device may determine the second angle change value based on the rotation angle. For example, when the first angle change value is a gradient value of the angle deviation of the first electronic device, the second electronic device may use the gradient value of the rotation angle as the second angle change value.

[0163] In the embodiment of the present application, step S702 and step S703 can be executed in parallel or asynchronously. The embodiment of the present application does not limit the order in which step S702 and step S703 are executed.

[0164] S704: The second electronic device performs posture authentication on the electronic device that sends the result sound wave signal according to the second angle change value and the first angle change value.

[0165] In some embodiments, the second electronic device can determine the difference between the second angle change value and the first angle change value. For example, if the first angle change value is δA and the second angle change value is ΔA, the difference is |δA-ΔA|. The second electronic device can perform posture authentication on the first electronic device by comparing the difference with an angle deviation threshold, thereby verifying communication security.

[0166] As an example, when the difference is less than the angle deviation threshold, the second electronic device can determine that the security check result is communication security. Exemplarily, when the difference is less than the angle deviation threshold, the second electronic device can determine that the electronic device that sent the resulting sound wave signal received by the second electronic device is in the same posture as the first electronic device. In other words, the second electronic device can determine that the electronic device that sent the resulting sound wave signal is the same electronic device as the first electronic device.

[0167] In one scenario, after the security verification result shows that the communication is secure, the second electronic device may execute step S705.

[0168] As another example, when the difference is greater than or equal to the angle deviation threshold, the second electronic device may determine that the security verification result is an attack. Exemplarily, when the difference is greater than or equal to the angle deviation threshold, the second electronic device may also determine that the electronic device sending the resulting sound wave signal is in a different posture than the source of the first signal, i.e., the electronic device sending the sound wave signal is a different electronic device from the first electronic device.

[0169] In one scenario, after determining that the security verification result indicates that the second electronic device has been attacked, the second electronic device may execute step S706.

[0170] S705: The second electronic device determines that the gesture authentication fails.

[0171] In some embodiments, the second electronic device may stop executing after determining that the gesture authentication fails. Stopping execution means that the second electronic device does not perform any operation. Alternatively, the second electronic device may display the first information or perform the first operation after the gesture authentication fails.

[0172] Exemplarily, the first information indicates an attack. For example, the first information may be information notifying a user of an attack. The first operation is an operation to be performed upon an attack. For example, the first operation may be an operation notifying the user of an attack, or an operation to perform an attack protection operation. When the second electronic device performs the first operation notifying the user of an attack, it may also perform an attack protection operation.

[0173] S706: The second electronic device determines that the gesture authentication is successful.

[0174] In some embodiments, after determining that the gesture authentication is successful, the second electronic device may obtain audio data in the result sound wave signal, and may also display second information or perform a second operation.

[0175] Exemplarily, the second information is used to indicate communication security. For example, the second information may be information that the user desires to obtain, or information informing the user of communication security. The second operation is an operation to be performed upon determining communication security. For example, the second operation may be an operation to inform the user of communication security, or an operation to obtain audio data.

[0176] In one possible scenario, after determining that the sound wave communication is secure, the second electronic device may display a second message or perform a second operation to inform the user of the communication security. For example, the second electronic device may display the second message of communication security in the display interface to inform the user of the communication security. For another example, the second electronic device may also perform a second operation of voice broadcast to inform the user of the communication security. When the second electronic device displays the second message or the second operation, the second electronic device may also obtain audio data and perform related functions based on the obtained audio data. Exemplarily, after determining that the gesture authentication is successful, the second electronic device may decrypt the sound wave information to obtain audio data.

[0177] In another possible scenario, after determining that the acoustic wave communication is secure, the second electronic device may display a second message or perform a second operation to inform the user of the communication security. For example, after determining that the acoustic wave communication is secure, the second electronic device may also complete the execution of the relevant function by displaying a second message or performing a second operation. For example, after successful gesture authentication, the second electronic device may obtain audio data from the acoustic wave information and display the obtained audio data on the display interface.

[0178] Based on the contents shown in the above embodiments, the first electronic device adds the posture changes of the first electronic device and embeds the chirp signal in segments during the communication process with the second electronic device, so that the second electronic device can restore the sound wave scene according to the received sound wave signal, thereby realizing the posture verification of the sending end at the receiving end, and further realizing ultrasonic communication that is anti-replay and anti-replica attack.

[0179] As shown in FIG11 , the present application provides a use case for acoustic wave communication. In this use case, the second electronic device performs a security check on the acoustic wave communication based on the received acoustic wave signal. As shown in FIG11 , this use case includes:

[0180] S1101: The second electronic device receives the resulting sound wave signal.

[0181] The resultant sound wave signal includes but is not limited to: a chirp signal and an initial sound wave signal.

[0182] S1102: The second electronic device demodulates and decodes the initial sound wave signal to obtain sound wave information.

[0183] The sound wave information includes, but is not limited to, audio data, a first angle change value, and a first timestamp. The first angle change value represents the angle change when the first electronic device sends the resulting sound wave signal. The first electronic device is the device that generates the resulting sound wave signal. The first timestamp indicates the time when the first electronic device sends the resulting sound wave signal.

[0184] S1103: The second electronic device analyzes the sound wave information to obtain a first angle change value.

[0185] S1104: The second electronic device determines a second angle change value according to the chirp signal.

[0186] The second angle change value is used to represent the angle change of the electronic device that transmits the resulting acoustic wave signal to the second electronic device. The process of determining the second angle change value in step S1104 is the same as the process of determining the second angle change value shown in steps C1 to C4 in the above embodiment, and will not be repeated here.

[0187] In the embodiment of the present application, there is no particular order in which step S1102 and step S1104 are executed, and they can be executed in parallel or asynchronously.

[0188] S1105: The second electronic device determines a difference between the first angle change value and the second angle change value.

[0189] S1106: The second electronic device determines whether the difference is less than the angle deviation threshold; if so, execute step S1107; if not, execute step S1110.

[0190] In some embodiments, when the second electronic device determines that the difference is less than the angle deviation threshold, the second electronic device may determine that the posture authentication is successful. After determining that the posture authentication is successful, the second electronic device may also perform a secondary security check. Exemplarily, the acoustic wave information may also include a first timestamp. The second electronic device may also perform a timestamp redundancy check based on the first timestamp in the acoustic wave information, thereby performing a secondary security check on the communication security of the acoustic wave signal.

[0191] S1107: The second electronic device determines a second timestamp of the received sound wave signal.

[0192] The second timestamp is used to indicate the moment when the second electronic device receives the resulting sound wave signal.

[0193] S1108: The second electronic device determines whether the time difference between the first timestamp and the second timestamp is less than a time threshold; if so, execute step S1109; if not, execute step S1110.

[0194] S1109: The second electronic device determines that the security verification result is communication security.

[0195] In some embodiments, when the second electronic device determines that the security check result is communication security, it can obtain audio data in the result sound wave signal.

[0196] S1110: The second electronic device determines that the security verification result is that it has been attacked.

[0197] In some embodiments, the second electronic device may stop execution when determining that the security check result is an attack.

[0198] In other embodiments, after receiving the result sound wave signal, the second electronic device may further perform a timestamp redundancy check, and after the check is successful, perform a posture authentication to achieve a secondary security check on the communication security of the sound wave signal.

[0199] Based on the content shown in Figure 11, the second electronic device can perform a verification of the posture changes of the first electronic device during the acoustic wave communication process based on the received acoustic wave signal, achieving real-time communication security verification, thereby preventing replay and replication attacks and greatly improving the security of acoustic wave communication. In addition, after the first verification is successful, the second electronic device can also perform a second verification to further ensure communication security.

[0200] Based on the contents of the above embodiments, the present application provides an interactive schematic diagram of a sound wave communication method. In which, the security check is an example of posture authentication. As shown in Figure 12, the method includes:

[0201] S1201: When determining to send audio data to a second electronic device, the first electronic device determines angle information.

[0202] The process of the first electronic device determining the angle information in step S1201 is the same as the process of obtaining the angle information in step S301 in the above embodiment, and will not be repeated here.

[0203] S1202: The first electronic device determines a first angle change value according to the angle information.

[0204] The first angle change value is used to represent the angle change of the first electronic device.

[0205] The process of determining the first angle change value in step S1202 may refer to the process of determining the first angle change value in step S302 of the above embodiment, and will not be repeated here.

[0206] S1203: The first electronic device generates sound wave information according to the first angle change value and the audio data.

[0207] The process of generating the sound wave information in step S1203 may refer to the content shown in B1 of the above embodiment, and will not be repeated here.

[0208] S1204: The first electronic device encodes, encrypts, and modulates the sound wave information to obtain an initial sound wave signal.

[0209] S1205: The first electronic device embeds the chirp signal into the initial sound wave signal in segments to obtain a result sound wave signal.

[0210] The process of obtaining the result sound wave signal in step S1205 can be referred to the content shown in B3 of the above embodiment, and will not be repeated here.

[0211] S1206: The first electronic device sends the result sound wave signal to the second electronic device.

[0212] S1207: The second electronic device detects a chirp signal from the received sound wave signal and determines that a result sound wave signal is received.

[0213] S1208: The second electronic device decodes the result sound wave signal to obtain a first angle change value.

[0214] The process of obtaining the first angle change value in step S1208 is the same as the process of obtaining the first angle change value in step S702 in the above embodiment, and will not be repeated here.

[0215] S1209: The second electronic device determines a second angle change value according to the chirp signal.

[0216] The second angle change value is used to characterize the angle change of the sending device, where the sending device is a device that sends the sound wave signal received by the second electronic device.

[0217] The process of determining the second angle change value in step S1209 is the same as the process of determining the second angle change value in step S703 in the above embodiment, and will not be repeated here. There is no particular order of execution between step S1209 and step S1208, and they can be executed synchronously or asynchronously.

[0218] S1210: The second electronic device performs posture authentication on the first electronic device according to the first angle change value and the second angle change value.

[0219] The process of performing posture authentication in step S1210 is the same as the process of performing posture authentication in step S704 in the above embodiment, and will not be repeated here.

[0220] S1211: After the second electronic device determines that the gesture authentication is successful, it obtains audio data in the result sound wave signal.

[0221] Based on the content shown in Figure 12, the first electronic device can provide a basis for posture authentication for the second electronic device by embedding a chirp signal and a first angle change value during acoustic wave communication with the second electronic device. The second electronic device can restore the posture change of the first electronic device based on the chirp signal in the resulting acoustic wave signal and implement security verification of the acoustic wave communication through posture authentication, thereby preventing replay and replication attacks and improving the security of the acoustic wave communication.

[0222] Based on the above embodiments and the same technical concept, the present application also provides a method for acoustic wave communication. As shown in FIG13 , the method may include:

[0223] S1301: The first electronic device generates a first signal.

[0224] The first electronic device generates a first signal, the first signal is used to transmit audio data, the first signal includes a first angle change value, and the first angle change value is used to represent an angle change of the first electronic device.

[0225] Exemplarily, the first electronic device may be the first electronic device in the aforementioned embodiment, the first signal may be the resulting sound wave signal in the aforementioned embodiment, the audio data may be the audio data in the aforementioned embodiment, and the first angle change value may be the first angle change value in the aforementioned embodiment. Regarding the first electronic device, reference may be made to the description of the first electronic device in the aforementioned embodiment, which will not be repeated here. Regarding the first signal, reference may be made to the description of the resulting sound wave signal in the aforementioned embodiment, which will not be repeated here. Regarding the audio data, reference may be made to the description of the audio data in the aforementioned embodiment, which will not be repeated here. Regarding the first angle change value, reference may be made to the description of the first angle change value in the aforementioned embodiment, which will not be repeated here.

[0226] In some embodiments of the present application, as an optional implementation, the first electronic device may encode the first angle change value and the audio data to obtain a first signal. The specific implementation of this method can refer to the encoding method by the first electronic device using B1 and B2 described in the aforementioned embodiment, and will not be described in detail here.

[0227] As another optional implementation, the first electronic device may also encode the first angle change value and the audio data to obtain an initial signal; the first electronic device may embed a chirp signal in the initial signal in segments to obtain a first signal. The initial signal may be the initial sound wave signal in the aforementioned embodiment, and the chirp signal may be the chirp signal in the aforementioned embodiment, which will not be described in detail here. Exemplarily, the first electronic device may embed a chirp signal in the initial signal at a set time interval to obtain the first signal; or, the first electronic device may also randomly embed a chirp signal in the initial signal to obtain the first signal. Regarding the specific implementation of this method, it can be implemented by referring to the method for the first electronic device to generate the resulting sound wave signal described in the aforementioned embodiment, which will not be described in detail here.

[0228] In some embodiments of the present application, the first angle change value is the difference between the first angle and the second angle, where the first angle is the angle at the start time of sending the first signal, and the second angle is the angle at the end time of sending the first signal. The first angle is the first angle in the aforementioned embodiment, and the second angle is the second angle in the aforementioned embodiment, which will not be described in detail here. The specific implementation method for determining the first angle change value can be implemented with reference to the relevant methods described in the aforementioned embodiments and will not be described in detail here.

[0229] Optionally, the first signal further includes a first timestamp, and the first timestamp is used to indicate the time when the first signal is sent. The first timestamp is the first timestamp described in the above embodiment and will not be described in detail here.

[0230] Optionally, the first signal includes an ultrasonic signal.

[0231] S1302: The first electronic device sends a first signal.

[0232] In the above method, the specific steps executed by the first electronic device can refer to the relevant introduction in the above embodiments, and will not be described in detail here.

[0233] Based on the above embodiments and the same technical concept, the present application also provides a method for acoustic wave communication. As shown in FIG14 , the method may include:

[0234] S1401: The second electronic device receives a first signal.

[0235] The second electronic device receives a first signal, where the first signal is used to transmit audio data and includes a first angle change value.

[0236] Exemplarily, the second electronic device may be the second electronic device in the aforementioned embodiment, the first signal may be the resulting sound wave signal in the aforementioned embodiment, the audio data may be the audio data in the aforementioned embodiment, and the first angle change value may be the first angle change value in the aforementioned embodiment. Regarding the second electronic device, reference may be made to the description of the second electronic device in the aforementioned embodiment, which will not be repeated here. Regarding the first signal, reference may be made to the description of the resulting sound wave signal in the aforementioned embodiment, which will not be repeated here. Regarding the audio data, reference may be made to the description of the audio data in the aforementioned embodiment, which will not be repeated here. Regarding the first angle change value, reference may be made to the description of the first angle change value in the aforementioned embodiment, which will not be repeated here.

[0237] Optionally, the first signal includes a chirp signal, wherein the chirp signal is the chirp signal in the aforementioned embodiment and will not be described in detail here.

[0238] S1402: The second electronic device determines a second angle change value according to the first signal.

[0239] The second electronic device determines a second angle change value according to the first signal, where the second angle change value is used to represent the angle change of the electronic device that sends the first signal.

[0240] For example, the second angle change value is the second angle change value in the aforementioned embodiment. For the second angle change value, reference may be made to the description of the second angle change value in the aforementioned embodiment, which will not be repeated here.

[0241] In an embodiment of the present application, the second electronic device includes a first microphone and a second microphone. The distance between the first microphone and the second microphone is greater than or equal to a set threshold. The first microphone is the first microphone in the aforementioned embodiment, the second microphone is the second microphone in the aforementioned embodiment, and the set threshold is the set threshold in the aforementioned embodiment, which will not be described in detail here.

[0242] In an optional embodiment, the second electronic device determines a displacement distance based on the time when the first microphone receives the first signal and the time when the second microphone receives the first signal; and the second electronic device determines the second angle change value based on the displacement distance. The displacement distance is the same as that in the aforementioned embodiment and will not be described in detail here. The specific implementation of this method can be implemented with reference to the relevant methods described in the aforementioned embodiments and will not be described in detail here.

[0243] S1403: When the difference between the first angle change value and the second angle change value is smaller than a preset angle deviation threshold, the second electronic device receives audio data.

[0244] Exemplarily, the preset angle deviation threshold may be the preset angle deviation threshold in the aforementioned embodiment, which will not be described in detail here.

[0245] Optionally, when the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device can also display the first information or perform the first operation; wherein, the first information is used to indicate communication security, the first operation is the operation to be performed when communication is secure, the first information is the second information in the aforementioned embodiment, and the first operation is the second operation in the aforementioned embodiment, which will not be described in detail here.

[0246] Optionally, when the difference between the first angle change value and the second angle change value is greater than or equal to a preset angle deviation threshold, the second electronic device can also display a first message or perform a first operation; wherein, the first information is used to indicate that an attack has occurred, and the first operation is an operation to be performed when an attack has occurred. The first information is the first information in the aforementioned embodiment, and the first operation is the first operation in the aforementioned embodiment, which will not be described in detail here.

[0247] In some embodiments of the present application, the first signal further includes a first timestamp, which is used to indicate the time when the first signal was sent. The first timestamp is the same as the first timestamp in the aforementioned embodiment and will not be described in detail here.

[0248] Optionally, the second electronic device may determine the time difference between the first timestamp and the second timestamp, where the second timestamp is used to indicate the moment the first signal was received; when the time difference is less than a preset time threshold and the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, the second electronic device receives the audio data. The second timestamp is the same as that in the aforementioned embodiment, and the preset time threshold is the same as that in the aforementioned embodiment, which will not be described in detail here. The specific implementation of this method can be implemented with reference to the relevant methods described in the aforementioned embodiments and will not be described in detail here.

[0249] In the above method, the specific steps executed by the second electronic device can be found in the relevant introduction of the above embodiments, and will not be described in detail here.

[0250] Based on the above embodiments and the same technical concept, the present application also provides an acoustic wave communication method, which is applied to a system including a first electronic device and a second electronic device. As shown in FIG15 , the method may include:

[0251] S1501: A first electronic device generates a first signal.

[0252] The first electronic device generates a first signal, the first signal is used to transmit audio data, the first signal includes a first angle change value, and the first angle change value is used to represent an angle change of the first electronic device.

[0253] Exemplarily, the first electronic device may be the first electronic device in the aforementioned embodiment, the first signal may be the resulting sound wave signal in the aforementioned embodiment, the audio data may be the audio data in the aforementioned embodiment, and the first angle change value may be the first angle change value in the aforementioned embodiment. Regarding the first electronic device, reference may be made to the description of the first electronic device in the aforementioned embodiment, which will not be repeated here. Regarding the first signal, reference may be made to the description of the resulting sound wave signal in the aforementioned embodiment, which will not be repeated here. Regarding the audio data, reference may be made to the description of the audio data in the aforementioned embodiment, which will not be repeated here. Regarding the first angle change value, reference may be made to the description of the first angle change value in the aforementioned embodiment, which will not be repeated here.

[0254] Regarding the specific implementation manner in which the first electronic device generates the first signal, reference may be made to the relevant methods described in the aforementioned embodiments and will not be described in detail here.

[0255] S1502: The first electronic device sends a first signal to the second electronic device.

[0256] The second electronic device may be the second electronic device in the aforementioned embodiment, which will not be described in detail here.

[0257] S1503: The second electronic device determines a second angle change value according to the received first signal.

[0258] Based on the received first signal, the second electronic device determines a second angle change value, where the second angle change value is used to represent the angle change of the electronic device that sent the first signal. The second angle change value may be the angle change value in the aforementioned embodiment and will not be described in detail here. Regarding the specific implementation method for the second electronic device to determine the second angle change value, reference can be made to the relevant methods described in the aforementioned embodiment and will not be described in detail here.

[0259] S1504: When the difference between the first angle change value and the second angle change value is smaller than a preset angle deviation threshold, the second electronic device receives audio data.

[0260] Among them, the specific implementation method of the second electronic device receiving audio data can be implemented by referring to the relevant methods described in the above embodiments, and will not be described in detail here.

[0261] In the above method, the specific steps executed by the first electronic device and the second electronic device can be found in the relevant introduction of the above embodiments, and will not be described in detail here.

[0262] Based on the above content and the same technical concept, the present application provides an electronic device, including a memory and one or more processors, the memory is used to store computer program code, and the computer program code includes computer instructions; the one or more processors are used to execute the computer program instructions stored in the memory, so that the electronic device performs the steps performed by the first electronic device or the second electronic device in the above method embodiment.

[0263] Based on the above content and the same concept, the present application provides a computer-readable storage medium, which stores a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device executes the steps performed by the first electronic device or the second electronic device in the above method embodiment.

[0264] Based on the above content and the same concept, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device executes the steps performed by the first electronic device or the second electronic device in the above method embodiment.

[0265] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0266] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0267] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0268] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0269] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A sound wave communication method, applied to a first electronic device, characterized in that: The method comprises: generating a first signal, wherein the first signal is used to transmit audio data, and the first signal includes a first angle change value, and the first angle change value is used to indicate an angle change of the first electronic device; The first signal is sent.

2. The method according to claim 1, characterized in that The generating the first signal comprises: The first angle change value and the audio data are encoded to obtain the first signal.

3. The method according to claim 1, characterized in that The generating of the first signal comprises: Encoding the first angle change value and the audio data to obtain an initial signal; A chirp signal is embedded in the initial signal in sections to obtain the first signal.

4. The method according to claim 3, characterized in that The step of embedding a chirp signal in the initial signal in sections to obtain the first signal includes: embedding the chirp signal into the initial signal at a set time interval to obtain the first signal; or, The chirp signal is randomly embedded in the initial signal to obtain the first signal.

5. The method according to any one of claims 1 to 4, characterized in that The first angle change value is the difference between a first angle and a second angle, wherein the first angle is the angle at the start time of sending the first signal, and the second angle is the angle at the end time of sending the first signal.

6. The method according to any one of claims 1 to 5, characterized in that The first signal further includes a first timestamp, and the first timestamp is used to indicate a sending time of the first signal.

7. The method according to any one of claims 1 to 6, characterized in that The first signal includes an ultrasonic signal.

8. A sound wave communication method, characterized in that: Applied to a second electronic device, the method includes: receiving a first signal, where the first signal is used to transmit audio data and the first signal includes a first angle change value; determining a second angle change value according to the first signal, where the second angle change value is used to represent an angle change of the electronic device that sends the first signal; When the difference between the first angle change value and the second angle change value is smaller than a preset angle deviation threshold, the audio data is received.

9. The method according to claim 8, characterized in that The first signal comprises a chirp signal.

10. The method according to claim 8 or 9, characterized in that The second electronic device includes a first microphone and a second microphone, and determining the second angle change value according to the first signal includes: determining a displacement distance according to a time when the first microphone receives the first signal and a time when the second microphone receives the first signal, wherein a distance between the first microphone and the second microphone is greater than or equal to a set threshold; The second angle change value is determined according to the displacement distance.

11. The method according to any one of claims 8 to 10, characterized in that: The method further comprises: Display first information or perform a first operation.

12. The method according to any one of claims 8 to 11, characterized in that The first signal further includes a first timestamp, and the first timestamp is used to indicate a sending time of the first signal.

13. The method according to claim 12, characterized in that When the difference between the first angle change value and the second angle change value is less than a preset angle deviation threshold, receiving the audio data includes: determining a time difference between the first timestamp and the second timestamp, where the second timestamp is used to indicate a moment when the first signal was received; When the time difference is less than a preset time threshold and the difference between the first angle change value and the second angle change value is less than the preset angle deviation threshold, the audio data is received.

14. A sound wave communication method, applied to a system including a first electronic device and a second electronic device, characterized in that: The method comprises: The first electronic device generates a first signal, the first signal is used to transmit audio data, the first signal includes a first angle change value, and the first angle change value is used to represent an angle change of the first electronic device; The first electronic device sends the first signal to the second electronic device; The second electronic device determines a second angle change value according to the received first signal, where the second angle change value is used to represent an angle change of the electronic device that sends the first signal; When the difference between the first angle change value and the second angle change value is smaller than a preset angle deviation threshold, the second electronic device receives the audio data.

15. A sound wave communication system, comprising a first electronic device and a second electronic device, characterized in that: The first electronic device executes the method according to any one of claims 1 to 7, and the second electronic device executes the method according to any one of claims 8 to 13.

16. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories are used to store one or more computer programs and data information; wherein the one or more computer programs include instructions; When the instructions are executed by the one or more processors, the electronic device is caused to perform the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 13.

18. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Detecting misbehavior in vehicle-to-vehicle (V2V) communications

    CN106162521A

  • Detection of replay attack

    CN111194445A

  • Signal processing method and device and electronic equipment

    CN111629300A

  • Audio signal processing method, electronic apparatus, and storage medium

    US20230045721A1

  • Angle Determining Method, Electronic Device, and Chip System

    US20230366676A1