Positioning method, positioning device and electronic equipment

By generating and processing near-ultrasound signals in electronic devices, the positioning accuracy problem when multiple devices share areas is solved, and more efficient signal processing and positioning results are achieved.

CN119986543APending Publication Date: 2025-05-13VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510191290.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When multiple electronic devices share the same area, it is difficult for GPS to accurately locate the specific location, and the signal interference caused by multiple devices broadcasting near-ultrasound signals, affecting positioning accuracy.

Method used

The first electronic device generates a near-ultrasound signal, processes N first ultrasound signals, transmits these signals, and after receiving the second ultrasound signal, determines the position information between the first electronic device and the third electronic device based on the second ultrasound signal and the target first ultrasound signal.

Benefits of technology

It improves the positioning accuracy of electronic devices, avoids signal interference, and enhances the positioning ability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119986543A_ABST
    Figure CN119986543A_ABST
Patent Text Reader

Abstract

The invention discloses a positioning method, a positioning device and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: generating a near ultrasonic signal; the near ultrasonic signals are processed, N first ultrasonic signals are obtained, each first ultrasonic signal corresponds to one second electronic device, and N is a positive integer; sending N first ultrasonic signals; after the second ultrasonic signal is received, if it is determined that the second ultrasonic signal corresponds to a third electronic device, position information between the first electronic device and the third electronic device is determined based on the second ultrasonic signal and the target first ultrasonic signal, and the third electronic device is one of N second electronic devices, the target first ultrasonic signal is an ultrasonic signal corresponding to the third electronic equipment in the N first ultrasonic signals, and the second ultrasonic signal is one of the N first ultrasonic signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a positioning method, a positioning device, and an electronic device. Background Art

[0002] Currently, electronic devices can be positioned using the Global Positioning System (GPS) in the electronic devices. However, when different electronic devices are in the same area, such as a shopping mall or amusement park, the GPS often cannot accurately locate the electronic device in the area.

[0003] In related technologies, in order to accurately locate the specific location of an electronic device, the electronic device can broadcast a near-ultrasonic signal to other electronic devices in an area, and then, knowing the propagation speed of the near-ultrasonic signal, derive the distance information between the electronic device and other electronic devices based on the propagation time and propagation speed of the near-ultrasonic signal. Finally, the electronic device can use the local visual mileage calculation method and the inertial measurement unit (IMU) in the electronic device to obtain the orientation information of other electronic devices, and combine the distance information between the electronic device and other electronic devices derived above to estimate the position coordinates of other electronic devices, thereby obtaining the position information of the other electronic devices in the same area.

[0004] However, in the above method, when there are multiple other electronic devices in the same area, since the electronic device will broadcast a near-ultrasonic signal, one or more other electronic devices in the same area as the electronic device can receive the near-ultrasonic signal broadcast by the electronic device, resulting in the one or more other electronic devices feeding back a reply signal of the near-ultrasonic signal to the electronic device, and then the electronic device can perform different positioning according to the one or more reply signals, resulting in signal interference. As a result, the positioning accuracy of the electronic device is poor. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a positioning method, a positioning device, an electronic device, a storage medium and a program product, which can improve the accuracy of positioning of the electronic device.

[0006] In a first aspect, an embodiment of the present application provides a positioning method, which is performed by a first electronic device, and the positioning method includes: generating a near ultrasonic signal; processing the near ultrasonic signal to obtain N first ultrasonic signals, each of the N first ultrasonic signals corresponds to a second electronic device, and N is a positive integer; sending the N first ultrasonic signals; after receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to a third electronic device, determining the location information between the first electronic device and the third electronic device based on the second ultrasonic signal and the target first ultrasonic signal, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal of the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals.

[0007] In a second aspect, an embodiment of the present application provides a positioning method, which is performed by a third electronic device. The positioning method includes: sending a second ultrasonic signal, where the second ultrasonic signal is one of K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among N first ultrasonic signals, where K is an integer greater than 1; after receiving the target first ultrasonic signal, when it is determined that the target first ultrasonic signal corresponds to the first electronic device, determining the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal.

[0008] In a third aspect, an embodiment of the present application provides a positioning device, which is applied to a first electronic device, and the positioning device includes: a generation module, a processing module, a sending module and a determination module. The generation module is used to generate a near-ultrasonic signal. The processing module is used to process the near-ultrasonic signal generated by the generation module to obtain N first ultrasonic signals, each of which corresponds to a second electronic device. The sending module is used to send the N first ultrasonic signals processed by the processing module, where N is a positive integer. The processing module is also used to determine the location information between the first electronic device and the third electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to the third electronic device, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal corresponding to the third electronic device among the N first ultrasonic signals, and the second ultrasonic signal is one of the N first ultrasonic signals.

[0009] In a fourth aspect, an embodiment of the present application provides a positioning device, which is applied to a third electronic device for execution, and the positioning device includes: a sending module and a processing module. The sending module is used to send a second ultrasonic signal, where the second ultrasonic signal is one of K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among N first ultrasonic signals, where K is an integer greater than 1. The processing module is used to determine the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the target first ultrasonic signal and determining that the target first ultrasonic signal corresponds to the first electronic device.

[0010] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect or the steps of the method described in the second aspect are implemented.

[0011] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the steps of the method described in the second aspect are implemented.

[0012] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect or the method described in the second aspect.

[0013] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the method described in the second aspect.

[0014] In an embodiment of the present application, a first electronic device may generate a near ultrasonic signal; and process the near ultrasonic signal to obtain N first ultrasonic signals, each first ultrasonic signal corresponding to a second electronic device; then, N first ultrasonic signals are sent, where N is a positive integer; finally, after receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to a third electronic device, the location information between the first electronic device and the third electronic device is determined based on the second ultrasonic signal and the target first ultrasonic signal, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal among the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals. In the present solution, after the first electronic device processes the near-ultrasonic signal, the N first ultrasonic signals obtained can correspond to each second electronic device among the N second electronic devices, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals. Therefore, after the first electronic device sends the target first ultrasonic signal corresponding to the third electronic device and the first electronic device receives the second ultrasonic signal, the second ultrasonic signal can be analyzed. When it is determined that the second ultrasonic signal is sent by the third electronic device, the position information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the first electronic device determines that the second ultrasonic signal is not sent by the third electronic device, the first electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the first electronic device receives the reply signal of the near-ultrasonic signal, thereby improving the accuracy of positioning the first electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a topological diagram of a multi-user group.

[0016] Figure 2 This is one of the flow charts of a positioning method provided in an embodiment of the present application;

[0017] Figure 3 It is a frequency band diagram of a near-ultrasonic signal.

[0018] Figure 4 This is a schematic diagram of an ultrasonic signal receiving time provided in an embodiment of the present application.

[0019] Figure 5 This is one of the spectrum diagrams of a near-ultrasonic signal.

[0020] Fig. 6A This is the second schematic diagram of the spectrum of a near-ultrasonic signal.

[0021] Figure 6B This is the third schematic diagram of the spectrum of a near-ultrasonic signal.

[0022] Figure 7 This is the second flowchart of a positioning method provided in an embodiment of the present application;

[0023] Figure 8 This is the third flowchart of a positioning method provided in an embodiment of the present application;

[0024] Fig. 9 This is a fourth flowchart of a positioning method provided in an embodiment of the present application;

[0025] Fig.10 is a flowchart of encoding and decoding of an ultrasonic signal provided in an embodiment of the present application;

[0026] Fig.11 This is the fifth flowchart of a positioning method provided in an embodiment of the present application;

[0027] Fig.12 is a schematic diagram of a position display interface provided in an embodiment of the present application;

[0028] Fig.13 is a schematic diagram of a user node sending an ultrasonic signal provided by an embodiment of the present application;

[0029] Fig.14 This is the sixth flowchart of a positioning method provided in an embodiment of the present application;

[0030] Fig.15 This is the seventh flowchart of a positioning method provided in an embodiment of the present application;

[0031] Fig.16 This is the eighth flowchart of a positioning method provided in an embodiment of the present application;

[0032] Fig.17 This is a ninth flowchart of a positioning method provided in an embodiment of the present application;

[0033] Fig.18 This is one of the structural schematic diagrams of a positioning device provided in an embodiment of the present application;

[0034] Fig.19 This is the second structural schematic diagram of a positioning device provided in an embodiment of the present application;

[0035] Fig. 20 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0036] Fig.21 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0038] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0039] The terms "at least one (item)", "at least one of" and the like in the specification and claims of the present application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" refers to two or more, and its meaning is similar to that of "at least one (item)".

[0040] The identifier in the present application is used to indicate an ultrasonic signal and the motion state, orientation information and second electronic device corresponding to the ultrasonic signal, including but not limited to text identifiers and symbol identifiers.

[0041] The positioning method, positioning device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0042] The positioning method, positioning device, electronic device and storage medium provided in the embodiments of the present application can be applied to shopping mall positioning scenarios, amusement park positioning scenarios or supermarket positioning scenarios, etc.

[0043] When parents take their children to the mall, because children are naturally active, if adults are not paying attention, the children may run to other places. There is a lot of turnover in the mall, and it is difficult to find the children if you are not careful. Due to the complex building structure of the indoor environment, it is difficult for GPS signals to penetrate the building and reach the indoor area; children's watches on the market often cannot accurately locate a certain area indoors, and cannot be used for early warning prompts within the indoor range. Other anti-lost artifacts, such as traction ropes, require both adults and children to tie ropes, which will obviously limit the range of activities.

[0044] At present, there are many solutions for indoor ranging, such as Solution 1. Solution 1 measures the distance based on the strength of the signal received by the device, and uses the fact that the strength of the signal gradually weakens as the spatial distance increases. For example, Wireless Fidelity (WiFi), Bluetooth, etc. Compared with traditional Bluetooth anti-lost trackers, HaiweiTag is a classic Bluetooth anti-lost tracker. After its Bluetooth module is paired with the mobile phone Bluetooth, it can judge the distance based on the strength of the Bluetooth signal, thereby giving a result of near / far distance, and then using a buzzer to prompt the search. The shortcomings of traditional Bluetooth anti-lost trackers are obvious. They cannot provide users with a visual direction and distance. Users cannot judge where the anti-lost tracker is, and the short-distance search capability is poor. According to statistics, the strength of the Bluetooth signal is easily affected by many factors, so there is uncertainty in the ranging; to improve the test accuracy, additional Bluetooth physical relay devices need to be deployed in the indoor space.

[0045] Another manufacturer launched a carrier-free communication technology (Ultra WideBand, UWB) chip in 2021, and launched the UWB-based anti-lost tracker AirTag; unlike traditional Bluetooth anti-lost trackers, AirTag has added a close-range precise search function. The UWB module in AirTag interacts with the UWB module in the mobile phone to achieve ranging and obtain distance information; in order to obtain pointing information, Apple calls on the camera and sensor of the mobile phone, using local visual mileage calculation method and inertial measurement unit (Inertial measurement unit, IMU), in conjunction with the distance information obtained by UWB, to estimate the coordinate points, thereby obtaining pointing and realizing visual close-range search. This solution requires UWB modules to be installed in AirTag and the mobile phone respectively, and the overall cost has increased significantly.

