Alarm prompting method and device of indoor terminal equipment, terminal equipment and storage medium
By combining the use of ultrasonic TDOA algorithm and pre-divided areas in terminal equipment, the problems of low positioning accuracy and difficult to achieve safety protection functions in the prior art are solved, and high-precision positioning and safety protection are achieved.
Patent Information
- Application Number
- CN202510130802.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-23
AI Technical Summary
While existing terminal devices realize security protection functions, it is difficult to improve positioning accuracy without modifying hardware, affecting user experience.
The ultrasonic arrival phase difference (TDOA) algorithm is used to combine the pre-divided safety area and the alarm area. By obtaining the arrival time of the ultrasonic signal transmitted by the base station, the current position of the terminal device is calculated, and the alarm prompt information is output when entering the alarm area.
Without modifying the terminal device hardware, improve the positioning accuracy of the terminal device, realize security protection functions, and improve the user's product experience.
Smart Images

Figure CN120034825A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of positioning, and in particular to an alarm prompt method, device, terminal equipment and storage medium for indoor terminal equipment. Background Art
[0002] The security solutions for terminal devices displayed in existing stores for user experience mainly include: 1) Using a secure connection line to connect the terminal device, limiting the mobile range of the terminal device, affecting the user experience. 2) Using radio frequency identification (RFID) or ultra-wide band (UWB) and other technologies to attach the device to the terminal device, and alarm when the terminal device exceeds a certain distance from the device. Although the positioning accuracy is high, the cost is also high, and the smart terminal device needs to be adapted, such as adding a base, tag, controller, etc. Summary of the invention
[0003] The embodiments of the present application provide an alarm prompt method, device, terminal device and storage medium for indoor terminal equipment, which are used to improve the positioning accuracy of terminal equipment without modifying the hardware of the terminal equipment, thereby improving the user's product experience while realizing the security protection function of the terminal equipment.
[0004] The first aspect of the present application provides an alarm prompt method for an indoor terminal device, which is applied to the terminal device, and includes: obtaining the arrival time of a first ultrasonic signal emitted by each base station, and using an ultrasonic arrival phase difference TDOA algorithm to calculate a first current position of the terminal device, wherein each base station is located at a different position indoors; determining a target area where the first current position is located based on the first current position and a pre-divided area, wherein the pre-divided area includes a safe area and an alarm area, and the distance between the alarm area and the indoor exit is less than the distance between the safe area and the indoor exit; and outputting an alarm prompt message when the target area is the alarm area.
[0005] A second aspect of the present application provides an alarm prompt device for an indoor terminal device, the device being applied to the terminal device, and the device may include:
[0006] A calculation module, used to obtain the arrival time of the first ultrasonic signal transmitted by each base station, and calculate the first current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm, wherein each base station is located at a different position indoors;
[0007] a determination module, configured to determine a target area where the first current position is located according to the first current position and a pre-divided area, wherein the pre-divided area includes a safe area and an alarm area, and a distance between the alarm area and an indoor exit is smaller than a distance between the safe area and the indoor exit;
[0008] The alarm module is used to output alarm prompt information when the target area is the alarm area.
[0009] A third aspect of the present application provides a terminal device, which may include a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the terminal device executes the program, the method described in the first aspect of the present application is implemented.
[0010] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of the present application.
[0011] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0012] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0013] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0014] In the embodiment of the present application, the arrival time of the first ultrasonic signal emitted by each base station is obtained, and the ultrasonic arrival phase difference TDOA algorithm is used to calculate the first current position of the terminal device, and each base station is at different positions indoors; according to the first current position and the pre-divided area, the target area where the first current position is located is determined, and the pre-divided area includes a safe area and an alarm area, and the distance between the alarm area and the indoor exit is less than the distance between the safe area and the indoor exit; when the target area is the alarm area, an alarm prompt message is output. It is used to improve the positioning accuracy of the terminal device without modifying the terminal device hardware, and improve the user's product experience while realizing the terminal device security protection function. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0016] Figure 1A A schematic diagram of a scenario applied in an embodiment of the present application;
[0017] Figure 1B A schematic diagram of another scenario applied by the embodiment of the present application;
[0018] Figure 1C A schematic diagram of a terminal device in an embodiment of the present application;
[0019] Figure 1D A schematic diagram of a base station in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of an embodiment of an alarm prompt method for an indoor terminal device in an embodiment of the present application;
[0021] Figure 3A A schematic diagram of playing an alarm prompt message through a loudspeaker in an embodiment of the present application;
[0022] Figure 3B A schematic diagram of displaying alarm prompt information on a display interface in an embodiment of the present application;
[0023] Figure 4 This is another schematic diagram of an embodiment of the alarm prompt method for indoor terminal equipment in an embodiment of the present application;
[0024] Figure 5A A schematic diagram of playing warning prompt information through a loudspeaker in an embodiment of the present application;
[0025] Figure 5B A schematic diagram of displaying warning prompt information on a display interface in an embodiment of the present application;
[0026] Figure 6 This is a schematic diagram of an embodiment of an alarm prompt device for an indoor terminal device in an embodiment of the present application;
[0027] Figure 7 This is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;
[0028] Figure 8 This is another schematic diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The embodiments of the present application provide an alarm prompt method, device, terminal device and storage medium for indoor terminal equipment, which are used to improve the positioning accuracy of terminal equipment without modifying the hardware of the terminal equipment, thereby improving the product experience while realizing the security protection function of the terminal equipment.
[0030] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0031] The following is a brief description of some terms involved in this application, as follows:
[0032] Wireless ultrasonic positioning uses the propagation time of ultrasonic signals to determine the target location. The propagation speed of ultrasonic signals is relatively stable in the air, so the distance can be calculated by measuring the propagation time of the signal. That is, the sending device sends out an ultrasonic signal, and the receiving device measures the arrival time of the ultrasonic signal, and determines the distance by calculating the propagation time of the ultrasonic signal. Multiple receiving devices can provide multiple distance measurements, thereby determining the precise location of the target.
[0033] The advantages and disadvantages of the security measures of terminal devices in the existing implementation methods are shown in Table 1 below:
[0034]
[0035] Table 1
[0036] In one implementation, a wide-area audio indoor positioning method, system and terminal based on radio frequency enhancement are provided. The scheme proposes a two-step phase difference (Time Difference of Arrival, TDOA) estimation method based on short-time Fourier transform and enhanced cross-correlation to achieve accurate audio positioning in indoor scenes. However, the terminal indoor positioning technology based on audio signals ignores the severe environmental noise scene and cannot solve the problem of audio positioning failure caused by environmental audio interference. In addition, returning to the use scenario of terminal devices displayed in stores for user experience, implementing the audio positioning function in the terminal device will inevitably encounter audio conflict scenarios.
[0037] In the embodiment of the present application, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0038] As an example but not limitation, in the embodiment of the present application, the terminal device can also be a wearable device with a display interface. Wearable devices can also be called wearable smart devices, which are a general term for wearable devices that use wearable technology to intelligently design and develop wearable devices for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0039] In the technical solution of this application, the terminal device is based on the ultrasonic arrival phase difference (Time Difference of Arrival, TDoA) positioning technology, combined with the pre-divided safety area / alarm area type; optionally, the warning area type can also be divided, and the warning area is between the safety area and the alarm area, to achieve the safety protection function of the terminal device (such as the terminal device demonstration machine in the store). Figure 1A and Figure 1B The following is a schematic diagram of a scenario in which the present application is applied. For example, the type definition of the demonstration area of a terminal device in a store is as follows:
[0040] Safety area: The terminal equipment has no impact in this safety area, that is, no alarm or early warning prompts are issued.
[0041] Warning area: When a terminal device enters the warning area, it will actively warn, accompanied by vibration, sound and other prompts.
[0042] Alarm area: When a terminal device enters the alarm area, it will automatically alarm, accompanied by strong vibrations, loud sounds and other prompts.
[0043] When the terminal device moves from the safe area to the alarm area, the terminal device will actively issue an alarm prompt; when it returns from the alarm area to the safe area, the alarm area prompt will be actively cancelled.
[0044] When the terminal device moves from the safe area to the early warning area, the terminal device will actively issue an early warning prompt. When the terminal device moves from the early warning area to the alarm area, the terminal device will actively issue an alarm prompt. When the terminal device returns from the alarm area / early warning area to the safe area, the alarm area / early warning area prompt will be automatically cancelled.
[0045] like Figure 1C FIG. 1 is a schematic diagram of a terminal device in an embodiment of the present application. The terminal device may include: a first processor, a first audio module, a positioning module and a first communication module. Optionally, it may also include a vibration module, an input / output module, a first storage module, a first power module, etc.
[0046] The first audio module can be used to collect ultrasonic signals and play alarm warning prompt sounds;
[0047] The positioning module can be used to add new services and run as a background program on the terminal device. It is mainly responsible for processing ultrasonic signals and realizing positioning functions, including safety / alarm / warning area positioning functions.
[0048] The first communication module communicates with the base station through wireless technologies such as Bluetooth or Wireless Fidelity (WiFi), and is mainly responsible for synchronizing the operating status of the base station (whether the base station is working normally, etc.) and configuration parameters.
[0049] Vibration module, used for vibration prompts, etc.
[0050] The input / output module is used to output text alarm prompt information, or output text warning prompt information, or obtain user input information, etc.
[0051] The first power module is used to provide power to the terminal device.
[0052] like Figure 1D FIG. 1 is a schematic diagram of a base station in an embodiment of the present application. The base station may include a second processor, a second communication module and a second audio module. Optionally, the base station may also include a second power module, a second storage module, etc.
[0053] The second audio module can be used to transmit an ultrasonic signal.
[0054] The second communication module can be used to communicate with the base station through wireless technologies such as Bluetooth or WiFi, and is mainly responsible for synchronizing the operating status and configuration parameters of the base station. It can also be used to send ultrasonic signals.
[0055] The second power supply module is used to provide power to the base station.
[0056] The technical solution of the present application is further described below by way of embodiments. Figure 2 FIG. 1 is a schematic diagram of an embodiment of an alarm prompt method for an indoor terminal device in an embodiment of the present application. The method is applied to the terminal device. The embodiment of the method may include:
[0057] 201. Obtain the arrival time of the first ultrasonic signal transmitted by each base station, and use the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device.
[0058] Each base station can be called a base station group. Each base station is located at different positions indoors. The base station group can be used to locate the terminal device, so the base station group can also be called a positioning base station group. One base station in the base station group is the main base station, and the rest are auxiliary base stations. The main base station automatically sends a broadcast signal through the second communication module. The broadcast signal contains the base station media access control (Media Access Control, MAC), the base station identification (Identity, ID), and the base station configuration parameters (for example: ultrasonic frequency, location coordinates, etc.). After receiving the broadcast signal, the auxiliary base station updates the configuration according to the broadcast parameters in the main base station broadcast signal, and then establishes a communication link with the main base station to feedback the auxiliary base station configuration parameters. At this point, the positioning base station group works normally and can send out ultrasonic signals.
[0059] After the primary base station synchronizes the ultrasonic signal configuration parameters (also referred to as audio signal configuration parameters) with the secondary base station through the second communication module, the positioning base station group may send out ultrasonic signals at a predetermined time according to the ultrasonic signal configuration parameters after clock synchronization.
[0060] After the terminal device starts the positioning module, it collects the ultrasonic signals emitted by the base station group by configuring the collection frequency, channel settings, coding format, sampling size, buffer size, etc. Then, after the ultrasonic signal is processed, the position coordinates of the terminal device are located through the TDOA algorithm. The terminal device uses the positioning module to perform regional positioning based on the position coordinates, determine the target area where the first current position of the terminal device is located, and finally decide whether to warn or alarm based on the area type of the target area.
[0061] Exemplarily, the terminal device collects ultrasonic signals transmitted by each base station in the base station group through the first audio module to obtain the arrival time of the ultrasonic signals of each base station. Generally speaking, the number of base stations in the base station group is greater than or equal to 3.
[0062] Here, a base station group including four base stations is taken as an example for explanation. It is assumed that the four base stations are base station (BS) 1, BS2, BS3 and BS4, and their known coordinates are (x1, y1, z1), (x2, y2, z2), (x3, y3, z3) and (x4, y4, z4) respectively.
[0063] Assume that the location coordinates of the terminal device are (x, y, z), the time when the four base stations transmit ultrasonic signals is T1, T2, T3, and T4, and the time when the terminal device receives the ultrasonic signals transmitted by the base stations is T1', T2', T3', and T4'.
[0064] In some possible implementations, obtaining the arrival time of the first ultrasonic signal transmitted by each base station and using the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device may include: obtaining the arrival time of the first ultrasonic signal transmitted by each base station; filtering the arrival time of the first ultrasonic signal of each base station to obtain the arrival time of the first ultrasonic signal after filtering at each base station; and calculating the first current position of the terminal device based on the arrival time of the first ultrasonic signal after filtering at each base station using the ultrasonic arrival phase difference TDOA algorithm.
[0065] In order to further improve the positioning accuracy, the measurement data can be filtered, for example, the measurement data, i.e., the arrival time of the first ultrasonic signal emitted by each base station, can be smoothed by combining Kalman filtering. Kalman filtering is a recursive filter that can effectively reduce measurement noise and errors and improve positioning accuracy and stability through prediction steps and update steps. Among them, the prediction step: predict the state at the current moment based on the state and motion model at the previous moment. The update step: update the state estimate based on the measurement data at the current moment to reduce the impact of measurement noise.
[0066] The filtering process may also include but is not limited to the following methods:
[0067] (1) Wavelet packet transform and adaptive filtering
[0068] Wavelet packet transform combined with adaptive filtering is an effective method for ultrasonic signal denoising. This method first decomposes the signal by wavelet packet, and then selects different filter parameters for each component signal for adaptive filtering. This method can effectively remove noise while retaining the high-frequency part of the signal, and is suitable for signal processing in ultrasonic non-destructive testing.
[0069] (2) Signal decomposition based on Gauss modulated pulses
[0070] This method uses Gauss modulated pulses as basis functions to decompose ultrasonic echo signals, preprocesses the signals through cross-correlation filtering, and then gradually extracts signal components in the form of Gauss modulated pulses. This method has advantages in computational efficiency and can effectively extract characteristic information of defect signals.
[0071] (3) Wiener Filtering
[0072] Wiener filtering is a filter based on the minimum mean square error criterion and is widely used in the enhancement of ultrasonic signals. It calculates the frequency response of the filter by statistically analyzing the noise power spectrum and the signal power spectrum, thereby achieving signal denoising. Wiener filtering performs well in improving the signal-to-noise ratio and is particularly suitable for the enhancement of ultrasonic echo signals.
[0073] (4) Zero-Phase Filtering
[0074] Zero-phase filtering is achieved through forward-reverse filtering (FRR) or reverse filtering-reverse output (RRF), which can effectively avoid phase distortion during the filtering process. This method is particularly suitable for application scenarios where the signal phase needs to remain unchanged.
[0075] (5) Mean filtering and weighted average filtering
[0076] Mean filtering is a simple linear smoothing technique that achieves the purpose of denoising by calculating the arithmetic mean of multiple consecutive sampling points. Weighted average filtering introduces weights on the basis of mean filtering, assigning different weights to different sampling points to better reflect the characteristics of the signal.
[0077] (6) Least Mean Square Algorithm LMS Adaptive Filter
[0078] The LMS (Least Mean Squares) adaptive filter can automatically adjust its parameters to meet the optimal filtering criteria when the input signal characteristics are unknown or changing. This method performs well in processing non-stationary signals and is suitable for dynamic denoising of ultrasonic signals.
[0079] In this technical solution, noise and errors in measurement are taken into consideration, and the measurement data, that is, the arrival time of the first ultrasonic signal transmitted by each base station, can be filtered to further improve the positioning accuracy.
[0080] In some possible implementations, the method may further include: receiving a first ultrasonic signal configuration parameter sent by a primary base station;
[0081] The acquiring the arrival time of the first ultrasonic signal transmitted by each base station may include: acquiring the arrival time of the first ultrasonic signal transmitted by each base station according to a first ultrasonic signal configuration parameter, wherein the first ultrasonic signal configuration parameter includes a first ultrasonic frequency.
[0082] Exemplarily, the first ultrasonic signal configuration parameters include MAC, base station identification ID, base station configuration parameters (eg, first ultrasonic frequency, location coordinates, etc.), and the sending time of transmitting the ultrasonic signal.
[0083] In the present technical solution, the arrival time of the first ultrasonic signal transmitted by each base station can be accurately obtained according to the first ultrasonic signal configuration parameter, and the first ultrasonic signal configuration parameter includes the first ultrasonic frequency.
[0084] In one possible implementation, obtaining the arrival time of the first ultrasonic signal transmitted by each base station and using the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device may include: obtaining the arrival time of the first ultrasonic signal transmitted by each base station; and calculating the first current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm based on the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal.
[0085] Exemplarily, the terminal device can calculate the first current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm based on the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal.
[0086] In this technical solution, the ultrasonic arrival phase difference TDOA algorithm is used, which requires the arrival time of the first ultrasonic signal emitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal, so that the first current position of the terminal device can be calculated.
[0087] In some possible implementations, the first current position of the terminal device is calculated based on the arrival time of the first ultrasonic signal emitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal, using the ultrasonic arrival phase difference TDOA algorithm, which may include: calculating the first ultrasonic arrival time difference of each base station based on the arrival time of the first ultrasonic signal emitted by each base station and the preset sending time of the first ultrasonic signal of each base station; calculating the distance between each base station and the terminal device based on the first ultrasonic arrival time difference of each base station and the propagation speed of the ultrasonic signal; and calculating the first coordinates of the terminal device based on the preset coordinates of each base station and the distance between each base station and the terminal device.
[0088] For example, the sending time T of the first ultrasonic signal of each base station may be i and the arrival time T of the first ultrasonic signal i ', calculate the first ultrasonic arrival time difference of each base station Δt=T i '-T i Then, according to the first ultrasonic arrival time difference Δt of each base station, the first current position of the terminal device in the three-dimensional coordinates is calculated through the principle that speed is equal to distance divided by time.
[0089] T i '=T i +d i / c, i = 1, 2, 3 ... N (Formula 1);
[0090] Among them, d i is the distance from the base station BSi to the terminal device, and c is the propagation speed of the ultrasonic signal, that is, the propagation speed of the audio signal. Therefore, it can be concluded that
[0091]
[0092] The location coordinates of the base station BSi (x i ,y i ,z i ) is a known value, T i and T i ' are also known values, so the location coordinates of the terminal device can be obtained as (x, y, z).
[0093] In the present technical solution, the principle that speed is equal to distance divided by time is adopted, that is, the first ultrasonic arrival time difference of each base station can be calculated according to the preset sending time of the first ultrasonic signal of each base station and the arrival time of the first ultrasonic signal; then, the distance between each base station and the terminal device is calculated according to the first ultrasonic arrival time difference of each base station and the ultrasonic signal propagation speed; the first coordinates of the terminal device are calculated according to the preset coordinates of each base station and the distance between each base station and the terminal device, thereby providing an implementation method for calculating the first coordinates of the terminal device, which has low cost, does not require the terminal device to be modified or new equipment to be added, has high positioning accuracy, and improves the feasibility of the solution.
[0094] In some possible implementations, the calculating the distance between each base station and the terminal device according to the first ultrasonic arrival time difference of each base station and the ultrasonic signal propagation speed may include: calculating the difference between the first ultrasonic arrival time differences between different base stations according to the first ultrasonic arrival time differences of each base station; calculating the difference between the distances between each base station and the terminal device according to the difference between the first ultrasonic arrival time differences between the different base stations and the ultrasonic signal propagation speed;
[0095] The step of calculating the first coordinates of the terminal device according to the preset coordinates of each base station and the distances between each base station and the terminal device may include: calculating the first coordinates of the terminal device according to the preset coordinates of each base station and the difference between the distances between each base station and the terminal device.
[0096] The time difference between different base stations is:
[0097]
[0098]
[0099] Furthermore, the time difference of different signal sources can be constructed as shown in Formula 5:
[0100]
[0101] In conjunction with the example in which the positioning base station group includes four base stations in the embodiment of the present application, a nonlinear equation group is constructed for different signal sources:
[0102]
[0103] Since the location coordinates of the base station BSi (x i ,y i ,z i ) is a known value, T i ' is also a known value, T ij 'You can use T i '-T j 'Calculated, therefore, the location coordinates of the terminal device can be obtained as (x, y, z).
[0104] In this technical solution, the difference between the first ultrasonic arrival time differences between different base stations is calculated based on the first ultrasonic arrival time differences of each base station; the difference between the first ultrasonic arrival time differences between the different base stations and the ultrasonic signal propagation speed is calculated to obtain the difference in distance between each base station and the terminal device; the first coordinate of the terminal device is calculated based on the preset coordinates of each base station and the difference in distance between each base station and the terminal device. A specific implementation method for calculating the first coordinate of the terminal device is provided, which is low in cost, does not require the terminal device to be modified or newly added, has high positioning accuracy, and improves the feasibility of the solution.
[0105] In some possible implementations, the calculating the first coordinates of the terminal device according to the preset coordinates of each base station and the difference in distances between each base station and the terminal device may include: calculating the first coordinates of the terminal device using a Taylor series method and a least squares method according to the preset coordinates of each base station and the difference in distances between each base station and the terminal device.
[0106] Next, the nonlinear equation can be converted into a linear equation through Taylor series expansion, and then the least squares method is used to iteratively solve it, and finally the first coordinate of the terminal device is obtained by solving it.
[0107] This application can be d i -d j The difference equation of the distance is expanded by Taylor series to linearize the nonlinear equation. For each equation, Taylor expansion can be performed around the estimated initial positioning coordinates (x0, y0, z0) of the terminal device, as shown below:
[0108]
[0109] The above expansion can be substituted into the original equation to obtain a 0 ,yy 0 ,zz 0 The linear equation is as follows:
[0110]
[0111]
[0112] Since the linear system of equations may not be completely consistent (i.e., there are measurement errors), the least squares method can be used to solve this system of equations. The least squares method can find the optimal solution by minimizing the sum of squares of the residuals.
[0113] The linear equation system is Ax = b, where A is the coefficient matrix and x is the unknown vector [x 0,yy 0 ,zz 0 ], b is a constant term vector. The least squares solution x can be obtained by solving A T Ax=A T b get.
[0114] Since the Taylor expansion is based on the initial positioning coordinates (x0, y0, z0), the value of (x0, y0, z0) can be continuously updated in an iterative manner until the position coordinates converge to a stable solution. In each iteration, the current position estimate coordinates (x0, y0, z0) can be used to perform Taylor expansion, solve the linear equations, and obtain the updated value of the position. Then, use this updated value as the new (x0, y0, z0) for the next iteration until the change in the position coordinates is less than a preset threshold, and the position is considered to have converged.
[0115] Through the above steps, the position coordinates (x, y, z) can be finally solved. This process converts the nonlinear equation into a linear equation and uses the least squares method to iteratively solve it to obtain an accurate position estimate.
[0116] In this technical solution, the nonlinear equation can be converted into a linear equation through Taylor series expansion, and then iteratively solved using the least squares method to ultimately solve the first coordinate of the terminal device.
[0117] 202. Determine a target area where the first current position is located according to the first current position and the pre-divided areas.
[0118] The pre-divided area includes a safe area and an alarm area, and the distance between the alarm area and an indoor exit (such as a door) is smaller than the distance between the safe area and the indoor exit. The pre-divided area can be intelligently divided after the base station obtains relevant indoor data, or it can be divided by the user, which is not limited in the specific embodiments of the present application.
[0119] For example, it can be combined with Figure 1A As shown, the indoor area can be divided into a safe area and an alarm area. After processing step 201, the first current position of the terminal device can be obtained, and then it is determined which area of the pre-divided area the first current position is located in, which is called the target area. The target area can be a safe area or an alarm area.
[0120] 203. When the target area is the alarm area, output alarm prompt information.
[0121] If the pre-divided area includes a safe area and a warning area, then it can be determined that the first current position is in the safe area or the warning area, and then the next step of processing is performed.
[0122] Exemplarily, if the first current location of the terminal device is in a safe area, no processing may be performed to ensure the user experience of using the terminal device as much as possible.
[0123] If the first current position of the terminal device is in the alarm area, an alarm prompt message needs to be output to realize the safety protection function of the terminal device. For example, the alarm prompt message is: You are in the alarm area. To ensure user experience, please move to a safe area to use the terminal device. Because when in the alarm area, the terminal device will continuously output alarm prompt messages, which is a very bad experience for the user, so the user can be prompted to move to a safe area to use the terminal device.
[0124] In some possible implementations, outputting the alarm prompt information may specifically include at least one of the following:
[0125] Play alarm prompt information through the speaker;
[0126] Displaying alarm prompt information on the display interface;
[0127] Output vibration corresponding to the first frequency and the first amplitude.
[0128] In this technical solution, several implementation methods are provided for outputting alarm prompt information, which improves the feasibility of the solution. Through different methods, alarm prompt information is output to realize the security protection function of terminal equipment. Figure 3A As shown in FIG. 1 , it is a schematic diagram of playing the alarm prompt information through the speaker in the embodiment of the present application. Figure 3B The figure is a schematic diagram of displaying alarm prompt information on the display interface in an embodiment of the present application.
[0129] In the embodiment of the present application, the arrival time of the first ultrasonic signal emitted by each base station is obtained, and the ultrasonic arrival phase difference TDOA algorithm is used to calculate the first current position of the terminal device, and each base station is at different positions indoors; according to the first current position and the pre-divided area, the target area where the first current position is located is determined, and the pre-divided area includes a safe area and an alarm area, and the distance between the alarm area and the indoor exit is less than the distance between the safe area and the indoor exit; when the target area is the alarm area, an alarm prompt message is output. It is used to improve the positioning accuracy of the terminal device without modifying the terminal device hardware, and improve the user's product experience while realizing the terminal device security protection function.
[0130] like Figure 4 As shown, it is a schematic diagram of another embodiment of the method for locating a terminal device in an embodiment of the present application, which may include:
[0131] 401. Obtain the arrival times of the first ultrasonic signals transmitted by each base station, and use the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device.
[0132] In this technical solution, focus on the handover scenarios in different regions of the key attention area. For the first current position, that is, the audio positioning result, use particle filtering to improve the accuracy of region handover. The delay from the safe area to the alarm area can be reduced by the following method.
[0133] Scenario 1: Audio resource conflict scenario
[0134] In some possible implementation manners, the obtaining of the arrival times of the first ultrasonic signals transmitted by each base station may include: when the terminal device is in a call scenario or a camera scenario, obtain the arrival times of the first ultrasonic signals transmitted by each base station in a shared manner.
[0135] The technical solution of this application mainly aims at the audio resource conflict scenario, that is, when the terminal device is in a call or camera scenario, etc., it will occupy the collected audio data. At this time, it will affect the positioning module to obtain the audio data, that is, the arrival times of the first ultrasonic signals transmitted by each base station, and finally affect the positioning function. To solve this problem, the technical solution of this application configures a shared audio data and an audio switching state synchronization mechanism to ensure that the positioning module can receive the audio data and the audio switching state, and quickly restore the audio positioning function.
[0136] When the terminal device detects that the target application needs to use audio data, even if the terminal device is in a call scenario or a camera scenario, etc., it can still share the collected audio data with the target application. The audio data includes the arrival times of the first ultrasonic signals transmitted by each base station; the target application uses the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device according to the arrival times of the first ultrasonic signals transmitted by each base station, the preset coordinates of each base station, and the transmission time of the first ultrasonic signals.
[0137] In some possible implementation manners, when the terminal device is in a call scenario or a camera scenario, preprocess the collected audio data to obtain preprocessed audio data. The preprocessed audio data includes the arrival times of the first ultrasonic signals transmitted by each base station.
[0138] Exemplarily, because when the terminal device is in a call or camera scenario, etc., the obtained audio data will include the user's voice. After preprocessing, the user's voice, etc. can be processed away, and only the arrival times of the first ultrasonic signals transmitted by each base station are included.
[0139] In this technical solution, the collected audio data is preprocessed, which can not only ensure the accuracy of the subsequent calculation of the first current position of the terminal device, but also protect the privacy of the user.
[0140] Scenario 2: Environmental noise interference scenario
[0141] In some possible implementations, the arrival time of the first ultrasonic signal transmitted by each base station is obtained based on a first ultrasonic signal configuration parameter; the method may further include: if noise interference is detected, sending indication information to a main base station, the indication information being used to indicate the presence of noise interference, and the base stations including the main base station; receiving a second ultrasonic signal configuration parameter sent by the main base station according to the indication information, the second ultrasonic frequency included in the second ultrasonic signal configuration parameter being different from the first ultrasonic frequency included in the first ultrasonic signal configuration parameter; obtaining the arrival time of the second ultrasonic signal of each base station based on the second ultrasonic signal configuration parameter; and calculating the second current position of the terminal device using an ultrasonic arrival phase difference TDOA algorithm based on the arrival time of the second ultrasonic signal of each base station.
[0142] The technical solution of the present application ensures the stable operation of the ultrasonic positioning function by monitoring the ultrasonic signal and the signal synchronization mechanism. Specifically: after the communication module of the terminal device synchronizes the ultrasonic signal configuration parameters with the communication module of the main base station, continuous positioning is performed. However, there may be noise signals in the surrounding environment. If there is noise interference in the surrounding environment, positioning cannot be performed. The terminal device can send an indication message to the main base station, and the indication message is used to indicate the presence of noise interference. After the main base station receives the indication message, it can send the updated second ultrasonic signal configuration parameters to the terminal device, and the terminal device uses the second ultrasonic signal configuration parameters to re-position.
[0143] It should be noted that after the primary base station updates the second ultrasonic signal configuration parameters, the second ultrasonic signal configuration parameters will also be updated synchronously with other secondary base stations.
[0144] In this technical solution, when there is an ultrasonic signal with environmental interference, it can be reported to the main base station. The main base station uses new ultrasonic signal configuration parameters for positioning, which can solve the problem of being unable to position due to environmental interference.
[0145] In an implementation manner, the instruction information further includes instruction information for updating the first ultrasonic frequency of the first ultrasonic signal configuration parameter.
[0146] In the present technical solution, the indication information reported by the terminal device includes not only the indication information of the existence of noise interference, but also the indication information of the first ultrasonic frequency of the first ultrasonic signal configuration parameter being updated. After receiving the indication information reported by the terminal device, the main base station can directly update the first ultrasonic signal configuration parameter according to the indication information to obtain the second ultrasonic signal configuration parameter. Then, the updated second ultrasonic signal configuration parameter is sent to the terminal device for positioning by the terminal device.
[0147] In an implementation manner, the second ultrasonic signal configuration parameter is obtained by the main base station performing detection according to the indication information and updating the first ultrasonic signal configuration parameter when confirming that there is noise interference.
[0148] In this technical solution, the terminal device synchronizes the ultrasonic signal status to the main base station, that is, the indication information reported by the terminal device includes the indication information of the presence of noise interference. After the main base station receives the indication information reported by the terminal device, the main base station measures the ultrasonic data of the surrounding environment; if it is confirmed that there is an interfering ultrasonic signal in the surrounding environment, the ultrasonic signal configuration parameters are switched according to the measured data, and the updated second ultrasonic signal configuration parameters are synchronized to the communication module of the terminal device. The positioning base station enables the updated second ultrasonic signal configuration parameters. After receiving the updated second ultrasonic signal configuration parameters, the terminal device re-monitors the ultrasonic signal and performs positioning.
[0149] 402. Determine a target area where the first current position is located according to the first current position and the pre-divided area.
[0150] Wherein, the pre-divided area also includes a warning area, and the distance between the warning area and the indoor exit is less than the distance between the safety area and the indoor exit, and greater than the distance between the alarm area and the indoor exit. If the pre-divided area includes a safety area, a warning area, and an alarm area, then it can be determined that the first current position is in the safety area, the warning area, or the alarm area, and then the next step of processing is performed.
[0151] In some possible implementations, the method may further include: performing filtering on the first current position to obtain the filtered first current position;
[0152] Determining the target area where the first current position is located based on the first current position and the pre-divided area may include: determining the target area where the first current position is located based on the first current position after filtering and the pre-divided area.
[0153] 1. Filtering processing includes Kalman filtering processing
[0154] In the present technical scheme, the error of calculating the first current position of the terminal device is considered, and the measurement data can be smoothed in combination with Kalman filtering, which can further improve the positioning accuracy. Further, it can be determined which pre-divided area the first current position is in based on the first current position after Kalman filtering. If the pre-divided area includes a safe area and an alarm area, then it can be determined that the first current position is in a safe area, or an alarm area, and then the next step of processing is performed; if the pre-divided area includes a safe area, a warning area, and an alarm area, then it can be determined that the first current position after Kalman filtering is in a safe area, a warning area, or an alarm area, and then the next step of processing is performed.
[0155] It should be noted that the filtering processing method for the first current position of the terminal device may also include but is not limited to the wavelet packet transform and adaptive filtering mentioned in the above article, signal decomposition based on Gauss modulated pulses, Wiener filtering, zero-phase filtering, mean filtering and weighted average filtering, least mean square algorithm LMS adaptive filtering, etc.
[0156] 2. Filtering includes particle filtering
[0157] Particle filtering is a nonlinear filtering technology based on the Monte Carlo method, which is suitable for handling state estimation problems of nonlinear and non-Gaussian systems. In audio positioning, particle filtering can be used to improve the accuracy and real-time performance of positioning, especially when the terminal device moves from the safe area to the alarm area. The following is a specific method of how to reduce the delay from the safe area to the alarm area through particle filtering:
[0158] (1) Increase the weight of the alarm area and reduce the weight of the safe area
[0159] In particle filtering, each particle has a weight, which represents the probability that the particle represents the true state. By adjusting the weight, the distribution and importance of the particles can be affected.
[0160] Specific steps:
[0161] Define areas: Clearly define the boundaries of safe areas and alarm areas.
[0162] Adjust weights: When a particle is in the alarm area, increase its weight; when a particle is in the safe area, reduce its weight. This can be achieved using the following formula:
[0163]
[0164] Among them, α>1 and β<1, ensuring that the particle weights in the alarm area are increased and the particle weights in the safe area are reduced.
[0165] (2) Increase the number of particles closer to the alarm area and improve sensitivity
[0166] Increasing the number of particles can improve the estimation accuracy of terminal devices, especially in critical areas (such as alarm areas).
[0167] Specific steps: The number of particles can be adjusted dynamically according to the position of the particles.
[0168] When particles are close to the alarm area, the number of particles is increased; when particles are far away from the alarm area, the number of particles is reduced. This can be achieved by the following formula:
[0169]
[0170] Among them, Nmax and Nmin represent the maximum and minimum number of particles, respectively.
[0171] (3) When approaching or entering the alarm area, increase the audio positioning calculation frequency, that is, the ultrasonic positioning calculation frequency
[0172] Principle: Increasing the calculation frequency can respond more quickly to changes in the terminal device's location, especially when the terminal device approaches or enters the alarm area, improving the real-time and accuracy of positioning.
[0173] Define trigger conditions: Set a trigger condition to increase the calculation frequency when particles approach or enter the alarm area.
[0174] Increase calculation frequency: When the trigger condition is met, increase the calculation frequency of audio positioning.
[0175] 403. When the target area is the alarm area, output alarm prompt information.
[0176] It should be noted that the description of step 403 in the embodiment of the present application can be referred to Figure 2 The description of step 203 in the illustrated embodiment will not be repeated here.
[0177] 404. When the target area is the warning area, output warning prompt information.
[0178] If the first current position of the terminal device is in the warning area, it is necessary to output a warning prompt message to achieve the safety protection function of the terminal device. For example, the warning prompt message is: You are in the warning area. To ensure user experience, please move to a safe area to use the terminal device. Because when in the warning area, the terminal device will continuously output warning prompt messages, which is a very bad experience for the user, so the user can be prompted to move to a safe area to use the terminal device.
[0179] In some possible implementation manners, outputting a warning prompt message may specifically include at least one of the following:
[0180] Playing the warning prompt message through a speaker;
[0181] Displaying the warning prompt message on a display interface;
[0182] Outputting vibrations corresponding to a second frequency and a second amplitude, where the second frequency is less than the first frequency and the second amplitude is less than the first amplitude.
[0183] In this technical solution, several implementation manners are provided for outputting a warning prompt message, which improves the feasibility of the solution. By different means, the warning prompt message is output to implement the security protection function of the terminal device. As Figure 5A shown, it is a schematic diagram of playing the warning prompt message through a speaker in an embodiment of the present application. As Figure 5B shown, it is a schematic diagram of displaying the warning prompt message on the display interface in an embodiment of the present application.
[0184] In an embodiment of the present application, the arrival time of the first ultrasonic signals transmitted by each base station is obtained, and the ultrasonic arrival phase difference TDOA algorithm is used to calculate the first current position of the terminal device, and the base stations are located at different positions indoors; according to the first current position and the pre-divided areas, the target area where the first current position is located is determined, and the pre-divided areas include a safe area and an alarm area, and the distance between the alarm area and the indoor exit is less than the distance between the safe area and the indoor exit; when the target area is the alarm area, an alarm prompt message is output; when the target area is the warning area, a warning prompt message is output. It is used to improve the positioning accuracy of the terminal device without modifying the hardware of the terminal device, and while implementing the security protection function of the terminal device, it also improves the user's product experience. Through TDOA audio positioning and constructing a regional fence, the regional positioning function is realized; the problem of inability to locate in abnormal scenarios can also be solved by processing audio conflicts and environmental interference adaptively.
[0185] As Figure 6 shown, it is a schematic diagram of an embodiment of an alarm prompt device for an indoor terminal device in an embodiment of the present application. The device is applied to the terminal device, and the device may include:
[0186] A calculation module 601, configured to obtain the arrival time of the first ultrasonic signals transmitted by each base station, and use the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device, and the base stations are located at different positions indoors;
[0187] A determination module 602 is used to determine a target area where the first current position is located according to the first current position and a pre-divided area, wherein the pre-divided area includes a safe area and an alarm area, and a distance between the alarm area and the indoor exit is smaller than a distance between the safe area and the indoor exit;
[0188] The alarm module 603 is used to output alarm prompt information when the target area is the alarm area.
[0189] In some possible implementations, the pre-divided area also includes a warning area, and the distance between the warning area and the indoor exit is smaller than the distance between the safety area and the indoor exit, and larger than the distance between the alarm area and the indoor exit; the warning module 604 is also used to output warning prompt information when the target area is the warning area.
[0190] In some possible implementations, the arrival time of the first ultrasonic signal transmitted by each base station is obtained according to the first ultrasonic signal configuration parameter; the transceiver module 605 is used to send indication information to the main base station if noise interference is detected, the indication information is used to indicate the presence of noise interference, and the base stations include the main base station; receive the second ultrasonic signal configuration parameter sent by the main base station according to the indication information, the second ultrasonic signal configuration parameter includes a second ultrasonic frequency that is different from the first ultrasonic frequency included in the first ultrasonic signal configuration parameter;
[0191] The calculation module 601 is also used to obtain the arrival time of the second ultrasonic signal of each base station according to the second ultrasonic signal configuration parameters; and calculate the second current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm according to the arrival time of the second ultrasonic signal of each base station.
[0192] In some possible implementations, the calculation module 601 is specifically used to obtain the arrival time of the first ultrasonic signal transmitted by each base station in a shared manner when the terminal device is in a call scene or a camera scene.
[0193] In some possible implementations, the calculation module 601 is also used to filter the first current position to obtain the filtered first current position; specifically, determine the target area where the first current position is located based on the filtered first current position and the pre-divided area.
[0194] In some possible implementations, the calculation module 601 is specifically used to obtain the arrival time of the first ultrasonic signal transmitted by each base station; filter the arrival time of the first ultrasonic signal of each base station to obtain the arrival time of the first ultrasonic signal after filtering at each base station; and calculate the first current position of the terminal device based on the arrival time of the first ultrasonic signal after filtering at each base station using the ultrasonic arrival phase difference TDOA algorithm.
[0195] In some possible implementations, the calculation module 601 is specifically used to obtain the arrival time of the first ultrasonic signal transmitted by each base station; based on the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal, the ultrasonic arrival phase difference TDOA algorithm is used to calculate the first current position of the terminal device.
[0196] In some possible implementations, the calculation module 601 is specifically used to calculate the first ultrasonic arrival time difference of each base station according to the arrival time of the first ultrasonic signal emitted by each base station and the preset sending time of the first ultrasonic signal of each base station; calculate the distance between each base station and the terminal device according to the first ultrasonic arrival time difference of each base station and the ultrasonic signal propagation speed; calculate the first coordinates of the terminal device according to the preset coordinates of each base station and the distance between each base station and the terminal device.
[0197] In some possible implementations, the calculation module 601 is specifically used to calculate the difference between the first ultrasonic arrival time differences between different base stations based on the first ultrasonic arrival time differences of each base station; calculate the difference between the distances between each base station and the terminal device based on the difference between the first ultrasonic arrival time differences between the different base stations and the ultrasonic signal propagation speed; calculate the first coordinates of the terminal device based on the preset coordinates of each base station and the difference between the distances between each base station and the terminal device.
[0198] In some possible implementations, the calculation module 601 is specifically used to calculate the first coordinates of the terminal device using the Taylor series method and the least squares method based on the coordinates of the preset base stations and the difference in distances between the base stations and the terminal device.
[0199] like Figure 7 As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include: Figure 6 The alarm prompt device of the indoor terminal equipment is shown.
[0200] like Figure 8 FIG. 1 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present application. Figure 8 A detailed introduction to the various components of the mobile phone in the terminal device:
[0201] The RF circuit 810 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 880 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 810 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 810 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0202] The memory 820 can be used to store software programs and modules. The processor 880 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 820. The memory 820 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 820 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0203] The input unit 830 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 831 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 880, and can receive and execute commands sent by the processor 880. In addition, the touch panel 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 831, the input unit 830 may also include other input devices 832. Specifically, the other input devices 832 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0204] The display unit 840 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 840 may include a display panel 841. Optionally, the display panel 841 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 831 may cover the display panel 841. When the touch panel 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of touch event. Subsequently, the processor 880 provides a corresponding visual output on the display panel 841 according to the type of touch event. Although in Figure 8 In the embodiment, the touch panel 831 and the display panel 841 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 831 and the display panel 841 can be integrated to realize the input and output functions of the mobile phone.
[0205] The mobile phone may also include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 841 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0206] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the mobile phone. The audio circuit 860 can transmit the received audio data to the speaker 861 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then sent to another mobile phone through the RF circuit 810, or the audio data is output to the memory 820 for further processing.
[0207] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 870. It provides users with wireless broadband Internet access. Figure 8 A Wi-Fi module 870 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0208] The processor 880 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory 820, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 880.
[0209] The mobile phone further includes a power source 890 (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the processor 880 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system.
[0210] Although not shown, the mobile phone may further include a camera, a Bluetooth module, etc., which will not be elaborated here.
[0211] In an embodiment of the present application, the processor 880 is configured to obtain the arrival time of the first ultrasonic signals transmitted by each base station, and use the ultrasonic arrival phase difference TDOA algorithm to calculate the first current position of the terminal device, where the base stations are located at different positions indoors; determine the target area where the first current position is located according to the first current position and the pre-divided areas, the pre-divided areas include a safe area and an alarm area, and the distance between the alarm area and the indoor exit is less than the distance between the safe area and the indoor exit; and output an alarm prompt message when the target area is the alarm area.
[0212] In some possible implementation manners, the pre-divided areas further include a warning area, the distance between the warning area and the indoor exit is less than the distance between the safe area and the indoor exit, and greater than the distance between the alarm area and the indoor exit; the processor 880 is further configured to output a warning prompt message when the target area is the warning area.
[0213] In some possible implementation manners, the arrival time of the first ultrasonic signals transmitted by each base station is obtained according to the first ultrasonic signal configuration parameters; the RF circuit 810 is configured to send an indication message to the main base station if it detects the existence of noise interference, the indication message is used to indicate the existence of noise interference, and each base station includes the main base station; and receive the second ultrasonic signal configuration parameters sent by the main base station according to the indication message, where the second ultrasonic frequency included in the second ultrasonic signal configuration parameters is different from the first ultrasonic frequency included in the first ultrasonic signal configuration parameters.
[0214] The processor 880 is further configured to obtain the arrival time of the second ultrasonic signals of each base station according to the second ultrasonic signal configuration parameters; and calculate the second current position of the terminal device according to the arrival time of the second ultrasonic signals of each base station by using the ultrasonic arrival phase difference TDOA algorithm.
[0215] In some possible implementation manners, the processor 880 is specifically configured to obtain the arrival time of the first ultrasonic signals transmitted by each base station in a sharing manner when the terminal device is in a call scenario or a camera scenario.
[0216] In some possible implementations, the processor 880 is further used to filter the first current position to obtain the filtered first current position; and determine the target area where the first current position is located based on the filtered first current position and the pre-divided area.
[0217] In some possible implementations, the processor 880 is specifically used to obtain the arrival time of the first ultrasonic signal transmitted by each base station; filter the arrival time of the first ultrasonic signal of each base station to obtain the arrival time of the first ultrasonic signal after filtering at each base station; and calculate the first current position of the terminal device based on the arrival time of the first ultrasonic signal after filtering at each base station using the ultrasonic arrival phase difference TDOA algorithm.
[0218] In some possible implementations, the processor 880 is specifically used to obtain the arrival time of the first ultrasonic signal transmitted by each base station; based on the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal, the ultrasonic arrival phase difference TDOA algorithm is used to calculate the first current position of the terminal device.
[0219] In some possible implementations, the processor 880 is specifically used to calculate the first ultrasonic arrival time difference of each base station according to the arrival time of the first ultrasonic signal emitted by each base station and the preset sending time of the first ultrasonic signal of each base station; calculate the distance between each base station and the terminal device according to the first ultrasonic arrival time difference of each base station and the ultrasonic signal propagation speed; calculate the first coordinates of the terminal device according to the preset coordinates of each base station and the distance between each base station and the terminal device.
[0220] In some possible implementations, the processor 880 is specifically configured to calculate the difference between the first ultrasonic arrival time differences between different base stations based on the first ultrasonic arrival time differences of each base station; calculate the difference between the distances between each base station and the terminal device based on the difference between the first ultrasonic arrival time differences between the different base stations and the ultrasonic signal propagation speed; and calculate the first coordinates of the terminal device based on the preset coordinates of each base station and the difference between the distances between each base station and the terminal device.
[0221] In some possible implementations, the processor 880 is specifically used to calculate the first coordinates of the terminal device using the Taylor series method and the least squares method based on the coordinates of the preset base stations and the difference in distances between the base stations and the terminal device.
[0222] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0223] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0224] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0225] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0226] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0227] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0228] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An alarm prompt method for indoor terminal equipment, characterized in that: The method is applied to a terminal device, and the method comprises: Acquire the arrival time of the first ultrasonic signal transmitted by each base station, and calculate the first current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm, wherein each base station is located at a different position indoors; Determine a target area where the first current position is located according to the first current position and a pre-divided area, wherein the pre-divided area includes a safe area and an alarm area, and a distance between the alarm area and an indoor exit is smaller than a distance between the safe area and the indoor exit; When the target area is the warning area, an alarm prompt message is output.
2. The method according to claim 1, characterized in that The pre-divided area also includes an early warning area, and the distance between the early warning area and the indoor exit is less than the distance between the safety area and the indoor exit, and greater than the distance between the alarm area and the indoor exit; the method further includes: When the target area is the warning area, warning prompt information is output.
3. The method according to claim 1 or 2, characterized in that: The arrival time of the first ultrasonic signal transmitted by each base station is obtained according to the first ultrasonic signal configuration parameter; the method further includes: If noise interference is detected, sending indication information to a primary base station, where the indication information is used to indicate the presence of noise interference, and the base stations include the primary base station; receiving a second ultrasonic signal configuration parameter sent by the primary base station according to the indication information, wherein a second ultrasonic frequency included in the second ultrasonic signal configuration parameter is different from a first ultrasonic frequency included in the first ultrasonic signal configuration parameter; Acquiring the arrival time of the second ultrasonic signal of each base station according to the second ultrasonic signal configuration parameter; According to the arrival time of the second ultrasonic signals of each base station, the second current position of the terminal device is calculated using the ultrasonic arrival phase difference TDOA algorithm.
4. The method according to claim 1 or 2, characterized in that: The obtaining of the arrival time of the first ultrasonic signal transmitted by each base station includes: When the terminal device is in a call scene or a video recording scene, the arrival time of the first ultrasonic signal emitted by each base station is obtained in a shared manner.
5. The method according to claim 1 or 2, characterized in that: The method further comprises: Performing filtering on the first current position to obtain a first current position after filtering; The determining, according to the first current position and the pre-divided area, a target area where the first current position is located includes: According to the first current position after the filtering process and the pre-divided area, a target area where the first current position is located is determined.
6. The method according to claim 1 or 2, characterized in that: The method of obtaining the arrival time of the first ultrasonic signal transmitted by each base station and calculating the first current position of the terminal device by using the ultrasonic arrival phase difference TDOA algorithm includes: Acquire the arrival time of the first ultrasonic signal transmitted by each base station; Performing filtering processing on the arrival time of the first ultrasonic signal of each base station to obtain the arrival time of the first ultrasonic signal of each base station after filtering processing; According to the arrival time of the first ultrasonic signal after filtering by each base station, the first current position of the terminal device is calculated using the ultrasonic arrival phase difference TDOA algorithm.
7. The method according to claim 1 or 2, characterized in that: The method of obtaining the arrival time of the first ultrasonic signal transmitted by each base station and calculating the first current position of the terminal device by using the ultrasonic arrival phase difference TDOA algorithm includes: Acquire the arrival time of the first ultrasonic signal transmitted by each base station; According to the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal, the first current position of the terminal device is calculated using the ultrasonic arrival phase difference TDOA algorithm.
8. The method according to claim 7, characterized in that The method of calculating the first current position of the terminal device by using an ultrasonic arrival phase difference TDOA algorithm according to the arrival time of the first ultrasonic signal transmitted by each base station, the preset coordinates of each base station and the sending time of the first ultrasonic signal includes: Calculating the first ultrasonic arrival time difference of each base station according to the arrival time of the first ultrasonic signal transmitted by each base station and the preset sending time of the first ultrasonic signal of each base station; Calculating the distance between each base station and the terminal device according to the first ultrasonic arrival time difference of each base station and the ultrasonic signal propagation speed; The first coordinates of the terminal device are calculated based on the preset coordinates of each base station and the distance between each base station and the terminal device.
9. The method according to claim 8, characterized in that The calculating the distance between each base station and the terminal device according to the first ultrasonic arrival time difference and the ultrasonic signal propagation speed of each base station includes: Calculating the difference between the first ultrasonic arrival time differences between different base stations according to the first ultrasonic arrival time differences of each base station; Calculate the difference in distance between each base station and the terminal device according to the difference between the first ultrasonic arrival time differences between the different base stations and the ultrasonic signal propagation speed; The calculating, according to the preset coordinates of each base station and the distance between each base station and the terminal device, the first coordinates of the terminal device includes: The first coordinates of the terminal device are calculated based on the preset coordinates of each base station and the difference in distance between each base station and the terminal device.
10. The method according to claim 9, characterized in that The calculating, according to the preset coordinates of each base station and the difference between the distances between each base station and the terminal device, the first coordinates of the terminal device includes: According to the preset coordinates of each base station and the difference in distance between each base station and the terminal device, the first coordinates of the terminal device are calculated using the Taylor series method and the least squares method.
11. An alarm prompt device for indoor terminal equipment, characterized in that: The device is applied to a terminal device, and the device includes: A calculation module, used to obtain the arrival time of the first ultrasonic signal transmitted by each base station, and calculate the first current position of the terminal device using the ultrasonic arrival phase difference TDOA algorithm, wherein each base station is located at a different position indoors; a determination module, configured to determine a target area where the first current position is located according to the first current position and a pre-divided area, wherein the pre-divided area includes a safe area and an alarm area, and a distance between the alarm area and an indoor exit is smaller than a distance between the safe area and the indoor exit; The alarm module is used to output alarm prompt information when the target area is the alarm area.
12. A terminal device, characterized in that: include: A memory, a processor, and a display, wherein the memory stores a computer program that can be run on the processor, and when the terminal device executes the program, the method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.