[0046] Solution 2 is based on the time of signal propagation. Knowing the speed of signal transmission, the distance can be deduced through the time difference, such as the time of arrival (TOA). The more common method is ultrasonic ranging. Current smartphones have speakers and microphones. The near-ultrasound of 19kHz-24kHz is played through the smartphone speakers. This frequency band cannot be heard by the human ear. In an ideal environment, near-ultrasound can achieve high-precision, low-cost indoor ranging and early warning. However, in the indoor environment, the building structure is complex, and the ultrasonic frequency band that smartphones can emit is very limited, such as Figure 1 As shown, in a topological structure composed of multiple user groups, when multiple users use near-ultrasound at the same time, there may be interference problems with acoustic signals. At the same time, considering that people will move dynamically, distance detection requires not only high-precision, low-latency estimation, but also high refresh rate. Consider the scenario of multiple families traveling with multiple children; multiple user devices need to send ultrasonic signals, which causes the multiple other electronic devices to feedback reply signals of near-ultrasound signals to the electronic device, and then the electronic device can perform different positioning according to the multiple reply signals, resulting in signal interference, that is, the electronic device cannot stably identify which user device sent the received ultrasonic signal through the ultrasonic signal, so the positioning accuracy of the electronic device is poor.

[0047] In the positioning method, positioning device, electronic device and storage medium provided in the embodiments of the present application, since the N first ultrasonic signals obtained after the first electronic device processes the near ultrasonic signal can correspond to each second electronic device in the N second electronic devices, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals, after the first electronic device sends the target first ultrasonic signal corresponding to the third electronic device and the first electronic device receives the second ultrasonic signal, the second ultrasonic signal can be parsed, and when it is determined that the second ultrasonic signal is sent by the third electronic device, the position information between the first electronic device and the third electronic device can be determined according to the target first ultrasonic signal and the second ultrasonic signal; it can be understood that when the first electronic device determines that the second ultrasonic signal is not sent by the third electronic device, the first electronic device can do no processing, avoiding the phenomenon of signal interference when the first electronic device receives the reply signal of the near ultrasonic signal, and improving the accuracy of positioning the first electronic device; and the present application can solve the current premise that the ultrasonic frequency band emitted by the electronic device is limited, and no additional physical ultrasonic relay equipment and UWB chip are required; improve the information transmission efficiency, support multiple user devices to participate in ranging and early warning at the same time, and visualize the current motion state and direction of the electronic device.

[0048] The execution subject of the positioning method provided in the embodiment of the present application may be a positioning device, and the positioning device may be an electronic device, or a functional module in an electronic device. The technical solution provided in the embodiment of the present application is described below by taking an electronic device as an example.

[0049] The present application embodiment provides a positioning method. Figure 2 FIG. 1 is a flowchart of a positioning method provided by an embodiment of the present application, which can be applied to a first electronic device. Figure 2 As shown, the positioning method provided in the embodiment of the present application may include the following steps 201 to 204.

[0050] Step 201: A first electronic device generates a near-ultrasonic signal.

[0051] In the embodiment of the present application, the near-ultrasonic signal is a sound signal with a frequency close to the ultrasonic range, generally referring to a sound with a frequency between 19kHz and 24kHz. The characteristic of this signal is that it is difficult for the human ear to detect, but it can be detected and processed by electronic equipment.

[0052] It should be noted that compared with traditional Bluetooth signals, near-ultrasonic signals have the following advantages: High precision: Near-ultrasonic signals have higher ranging accuracy, and the mutual ranging error within 5 meters can be less than 4 cm. Low misjudgment rate: Near-ultrasonic signals are not easy to pass through obstacles such as walls and doors, so the misjudgment rate is low.

[0053] For example, Figure 3 As shown, the sound signal that the human ear is sensitive to is generally 20HZ to 18KHZ, while the near-ultrasonic signal is generally 18KHZ to 24KHZ. Ultrasonic signals above 24KHZ are usually not supported by the hardware sampling rate of the first electronic device; that is, the first electronic device can only emit ultrasonic signals in a certain frequency band.

[0054] Optionally, in the embodiment of the present application, the first electronic device may generate a near-ultrasonic signal through an ultrasonic sensor in the first electronic device; or, the first electronic device may generate a near-ultrasonic signal through digital signal processing.

[0055] For example, for the above-mentioned generation of near-ultrasonic signals by the ultrasonic sensor, the ultrasonic sensor can generate near-ultrasonic signals by using the piezoelectric effect. Specifically, the ultrasonic sensor can periodically change the voltage applied to the piezoelectric crystal, so that the piezoelectric crystal vibrates and generates near-ultrasonic signals.

[0056] As another example, for the above-mentioned generation of near-ultrasonic signals by digital signal processing, the first electronic device can determine the sampling period of the ultrasonic signal, and the sampling period determines the resolution and frequency accuracy of the signal. For near-ultrasonic signals, the frequency usually selected is higher than 20kHz, because this is the upper limit of human hearing, and then, according to the sampling period, the amplitude corresponding to the signal sampling sequence is obtained in sequence. This step involves calculating the signal strength of each sampling point according to the preset number, amplitude and frequency of sine waves. With the sampling sequence and the corresponding amplitude, an ultrasonic signal can be generated. This can be achieved by directly utilizing the processor resources of the first electronic device, without increasing the number of circuit elements and circuit complexity in the product, without increasing the volume of the product, and is simple, reliable and low-cost.

[0057] Optionally, in the embodiment of the present application, the ultrasonic sensor may be any one of the following: a piezoelectric ultrasonic sensor, a magnetostrictive ultrasonic sensor, or an electromagnetic ultrasonic sensor, etc. The specific configuration may be determined based on actual use requirements, and the embodiment of the present application does not limit this.

[0058] Step 202: The first electronic device processes the near ultrasonic signal to obtain N first ultrasonic signals.

[0059] In the embodiment of the present application, each of the N first ultrasonic signals corresponds to a second electronic device, and N is a positive integer.

[0060] Optionally, in the embodiment of the present application, the above-mentioned processing of the near-ultrasonic signal may include: splitting the near-ultrasonic signal, performing hybrid encoding on the split near-ultrasonic signal, and performing linear frequency modulation on the split near-ultrasonic signal.

[0061] Optionally, in an embodiment of the present application, the ultrasonic signal resource identifier corresponding to each of the N first ultrasonic signals is different.

[0062] Optionally, in the embodiment of the present application, multiple first ultrasonic signals among the above-mentioned N first ultrasonic signals may correspond to one second electronic device.

[0063] Step 203: The first electronic device sends N first ultrasonic signals.

[0064] Optionally, in an embodiment of the present application, the first electronic device may send N first ultrasonic signals in sequence through the above-mentioned ultrasonic sensor; or, the first electronic device may send N first ultrasonic signals in sequence through a microphone in the first electronic device.

[0065] Exemplarily, the first electronic device may send out N first ultrasonic signals in sequence through a speaker in the first electronic device according to a preset ultrasonic signal sending cycle and time-division multiplexing of the ultrasonic frequency band.

[0066] It should be noted that the first electronic device sends out N first ultrasonic signals in sequence by broadcasting.

[0067] Step 204: After receiving the second ultrasonic signal, the first electronic device determines the position information between the first electronic device and the third electronic device based on the second ultrasonic signal and the target first ultrasonic signal when determining that the second ultrasonic signal corresponds to the third electronic device.

[0068] In an embodiment of the present application, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal corresponding to the third electronic device among the N first ultrasonic signals, and the second ultrasonic signal is one of the N first ultrasonic signals.

[0069] Optionally, in the embodiment of the present application, the above-mentioned location information may include: orientation information and distance information between the first electronic device and the third electronic device.

[0070] Optionally, in the embodiment of the present application, the above-mentioned direction information can be any one of the following: east, west, south or north.

[0071] Optionally, in an embodiment of the present application, the first electronic device may receive the sixth ultrasonic signal through a microphone in the first electronic device, and then the first electronic device may perform a high-pass filter on the sixth ultrasonic signal to obtain a filtered sixth ultrasonic signal, and finally use the filtered sixth ultrasonic signal as the above-mentioned second ultrasonic signal.

[0072] It should be noted that, since the first electronic device receives the sixth ultrasonic signal through a microphone, the first electronic device can remove noise signals in the environment, such as human voice signals, by performing high-pass filtering on the sixth ultrasonic signal.

[0073] In the embodiment of the present application, the first electronic device can determine the position information between the third electronic device and the first electronic device according to the position information carried by the second ultrasonic signal and the position information of the first electronic device; and calculate the distance information between the first electronic device and the third electronic device according to the first duration and the propagation speed of the target first ultrasonic signal. The first duration is the duration between the first electronic device sending the target first ultrasonic signal and receiving the second ultrasonic signal.

[0074] Exemplarily, the first electronic device may calculate the distance information between the first electronic device and the third electronic device by using the following formula (1).

[0075]

[0076] Wherein, d is the distance information between the first electronic device and the third electronic device, V is the propagation speed of the target first ultrasonic signal, Tsum is the first duration, T is the system-inherent time consumption of the first electronic device, which is generally related to the signal period and system path overhead selected by the first electronic device. For example, the first electronic device decodes the ultrasonic signal to sends the ultrasonic signal; in this process, the first electronic device will have a certain overhead, which can be tested in advance.

[0077] As another example, Figure 4 As shown, device 1, namely the first electronic device, and device 2, namely the second electronic device, perform mutual distance measurement; device 1 sends out ultrasonic signal 1, namely the first target ultrasonic signal, and device 2 sends out ultrasonic signal 2, namely the second ultrasonic signal. Figure 2 The signal propagation process is as follows: the time from device 1 sending ultrasonic signal 1 to device 2 receiving ultrasonic signal 1 is T1; the time from device 2 receiving ultrasonic signal 1, decoding ultrasonic signal 1 and sending ultrasonic signal 2 is T; the time from device 1 receiving ultrasonic signal 2 is T1, and T1+T2+T is Tsum. According to the principle of sound propagation, the distance between the two devices is d=V*(Tsum-T) / 2, which is the above formula 1.

[0078] Exemplarily, the distance measurement principle of the first electronic device is explained below.

[0079] The first electronic device may calculate the cross-correlation between the ideal transmission signal and the received signal, and define the maximum peak value of the obtained cross-correlation result as the time when the signal arrives. Figure 5 As shown in FIG. 1 , the transmitted signal is a 18k-19kHz linear frequency modulation (LFM) signal, and the received signal is superimposed with human voice, noise, and multiple superimposed LFM signals. Fig. 6A and Figure 6B As shown in the figure, the cross-correlation has three obvious peaks, which is consistent with the expected conclusion. Based on the time when the peak arrives, the distance can be deduced given the known speed of sound.

[0080] In the embodiment of the present application, under the premise that the ultrasonic frequency band emitted by the first electronic device is limited, there is no need to add additional physical ultrasonic relay equipment and UWB chips; the information transmission efficiency is improved, multiple user devices are supported to participate in ranging and early warning at the same time, and the current motion status and direction of the third electronic device are visually displayed.

[0081] In the positioning method provided in the embodiment of the present application, the first electronic device can generate a near ultrasonic signal; and process the near ultrasonic signal to obtain N first ultrasonic signals, each first ultrasonic signal corresponding to a second electronic device; then send N first ultrasonic signals in sequence, N is a positive integer; finally, after receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to a third electronic device, the location information between the first electronic device and the third electronic device is determined based on the second ultrasonic signal and the target first ultrasonic signal, the third electronic device is one of the at least two second electronic devices, the target first ultrasonic signal is an ultrasonic signal among the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals. In this solution, after the first electronic device processes the near-ultrasonic signal, the N first ultrasonic signals obtained can correspond to each of the N second electronic devices, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals. Therefore, after the first electronic device sends the target first ultrasonic signal corresponding to the third electronic device and the first electronic device receives the second ultrasonic signal, the second ultrasonic signal can be analyzed. When it is determined that the second ultrasonic signal is sent by the third electronic device, the location information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the first electronic device determines that the second ultrasonic signal is not sent by the third electronic device, the first electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the first electronic device receives the reply signal of the near-ultrasonic signal, thereby improving the accuracy of indoor positioning of the first electronic device.

[0082] Optionally, in the embodiment of the present application, combined with Figure 2 ,like Figure 7 As shown, the above step 202 can be specifically implemented through the following steps 202a to 202e.

[0083] Step 202a: The first electronic device splits the near ultrasonic signal to obtain N third ultrasonic signals.

[0084] In the embodiment of the present application, the number of the N third ultrasonic signals may be preset by the electronic device.

[0085] In the embodiment of the present application, the first electronic device may split the near-ultrasonic signal according to the frequency band of the near-ultrasonic signal to obtain N third ultrasonic signals.

[0086] Exemplarily, the first electronic device can split N sub-bands from the near-ultrasonic signal according to the number of preset third ultrasonic signals, and then calculate the bandwidth corresponding to each of the N sub-bands by the following formula (2), and finally perform signal generation processing on the bandwidth corresponding to each of the N sub-bands and the N sub-bands to obtain the above-mentioned N third ultrasonic signals.

[0087]

[0088] Wherein, BW is the bandwidth, 19 is the start frequency of the near-ultrasonic signal, and 24 is the end frequency of the near-ultrasonic signal.

[0089] It should be noted that the bandwidth corresponding to each of the N sub-frequency bands is the same.

[0090] Step 202b: The first electronic device generates X random numbers based on the first random factor.

[0091] In the embodiment of the present application, one of the X random numbers corresponds to a single-frequency signal, the first random factor is obtained by performing a hash operation on user information of a user to which the first electronic device belongs, and X is an integer greater than 1.

[0092] Optionally, in the embodiment of the present application, the number of the above-mentioned X random numbers is preset by the first electronic device.

[0093] Optionally, in the embodiment of the present application, the user information may include at least one of the following: user name, user account name, user account registration time, user gender or user personal address, etc. The specific information may be determined according to actual use requirements and is not limited in the embodiment of the present application.

[0094] Optionally, in an embodiment of the present application, the first electronic device may obtain user information of the user, and perform a hash operation on the user information to obtain a fixed 64-bit string, which is the first random factor mentioned above.

[0095] Optionally, in the embodiment of the present application, the first electronic device may generate a random integer R from 1 to BW each time from the first random factor through a random function, where BW is the bandwidth of the third ultrasonic signal and R is one of the X random numbers.

[0096] Step 202c: For each third ultrasonic signal, the first electronic device processes the third ultrasonic signal based on X random numbers to obtain X single-frequency signals corresponding to the X random numbers.

[0097] It should be noted that the process of the first electronic device obtaining X single-frequency signals can be found in the following embodiments, which will not be described again to avoid repetition.

[0098] Step 202d: The first electronic device mixes and encodes the X single-frequency signals and the third ultrasonic signal to obtain an encoded third ultrasonic signal.

[0099] It should be noted that, for each of the N third ultrasonic signals, the first electronic device can obtain the encoded N third ultrasonic signals through the following embodiments, which will not be described again here to avoid repetition.

[0100] Step 202e: The first electronic device uses the encoded N third ultrasonic signals as N first ultrasonic signals.

[0101] In the embodiment of the present application, since the N first ultrasonic signals are obtained based on the user information of the user to whom the first electronic device belongs, and the user information of different devices must be unique; therefore, the first electronic device can know which ultrasonic signals are sent by the second electronic device connected to the first electronic device through the ultrasonic signal, thereby avoiding the signal anti-interference phenomenon and improving the anti-interference ability of near-ultrasound. And even if the frequency band of each of the N third ultrasonic signals is the same, but the random numbers corresponding to each of the N third ultrasonic signals after encoding are different, then each of the N third ultrasonic signals after encoding is also different, thereby improving the utilization rate of near-ultrasound.

[0102] Optionally, in the embodiment of the present application, the above step 202a can be specifically implemented through the following steps 202a1 to 202a3.

[0103] Step 202a1: The first electronic device splits the near ultrasonic signal to obtain N fourth ultrasonic signals.

[0104] It should be noted that the process of splitting the near-ultrasonic signal by the first electronic device can be found in the above embodiment in detail, and will not be described again here to avoid repetition.

[0105] Step 202a2: The first electronic device performs linear frequency modulation on the N fourth ultrasonic signals respectively to obtain N frequency-modulated fourth ultrasonic signals.

[0106] In the embodiment of the present application, for a fourth ultrasonic signal among the N fourth ultrasonic signals, the first electronic device may perform linear frequency modulation according to the following formula (3) to obtain a frequency-modulated fourth ultrasonic signal.

[0107]

[0108] Wherein, X(t) is a fourth ultrasonic signal after frequency modulation, f 0 is the starting frequency of a fourth ultrasonic signal, τ is the time constant, and K is the frequency modulation slope.

[0109] In the embodiment of the present application, the above frequency modulation slope can be achieved by the following formula (4).

[0110]

[0111] Where K is the frequency modulation slope, f 1 is the stop frequency of the fourth ultrasonic signal, f 0 is a starting frequency of a fourth ultrasonic signal.

[0112] It should be noted that, for each of the N fourth ultrasonic signals, the first electronic device can obtain the frequency-modulated fourth ultrasonic signal corresponding to each of the N fourth ultrasonic signals through the above embodiment. To avoid repetition, it will not be repeated here.

[0113] Step 202a3: The first electronic device uses the frequency-modulated N fourth ultrasonic signals as N third ultrasonic signals.

[0114] In the embodiment of the present application, the first electronic device may perform linear frequency modulation on each of the N fourth ultrasonic signals to facilitate cross-correlation calculation of the signals, thereby facilitating the first electronic device to extract characteristic signals.

[0115] Optionally, in an embodiment of the present application, in the above step 202b, "the first electronic device generates X random numbers based on the first random factor, processes the third ultrasonic signal based on the X random numbers, and obtains X single-frequency signals corresponding to the X random numbers" can be specifically implemented by the following steps 202b1 and 202b2.

[0116] Step 202b1: The first electronic device adds the ratio between the bandwidth of the third ultrasonic signal and the first random number to the starting frequency of the third ultrasonic signal to obtain the first frequency.

[0117] In the embodiment of the present application, the first random number is one of X random numbers.

[0118] In the embodiment of the present application, the number of the above-mentioned random numbers is preset by the first electronic device.

[0119] Exemplarily, the first electronic device may obtain the first frequency by using the following formula (5).

[0120]

[0121] Where F is the first frequency, M x is the starting frequency of the third ultrasonic signal, B is the bandwidth of the third ultrasonic signal, and R is the random number corresponding to the third ultrasonic signal.

[0122] Step 202b2: The first electronic device uses the single-frequency signal corresponding to the first frequency in the third ultrasonic signal as the single-frequency signal corresponding to the first random number, so as to obtain X single-frequency signals corresponding to the X random numbers.

[0123] In the embodiment of the present application, the first electronic device can separate a single-frequency signal corresponding to the third ultrasonic signal from a third ultrasonic signal according to the first frequency, and then use it as the single-frequency signal corresponding to the first random number.

[0124] Exemplarily, taking 1 sub-band, 3 random numbers corresponding to the sub-band, and a bandwidth of each sub-band of 1000 Hz as an example, assuming that the frequency band range of sub-band 1 is 19 kHz to 20 kHz, and the 3 random numbers are 20, 6, and 10 respectively; for sub-band 1, the single-frequency frequencies corresponding to sub-band 1 are 19000+1000 / 20, 19000+1000 / 6, and 19000+1000 / 10 respectively, that is, the single-frequency frequencies corresponding to band 1 are 19050 Hz, 19166, and 19100 Hz respectively.

[0125] It should be noted that, for each of the X single-frequency signals, the first electronic device can obtain the single-frequency signal corresponding to each of the X random numbers through the above embodiments, which will not be described here to avoid repetition.

[0126] In an embodiment of the present application, the single-frequency signal obtained by the first electronic device through the user information of the user, even if the frequency band of each of the N third ultrasonic signals is the same, but the random numbers corresponding to each of the N third ultrasonic signals after encoding are different, then each of the N third ultrasonic signals after encoding is also different, thereby improving the utilization rate of near-ultrasound.

[0127] Optionally, in the embodiment of the present application, the step 202b of “mixing and encoding the X single-frequency signals and the third ultrasonic signal to obtain an encoded third ultrasonic signal” can be specifically implemented by the following step 202b2.

[0128] Step 202b2: The first electronic device mixes and encodes the X single-frequency signals and the third ultrasonic signal in the time domain to obtain an encoded third ultrasonic signal.

[0129] In the embodiment of the present application, the first electronic device may perform an inverse Fourier transform on each of the X single-frequency signals, thereby converting the X single-frequency signals from the frequency domain to the time domain; and the first electronic device may perform an inverse Fourier transform on the third ultrasonic signal, thereby converting the third ultrasonic signal from the frequency domain to the time domain; then the first electronic device may superimpose each of the X single-frequency signals in the time domain with the third ultrasonic signal in the time domain, to obtain an encoded third ultrasonic signal.

[0130] It should be noted that the above only obtains multiple single-frequency signals corresponding to a third ultrasonic signal. For the multiple single-frequency signals corresponding to each of the N third ultrasonic signals, the first electronic device can be implemented through the above embodiment. To avoid repetition, it will not be repeated here.

[0131] For example, as shown in Table 1, assuming that near-ultrasound is divided into 5 sub-frequency bands, each sub-frequency band is further divided into 2 single-frequency signals, and the bandwidth B is 1000 Hz; then a total of 10 ultrasonic signals can be encoded.

[0132] Table 1

[0133]

[0134] Optionally, in the embodiment of the present application, after obtaining a plurality of encoded third ultrasonic signals, that is, the N first ultrasonic signals mentioned above, the first electronic device may combine the N first ultrasonic signals to obtain a first reference signal set.

[0135] Optionally, in an embodiment of the present application, the first electronic device may, according to positioning requirements, assign a state to each encoded third ultrasonic signal in the first reference signal set in advance. For details, please refer to the following embodiments, which will not be described again here to avoid repetition.

[0136] Optionally, in the embodiment of the present application, as shown in Table 2, it is proved through experiments that the r value of the single-frequency signal is the lowest, and the r value of the linear frequency modulation signal is the largest; the r value of the linear frequency modulation signal is significantly greater than that of the single-frequency signal; the linear frequency modulation signal superimposed with a certain single-frequency signal has resolution. Considering that public places are themselves interfered by external signals; therefore, the time domain superposition signal of the linear frequency modulation signal and the single-frequency signal can improve the utilization rate of the bandwidth and have anti-interference ability; wherein, the r value is used to characterize the cross-correlation between a third ultrasonic signal and a third ultrasonic signal after encoding.

[0137] Table 2

[0138]

[0139]

[0140] Among them, standard LFM signal: 19kHz-20kHz; signal A: 19kHz-20kHz superimposed on 19250Hz; signal B: 19kHz-20kHz superimposed on 20250Hz; signal C: single frequency signal 19250Hz.

[0141] In the embodiment of the present application, the time domain superposition signal of the linear frequency modulation signal and the single frequency signal can improve the utilization rate of the bandwidth and at the same time have anti-interference ability, thereby avoiding the signal interference phenomenon that exists when the first electronic device receives the reply signal of the near-ultrasonic signal, and improving the accuracy of the indoor positioning of the first electronic device.

[0142] Optionally, in the embodiment of the present application, combined with Figure 2 ,like Figure 8 As shown, in the above step 204, "after the first electronic device receives the second ultrasonic signal", the positioning method provided in the embodiment of the present application also includes the following steps 301 to 303; and the above step 204, "determining that the second ultrasonic signal corresponds to the third electronic device" can be specifically implemented through the following step 204a.

[0143] Step 301: A first electronic device obtains a first reference signal set.

[0144] In the embodiment of the present application, the above-mentioned first reference signal set includes N first ultrasonic signals.

[0145] In the embodiment of the present application, the first electronic device may obtain the first reference signal set from a storage unit of the first electronic device.

[0146] Optionally, in an embodiment of the present application, the above-mentioned storage unit may be a hard disk storage unit or a memory unit.

[0147] Step 302: The first electronic device performs a cross-correlation operation on the second ultrasonic signal and each of the N first ultrasonic signals to obtain N first correlation values ​​corresponding to the N first ultrasonic signals.

[0148] In the embodiment of the present application, one first correlation value among the N first correlation values ​​is used to represent the similarity between the second ultrasonic signal and a first ultrasonic signal.

[0149] Exemplarily, the first electronic device may obtain a first correlation value between the second ultrasonic signal and a first ultrasonic signal by using the following formula (6).

[0150]

[0151] Among them, R(x, y, τ) is the above-mentioned first correlation value, x is a first ultrasonic signal, y is a second ultrasonic signal, t is the above-mentioned first time length, and τ is a time constant.

[0152] It should be noted that, for each of the N first ultrasonic signals, the first electronic device can obtain N first correlation values ​​through the above embodiments; to avoid repetition, they are not described again here.

[0153] Step 303: The first electronic device uses the first ultrasonic signal corresponding to the first correlation value greater than or equal to the first threshold value among the N first correlation values ​​and the largest one among the N first correlation values ​​as the first reference signal.

[0154] Optionally, in the embodiment of the present application, the first threshold may be preset by the first electronic device.

[0155] In an embodiment of the present application, after obtaining N first correlation values, the first electronic device can compare the N first correlation values ​​with the first threshold respectively, and then determine multiple third correlation values ​​that are greater than or equal to the first threshold from the N first correlation values; then, compare the multiple third correlation values ​​respectively to determine the fourth correlation value with the largest correlation value from the multiple third correlation values, and finally use the first ultrasonic signal corresponding to the fourth correlation value as the first reference signal.

[0156] Step 204a: When the signal identifier corresponding to the first reference signal is the signal identifier of the third electronic device, the first electronic device determines that the second ultrasonic signal corresponds to the third electronic device.

[0157] Optionally, in an embodiment of the present application, the above-mentioned signal identifier is used to indicate a third electronic device.

[0158] Optionally, in the embodiment of the present application, the signal identifier may be any one of the following: a Chinese identifier, an English identifier, or a symbol identifier, etc. The specific identifier may be determined according to actual use requirements, and the embodiment of the present application does not limit the identifier.

[0159] In the embodiment of the present application, the first electronic device may determine the signal identifier corresponding to the first reference signal from the first ultrasonic signal resource matching table.

[0160] Exemplarily, as shown in Table 3, after the first electronic device obtains N first ultrasonic signals, the first electronic device can assign a corresponding ultrasonic signal resource identifier, a signal identifier of the second electronic device, a motion state identifier, and a motion direction identifier to each of the N first ultrasonic signals, and store the corresponding ultrasonic signal resource identifier, the signal identifier of the second electronic device, the motion state identifier, and the motion direction identifier assigned to each of the N first ultrasonic signals in Table 3, i.e., the above-mentioned first ultrasonic signal resource matching table.

[0161] Table 3

[0162]

[0163] For example, Fig. 9As shown, the following specifically explains how the first electronic device determines that the second ultrasonic signal corresponds to the third electronic device through a specific example. Specifically, it can be implemented through the following steps 20 to 26.

[0164] Step 20: The first electronic device records the second ultrasonic signal through a microphone.

[0165] Step 21: The first electronic device performs high-pass filtering on the second ultrasonic signal.

[0166] Step 22: The first electronic device performs frequency domain conversion on the filtered second ultrasonic signal to obtain a second ultrasonic signal in the frequency domain.

[0167] In the embodiment of the present application, the first electronic device may perform Fourier transform on the filtered second ultrasonic signal, thereby converting the second ultrasonic signal in the time domain into a second ultrasonic signal in the frequency domain.

[0168] Step 23: The first electronic device performs a cross-correlation operation on the second ultrasonic signal and each reference signal in the first reference signal set to obtain multiple correlation values.

[0169] Step 24: The first electronic device detects whether there is a corresponding ultrasonic signal.

[0170] In the embodiment of the present application, when the first electronic device detects a corresponding ultrasonic signal, the following step 25 may be executed; when the first electronic device does not detect a corresponding ultrasonic signal, subsequent operations may not be executed.

[0171] Step 25: The first electronic device obtains an ultrasonic signal resource matching table.

[0172] Step 26: The first electronic device determines, according to the first ultrasonic signal resource matching table, that the second ultrasonic signal corresponds to the third electronic device.

[0173] As another example, Fig.10 As shown, the following specifically explains the process of encoding and decoding the ultrasonic signal in the positioning method provided in the embodiment of the present application.

[0174] After determining the number of at least two electronic devices, the first electronic device can obtain user information of the user to which the first electronic device belongs, and then obtain a random number through the user information; then the first electronic device can split the near-ultrasonic signal to obtain multiple near-ultrasonic signals after splitting, and generate a single-frequency signal corresponding to each ultrasonic signal according to each ultrasonic signal in the multiple near-ultrasonic signals and the random number corresponding to each ultrasonic signal; then, the single-frequency signal corresponding to each ultrasonic signal is mixed and encoded with the multiple near-ultrasonic signals after splitting to obtain multiple first ultrasonic signals, and the multiple first ultrasonic signals are matched with each electronic device in the at least two electronic devices; when receiving the second ultrasonic signal sent by the third electronic device, considering the scenario of multi-user use, the signals of multiple nodes may conflict and overlap, and the first electronic device first needs to use multi-path matching filtering to perform cross-correlation operation on the preset frequency modulation signal and the received signal; decode various frequency modulation signals from the received signal; and then estimate based on the energy threshold to decode the user information.

[0175] In an embodiment of the present application, after receiving the second ultrasonic signal, the first electronic device can determine whether the received second ultrasonic signal is sent by the third electronic device through the first ultrasonic signal resource matching table. When it is determined that the second ultrasonic signal is sent by the third electronic device, the first electronic device can perform ranging, thereby avoiding the phenomenon of signal interference when the first electronic device receives a reply signal of a near ultrasonic signal, thereby improving the accuracy of positioning of the first electronic device.

[0176] Optionally, in an embodiment of the present application, each of the above-mentioned N first ultrasonic signals corresponds to an ultrasonic signal resource identifier, and each of the N ultrasonic signal resource identifiers indicates the motion state, orientation information and corresponding second electronic device of the corresponding first ultrasonic signal.

[0177] For example, in combination Figure 2 ,like Fig.11 As shown, before the above step 203, the positioning method provided by the embodiment of the present application also includes the following step 401, and after the above step 204, the positioning method provided by the embodiment of the present application also includes the following step 402.

[0178] Step 401: After obtaining N first ultrasonic signals, the first electronic device sends a corresponding first ultrasonic signal to each of the N second electronic devices.

[0179] Optionally, in the embodiment of the present application, the first electronic device may be connected to each of the N second electronic devices.

[0180] Optionally, in the embodiment of the present application, the first electronic device may be connected to each of the N second electronic devices via Wireless Fidelity (WiFi) or Bluetooth.

[0181] In an embodiment of the present application, a first electronic device may respectively send a corresponding first message to each of N second electronic devices, where the first message carries a corresponding ultrasonic signal sent by each of the N second electronic devices. One first message corresponds to one second electronic device, and the number of ultrasonic signals carried in the first message may be one or more.

[0182] Optionally, in an embodiment of the present application, the first electronic device may receive a reply message sent by each of the N second electronic devices, where the reply message is used to indicate that each of the N second electronic devices has received the first message.

[0183] Optionally, in an embodiment of the present application, the first electronic device may send a first message to each of the N second electronic devices via WiFi; or, the first electronic device may send a first message to each of the N second electronic devices via Bluetooth; or, the first electronic device may send a first message to each of the N second electronic devices via a local area network.

[0184] Step 402: The first electronic device determines the movement direction of the third electronic device based on the azimuth information indicated by the ultrasonic signal resource identifier corresponding to the second ultrasonic signal, and displays the direction identifier of the movement direction of the third electronic device on the first electronic device.

[0185] In the embodiment of the present application, after receiving the second ultrasonic signal, the first electronic device may query the ultrasonic signal resource matching table and determine the movement direction of the third electronic device through the ultrasonic signal resource matching table.

[0186] Optionally, in an embodiment of the present application, the first electronic device may display a direction indicator of the movement direction of the third electronic device in a positioning interface of a positioning application; or, the first electronic device may display a direction indicator of the movement direction of the third electronic device in a pop-up window; or, the first electronic device may display a direction indicator of the movement direction of the third electronic device in a screen component of the first electronic device, such as an atomic island.

[0187] Optionally, in the embodiment of the present application, the first electronic device may display a direction indicator of the movement direction of the third electronic device while displaying the position information between the first electronic device and the third electronic device.

[0188] Optionally, in an embodiment of the present application, the first electronic device can detect in real time a first distance between the first electronic device and the third electronic device. When the first distance exceeds a distance threshold, such as 10 meters, the first electronic device can play a warning sound and display on the first electronic device that the third electronic device has exceeded the safety distance.

[0189] For example, Fig.12 As shown, the first electronic device can determine the location information between the first electronic device and the third electronic device based on the target first ultrasonic signal and the second ultrasonic signal, and determine the movement direction of the third electronic device through the movement direction corresponding to the second ultrasonic signal; and display the location information between the first electronic device and the third electronic device and the movement direction of the third electronic device on the screen of the first electronic device. In addition, when the first electronic device detects that the first distance between the first electronic device and the third electronic device exceeds 10 meters, it can play a warning tone and display the abnormal distance on the screen of the first electronic device.

[0190] Exemplarily, the above embodiments are explained below through specific examples.

[0191] The near ultrasonic signal emitted by the first electronic device can measure the distance between the two devices. In this system, the master device must be set first, which is used to generate pseudo-random factors and encode ultrasonic signals. The slave device added to the early warning system is assigned a device ID, ultrasonic signal resources for ranging, and signal resources carrying motion status, and the device is added to the active device list.

[0192] The master device maintains multiple lists to facilitate resource management and control.

[0193] List 1: Ultrasonic signal resource list for ranging

[0194] List 2: Slave device ID list

[0195] Listing 3: List of slave devices to which signals have been assigned

[0196] The master and slave devices will send out corresponding ultrasonic signals according to the time-division multiplexing ultrasonic frequency band; the master and slave devices will measure each other's distance. When the distance between the slave device and the master device exceeds a predetermined threshold, an abnormal display will be made on the display screen of the master device, showing how far the currently detected slave device is from the master device and whether it is in motion; at the same time, the master device can support the playback of abnormal warning sounds. The master and slave devices designed by the present invention can support mutual distance measurement, and the slave device can also send out corresponding warning prompt sound information.

[0197] When multiple devices participate in early warning, the present invention can perform mutual distance measurement between master and slave devices, and expand it to mutual distance measurement between slave devices. After the master device performs mixed encoding on the ultrasonic signal used for distance measurement, it allocates corresponding signal resources to each slave device added to the early warning system. Since each device knows its own device ID and ultrasonic signal resource ID, it also knows the basic information of other devices in the system. When mutual distance measurement is required between slave devices, it only needs to periodically send the ultrasonic signal that needs to be measured according to the ultrasonic signal resource ID allocated by the master device.

[0198] In the embodiment of the present application, the N first ultrasonic signals generated by the first electronic device can transmit more information status at the same time, thereby improving the utilization rate of near-ultrasound; by encoding the ultrasonic signals, the distance and motion status of the access device can be monitored in real time; the visual warning dimension is increased, thereby improving the accuracy of the visual warning.

[0199] Optionally, in the embodiment of the present application, the above step 203 can be specifically implemented by the following step 203a or step 203b or step 203c.

[0200] Step 203a: When the number of at least two second electronic devices is greater than or equal to the second threshold and an ultrasonic signal is detected in the current environment, the first electronic device sends N first ultrasonic signals in sequence after the second time period.

[0201] In the embodiment of the present application, the second duration is determined based on a first random back-off coefficient and a period for sending the first ultrasonic signal, and the first random back-off coefficient is determined based on a first random factor.

[0202] Optionally, in the embodiment of the present application, the second threshold may be preset by the first electronic device.

[0203] Optionally, in the embodiment of the present application, the first electronic device may detect whether there is a fourth ultrasonic signal in the current environment through an ultrasonic sensor.

[0204] Optionally, in the embodiment of the present application, after obtaining the first random factor, the first electronic device may generate a first random number through a random function, and use the first random number as a first random back-off coefficient, and then multiply the first random back-off coefficient by the period of the first electronic device sending the first ultrasonic signal to obtain the second duration. This may be specifically achieved through the following formula (7).

[0205] S=p*T (7)

[0206] Wherein, S is the second duration, P is the first random back-off coefficient, and T is the period for the first electronic device to send the first ultrasonic signal.

[0207] It should be noted that the process of the first electronic device acquiring the first random factor can be found in the above embodiment in detail, and will not be described again here to avoid repetition.

[0208] Step 203b: When the number of at least two second electronic devices is greater than or equal to the first number threshold and no ultrasonic signal is detected in the current environment, the first electronic device sends N first ultrasonic signals in sequence.

[0209] Exemplarily, the above steps 203a and 203b are explained in detail below through a specific scenario.

[0210] For multi-user scenarios, when there are multiple user groups participating in positioning, each device polls to send ultrasonic signals for ranging. Since there are many users, the frequency bands of the N first ultrasonic signals obtained by the first electronic device may be relatively close. At this time, there may be conflicts between the ultrasonic signals of multiple user groups. For this scenario, it is necessary to expand the hybrid coding logic and add environmental signal detection to confirm whether there is an ultrasonic signal in the current environment.

[0211] Assume there are three user groups, such as Fig.13 As shown, the user nodes in the user group are defined as (Gx-i, i=1,2,N. Where x=1,2,3). According to the above two-way ranging, for a certain user group, each node theoretically only needs to send N-1 ultrasonic signals. For example, node G1-1 needs to perform mutual ranging with node G1-2 and node N respectively. However, sound signals have broadcast characteristics. When a node sends a signal, as long as the signal-to-noise ratio meets the requirements, other nodes will monitor and receive the ultrasonic information.

[0212] When each device node needs to send data, when the mobile phone detects that there is no ultrasonic signal in the environment, that is, the communication channel is idle, the device can immediately send out a ranging ultrasonic signal. When the channel is detected to be non-idle, the current node will wait according to the preset backoff time, that is, the second time length mentioned above.

[0213] Optionally, in an embodiment of the present application, after waiting for the second period of time, the first electronic device can detect again whether there is an ultrasonic signal in the current environment. If an ultrasonic signal still exists, it can continue to wait for the second period of time. If no ultrasonic signal is detected, N first ultrasonic signals can be sent in sequence.

[0214] For example, Fig.14 As shown, the above step 203a and step 203b are explained in detail below. Specifically, they can be implemented through the following steps 30 to 35.

[0215] Step 30: User devices of user group GX participate in positioning warning.

[0216] Step 31: The master device in the user group GX distributes ultrasonic signals to each slave device in the user group GX.

[0217] Step 32: The master device generates a random back-off coefficient.

[0218] Step 33: For the user group GX, the master device determines whether there is an ultrasonic signal in the current environment through the recorded sound signal.

[0219] In the embodiment of the present application, when the main device detects the presence of an ultrasonic signal in the current environment, the back-off duration is calculated based on the random back-off coefficient and the signal sending period.

[0220] Step 34: When the master device detects that there is an ultrasonic signal in the current environment, execute step 35 after the retreat time.

[0221] Step 35: When the master device does not detect the existence of an ultrasonic signal in the current environment, the master device sends an ultrasonic signal.

[0222] Step 203c: When the number of at least two second electronic devices is less than the first number threshold, the first electronic device sends N first ultrasonic signals in sequence.

[0223] It can be understood that, when the number of at least two second electronic devices is less than the first number threshold, the N first ultrasonic signals obtained by the first electronic device usually will not have signal interference, so there is no need to perform random back-off.

[0224] In the embodiment of the present application, for positioning involving multiple user groups, the random back-off mechanism can reduce conflicts between ultrasonic signals and reduce signal interference; improve the bandwidth utilization of ultrasound; and for near-ultrasound with limited frequency domain, a pseudo-random mixed coding scheme is proposed; a random back-off mechanism is used to reduce conflicts; and the number of devices connected simultaneously can be increased without reducing positioning accuracy.

[0225] The present application embodiment provides a positioning method. Fig.15 FIG. 1 is a flow chart of a positioning method provided by an embodiment of the present application, which can be applied to a third electronic device. Fig.15 As shown, the positioning method provided in the embodiment of the present application may include the following steps 501 and 502.

[0226] Step 501: A third electronic device sends a second ultrasonic signal.

[0227] In the embodiment of the present application, the second ultrasonic signal is one of K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, and K is an integer greater than 1.

[0228] Optionally, in the embodiment of the present application, the third electronic device may send a second ultrasonic signal through a microphone.

[0229] It should be noted that the third electronic device sends the second ultrasonic signal by broadcasting.

[0230] Step 502: After receiving the target first ultrasonic signal, if the third electronic device determines that the target first ultrasonic signal corresponds to the first electronic device, determine the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal.

[0231] Optionally, in an embodiment of the present application, the third electronic device may receive the seventh ultrasonic signal through a microphone in the third electronic device, and then the third electronic device may perform high-pass filtering on the seventh ultrasonic signal to obtain a filtered seventh ultrasonic signal, and finally use the filtered seventh ultrasonic signal as the above-mentioned target first ultrasonic signal.

[0232] It should be noted that, since the third electronic device receives the sixth ultrasonic signal through a microphone, the first electronic device can remove noise signals in the environment, such as human voice signals, by performing high-pass filtering on the seventh ultrasonic signal.

[0233] In the embodiment of the present application, the third electronic device can determine the position information between the third electronic device and the first electronic device according to the position information carried by the target first ultrasonic signal and the position information of the third electronic device; and calculate the distance information between the first electronic device and the third electronic device according to the third time length and the propagation speed of the second ultrasonic signal. The third time length is the time length between the third electronic device sending the second ultrasonic signal and receiving the target first ultrasonic signal.

[0234] It should be noted that the specific process can be found in the above embodiments, and will not be described again here to avoid repetition.

[0235] In the embodiment of the present application, since the second ultrasonic signal is one of the K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, after the third electronic device receives the target first ultrasonic signal sent by the first electronic device, it can parse the target first ultrasonic signal, and when it is determined that the target first ultrasonic signal is sent by the first electronic device, the position information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal; it can be understood that when the third electronic device determines that the target first ultrasonic signal is not sent by the first electronic device, the third electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the third electronic device receives the reply signal of the near ultrasonic signal, thereby improving the accuracy of indoor positioning of the third electronic device.

[0236] Optionally, in the embodiment of the present application, in the above step 502 “after receiving the first ultrasonic signal of the target”, the positioning method provided in the embodiment of the present application may also include the following steps 601 to 604.

[0237] Step 601: A third electronic device obtains a second reference signal set.

[0238] In the embodiment of the present application, the second reference signal set includes K first ultrasonic signals.

[0239] In the embodiment of the present application, the third electronic device may obtain the second reference signal set from a storage unit of the third electronic device.

[0240] Optionally, in an embodiment of the present application, the above-mentioned storage unit may be a hard disk storage unit or a memory unit.

[0241] Step 602: The third electronic device performs cross-correlation operations on the target first ultrasonic signal and each fourth ultrasonic signal in the K first ultrasonic signals, respectively, to obtain K second correlation values ​​corresponding to the K fourth ultrasonic signals.

[0242] In the embodiment of the present application, one second correlation value among the K second correlation values ​​is used to characterize the similarity between the target first ultrasonic signal and a fourth ultrasonic signal.

[0243] It should be noted that the specific implementation process can be found in the above embodiments, and will not be described again here to avoid repetition.

[0244] Step 603: The third electronic device uses a fourth ultrasonic signal corresponding to a second correlation value among the K second correlation values ​​that is greater than or equal to the third threshold and is the largest among the K second correlation values ​​as a second reference signal.

[0245] Optionally, in the embodiment of the present application, the third threshold may be preset by the third electronic device.

[0246] In an embodiment of the present application, after obtaining K second correlation values, the third electronic device may compare the K first correlation values ​​with the second threshold respectively, and then determine multiple fourth correlation values ​​greater than or equal to the second threshold from the K first correlation values; then, compare the multiple fourth correlation values ​​respectively to determine the fifth correlation value with the largest correlation value from the multiple fourth correlation values, and finally use the fourth ultrasonic signal corresponding to the fifth correlation value as the second reference signal.

[0247] Step 604: When the signal identifier corresponding to the second reference signal is the signal identifier of the first electronic device, the third electronic device determines that the target first ultrasonic signal corresponds to the first electronic device.

[0248] In the embodiment of the present application, the third electronic device may determine the signal identifier corresponding to the second reference signal from the second ultrasonic signal resource matching table.

[0249] Optionally, in the embodiment of the present application, the second ultrasonic signal resource matching table may be sent by the first electronic device to the third electronic device.

[0250] It should be noted that the second ultrasonic signal resource matching table only includes ultrasonic signal resource identifiers corresponding to the K first ultrasonic signals, signal identifiers of the first electronic device, motion state identifiers, and motion orientation identifiers.

[0251] In an embodiment of the present application, after receiving the target first ultrasonic signal, the third electronic device can determine whether the received target first ultrasonic signal is sent by the first electronic device through the second ultrasonic signal resource matching table. When it is determined that the target first ultrasonic signal is sent by the first electronic device, the third electronic device can perform ranging, thereby avoiding the signal interference phenomenon that exists when the third electronic device receives the reply signal of the near ultrasonic signal, thereby improving the accuracy of positioning of the third electronic device.

[0252] Optionally, in an embodiment of the present application, after the above step 502, the positioning method provided in the embodiment of the present application further includes the following step 701.

[0253] Step 701: When the position information between the third electronic device and the first electronic device is greater than or equal to a fourth threshold, the third electronic device plays a warning tone.

[0254] In the embodiment of the present application, the third electronic device can detect the distance between itself and the first electronic device in real time, so that when the distance between the third electronic device and the first electronic device is greater than or equal to a fourth threshold, the third electronic device plays a warning tone.

[0255] In the embodiment of the present application, the third electronic device can obtain the distance information between itself and the first electronic device in real time, so that when the distance information exceeds the fourth threshold, the third electronic device can remind the user by playing a warning tone.

[0256] Optionally, in an embodiment of the present application, the second ultrasonic signal corresponds to an ultrasonic signal resource identifier, and the ultrasonic signal resource identifier indicates the motion state and orientation information of the corresponding second ultrasonic signal.

[0257] Exemplarily, the above step 501 can be specifically implemented through the following step 501a.

[0258] Step 501a: The third electronic device sends a second ultrasonic signal corresponding to the movement direction and movement state to the first electronic device based on the current movement direction and movement state of the third electronic device.

[0259] Optionally, in the embodiment of the present application, the third electronic device may obtain the motion direction and motion state of the third electronic device through a motion sensor in the third electronic device.

[0260] Optionally, in the embodiment of the present application, the motion sensor may include at least one of the following: a gyroscope sensor, an acceleration sensor, and a vibration sensor, which may be determined according to actual use requirements and is not limited in the embodiment of the present application.

[0261] Optionally, in an embodiment of the present application, after determining the current motion direction and motion state, the third electronic device may search for a matching ultrasonic signal from the second ultrasonic signal resource matching table, and then use the ultrasonic signal as the second ultrasonic signal and send the second ultrasonic signal.

[0262] In the embodiment of the present application, the second ultrasonic signal passed by the third electronic device can simultaneously transmit more information states, thereby improving the utilization rate of the near-ultrasonic signal.

[0263] Optionally, in the embodiment of the present application, the above step 501 can be specifically implemented by the following step 501b or step 501c.

[0264] Step 501b: When an ultrasonic signal is detected in the current environment, the third electronic device sends a second ultrasonic signal after a third time period.

[0265] In the embodiment of the present application, the third duration is determined based on a second random back-off coefficient and a period for sending the second ultrasonic signal, and the second random back-off coefficient is determined based on a second random factor.

[0266] Optionally, in the embodiment of the present application, the third electronic device may detect whether there is a sixth ultrasonic signal in the current environment through an ultrasonic sensor.

[0267] Optionally, in an embodiment of the present application, the second random factor is based on user information of a user to which the third electronic device belongs, and a hash operation is performed on the user information to obtain a fixed 64-bit string, which is the second random factor.

[0268] Optionally, in the embodiment of the present application, the third electronic device may generate a random integer from the second random factor through a random function, and the random integer is the second random back-off coefficient.

[0269] In the embodiment of the present application, after obtaining the second random back-off coefficient, the third electronic device may multiply the second random back-off coefficient by the period at which the third electronic device sends the second ultrasonic signal to obtain the third duration.

[0270] Step 501c: When no ultrasonic signal is detected in the current environment, the third electronic device sends a second ultrasonic signal.

[0271] Optionally, in the embodiment of the present application, the third electronic device may send a second ultrasonic signal through a microphone.

[0272] In the embodiment of the present application, for positioning involving multiple user groups, the random back-off mechanism can reduce conflicts between ultrasonic signals and reduce signal interference; improve the bandwidth utilization of ultrasound; and for near-ultrasound with limited frequency domain, a pseudo-random mixed coding scheme is proposed; a random back-off mechanism is used to reduce conflicts; and the number of devices connected simultaneously can be increased without reducing positioning accuracy.

[0273] The above-mentioned method embodiments, or various possible implementation methods in each method embodiment, can be executed separately, or, under the premise that there is no contradiction, can also be executed in combination with each other. The specific implementation can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0274] By way of example, the positioning method provided in the embodiment of the present application is explained below through a specific example, which can be implemented through the following steps 50 to 59.

[0275] Step 50: The user of the first electronic device registers with the positioning system and fills in basic personal information.

[0276] Step 51: The first electronic device generates a random factor based on the user's basic personal information.

[0277] Step 52: The first electronic device sets basic parameters of the positioning system.

[0278] Optionally, in the embodiment of the present application, the basic parameters may be divided into X sub-frequency bands for near-ultrasound, and each sub-frequency band randomly generates Y single-frequency signals.

[0279] Step 53: The first electronic device obtains N first ultrasonic signals through the above random factors and basic parameters.

[0280] Step 54: The first electronic device is connected to at least two second electronic devices, and basic configuration information is allocated to each of the at least two second electronic devices.

[0281] Optionally, in an embodiment of the present application, the above basic configuration information may include: device ID, ultrasonic signal resource ID.

[0282] Step 55: The first electronic device and the third electronic device respectively start the ultrasonic transmission and recording modules.

[0283] In the embodiment of the present application, the third electronic device is the other one of the at least two second electronic devices.

[0284] In the embodiment of the present application, the first electronic device has already allocated a resource for the ultrasonic signal ID and periodically sends an ultrasonic signal; the third electronic device only sends the ultrasonic signal allocated to itself.

[0285] Optionally, in an embodiment of the present application, when the first electronic device detects that the number of second electronic devices connected to the first electronic device is greater than or equal to a threshold and detects the presence of an ultrasonic signal in the current environment, the first electronic device may periodically send an ultrasonic signal after a second time period.

[0286] Optionally, in the embodiment of the present application, when the third electronic device detects the presence of an ultrasonic signal in the current environment, the third electronic device may send an ultrasonic signal assigned to itself after a third time period.

[0287] Step 56: The first electronic device receives the ultrasonic signal sent by the third electronic device and first uses multi-path matching filtering, then decodes the corresponding frequency modulation signal from the received signal based on the signal cross-correlation calculation principle, and confirms the decoded device ID based on the above configuration information.

[0288] Step 57: The first electronic device determines whether the current situation is abnormal based on the preset distance warning threshold, and displays the current distance position, movement status, and possible direction on the screen. A prompt tone may be played based on the preset conditions.

[0289] Step 58: The third electronic device receives the ultrasonic signal sent by the first electronic device and first uses multi-path matching filtering, then decodes the corresponding frequency modulation signal from the received signal based on the signal cross-correlation calculation principle, and confirms the decoded device ID based on the above configuration information.

[0290] Step 59: The third electronic device determines whether there is an abnormality at present according to a preset distance warning threshold value; and plays a prompt tone according to a preset condition.

[0291] For example, Fig.16 As shown, the embodiment of the present application provides an early warning system, which can be implemented through the following steps 60 to 65.

[0292] Step 60: The master device first registers the system.

[0293] Step 61: The master device generates an ultrasonic signal.

[0294] Step 62: The slave device joins the system, and the master device distributes basic configuration information to the slave device.

[0295] Step 63: Add the slave device to the active list.

[0296] Step 64: The master and slave devices take out ultrasonic signals from the ultrasonic resource matching table and send out ultrasonic signals in sequence.

[0297] Step 65: The master and slave devices enable recording modules to perform ultrasonic recording and decode the received ultrasonic signals.

[0298] Step 66: The master device starts polling detection.

[0299] Step 67: The master device determines whether the slave device X is detected.

[0300] In the embodiment of the present application, if the slave device X is not detected, the master device continues to execute step 66; if the slave device X is detected, step 68 is executed.

[0301] Step 68: The master device determines whether the distance exceeds a threshold.

[0302] In the embodiment of the present application, when the distance does not exceed the threshold, step 66 is continued to be executed; when the distance exceeds the threshold, step 69 is executed.

[0303] Step 69: The master device displays the distance on the screen and plays a prompt tone.

[0304] For example, Fig.17 As shown, the embodiment of the present application provides an early warning system. Specifically, it can be implemented through the following steps 1 to 8.

[0305] Step 1: Join the early warning system from the device.

[0306] Step 2: Get configuration information from the device.

[0307] Step 3: Start the ultrasonic transmission from the device and send ultrasonic waves periodically.

[0308] Step 4: Enable the recording module from the device to perform ultrasonic recording and decode the ultrasonic signal.

[0309] Step 5: Poll the slave device for detection.

[0310] Step 6: The slave device detects the master device.

[0311] Step 7: The slave device determines whether the distance exceeds a threshold.

[0312] In the embodiment of the present application, when the distance does not exceed the threshold, the slave device executes step 5, and when the distance exceeds the threshold, the slave device executes step 8.

[0313] Step 8. Play the prompt tone from the device.

[0314] In the embodiment of the present application, after the first electronic device processes the near-ultrasonic signal, each of the N first ultrasonic signals obtained can correspond to a second electronic device, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals. Therefore, after the first electronic device sends the target first ultrasonic signal corresponding to the third electronic device and the first electronic device receives the second ultrasonic signal, the second ultrasonic signal can be analyzed. When it is determined that the second ultrasonic signal is sent by the third electronic device, the position information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the first electronic device determines that the second ultrasonic signal is not sent by the third electronic device, the first electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the first electronic device receives the reply signal of the near-ultrasonic signal, thereby improving the accuracy of positioning of the first electronic device.

[0315] It should be noted that the positioning method provided in the embodiment of the present application can be executed by a positioning device. In the embodiment of the present application, the positioning method performed by the positioning device is taken as an example to illustrate the positioning device provided in the embodiment of the present application.

[0316] Fig.18 FIG. 1 is a schematic diagram showing a possible structure of a positioning device involved in an embodiment of the present application. Fig.18 As shown, the positioning device 70 may include: a generating module 71 , a processing module 72 , a sending module 73 and a determining module 74 .

[0317] Among them, the generating module 71 is used to generate a near ultrasonic signal. The processing module 72 is used to process the near ultrasonic signal generated by the generating module 71 to obtain N first ultrasonic signals, each of which corresponds to a second electronic device, and N is a positive integer. The sending module 73 is used to sequentially send the N first ultrasonic signals processed by the processing module 72. The determining module 74 is used to, after receiving the second ultrasonic signal, determine the location information between the first electronic device and the third electronic device based on the second ultrasonic signal and the target first ultrasonic signal when it is determined that the second ultrasonic signal corresponds to the third electronic device, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal among the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals.

[0318] In a possible implementation, the processing module 72 is specifically used to split the near ultrasonic signal to obtain N third ultrasonic signals; and generate X random numbers based on the first random factor; and for each third ultrasonic signal, process the third ultrasonic signal based on the X random numbers to obtain X single-frequency signals corresponding to the X random numbers, and mix and encode the X single-frequency signals and the third ultrasonic signal to obtain the encoded third ultrasonic signal, one random number corresponds to one single-frequency signal, the first random factor is obtained by performing a hash operation on the user information of the user to which the first electronic device belongs, and X is an integer greater than 1; and use the encoded N third ultrasonic signals as N first ultrasonic signals.

[0319] In a possible implementation, the processing module 72 is specifically configured to add a ratio between the bandwidth of the third ultrasonic signal and the first random number to a starting frequency of the third ultrasonic signal to obtain a first frequency, and use a single-frequency signal corresponding to the first frequency in the third ultrasonic signal as a single-frequency signal corresponding to the first random number to obtain X single-frequency signals corresponding to X random numbers; wherein the first random number is one of the X random numbers.

[0320] In a possible implementation, the processing module 72 is specifically used to split the near ultrasonic signal to obtain N fourth ultrasonic signals; and perform linear frequency modulation on the N fourth ultrasonic signals respectively to obtain N frequency-modulated fourth ultrasonic signals; and use the N frequency-modulated fourth ultrasonic signals as N third ultrasonic signals.

[0321] In a possible implementation, the processing module 72 is specifically configured to mix and encode the X single-frequency signals and the third ultrasonic signal in the time domain to obtain an encoded third ultrasonic signal.

[0322] In a possible implementation, the positioning device 70 provided in the embodiment of the present application also includes an acquisition module. The acquisition module is used to acquire a first reference signal set after receiving the second ultrasonic signal, and the first reference signal set includes N first ultrasonic signals. The above-mentioned processing module 72 is also used to perform cross-correlation operations on the second ultrasonic signal and each first ultrasonic signal, respectively, to obtain N first correlation values ​​corresponding to the N first ultrasonic signals, and a first correlation value is used to characterize the similarity between the second ultrasonic signal and a first ultrasonic signal; and the first ultrasonic signal corresponding to the first correlation value greater than or equal to the first threshold value and the largest first correlation value among the N first correlation values ​​is used as the first reference signal. The above-mentioned processing module 72 is specifically used to determine that the second ultrasonic signal corresponds to the third electronic device when the signal identifier corresponding to the first reference signal is the signal identifier of the third electronic device.

[0323] In a possible implementation, each of the N first ultrasonic signals corresponds to an ultrasonic signal resource identifier, and each of the N ultrasonic signal resource identifiers indicates the motion state, orientation information, and corresponding second electronic device of the corresponding first ultrasonic signal. The sending module 73 is also used to send the corresponding first ultrasonic signal to each second electronic device respectively after obtaining the N first ultrasonic signals before sending the N first ultrasonic signals. The processing module 72 is also used to determine the motion direction of the third electronic device based on the orientation information indicated by the ultrasonic signal resource identifier corresponding to the second ultrasonic signal after determining the position information between the first electronic device and the third electronic device, and display the direction identifier of the motion direction of the third electronic device in the first electronic device.

[0324] In a possible implementation, the sending module 73 is specifically used to send N first ultrasonic signals in sequence after a second time period when the number of at least two second electronic devices is greater than or equal to a second threshold and an ultrasonic signal is detected in the current environment; or, to send N first ultrasonic signals in sequence when the number of at least two second electronic devices is greater than or equal to a first number threshold and no ultrasonic signal is detected in the current environment; or, to send N first ultrasonic signals in sequence when the number of at least two second electronic devices is less than the first number threshold; wherein the second time period is determined based on a first random back-off coefficient and a period for sending the first ultrasonic signal, and the first random back-off coefficient is determined based on a first random factor.

[0325] An embodiment of the present application provides a positioning device. After the positioning device processes the near-ultrasonic signal, each of the N first ultrasonic signals obtained can correspond to a second electronic device, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals. Therefore, after the positioning device sends the target first ultrasonic signal corresponding to the third electronic device and the positioning device receives the second ultrasonic signal, the second ultrasonic signal can be analyzed. When it is determined that the second ultrasonic signal is sent by the third electronic device, the position information between the positioning device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the positioning device determines that the second ultrasonic signal is not sent by the third electronic device, the positioning device may not perform any processing, thereby avoiding the phenomenon of signal interference when the positioning device receives the reply signal of the near-ultrasonic signal, thereby improving the accuracy of positioning by the positioning device.

[0326] Fig.19 FIG. 1 is a schematic diagram showing a possible structure of a positioning device involved in an embodiment of the present application. Fig.19 As shown, the positioning device 80 may include: a sending module 81 and a processing module 82 .

[0327] The sending module 81 is used to send a second ultrasonic signal, where the second ultrasonic signal is one of the K first ultrasonic signals, where the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, and K is an integer greater than 1. The processing module 82 is used to determine the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the target first ultrasonic signal and determining that the target first ultrasonic signal corresponds to the first electronic device.

[0328] In a possible implementation, the positioning device 80 provided in the embodiment of the present application also includes an acquisition module. The acquisition module is used to acquire a second reference signal set after receiving the target first ultrasonic signal, and the second reference signal set includes K first ultrasonic signals. The above-mentioned processing module 82 is also used to perform cross-correlation operations on the target first ultrasonic signal and each fourth ultrasonic signal in the K first ultrasonic signals, respectively, to obtain K second correlation values ​​corresponding to the K fourth ultrasonic signals, and a second correlation value is used to characterize the similarity between the target first ultrasonic signal and a fourth ultrasonic signal; and the fourth ultrasonic signal corresponding to the second correlation value greater than or equal to the third threshold value and the largest second correlation value among the K second correlation values ​​is used as the second reference signal; and when the signal identifier corresponding to the second reference signal is the signal identifier of the first electronic device, it is determined that the target first ultrasonic signal corresponds to the first electronic device.

[0329] In a possible implementation, the second ultrasonic signal corresponds to an ultrasonic signal resource identifier, and the ultrasonic signal resource identifier indicates the motion state and orientation information of the corresponding second ultrasonic signal. The sending module 81 is specifically configured to send the second ultrasonic signal corresponding to the motion direction and motion state to the first electronic device based on the current motion direction and motion state of the third electronic device.

[0330] In a possible implementation, the sending module 81 is specifically used to send a second ultrasonic signal after a third time period when an ultrasonic signal is detected in the current environment; or to send a second ultrasonic signal when no ultrasonic signal is detected in the current environment; wherein the third time period is determined based on a second random back-off coefficient and a period for sending the second ultrasonic signal, and the second random back-off coefficient is determined based on a second random factor.

[0331] The embodiment of the present application provides a positioning device. Since the second ultrasonic signal is one of K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, after the positioning device receives the target first ultrasonic signal sent by the first electronic device, the target first ultrasonic signal can be analyzed. When it is determined that the target first ultrasonic signal is sent by the first electronic device, the position information between the first electronic device and the positioning device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the positioning device determines that the target first ultrasonic signal is not sent by the first electronic device, the positioning device may not perform any processing, thereby avoiding the phenomenon of signal interference when the positioning device receives a reply signal of a near ultrasonic signal, thereby improving the accuracy of the positioning device in indoor positioning.

[0332] The positioning device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0333] The positioning device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0334] The positioning device provided in the embodiment of the present application can implement each process implemented in the above embodiment, and will not be described again here to avoid repetition.

[0335] Alternatively, if Fig. 20 As shown, an embodiment of the present application further provides an electronic device 90, including a processor 91 and a memory 92, wherein the memory 92 stores programs or instructions that can be executed on the processor 91, and when the program or instructions are executed by the processor 91, the various steps of the above-mentioned positioning method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0336] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0337] Fig.21 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0338] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.

[0339] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.21 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0340] When the electronic device is the first electronic device:

[0341] The processor 110 is used to generate a near ultrasonic signal and process the near ultrasonic signal to obtain N first ultrasonic signals, each of which corresponds to a second electronic device, where N is a positive integer. The radio frequency unit 101 is used to send N first ultrasonic signals. The processor 110 is also used to determine the location information between the first electronic device and the third electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to the third electronic device, wherein the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal among the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals.

[0342] Optionally, in an embodiment of the present application, the processor 110 is specifically used to split the near ultrasonic signal to obtain N third ultrasonic signals; and generate X random numbers based on the first random factor; and for each third ultrasonic signal, process the third ultrasonic signal based on the X random numbers to obtain X single-frequency signals corresponding to the X random numbers; and mix and encode the X single-frequency signals and the third ultrasonic signal to obtain an encoded third ultrasonic signal, where one random number corresponds to one single-frequency signal, and the first random factor is obtained by performing a hash operation on user information of a user to which the first electronic device belongs, and X is an integer greater than 1; and use the encoded N third ultrasonic signals as N first ultrasonic signals.

[0343] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to add the ratio between the bandwidth of the third ultrasonic signal and the first random number to the starting frequency of the third ultrasonic signal to obtain the first frequency, and use the single-frequency signal corresponding to the first frequency in the third ultrasonic signal as the single-frequency signal corresponding to the first random number to obtain X single-frequency signals corresponding to X random numbers; wherein the first random number is one of the X random numbers.

[0344] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to split the near-ultrasonic signal to obtain N fourth ultrasonic signals; and linearly frequency modulate the N fourth ultrasonic signals respectively to obtain N frequency-modulated fourth ultrasonic signals; and use the N frequency-modulated fourth ultrasonic signals as N third ultrasonic signals.

[0345] Optionally, in the embodiment of the present application, the processor 110 is specifically configured to mix and encode the X single-frequency signals and the third ultrasonic signal in the time domain to obtain an encoded third ultrasonic signal.

[0346] Optionally, in an embodiment of the present application, the processor 110 is further used to obtain a first reference signal set after receiving the second ultrasonic signal, the first reference signal set including N first ultrasonic signals; perform cross-correlation operations on the second ultrasonic signal and each first ultrasonic signal respectively to obtain N first correlation values ​​corresponding to the N first ultrasonic signals, and a first correlation value is used to characterize the similarity between the second ultrasonic signal and a first ultrasonic signal; use the first ultrasonic signal corresponding to the first correlation value that is greater than or equal to the first threshold among the N first correlation values ​​and the largest among the N first correlation values ​​as the first reference signal; and determine that the second ultrasonic signal corresponds to the third electronic device when the signal identifier corresponding to the first reference signal is the signal identifier of the third electronic device.

[0347] Optionally, in an embodiment of the present application, each of the N first ultrasonic signals corresponds to an ultrasonic signal resource identifier, and each ultrasonic signal resource identifier indicates the motion state, orientation information, and corresponding second electronic device of the corresponding first ultrasonic signal; the radio frequency unit 101 is also used to send the corresponding first ultrasonic signal to each second electronic device respectively before sending the N first ultrasonic signals and after obtaining the N first ultrasonic signals. The processor 110 is also used to determine the motion direction of the third electronic device based on the orientation information indicated by the ultrasonic signal resource identifier corresponding to the second ultrasonic signal after determining the position information between the first electronic device and the third electronic device, and display the direction identifier of the motion direction of the third electronic device in the first electronic device.

[0348] Optionally, in an embodiment of the present application, the above-mentioned radio frequency unit 101 is specifically used to send N first ultrasonic signals in sequence after the second time length when the number of at least two second electronic devices is greater than or equal to the second threshold value and the presence of ultrasonic signals in the current environment is detected; or, to send N first ultrasonic signals in sequence when the number of at least two second electronic devices is greater than or equal to the first number threshold value and the presence of ultrasonic signals in the current environment is not detected; or, to send N first ultrasonic signals in sequence when the number of at least two second electronic devices is less than the first number threshold value; wherein the second time length is determined based on the first random back-off coefficient and the period of sending the first ultrasonic signal, and the first random back-off coefficient is determined based on the first random factor.

[0349] An embodiment of the present application provides an electronic device. After the first electronic device processes the near-ultrasonic signal, the N first ultrasonic signals obtained can correspond to each of the N second electronic devices, and the ultrasonic signal sent by the third electronic device is one of the N first ultrasonic signals. Therefore, after the first electronic device sends the target first ultrasonic signal corresponding to the third electronic device and the first electronic device receives the second ultrasonic signal, the second ultrasonic signal can be analyzed. When it is determined that the second ultrasonic signal is sent by the third electronic device, the position information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the first electronic device determines that the second ultrasonic signal is not sent by the third electronic device, the first electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the first electronic device receives the reply signal of the near-ultrasonic signal, thereby improving the accuracy of positioning of the first electronic device.

[0350] When the above-mentioned electronic device is a third electronic device:

[0351] The radio frequency unit 101 is used to send a second ultrasonic signal, where the second ultrasonic signal is one of the K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, where K is an integer greater than 1. The processor 110 is used to determine the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the target first ultrasonic signal and determining that the target first ultrasonic signal corresponds to the first electronic device.

[0352] Optionally, in an embodiment of the present application, the processor 110 is further used to obtain a second reference signal set after receiving the target first ultrasonic signal, where the second reference signal set includes K first ultrasonic signals; perform cross-correlation operations on the target first ultrasonic signal and each fourth ultrasonic signal in the K first ultrasonic signals, respectively, to obtain K second correlation values ​​corresponding to the K fifth ultrasonic signals, where a second correlation value is used to characterize the similarity between the target first ultrasonic signal and a fourth ultrasonic signal; use the fourth ultrasonic signal corresponding to the second correlation value that is greater than or equal to the third threshold value among the K second correlation values ​​and is the largest among the K second correlation values ​​as the second reference signal; and determine that the target first ultrasonic signal corresponds to the first electronic device when the signal identifier corresponding to the second reference signal is the signal identifier of the first electronic device.

[0353] Optionally, in an embodiment of the present application, the above-mentioned second ultrasonic signal corresponds to an ultrasonic signal resource identifier, and the ultrasonic signal resource identifier indicates the motion state and orientation information of the corresponding second ultrasonic signal; the above-mentioned radio frequency unit 101 is specifically used to send the second ultrasonic signal corresponding to the motion direction and the motion state to the first electronic device based on the current motion direction and motion state of the third electronic device.

[0354] Optionally, in an embodiment of the present application, the above-mentioned radio frequency unit 101 is specifically used to send a second ultrasonic signal after a third time period when an ultrasonic signal is detected in the current environment; or, send a second ultrasonic signal when no ultrasonic signal is detected in the current environment; wherein the third time period is determined based on a second random back-off coefficient and a period for sending the second ultrasonic signal, and the second random back-off coefficient is determined based on a second random factor.

[0355] An embodiment of the present application provides an electronic device. Since the second ultrasonic signal is one of K first ultrasonic signals, and the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, after the third electronic device receives the target first ultrasonic signal sent by the first electronic device, the target first ultrasonic signal can be analyzed. When it is determined that the target first ultrasonic signal is sent by the first electronic device, the position information between the first electronic device and the third electronic device can be determined based on the target first ultrasonic signal and the second ultrasonic signal. It can be understood that when the third electronic device determines that the target first ultrasonic signal is not sent by the first electronic device, the third electronic device may not perform any processing, thereby avoiding the phenomenon of signal interference when the third electronic device receives a reply signal of a near ultrasonic signal, thereby improving the accuracy of positioning by the third electronic device.

[0356] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0357] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.

[0358] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0359] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0360] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.

[0361] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0362] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0363] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0364] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0365] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned positioning method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0366] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

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

[0368] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A positioning method, characterized in that: The method is performed by a first electronic device and includes: generating a near-ultrasonic signal; Processing the near ultrasonic signal to obtain N first ultrasonic signals, each first ultrasonic signal corresponds to a second electronic device, and N is a positive integer; Sending the N first ultrasonic signals; After receiving the second ultrasonic signal, when it is determined that the second ultrasonic signal corresponds to a third electronic device, the position information between the first electronic device and the third electronic device is determined based on the second ultrasonic signal and the target first ultrasonic signal, the third electronic device is one of the N second electronic devices, the target first ultrasonic signal is an ultrasonic signal among the N first ultrasonic signals corresponding to the third electronic device, and the second ultrasonic signal is one of the N first ultrasonic signals.

2. The method according to claim 1, characterized in that The processing of the near ultrasonic signal to obtain N first ultrasonic signals includes: Splitting the near ultrasonic signal to obtain N third ultrasonic signals; Generate X random numbers based on a first random factor; For each third ultrasonic signal, process the third ultrasonic signal based on the X random numbers to obtain X single-frequency signals corresponding to the X random numbers; Mix and encode the X single-frequency signals and the third ultrasonic signal to obtain an encoded third ultrasonic signal, wherein one random number corresponds to one single-frequency signal, the first random factor is obtained by performing a hash operation on user information of a user to which the first electronic device belongs, and X is an integer greater than 1; The encoded N third ultrasonic signals are used as the N first ultrasonic signals.

3. The method according to claim 2, characterized in that The processing of the third ultrasonic signal based on the X random numbers to obtain X single-frequency signals corresponding to the X random numbers includes: Adding a ratio between the bandwidth of the third ultrasonic signal and the first random number to a starting frequency of the third ultrasonic signal to obtain a first frequency; Using the single-frequency signal corresponding to the first frequency in the third ultrasonic signal as the single-frequency signal corresponding to the first random number, so as to obtain X single-frequency signals corresponding to the X random numbers; The first random number is one of the X random numbers.

4. The method according to claim 2 or 3, characterized in that: The splitting process of the near ultrasonic signal to obtain N third ultrasonic signals includes: Splitting the near ultrasonic signal to obtain N fourth ultrasonic signals; Performing linear frequency modulation on the N fourth ultrasonic signals respectively to obtain the N frequency-modulated fourth ultrasonic signals; The frequency-modulated N fourth ultrasonic signals are used as the N third ultrasonic signals.

5. The method according to claim 2, characterized in that: The step of mixing and encoding the X single-frequency signals and the third ultrasonic signal to obtain an encoded third ultrasonic signal includes: The X single-frequency signals and the third ultrasonic signal are mixed and encoded in the time domain to obtain the encoded third ultrasonic signal.

6. The method according to claim 1, characterized in that After receiving the second ultrasonic signal, the method further includes: Acquire a first reference signal set, where the first reference signal set includes the N first ultrasonic signals; performing cross-correlation operations on the second ultrasonic signal and each of the first ultrasonic signals respectively to obtain N first correlation values ​​corresponding to the N first ultrasonic signals, wherein one first correlation value is used to represent the similarity between the second ultrasonic signal and one first ultrasonic signal; taking a first ultrasonic signal corresponding to a first correlation value greater than or equal to a first threshold value and the largest first correlation value among the N first correlation values ​​as a first reference signal; The determining that the second ultrasonic signal corresponds to the third electronic device includes: In a case where the signal identifier corresponding to the first reference signal is the signal identifier of the third electronic device, it is determined that the second ultrasonic signal corresponds to the third electronic device.

7. The method according to claim 1, characterized in that Each of the first ultrasonic signals corresponds to an ultrasonic signal resource identifier, and each ultrasonic signal resource identifier indicates the motion state and orientation information of the corresponding first ultrasonic signal and the corresponding second electronic device; Before sending the N first ultrasonic signals, the method further includes: After obtaining the N first ultrasonic signals, sending a corresponding first ultrasonic signal to each second electronic device respectively; After determining the location information between the first electronic device and the third electronic device, the method further includes: The moving direction of the third electronic device is determined based on the azimuth information indicated by the ultrasonic signal resource identifier corresponding to the second ultrasonic signal, and a direction identifier of the moving direction of the third electronic device is displayed in the first electronic device.

8. The method according to claim 1, characterized in that The sending of the N first ultrasonic signals comprises: When the number of the at least two second electronic devices is greater than or equal to the second threshold and an ultrasonic signal is detected in the current environment, after a second time period, the N first ultrasonic signals are sent in sequence; or, When the number of the at least two second electronic devices is greater than or equal to the first number threshold and no ultrasonic signal is detected in the current environment, sending the N first ultrasonic signals in sequence; or, When the number of the at least two second electronic devices is less than the first number threshold, sending the N first ultrasonic signals in sequence; The second duration is determined based on a first random back-off coefficient and a period for sending the first ultrasonic signal, and the first random back-off coefficient is determined based on a first random factor.

9. A positioning method, characterized in that: The method is performed by a third electronic device, and includes: Sending a second ultrasonic signal, where the second ultrasonic signal is one of the K first ultrasonic signals, where the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, and K is an integer greater than 1; After receiving the target first ultrasonic signal, if it is determined that the target first ultrasonic signal corresponds to the first electronic device, the position information between the third electronic device and the first electronic device is determined based on the second ultrasonic signal and the target first ultrasonic signal.

10. The method according to claim 9, characterized in that After receiving the first target ultrasonic signal, the method further includes: Acquire a second reference signal set, where the second reference signal set includes the K first ultrasonic signals; performing cross-correlation operations on the target first ultrasonic signal and each fourth ultrasonic signal in the K first ultrasonic signals respectively, to obtain K second correlation values ​​corresponding to the K fourth ultrasonic signals, wherein one second correlation value is used to characterize the similarity between the target first ultrasonic signal and one fourth ultrasonic signal; using a fourth ultrasonic signal corresponding to a second correlation value that is greater than or equal to a third threshold value and is the largest among the K second correlation values ​​as a second reference signal; In a case where the signal identifier corresponding to the second reference signal is the signal identifier of the first electronic device, it is determined that the target first ultrasonic signal corresponds to the first electronic device.

11. The method according to claim 9, characterized in that The second ultrasonic signal corresponds to an ultrasonic signal resource identifier, and the ultrasonic signal resource identifier indicates the motion state and orientation information of the corresponding second ultrasonic signal; The sending of the second ultrasonic signal comprises: Based on the current movement direction and movement state of the third electronic device, the second ultrasonic signal corresponding to the movement direction and the movement state is sent to the first electronic device.

12. The method according to claim 9 or 11, characterized in that: The sending of the second ultrasonic signal comprises: In case an ultrasonic signal is detected in the current environment, after a third time period, the second ultrasonic signal is sent; or, In a case where no ultrasonic signal is detected in the current environment, sending the second ultrasonic signal; The third duration is determined based on a second random back-off coefficient and a period for sending the second ultrasonic signal, and the second random back-off coefficient is determined based on a second random factor.

13. A positioning device, characterized in that: Applied to a first electronic device, the positioning device comprises: a generating module, a processing module, a sending module and a determining module; The generating module is used to generate a near-ultrasonic signal; The processing module is used to process the near ultrasonic signal generated by the generating module to obtain N first ultrasonic signals, each first ultrasonic signal corresponds to a second electronic device, and N is a positive integer; The sending module is used to send the N first ultrasonic signals obtained by the processing module; The determination module is used to determine the location information between the first electronic device and the third electronic device based on the second ultrasonic signal and a target first ultrasonic signal after receiving the second ultrasonic signal and in the case where it is determined that the second ultrasonic signal corresponds to a third electronic device, the third electronic device being one of N second electronic devices, the target first ultrasonic signal being an ultrasonic signal corresponding to the third electronic device among the N first ultrasonic signals, and the second ultrasonic signal being one of the N first ultrasonic signals.

14. A positioning device, characterized in that: Applied to a third electronic device, the positioning device comprises: a sending module and a determining module; The sending module is used to send a second ultrasonic signal, where the second ultrasonic signal is one of K first ultrasonic signals, where the K first ultrasonic signals are ultrasonic signals corresponding to the third electronic device among the N first ultrasonic signals, and K is an integer greater than 1; The determination module is used to determine the location information between the third electronic device and the first electronic device based on the second ultrasonic signal and the target first ultrasonic signal after receiving the target first ultrasonic signal and determining that the target first ultrasonic signal corresponds to the first electronic device.

15. An electronic device, characterized in that: It comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the positioning method as described in any one of claims 1 to 8 or the steps of the positioning method as described in any one of claims 9 to 12 are implemented.